Touch & controller basics
D2R Mobile translates multi-touch input into native gamepad events and direct UI interactions using an internal state machine. This guide details real touch gestures across menus, combat, and inventory panels, HUD overlay integration, and physical gamepad connectivity on iOS and Mac.
Dual Input Architecture
The Nintendo Switch version of Diablo II: Resurrected natively recognizes two input methods: gamepad buttons/sticks and direct touchscreen coordinates. The D2R Mobile iOS shell (dm/ios) bridges touch events into these formats through an internal pure C state machine (Sources/dm_touch_controls.c).
The state machine classifies finger contacts across three distinct operational contexts, driven by internal game navigation messages (dm_tc_navigation):
- Front-End Screens (Main Menu, Character Selection, Creation):
The virtual analog stick and skill clusters are hidden. Screen touches translate directly into UI cursor clicks (
dm_ui_touch), allowing you to select classes, adjust options, or tap interface buttons directly. - In-Game Exploration & Combat (No Panels Open): The screen divides into functional control zones:
- Left Zone: Virtual analog stick translating thumb movement into left-stick axes.
- Right Zone: Skill action buttons translating taps into gamepad button presses (X, Y, B, A, ZR, ZL).
- Bottom Bar: Access to belt potions, town portal, and menu shortcuts.
- World Targeting: Tapping a monster, item nameplate, chest, or NPC dispatches coordinates to
dm_ui_world_tapfor engine target resolution. Tapping empty ground dispatches no input. - In-Game Panels (Inventory, Stash, Cube, Skill Trees): When an interface panel opens, controls switch to direct panel interaction based on the engine's internal panel hierarchy:
- Single Tap: Selects an item and displays its stat tooltip.
- Double Tap: Uses, drinks, or equips/unequips the item.
- Long Press / Drag & Drop: Picks up an item to move it between grid cells, stash tabs, or the cube.
- Dismissal: Tapping outside the active panel perimeter closes it immediately.
HUD Overlay Composition
D2R Mobile minimizes artificial UI layers by repurposing the game's original assets:
- Original HUD Widgets: Life orb, mana orb, belt slots, town portal, and system buttons are native Switch HUD elements repositioned and scaled via an overlay RomFS layout file (
Gen/romfs_overlay). - Shell-Drawn Elements: Experience bar graphics and belt slot count numbers are rendered directly by the shell.
- Skill Buttons & Stick: Rendered as an independent UIKit overlay (
DmTouchOverlay.m) that floats above the Metal viewport. Skill icons are extracted dynamically from the game's skill atlas, and active bindings are read directly from running memory (dm_touch_game_bridge.c).
Physical Gamepads & macOS Controls
iOS and iPadOS
A controller supported by the device’s operating system can route input through Apple's Game Controller framework. Pair it in system Bluetooth settings first; support depends on the controller model and OS version. Pressing any physical controller button immediately hides touch overlays and switches interface hints back to gamepad glyphs.
macOS Desktop Controls
On Apple Silicon Mac desktop builds (D2R Mobile.app and D2R Mobile M3.app), input adapts to desktop hardware:
- Keyboard Navigation: Move with W, A, S, D; confirm with Space or J; cancel/menu with Esc or K; toggle minimap with Tab; open menu with =.
- Mouse Controls: Left-click empty ground to pathfind and walk; click and hold to continuously walk toward the cursor; left-click monsters to attack with the primary skill bound to J; click world objects to interact; drag and drop items across inventory grids; right-click executes back/cancel (B).
Frequently Asked Questions
Can I connect an Xbox or PlayStation controller to D2R Mobile?
Yes. D2R Mobile natively integrates with Apple's Game Controller framework. Pairing an Xbox Wireless Controller, PlayStation DualSense (PS5), DualShock 4, or Nintendo Switch Pro Controller via Bluetooth immediately routes hardware inputs to the game engine and switches on-screen hints to gamepad button letters.
How do touch gestures work in inventory and stash panels?
In inventory or dialogue panels, touch operates directly on the interface: a single tap on an item selects it and displays its description; a double tap equips or consumes it; a long press or drag-and-drop moves the item between slots, the Horadric Cube, or stash pages. Tapping outside the panel closes it.
Can I adjust the virtual joystick position or size in the settings?
No. There are no in-game sliders, deadzone adjustments, or floating joystick toggles. The virtual analog stick and skill clusters are positioned at build time through an overlay RomFS layout and rendered on top of the scene by the UIKit overlay layer.