Skip to content

Commit 3a6518f

Browse files
briaguya-aibriaguya
and
briaguya
authored
set SDL_HINT_JOYSTICK_THREAD to address dropped input issues (Kenix3#796)
i was testing the "z-target dropping" issue in soh and added some logging to `SDLAxisDirectionToButtonMapping` where we call `SDL_GameControllerGetAxis` i found that when reproducing the z-target drop error the value we got from there would occasionally drop from the max (trigger held down) to `0` for a single frame i searched for issues on the SDL repo related to `SDL_GameControllerGetAxis` and found libsdl-org/SDL#9270 this hint was recommended and the original reporter of that issue said it fixed it for them i was not able to reproduce the dropped z-target issue after applying this hint Co-authored-by: briaguya <briaguya@shipdev>
1 parent 2e7d1fe commit 3a6518f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/public/libultra/os.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ int32_t osContInit(OSMesgQueue* mq, uint8_t* controllerBits, OSContStatus* statu
1414
*controllerBits = 0;
1515
status->status |= 1;
1616

17+
SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
1718
if (SDL_Init(SDL_INIT_GAMECONTROLLER) != 0) {
1819
SPDLOG_ERROR("Failed to initialize SDL game controllers ({})", SDL_GetError());
1920
exit(EXIT_FAILURE);

0 commit comments

Comments
 (0)