Win32 - disabled savestate, loadstate, and setsaveslot hotkeys when no rom is loaded.
This commit is contained in:
parent
016a543ef3
commit
2ae4e618e5
|
@ -112,41 +112,50 @@ void HK_PrintScreen(int param)
|
||||||
|
|
||||||
void HK_StateSaveSlot(int num)
|
void HK_StateSaveSlot(int num)
|
||||||
{
|
{
|
||||||
if (!paused)
|
if (romloaded)
|
||||||
{
|
{
|
||||||
NDS_Pause();
|
if (!paused)
|
||||||
savestate_slot(num); //Savestate
|
{
|
||||||
NDS_UnPause();
|
NDS_Pause();
|
||||||
|
savestate_slot(num); //Savestate
|
||||||
|
NDS_UnPause();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
savestate_slot(num); //Savestate
|
||||||
|
|
||||||
|
lastSaveState = num; //Set last savestate used
|
||||||
|
SaveStateMessages(num, 0); //Display state loaded message
|
||||||
|
LoadSaveStateInfo();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
savestate_slot(num); //Savestate
|
|
||||||
|
|
||||||
lastSaveState = num; //Set last savestate used
|
|
||||||
SaveStateMessages(num, 0); //Display state loaded message
|
|
||||||
LoadSaveStateInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_StateLoadSlot(int num)
|
void HK_StateLoadSlot(int num)
|
||||||
{
|
{
|
||||||
BOOL wasPaused = paused;
|
if (romloaded)
|
||||||
NDS_Pause();
|
{
|
||||||
loadstate_slot(num); //Loadstate
|
BOOL wasPaused = paused;
|
||||||
lastSaveState = num; //Set last savestate used
|
NDS_Pause();
|
||||||
SaveStateMessages(num, 1); //Display state loaded message
|
loadstate_slot(num); //Loadstate
|
||||||
|
lastSaveState = num; //Set last savestate used
|
||||||
|
SaveStateMessages(num, 1); //Display state loaded message
|
||||||
|
|
||||||
Update_RAM_Watch(); //adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating
|
Update_RAM_Watch(); //adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating
|
||||||
Update_RAM_Search(); //main.cpp - case IDM_STATE_LOAD: also calls these functions
|
Update_RAM_Search(); //main.cpp - case IDM_STATE_LOAD: also calls these functions
|
||||||
|
|
||||||
if(!wasPaused)
|
if(!wasPaused)
|
||||||
NDS_UnPause();
|
NDS_UnPause();
|
||||||
else
|
else
|
||||||
Display();
|
Display();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_StateSetSlot(int num)
|
void HK_StateSetSlot(int num)
|
||||||
{
|
{
|
||||||
lastSaveState = num;
|
if (romloaded)
|
||||||
SaveStateMessages(num,2);
|
{
|
||||||
|
lastSaveState = num;
|
||||||
|
SaveStateMessages(num,2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HK_StateQuickSaveSlot(int)
|
void HK_StateQuickSaveSlot(int)
|
||||||
|
|
Loading…
Reference in New Issue