mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Improving shortcuts of Windows version.
This commit is contained in:
parent
72b13d91f8
commit
22de16d178
@ -51,7 +51,7 @@ struct DefaultKeyMap {
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_L)] = VIRTKEY_AXIS_X_MAX;
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_SHIFT_LEFT)] = VIRTKEY_RAPID_FIRE;
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_TAB)] = VIRTKEY_UNTHROTTLE;
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_F3)] = VIRTKEY_SPEED_TOGGLE;
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_F1)] = VIRTKEY_SPEED_TOGGLE;
|
||||
m[KeyDef(DEVICE_ID_KEYBOARD, KEYCODE_ESCAPE)] = VIRTKEY_PAUSE;
|
||||
return m;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ namespace MainWindow
|
||||
static bool hideCursor = false;
|
||||
static void *rawInputBuffer;
|
||||
static size_t rawInputBufferSize;
|
||||
static int currentSavestateSlot = 0;
|
||||
|
||||
//W32Util::LayeredWindow *layer;
|
||||
#define MAX_LOADSTRING 100
|
||||
@ -555,14 +556,19 @@ namespace MainWindow
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_EMULATION_RUN:
|
||||
if (Core_IsStepping()) {
|
||||
Core_EnableStepping(false);
|
||||
case ID_TOGGLE_PAUSE:
|
||||
if (Core_IsStepping()) //If is paused, then continue to run
|
||||
{
|
||||
if (disasmWindow[0])
|
||||
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0);
|
||||
else
|
||||
Core_EnableStepping(false);
|
||||
} else {
|
||||
NativeMessageReceived("run", "");
|
||||
if (disasmWindow[0])
|
||||
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOP, 0);
|
||||
else
|
||||
Core_EnableStepping(true);
|
||||
}
|
||||
if (disasmWindow[0])
|
||||
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0);
|
||||
break;
|
||||
|
||||
case ID_EMULATION_STOP:
|
||||
@ -580,15 +586,6 @@ namespace MainWindow
|
||||
Update();
|
||||
break;
|
||||
|
||||
case ID_EMULATION_PAUSE:
|
||||
if (disasmWindow[0])
|
||||
{
|
||||
SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOP, 0);
|
||||
} else if (globalUIState == UISTATE_INGAME) {
|
||||
Core_EnableStepping(true);
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_EMULATION_RESET:
|
||||
NativeMessageReceived("reset", "");
|
||||
break;
|
||||
@ -600,7 +597,7 @@ namespace MainWindow
|
||||
case ID_FILE_LOADSTATEFILE:
|
||||
if (W32Util::BrowseForFileName(true, hWnd, "Load state",0,"Save States (*.ppst)\0*.ppst\0All files\0*.*\0\0","ppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SetCursor(LoadCursor(0, IDC_WAIT));
|
||||
SaveState::Load(fn, SaveStateActionFinished);
|
||||
}
|
||||
break;
|
||||
@ -608,21 +605,29 @@ namespace MainWindow
|
||||
case ID_FILE_SAVESTATEFILE:
|
||||
if (W32Util::BrowseForFileName(false, hWnd, "Save state",0,"Save States (*.ppst)\0*.ppst\0All files\0*.*\0\0","ppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SetCursor(LoadCursor(0, IDC_WAIT));
|
||||
SaveState::Save(fn, SaveStateActionFinished);
|
||||
}
|
||||
break;
|
||||
|
||||
// TODO: Add UI for multiple slots
|
||||
// TODO: Improve UI for multiple slots
|
||||
case ID_FILE_SAVESTATE_NEXT_SLOT:
|
||||
{
|
||||
currentSavestateSlot = (currentSavestateSlot + 1)%5;
|
||||
char msg[30];
|
||||
sprintf(msg, "Using save state slot %d.", currentSavestateSlot + 1);
|
||||
osm.Show(msg);
|
||||
break;
|
||||
}
|
||||
|
||||
case ID_FILE_QUICKLOADSTATE:
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SaveState::LoadSlot(0, SaveStateActionFinished);
|
||||
SetCursor(LoadCursor(0, IDC_WAIT));
|
||||
SaveState::LoadSlot(currentSavestateSlot, SaveStateActionFinished);
|
||||
break;
|
||||
|
||||
case ID_FILE_QUICKSAVESTATE:
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
SaveState::SaveSlot(0, SaveStateActionFinished);
|
||||
SetCursor(LoadCursor(0, IDC_WAIT));
|
||||
SaveState::SaveSlot(currentSavestateSlot, SaveStateActionFinished);
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_SCREEN1X:
|
||||
@ -687,6 +692,13 @@ namespace MainWindow
|
||||
gpu->Resized(); // easy way to force a clear...
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_SKIPUPDATINGMEMORY:
|
||||
g_Config.bFramebuffersToMem = !g_Config.bFramebuffersToMem;
|
||||
osm.ShowOnOff(g->T("Skip Updating PSP Memory"), !g_Config.bFramebuffersToMem);
|
||||
if (gpu)
|
||||
gpu->Resized(); // easy way to force a clear...
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_SHOWDEBUGSTATISTICS:
|
||||
g_Config.bShowDebugStats = !g_Config.bShowDebugStats;
|
||||
break;
|
||||
@ -1059,10 +1071,9 @@ namespace MainWindow
|
||||
lastGlobalUIState = globalUIState;
|
||||
|
||||
HMENU menu = GetMenu(GetHWND());
|
||||
EnableMenuItem(menu,ID_EMULATION_RUN, (Core_IsStepping() || globalUIState == UISTATE_PAUSEMENU) ? MF_ENABLED : MF_GRAYED);
|
||||
|
||||
UINT ingameEnable = globalUIState == UISTATE_INGAME ? MF_ENABLED : MF_GRAYED;
|
||||
EnableMenuItem(menu,ID_EMULATION_PAUSE, ingameEnable);
|
||||
EnableMenuItem(menu,ID_TOGGLE_PAUSE, ingameEnable);
|
||||
EnableMenuItem(menu,ID_EMULATION_STOP, ingameEnable);
|
||||
EnableMenuItem(menu,ID_EMULATION_RESET, ingameEnable);
|
||||
|
||||
@ -1182,8 +1193,8 @@ namespace MainWindow
|
||||
|
||||
void SaveStateActionFinished(bool result, void *userdata)
|
||||
{
|
||||
if (!result)
|
||||
MessageBox(0, "Savestate failure. Using savestates between different PPSSPP versions is not supported.", "Sorry", MB_OK);
|
||||
//if (!result)
|
||||
// osm.Show( "Savestate failure. Using savestates between different PPSSPP versions is not supported." );
|
||||
SetCursor(LoadCursor(0, IDC_ARROW));
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user