mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-11 03:43:37 -05:00
Users are reporting a crash at the point where WiimoteAndroid::IORead tries to use m_java_wiimote_payload. This commit solves the problem by making m_java_wiimote_payload a global reference. The code for setting up m_java_wiimote_payload has also been moved to the constructor just because that way it's impossible for it to run twice. (If the code as written were to run a second time, the old global reference would be leaked. ConnectInternal should only run once, so this is just to be on the safe side.) Fixes https://bugs.dolphin-emu.org/issues/13960.