From b5c0efd5acc4bf8e13963ca9216dd408ee50c8d6 Mon Sep 17 00:00:00 2001 From: tmator Date: Tue, 17 Feb 2009 22:05:34 +0000 Subject: [PATCH] fix nowx njoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2292 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp | 3 ++- Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp index 5b75c43f95..beb189736f 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/Config.cpp @@ -37,8 +37,9 @@ #include "Common.h" Config g_Config; +#if defined(HAVE_WX) && HAVE_WX extern ConfigBox* m_frame; - +#endif ////////////////////////////////// diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp index 5fa651fc3f..eb813e59ad 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -257,12 +257,14 @@ void Initialize(void *init) #endif // Populate joyinfo for all attached devices if the configuration window is not already open +#if defined(HAVE_WX) && HAVE_WX if(!m_frame) { Search_Devices(joyinfo, NumPads, NumGoodPads); // Check if a DirectInput error occured if(ReloadDLL()) g_PADInitialize->padNumber = -1; } +#endif } bool Search_Devices(std::vector &_joyinfo, int &_NumPads, int &_NumGoodPads) @@ -309,8 +311,9 @@ void Shutdown() // Don't shutdown the gamepad if the configuration window is still showing // Todo: Coordinate with the Wiimote plugin, SDL_Quit() will remove the pad for it to +#if defined(HAVE_WX) && HAVE_WX if (m_frame) return; - +#endif /* Close all devices carefully. We must check that we are not accessing any undefined vector elements or any bad devices */ for (int i = 0; i < 4; i++)