[Project64] Add GameLoaded setting
This commit is contained in:
parent
51c89388c7
commit
73d7263de0
|
@ -181,6 +181,7 @@ bool CN64System::RunFileImage(const char * FileLoc)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
WriteTrace(TraceDebug, __FUNCTION__ ": Mark Rom as loading");
|
WriteTrace(TraceDebug, __FUNCTION__ ": Mark Rom as loading");
|
||||||
|
g_Settings->SaveString(Game_File, "");
|
||||||
|
|
||||||
//Mark the rom as loading
|
//Mark the rom as loading
|
||||||
g_Settings->SaveBool(GameRunning_LoadingInProgress, true);
|
g_Settings->SaveBool(GameRunning_LoadingInProgress, true);
|
||||||
|
@ -201,10 +202,7 @@ bool CN64System::RunFileImage(const char * FileLoc)
|
||||||
{
|
{
|
||||||
g_System->RefreshGameSettings();
|
g_System->RefreshGameSettings();
|
||||||
|
|
||||||
WriteTrace(TraceDebug, __FUNCTION__ ": Add Recent Rom");
|
g_Settings->SaveString(Game_File, FileLoc);
|
||||||
Notify().AddRecentRom(FileLoc);
|
|
||||||
Notify().SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str());
|
|
||||||
|
|
||||||
g_Settings->SaveBool(GameRunning_LoadingInProgress, false);
|
g_Settings->SaveBool(GameRunning_LoadingInProgress, false);
|
||||||
|
|
||||||
if (g_Settings->LoadDword(Setting_AutoStart) != 0)
|
if (g_Settings->LoadDword(Setting_AutoStart) != 0)
|
||||||
|
@ -275,9 +273,6 @@ void CN64System::StartEmulation2(bool NewThread)
|
||||||
if (NewThread)
|
if (NewThread)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceDebug, __FUNCTION__ ": Starting");
|
WriteTrace(TraceDebug, __FUNCTION__ ": Starting");
|
||||||
|
|
||||||
Notify().HideRomBrowser();
|
|
||||||
|
|
||||||
if (bHaveDebugger())
|
if (bHaveDebugger())
|
||||||
{
|
{
|
||||||
g_LogOptions.GenerateLog = g_Settings->LoadBool(Debugger_GenerateDebugLog);
|
g_LogOptions.GenerateLog = g_Settings->LoadBool(Debugger_GenerateDebugLog);
|
||||||
|
@ -1805,7 +1800,7 @@ bool CN64System::LoadState(LPCSTR FileName)
|
||||||
SetActiveSystem(true);
|
SetActiveSystem(true);
|
||||||
SyncCPU(m_SyncCPU);
|
SyncCPU(m_SyncCPU);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WriteTrace(TraceDebug, __FUNCTION__ ": 13");
|
WriteTrace(TraceDebug, __FUNCTION__ ": 13");
|
||||||
std::wstring LoadMsg = g_Lang->GetString(MSG_LOADED_STATE);
|
std::wstring LoadMsg = g_Lang->GetString(MSG_LOADED_STATE);
|
||||||
g_Notify->DisplayMessage(5, stdstr_f("%s %s", LoadMsg.c_str(), CPath(FileNameStr).GetNameExtension()).ToUTF16().c_str());
|
g_Notify->DisplayMessage(5, stdstr_f("%s %s", LoadMsg.c_str(), CPath(FileNameStr).GetNameExtension()).ToUTF16().c_str());
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -105,6 +105,7 @@ enum SettingID
|
||||||
|
|
||||||
//Individual Game Settings
|
//Individual Game Settings
|
||||||
Game_IniKey,
|
Game_IniKey,
|
||||||
|
Game_File,
|
||||||
Game_GameName,
|
Game_GameName,
|
||||||
Game_GoodName,
|
Game_GoodName,
|
||||||
Game_TempLoaded,
|
Game_TempLoaded,
|
||||||
|
|
|
@ -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(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if this fails then it has already been created
|
//if this fails then it has already been created
|
||||||
|
@ -66,6 +67,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(Game_File, this, (CSettings::SettingChangedFunc)GameLoaded);
|
||||||
}
|
}
|
||||||
if (m_hMainWindow)
|
if (m_hMainWindow)
|
||||||
{
|
{
|
||||||
|
@ -118,6 +120,19 @@ void CMainGui::LoadingInProgressChanged(CMainGui * Gui)
|
||||||
Gui->RefreshMenu();
|
Gui->RefreshMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMainGui::GameLoaded(CMainGui * Gui)
|
||||||
|
{
|
||||||
|
stdstr FileLoc = g_Settings->LoadStringVal(Game_File);
|
||||||
|
if (FileLoc.length() > 0)
|
||||||
|
{
|
||||||
|
WriteTrace(TraceDebug, __FUNCTION__ ": Add Recent Rom");
|
||||||
|
Notify().AddRecentRom(FileLoc.c_str());
|
||||||
|
Notify().SetWindowCaption(g_Settings->LoadStringVal(Game_GoodName).ToUTF16().c_str());
|
||||||
|
|
||||||
|
Gui->HideRomList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RomBowserColoumnsChanged(CMainGui * Gui)
|
void RomBowserColoumnsChanged(CMainGui * Gui)
|
||||||
{
|
{
|
||||||
Gui->ResetRomBrowserColomuns();
|
Gui->ResetRomBrowserColomuns();
|
||||||
|
|
|
@ -112,6 +112,7 @@ private:
|
||||||
friend void RomBowserColoumnsChanged(CMainGui * Gui);
|
friend void RomBowserColoumnsChanged(CMainGui * Gui);
|
||||||
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);
|
||||||
|
|
||||||
CBaseMenu * m_Menu;
|
CBaseMenu * m_Menu;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue