mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 10:00:27 +02:00
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 (cherry picked from commit 85f250155f8f397c1c463dc51dd4dc2707371d06) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011tcyLz63pXjoYEwsFjfg8F
This commit is contained in:
1 parent
794b715d31
commit
152c4f5f38
4 files changed
+32
-6
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,8 @@ int32_t HandleIpTopIoctlv(uint32_t cmd, const std::vector<IoVector>& in, const s
|
||||
const int ret = sendto(s->native, reinterpret_cast<const char*>(sendData), static_cast<int>(sendSize),
|
||||
static_cast<int>(flags), destPtr, destLen);
|
||||
const int hostError = ret < 0 ? NativeLastError() : 0;
|
||||
int32_t result = SocketResult(ret);
|
||||
// Diagnostics may change the native error; use the send result captured above.
|
||||
int32_t result = ret >= 0 ? SocketResult(ret) : SocketErrorResult(hostError);
|
||||
if (patchedWrite && ret == static_cast<int>(sendSize)) {
|
||||
result = static_cast<int32_t>(in[0].size);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user