From 2bcb28278d47f02035bedafade6895759cfc4203 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Sat, 16 Mar 2019 22:01:12 -0400 Subject: [PATCH] avoid a re-init of current joystick (this generally happens on first os_poll() call) --- src/osapi/osapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osapi/osapi.cpp b/src/osapi/osapi.cpp index 7634dc4..c3c20d3 100644 --- a/src/osapi/osapi.cpp +++ b/src/osapi/osapi.cpp @@ -388,7 +388,7 @@ void os_poll() } case SDL_JOYDEVICEADDED: { - if ( !Is_standalone ) { + if ( !Is_standalone && (e.jdevice.which != joystick_get_id()) ) { joy_reinit(e.jdevice.which); } -- 2.39.2