mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 12:34:37 +00:00
Print error on SDL_SetGamepadPlayerIndex failure
This commit is contained in:
parent
f29d79ec40
commit
e26ed73533
@ -287,7 +287,10 @@ void GameControllers::TryOpenSDLControllers(GameControllers& controllers) {
|
|||||||
controllers[i]->m_sdl_gamepad = pad;
|
controllers[i]->m_sdl_gamepad = pad;
|
||||||
controllers[i]->user_id = i + 1;
|
controllers[i]->user_id = i + 1;
|
||||||
slot_taken[i] = true;
|
slot_taken[i] = true;
|
||||||
SDL_SetGamepadPlayerIndex(pad, i);
|
bool err = SDL_SetGamepadPlayerIndex(pad, i);
|
||||||
|
if (!err) {
|
||||||
|
LOG_ERROR(Input, "Failed to set controller index: {}", SDL_GetError());
|
||||||
|
}
|
||||||
AddUserServiceEvent(
|
AddUserServiceEvent(
|
||||||
{OrbisUserServiceEventType::Login, SDL_GetGamepadPlayerIndex(pad) + 1});
|
{OrbisUserServiceEventType::Login, SDL_GetGamepadPlayerIndex(pad) + 1});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user