[Project64] Create gui callback on paused
This commit is contained in:
parent
e4bd5eae74
commit
3b74fef76c
|
@ -452,12 +452,10 @@ void CN64System::Pause()
|
||||||
}
|
}
|
||||||
m_hPauseEvent.Reset();
|
m_hPauseEvent.Reset();
|
||||||
g_Settings->SaveBool(GameRunning_CPU_Paused, true);
|
g_Settings->SaveBool(GameRunning_CPU_Paused, true);
|
||||||
Notify().RefreshMenu();
|
|
||||||
g_Notify->DisplayMessage(5, MSG_CPU_PAUSED);
|
g_Notify->DisplayMessage(5, MSG_CPU_PAUSED);
|
||||||
m_hPauseEvent.IsTriggered(SyncEvent::INFINITE_TIMEOUT);
|
m_hPauseEvent.IsTriggered(SyncEvent::INFINITE_TIMEOUT);
|
||||||
m_hPauseEvent.Reset();
|
m_hPauseEvent.Reset();
|
||||||
g_Settings->SaveBool(GameRunning_CPU_Paused, (DWORD)false);
|
g_Settings->SaveBool(GameRunning_CPU_Paused, false);
|
||||||
Notify().RefreshMenu();
|
|
||||||
Notify().DisplayMessage(5, MSG_CPU_RESUMED);
|
Notify().DisplayMessage(5, MSG_CPU_RESUMED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ m_ResetInfo(NULL)
|
||||||
g_Settings->RegisterChangeCB(RomBrowser_ColoumnsChanged, this, (CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
g_Settings->RegisterChangeCB(RomBrowser_ColoumnsChanged, this, (CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||||
g_Settings->RegisterChangeCB(RomBrowser_Recursive, this, (CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
g_Settings->RegisterChangeCB(RomBrowser_Recursive, this, (CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||||
g_Settings->RegisterChangeCB(GameRunning_LoadingInProgress, this, (CSettings::SettingChangedFunc)LoadingInProgressChanged);
|
g_Settings->RegisterChangeCB(GameRunning_LoadingInProgress, this, (CSettings::SettingChangedFunc)LoadingInProgressChanged);
|
||||||
|
g_Settings->RegisterChangeCB(GameRunning_CPU_Paused, this, (CSettings::SettingChangedFunc)GamePaused);
|
||||||
g_Settings->RegisterChangeCB(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
g_Settings->RegisterChangeCB(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ CMainGui::~CMainGui(void)
|
||||||
g_Settings->UnregisterChangeCB(RomBrowser_ColoumnsChanged, this, (CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
g_Settings->UnregisterChangeCB(RomBrowser_ColoumnsChanged, this, (CSettings::SettingChangedFunc)RomBowserColoumnsChanged);
|
||||||
g_Settings->UnregisterChangeCB(RomBrowser_Recursive, this, (CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
g_Settings->UnregisterChangeCB(RomBrowser_Recursive, this, (CSettings::SettingChangedFunc)RomBrowserRecursiveChanged);
|
||||||
g_Settings->UnregisterChangeCB(GameRunning_LoadingInProgress, this, (CSettings::SettingChangedFunc)LoadingInProgressChanged);
|
g_Settings->UnregisterChangeCB(GameRunning_LoadingInProgress, this, (CSettings::SettingChangedFunc)LoadingInProgressChanged);
|
||||||
|
g_Settings->UnregisterChangeCB(GameRunning_CPU_Paused, this, (CSettings::SettingChangedFunc)GamePaused);
|
||||||
g_Settings->UnregisterChangeCB(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
g_Settings->UnregisterChangeCB(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
||||||
}
|
}
|
||||||
if (m_hMainWindow)
|
if (m_hMainWindow)
|
||||||
|
@ -184,6 +186,11 @@ void CMainGui::GameLoaded(CMainGui * Gui)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMainGui::GamePaused(CMainGui * Gui)
|
||||||
|
{
|
||||||
|
Gui->RefreshMenu();
|
||||||
|
}
|
||||||
|
|
||||||
void RomBowserColoumnsChanged(CMainGui * Gui)
|
void RomBowserColoumnsChanged(CMainGui * Gui)
|
||||||
{
|
{
|
||||||
Gui->ResetRomBrowserColomuns();
|
Gui->ResetRomBrowserColomuns();
|
||||||
|
|
|
@ -115,6 +115,7 @@ private:
|
||||||
friend void RomBrowserRecursiveChanged(CMainGui * Gui);
|
friend void RomBrowserRecursiveChanged(CMainGui * Gui);
|
||||||
static void LoadingInProgressChanged(CMainGui * Gui);
|
static void LoadingInProgressChanged(CMainGui * Gui);
|
||||||
static void GameLoaded(CMainGui * Gui);
|
static void GameLoaded(CMainGui * Gui);
|
||||||
|
static void GamePaused(CMainGui * Gui);
|
||||||
|
|
||||||
CBaseMenu * m_Menu;
|
CBaseMenu * m_Menu;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue