mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-01 11:12:49 +00:00
Add some basic Windows UI for save states.
This commit is contained in:
parent
fd2f609367
commit
94969c4ead
@ -18,8 +18,9 @@
|
||||
#include "main.h"
|
||||
|
||||
#include "../Core/Core.h"
|
||||
#include "../Core/System.h"
|
||||
#include "../Core/MemMap.h"
|
||||
#include "../Core/SaveState.h"
|
||||
#include "../Core/System.h"
|
||||
#include "EmuThread.h"
|
||||
|
||||
#include "resource.h"
|
||||
@ -312,18 +313,18 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case ID_FILE_LOADSTATE:
|
||||
if (W32Util::BrowseForFileName(true, hWnd, "Load state",0,"Save States (*.gcs)\0*.gcs\0All files\0*.*\0\0","gcs",fn))
|
||||
if (W32Util::BrowseForFileName(true, hWnd, "Load state",0,"Save States (*.ppssppst)\0*.ppssppst\0All files\0*.*\0\0","ppssppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SetCursor(LoadCursor(0,IDC_ARROW));
|
||||
SaveState::Load(fn, SaveStateActionFinished);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_FILE_SAVESTATE:
|
||||
if (W32Util::BrowseForFileName(false, hWnd, "Save state",0,"Save States (*.gcs)\0*.gcs\0All files\0*.*\0\0","gcs",fn))
|
||||
if (W32Util::BrowseForFileName(false, hWnd, "Save state",0,"Save States (*.ppssppst)\0*.ppssppst\0All files\0*.*\0\0","ppssppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SetCursor(LoadCursor(0,IDC_ARROW));
|
||||
SaveState::Save(fn, SaveStateActionFinished);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -766,6 +767,14 @@ namespace MainWindow
|
||||
}
|
||||
}
|
||||
|
||||
void SaveStateActionFinished(bool result)
|
||||
{
|
||||
// TODO: Improve messaging?
|
||||
if (!result)
|
||||
MessageBox(0, "Savestate failure. Please try again later.", "Sorry", MB_OK);
|
||||
SetCursor(LoadCursor(0, IDC_ARROW));
|
||||
}
|
||||
|
||||
void SetNextState(CoreState state)
|
||||
{
|
||||
nextState = state;
|
||||
|
@ -17,6 +17,7 @@ namespace MainWindow
|
||||
void SetPlaying(const char*text);
|
||||
void BrowseAndBoot();
|
||||
void SetNextState(CoreState state);
|
||||
void SaveStateActionFinished(bool result);
|
||||
void _ViewFullScreen(HWND hWnd);
|
||||
void _ViewNormal(HWND hWnd);
|
||||
}
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user