Repository navigation
Conversation
|
Note: I couldn't run |
|
Rebased onto main (4b5e515); the controller prompt keeps the keyboard while it is up and frees a captured pointer when it opens, and the mouse settings sit before Press a button to join. |
|
Rebased onto main (2e6edda), retitled to the Checked on this commit (M4 Max): host build, |
|
Now that this Mac has the chain lock's compiler (Xcode 27.2), regress.py check (full): PASSBaseline
BOTW
|
|
A crash on iOS in this branch (head 14ec16f), found while carrying it on top of current main and running the iOS Duo harness (
The harness makes a gamepad view per test and crashed at the second one. A one-line guard fixes it (a later call keeps the one timer and only takes the new output function and settings): static void ml_init(ml_out_fn out) {
g_ml.out = out; ml_settings();
+ if (g_ml.timer) return;
g_ml.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_main_queue());With it the harness runs all its tests (39, 1 skipped, 0 failures). Not yet checked on a device; a run on an iPhone (A20 Pro, iOS 27.2) with a keyboard will follow. |
iPad: a hardware keyboard (GCKeyboard) plays player 1 with the Mac's key map. With Mouse: Camera (DM_MOUSE, profile key mouse: camera by default in 3D games) the pointer is locked and a mouse's or trackpad's movement (GCMouse) is the right stick; its buttons press the profile's mouse_buttons (default Y ZL R3). Esc or the in-game menu frees the pointer, a click locks it again. The touch controls hide while the keyboard or mouse is used. Mac: the same mouse camera; a click on the picture captures the pointer. The movement comes through a local event monitor, since AppKit sends mouse-moved events to the first responder rather than the view under the pointer. mouse_look.h turns report speed into stick deflection: speed measured over at least 4 ms of reports, smoothed over 4 ms, full tilt at 1000 points a second times DM_MOUSE_SENS, plus a 0.12 offset past the game's dead zone.
|
Rebased onto current main. The Makefile conflict went away because main now tracks header dependencies itself; on focus loss, |
A hardware keyboard, mouse and trackpad play on the iPad, and the mouse turns the camera on the Mac.
iPad keyboard: a hardware keyboard (GCKeyboard) plays player 1 with the Mac's key map. WASD the left stick, the arrow keys the D-pad (Shift + arrows the right stick), J K U I = A B X Y, Q E = L R, Z C = ZL ZR, F G = L3 R3, Return +, Tab −, Space shakes the controller. Keys pressed with ⌘ held stay the system's.
iPad mouse and trackpad: with Mouse: Camera (
DM_MOUSE, new profile keymouse; defaultcamerawithpad_layout full, elsetouch) the pointer is locked throughprefersPointerLocked, GCMouse movement is the right stick, and the buttons press the profile'smouse_buttons(defaultY ZL R3). Esc (or`) or opening the in-game menu frees the pointer; a click on the picture locks it again. iPadOS only locks the pointer while the app fills the screen; otherwise, and with Mouse: Touch screen, the pointer stays a finger on the touch screen as before. The touch controls hide while the keyboard or mouse is in use and come back at the next finger touch.DM_MOUSEandDM_MOUSE_SENSare launcher settings; Mouse and trackpad is also in the in-game menu.Mac: the same mouse camera. A click on the picture captures the pointer (
CGAssociateMouseAndMouseCursorPosition), Esc or focus loss frees it. The movement is taken through a local event monitor, because AppKit sends mouse-moved events to the first responder, not to the view under the pointer.mouse_look.h(shared by both front ends) turns reports into a stick deflection: the speed of each report is measured over at least 4 ms of reports, smoothed over 4 ms on 2 ms ticks, full tilt at 1000 points/s timesDM_MOUSE_SENS, plus a 0.12 offset (DM_MOUSE_DEAD) to clear the game's dead zone. A 125 Hz mouse, a 1000 Hz mouse and a trackpad give the same speed for the same hand: with a synthetic report stream, a steady 500 pt/s gives the same deflection at 1, 8 and 16 ms report intervals.Tested: Breath of the Wild on an iPad Pro 13" M4 with a Magic Keyboard and trackpad. On the Mac, synthetic clicks and movement captured the pointer and turned the right stick.
Checks:
make -C dm/host GAME=01007EF00011E000builds,compile_check.pyreports 0 failed, and the env switches, launcher settings, game profile, docs, lint, architecture, settings and player env tests pass.