mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Small code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4768 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -168,7 +168,6 @@ void PADConfigDialognJoy::OnClose(wxCloseEvent& event)
|
||||
// Close pads, unless we are running a game
|
||||
//if (!g_EmulatorRunning) Shutdown();
|
||||
|
||||
g_FrameOpen = false;
|
||||
EndModal(wxID_CLOSE);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ std::vector<InputCommon::CONTROLLER_INFO> joyinfo;
|
||||
InputCommon::CONTROLLER_STATE PadState[4];
|
||||
InputCommon::CONTROLLER_MAPPING PadMapping[4];
|
||||
bool g_EmulatorRunning = false;
|
||||
bool g_FrameOpen = false;
|
||||
bool g_SearchDeviceDone = false;
|
||||
int NumPads = 0, NumGoodPads = 0, LastPad = 0;
|
||||
#ifdef _WIN32
|
||||
HWND m_hWnd = NULL, m_hConsole = NULL; // Handle to window
|
||||
@ -155,12 +155,13 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
|
||||
// ------------------
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
if (!g_EmulatorRunning)
|
||||
if (!g_SearchDeviceDone)
|
||||
{
|
||||
g_Config.Load(); // load settings
|
||||
// Init Joystick + Haptic (force feedback) subsystem on SDL 1.3
|
||||
// Populate joyinfo for all attached devices
|
||||
Search_Devices(joyinfo, NumPads, NumGoodPads);
|
||||
g_SearchDeviceDone = true;
|
||||
}
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
@ -171,15 +172,9 @@ void DllConfig(HWND _hParent)
|
||||
|
||||
// Only allow one open at a time
|
||||
if (!m_ConfigFrame->IsShown())
|
||||
{
|
||||
g_FrameOpen = true;
|
||||
m_ConfigFrame->ShowModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
g_FrameOpen = false;
|
||||
m_ConfigFrame->Hide();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -202,11 +197,12 @@ void Initialize(void *init)
|
||||
DEBUG_INIT();
|
||||
#endif
|
||||
|
||||
if (!g_FrameOpen)
|
||||
if (!g_SearchDeviceDone)
|
||||
{
|
||||
g_Config.Load(); // load settings
|
||||
// Populate joyinfo for all attached devices
|
||||
Search_Devices(joyinfo, NumPads, NumGoodPads);
|
||||
g_SearchDeviceDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,6 @@
|
||||
#ifdef _WIN32
|
||||
extern HWND m_hWnd, m_hConsole; // Handle to window
|
||||
#endif
|
||||
extern bool g_FrameOpen;
|
||||
extern int NumPads, NumGoodPads, LastPad; // Number of goods pads
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user