From df32603ba4065ce2cb1f8a2e6790a40aff7c0d11 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Fri, 9 Jul 2010 04:02:36 +0000 Subject: [PATCH] When refreshing real wiimotes in linux, make sure that real wiimotes have been initialized first. Thanks Billiard. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5861 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp index 0c88f4b4f4..7b8366888d 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteReal/WiimoteReal.cpp @@ -348,6 +348,13 @@ void Shutdown(void) #ifdef __linux__ void Refresh() { + // make sure real wiimotes have been initialized + if (!g_real_wiimotes_initialized) + { + Initialize(); + return; + } + // find the number of slots configured for real wiimotes unsigned int wanted_wiimotes = 0; for (unsigned int i = 0; i < MAX_WIIMOTES; ++i)