Fix controller mapping platform, player index sync, and socket errors (#251)

* Fix macOS controller platform, sync player indices, and preserve socket send error

- Preserve captured socket send error across diagnostic logging in network_socket.cpp
- Use SDL_GetPlatform() instead of hardcoded Windows in controller mapping wizard
- Synchronize Aurora and SDL player indices on port assignment and clear in pad.cpp
- Auto-assign Player 1 on macOS when unconfigured in input.cpp

* fix(input): refine macOS port 0 assignment and persistence logic

- Persist port 0 preference for newly connected controller even if already assigned player index 0
- Verify controller has no preference on other ports before assigning to port 0
This commit is contained in:
Michael G
2026-09-24 16:01:49 -04:00
committed by GitHub
parent a9c9c0de26
commit 85f250155f
4 changed files with 32 additions and 6 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include <imgui.h>
#include <SDL3/SDL_gamepad.h>
#include <SDL3/SDL_joystick.h>
#include <SDL3/SDL_platform.h>
#include <algorithm>
#include <array>
@@ -146,7 +147,7 @@ std::string BuildMappingString() {
mapping += std::string(kSteps[i].mappingKey) + ":" + *g_wizard.bindings[i] + ",";
}
}
mapping += "platform:Windows,";
mapping += std::string("platform:") + SDL_GetPlatform() + ",";
return mapping;
}