win32: add hotkeys for preview dialog

This commit is contained in:
OV2 2019-12-20 16:39:07 +01:00
parent 04a15d9a2e
commit e47e41627f
6 changed files with 145 additions and 113 deletions

View File

@ -488,16 +488,15 @@ int GetNumHotKeysAssignedTo (WORD Key, int modifiers)
if(MATCHES_KEY(SlotMinus)) count++;
if(MATCHES_KEY(SlotSave)) count++;
if(MATCHES_KEY(SlotLoad)) count++;
if(MATCHES_KEY(DialogSave)) count++;
if(MATCHES_KEY(DialogLoad)) count++;
if(MATCHES_KEY(BGL1)) count++;
if(MATCHES_KEY(BGL2)) count++;
if(MATCHES_KEY(BGL3)) count++;
if(MATCHES_KEY(BGL4)) count++;
if(MATCHES_KEY(BGL5)) count++;
if(MATCHES_KEY(ClippingWindows)) count++;
// if(MATCHES_KEY(BGLHack)) count++;
if(MATCHES_KEY(Transparency)) count++;
// if(MATCHES_KEY(GLCube)) count++;
// if(MATCHES_KEY(InterpMode7)) count++;
if(MATCHES_KEY(JoypadSwap)) count++;
if(MATCHES_KEY(SwitchControllers)) count++;
if(MATCHES_KEY(TurboA)) count++;

View File

@ -281,6 +281,7 @@
#define IDC_LABEL_UP19 1198
#define IDC_ASPECT 1199
#define IDC_LABEL_UP26 1199
#define IDC_LABEL_UP27 1200
#define IDC_MESSAGES_IN_IMAGE 1200
#define IDC_RECORD_NOW 1201
#define IDC_MESSAGES_SCALE 1201
@ -309,6 +310,7 @@
#define IDC_MOVIEROMINFO 1216
#define IDC_SAVE10 1217
#define IDC_CURRENTROMINFO 1217
#define IDC_DIALOGSAVE 1218
#define IDC_SAVE11 1219
#define IDC_DISPLAY_INPUT 1220
#define IDC_SAVE12 1220
@ -322,6 +324,7 @@
#define IDC_SAVE20 1228
#define IDC_LABEL_UP20 1229
#define IDC_LABEL_UP21 1230
#define IDC_DIALOGLOAD 1231
#define IDC_LABEL_UP22 1234
#define IDC_SLOTMINUS 1235
#define IDC_LABEL_UP23 1236

View File

@ -426,91 +426,95 @@ BEGIN
CONTROL "Clear SRAM",IDC_CLEARSRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,96,70,10
END
IDD_KEYCUSTOM DIALOGEX 0, 0, 408, 206
IDD_KEYCUSTOM DIALOGEX 0, 0, 409, 272
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION
CAPTION "Customize Special Keys"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "Cancel",IDCANCEL,354,186,48,14
PUSHBUTTON "OK",IDOK,300,186,48,14
PUSHBUTTON "Cancel",IDCANCEL,354,252,48,14
PUSHBUTTON "OK",IDOK,300,252,48,14
RTEXT "Speed +:",IDC_LABEL_HK1,12,30,72,12
RTEXT "Frame advance:",IDC_LABEL_HK4,12,66,72,12
RTEXT "Speed -:",IDC_LABEL_HK2,12,42,72,12
RTEXT "Pause:",IDC_LABEL_HK3,12,54,72,12
RTEXT "Frameskip +:",IDC_LABEL_HK6,12,90,72,12
RTEXT "Movie frame count:",IDC_LABEL_HK11,12,150,72,12
RTEXT "SuperScope turbo:",IDC_LABEL_HK8,12,114,72,12
RTEXT "Movie read-only:",IDC_LABEL_HK12,12,162,72,12
RTEXT "SuperScope pause:",IDC_LABEL_HK9,12,126,72,12
RTEXT "Frameskip -:",IDC_LABEL_HK7,12,102,72,12
CONTROL "",IDC_HOTKEY1,"InputCustomHot",WS_TABSTOP,90,30,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY2,"InputCustomHot",WS_TABSTOP,90,42,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY3,"InputCustomHot",WS_TABSTOP,90,54,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY4,"InputCustomHot",WS_TABSTOP,90,66,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY5,"InputCustomHot",WS_TABSTOP,90,78,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY6,"InputCustomHot",WS_TABSTOP,90,90,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY7,"InputCustomHot",WS_TABSTOP,90,102,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY8,"InputCustomHot",WS_TABSTOP,90,114,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY9,"InputCustomHot",WS_TABSTOP,90,126,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY10,"InputCustomHot",WS_TABSTOP,90,138,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY11,"InputCustomHot",WS_TABSTOP,90,150,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY12,"InputCustomHot",WS_TABSTOP,90,162,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY13,"InputCustomHot",WS_TABSTOP,90,174,90,11,WS_EX_CLIENTEDGE
CONTROL "",IDC_SAVE1,"InputCustomHot",WS_TABSTOP,234,18,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 1:",IDC_LABEL_UP2,198,30,30,12
CONTROL "",IDC_SAVE2,"InputCustomHot",WS_TABSTOP,234,30,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 2:",IDC_LABEL_UP3,198,42,30,12
CONTROL "",IDC_SAVE3,"InputCustomHot",WS_TABSTOP,234,42,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 3:",IDC_LABEL_UP4,198,54,30,12
CONTROL "",IDC_SAVE4,"InputCustomHot",WS_TABSTOP,234,54,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 4:",IDC_LABEL_UP5,198,66,30,12
CONTROL "",IDC_SAVE5,"InputCustomHot",WS_TABSTOP,234,66,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 5:",IDC_LABEL_UP6,198,78,30,12
CONTROL "",IDC_SAVE6,"InputCustomHot",WS_TABSTOP,234,78,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 6:",IDC_LABEL_UP7,198,90,30,12
CONTROL "",IDC_SAVE7,"InputCustomHot",WS_TABSTOP,234,90,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 7:",IDC_LABEL_UP8,198,102,30,12
CONTROL "",IDC_SAVE8,"InputCustomHot",WS_TABSTOP,234,102,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 8:",IDC_LABEL_UP9,198,114,30,12
CONTROL "",IDC_SAVE9,"InputCustomHot",WS_TABSTOP,234,114,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 9:",IDC_LABEL_UP10,198,126,30,12
CONTROL "",IDC_SAVE10,"InputCustomHot",WS_TABSTOP,234,126,60,11,WS_EX_CLIENTEDGE
RTEXT "Save 0:",IDC_LABEL_UP11,198,18,30,12
CONTROL "",IDC_SAVE11,"InputCustomHot",WS_TABSTOP,336,18,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 1:",IDC_LABEL_UP12,300,30,30,12
CONTROL "",IDC_SAVE12,"InputCustomHot",WS_TABSTOP,336,30,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 2:",IDC_LABEL_UP13,300,42,30,12
CONTROL "",IDC_SAVE13,"InputCustomHot",WS_TABSTOP,336,42,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 3:",IDC_LABEL_UP14,300,54,30,12
CONTROL "",IDC_SAVE14,"InputCustomHot",WS_TABSTOP,336,54,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 4:",IDC_LABEL_UP15,300,66,30,12
CONTROL "",IDC_SAVE15,"InputCustomHot",WS_TABSTOP,336,66,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 5:",IDC_LABEL_UP16,300,78,30,12
CONTROL "",IDC_SAVE16,"InputCustomHot",WS_TABSTOP,336,78,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 6:",IDC_LABEL_UP17,300,90,30,12
CONTROL "",IDC_SAVE17,"InputCustomHot",WS_TABSTOP,336,90,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 7:",IDC_LABEL_UP18,300,102,30,12
CONTROL "",IDC_SAVE18,"InputCustomHot",WS_TABSTOP,336,102,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 8:",IDC_LABEL_UP19,300,114,30,12
CONTROL "",IDC_SAVE19,"InputCustomHot",WS_TABSTOP,336,114,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 9:",IDC_LABEL_UP20,300,126,30,12
CONTROL "",IDC_SAVE20,"InputCustomHot",WS_TABSTOP,336,126,60,11,WS_EX_CLIENTEDGE
RTEXT "Load 0:",IDC_LABEL_UP21,300,18,30,12
RTEXT "Fast-forward:",IDC_LABEL_HK5,12,78,72,12
RTEXT "Show pressed keys:",IDC_LABEL_HK10,12,138,72,12
RTEXT "Save screenshot:",IDC_LABEL_HK13,12,174,72,12
RTEXT "Slot -:",IDC_LABEL_UP22,198,150,30,12
CONTROL "",IDC_SLOTMINUS,"InputCustomHot",WS_TABSTOP,234,150,60,11,WS_EX_CLIENTEDGE
RTEXT "Slot +:",IDC_LABEL_UP23,300,150,30,12
CONTROL "",IDC_SLOTPLUS,"InputCustomHot",WS_TABSTOP,336,150,60,11,WS_EX_CLIENTEDGE
RTEXT "Save #:",IDC_LABEL_UP24,198,162,30,12
CONTROL "",IDC_SLOTSAVE,"InputCustomHot",WS_TABSTOP,234,162,60,11,WS_EX_CLIENTEDGE
RTEXT "Load #:",IDC_LABEL_UP25,300,162,30,12
CONTROL "",IDC_SLOTLOAD,"InputCustomHot",WS_TABSTOP,336,162,60,11,WS_EX_CLIENTEDGE
LTEXT "Blue means the hotkey is already mapped. Pink means it conflicts with a game button. Red means it's reserved by Windows. A hotkey can be disabled using Escape.",IDC_LABEL_BLUE,192,186,78,12,NOT WS_VISIBLE
RTEXT "Frame advance:",IDC_LABEL_HK4,12,75,72,12
RTEXT "Speed -:",IDC_LABEL_HK2,12,45,72,12
RTEXT "Pause:",IDC_LABEL_HK3,12,60,72,12
RTEXT "Frameskip +:",IDC_LABEL_HK6,12,105,72,12
RTEXT "Movie frame count:",IDC_LABEL_HK11,12,180,72,12
RTEXT "SuperScope turbo:",IDC_LABEL_HK8,12,135,72,12
RTEXT "Movie read-only:",IDC_LABEL_HK12,12,195,72,12
RTEXT "SuperScope pause:",IDC_LABEL_HK9,12,150,72,12
RTEXT "Frameskip -:",IDC_LABEL_HK7,12,120,72,12
CONTROL "",IDC_HOTKEY1,"InputCustomHot",WS_TABSTOP,90,30,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY2,"InputCustomHot",WS_TABSTOP,90,45,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY3,"InputCustomHot",WS_TABSTOP,90,60,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY4,"InputCustomHot",WS_TABSTOP,90,75,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY5,"InputCustomHot",WS_TABSTOP,90,90,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY6,"InputCustomHot",WS_TABSTOP,90,105,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY7,"InputCustomHot",WS_TABSTOP,90,120,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY8,"InputCustomHot",WS_TABSTOP,90,135,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY9,"InputCustomHot",WS_TABSTOP,90,150,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY10,"InputCustomHot",WS_TABSTOP,90,165,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY11,"InputCustomHot",WS_TABSTOP,90,180,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY12,"InputCustomHot",WS_TABSTOP,90,195,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY13,"InputCustomHot",WS_TABSTOP,90,210,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_SAVE1,"InputCustomHot",WS_TABSTOP,217,30,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 1:",IDC_LABEL_UP2,181,45,30,12
CONTROL "",IDC_SAVE2,"InputCustomHot",WS_TABSTOP,217,45,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 2:",IDC_LABEL_UP3,181,60,30,12
CONTROL "",IDC_SAVE3,"InputCustomHot",WS_TABSTOP,217,60,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 3:",IDC_LABEL_UP4,181,75,30,12
CONTROL "",IDC_SAVE4,"InputCustomHot",WS_TABSTOP,217,75,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 4:",IDC_LABEL_UP5,181,90,30,12
CONTROL "",IDC_SAVE5,"InputCustomHot",WS_TABSTOP,217,90,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 5:",IDC_LABEL_UP6,181,105,30,12
CONTROL "",IDC_SAVE6,"InputCustomHot",WS_TABSTOP,217,105,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 6:",IDC_LABEL_UP7,181,120,30,12
CONTROL "",IDC_SAVE7,"InputCustomHot",WS_TABSTOP,217,120,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 7:",IDC_LABEL_UP8,181,135,30,12
CONTROL "",IDC_SAVE8,"InputCustomHot",WS_TABSTOP,217,135,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 8:",IDC_LABEL_UP9,181,150,30,12
CONTROL "",IDC_SAVE9,"InputCustomHot",WS_TABSTOP,217,150,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 9:",IDC_LABEL_UP10,181,165,30,12
CONTROL "",IDC_SAVE10,"InputCustomHot",WS_TABSTOP,217,165,60,12,WS_EX_CLIENTEDGE
RTEXT "Save 0:",IDC_LABEL_UP11,181,30,30,12
CONTROL "",IDC_SAVE11,"InputCustomHot",WS_TABSTOP,336,30,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 1:",IDC_LABEL_UP12,300,45,30,12
CONTROL "",IDC_SAVE12,"InputCustomHot",WS_TABSTOP,336,45,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 2:",IDC_LABEL_UP13,300,60,30,12
CONTROL "",IDC_SAVE13,"InputCustomHot",WS_TABSTOP,336,60,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 3:",IDC_LABEL_UP14,300,75,30,12
CONTROL "",IDC_SAVE14,"InputCustomHot",WS_TABSTOP,336,75,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 4:",IDC_LABEL_UP15,300,90,30,12
CONTROL "",IDC_SAVE15,"InputCustomHot",WS_TABSTOP,336,90,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 5:",IDC_LABEL_UP16,300,105,30,12
CONTROL "",IDC_SAVE16,"InputCustomHot",WS_TABSTOP,336,105,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 6:",IDC_LABEL_UP17,300,120,30,12
CONTROL "",IDC_SAVE17,"InputCustomHot",WS_TABSTOP,336,120,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 7:",IDC_LABEL_UP18,300,135,30,12
CONTROL "",IDC_SAVE18,"InputCustomHot",WS_TABSTOP,336,135,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 8:",IDC_LABEL_UP19,300,150,30,12
CONTROL "",IDC_SAVE19,"InputCustomHot",WS_TABSTOP,336,150,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 9:",IDC_LABEL_UP20,300,165,30,12
CONTROL "",IDC_SAVE20,"InputCustomHot",WS_TABSTOP,336,165,60,12,WS_EX_CLIENTEDGE
RTEXT "Load 0:",IDC_LABEL_UP21,300,30,30,12
RTEXT "Fast-forward:",IDC_LABEL_HK5,12,90,72,12
RTEXT "Show pressed keys:",IDC_LABEL_HK10,12,165,72,12
RTEXT "Save screenshot:",IDC_LABEL_HK13,12,210,72,12
RTEXT "Slot -:",IDC_LABEL_UP22,181,195,30,12
CONTROL "",IDC_SLOTMINUS,"InputCustomHot",WS_TABSTOP,217,195,60,12,WS_EX_CLIENTEDGE
RTEXT "Slot +:",IDC_LABEL_UP23,300,195,30,12
CONTROL "",IDC_SLOTPLUS,"InputCustomHot",WS_TABSTOP,336,195,60,12,WS_EX_CLIENTEDGE
RTEXT "Save #:",IDC_LABEL_UP24,181,210,30,12
CONTROL "",IDC_SLOTSAVE,"InputCustomHot",WS_TABSTOP,217,210,60,12,WS_EX_CLIENTEDGE
RTEXT "Load #:",IDC_LABEL_UP25,300,210,30,12
CONTROL "",IDC_SLOTLOAD,"InputCustomHot",WS_TABSTOP,336,210,60,12,WS_EX_CLIENTEDGE
LTEXT "Blue means the hotkey is already mapped. Pink means it conflicts with a game button. Red means it's reserved by Windows. A hotkey can be disabled using Escape.",IDC_LABEL_BLUE,7,232,269,34
COMBOBOX IDC_HKCOMBO,6,6,60,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "",IDC_STATIC,6,18,180,174,0,WS_EX_TRANSPARENT
GROUPBOX "Save States",IDC_STATIC,192,6,210,174,0,WS_EX_TRANSPARENT
GROUPBOX "",IDC_STATIC,6,21,149,207,0,WS_EX_TRANSPARENT
GROUPBOX "Save States",IDC_STATIC,161,21,241,207,0,WS_EX_TRANSPARENT
RTEXT "Save Dialog:",IDC_LABEL_UP26,165,180,46,12
CONTROL "",IDC_DIALOGSAVE,"InputCustomHot",WS_TABSTOP,217,180,60,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_DIALOGLOAD,"InputCustomHot",WS_TABSTOP,336,180,60,12,WS_EX_CLIENTEDGE
RTEXT "Load Dialog:",IDC_LABEL_UP27,284,180,46,12
END
IDD_MULTICART DIALOGEX 0, 0, 390, 90
@ -600,6 +604,14 @@ END
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_DIALOG_LOAD_PREVIEW, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 560
TOPMARGIN, 7
BOTTOMMARGIN, 240
END
IDD_SOUND_OPTS, DIALOG
BEGIN
LEFTMARGIN, 7
@ -719,10 +731,9 @@ BEGIN
IDD_KEYCUSTOM, DIALOG
BEGIN
RIGHTMARGIN, 406
VERTGUIDE, 72
VERTGUIDE, 92
BOTTOMMARGIN, 200
RIGHTMARGIN, 407
VERTGUIDE, 90
BOTTOMMARGIN, 266
END
IDD_MULTICART, DIALOG
@ -761,13 +772,6 @@ BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 113
END
IDD_DIALOG_LOAD_PREVIEW, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 560
TOPMARGIN, 7
BOTTOMMARGIN, 240
END
END
#endif // APSTUDIO_INVOKED

View File

@ -917,7 +917,7 @@ void WinRegisterConfigItems()
ADDN(Save[0],SaveSlot0); ADDN(Save[1],SaveSlot1); ADDN(Save[2],SaveSlot2); ADDN(Save[3],SaveSlot3); ADDN(Save[4],SaveSlot4); ADDN(Save[5],SaveSlot5); ADDN(Save[6],SaveSlot6); ADDN(Save[7],SaveSlot7); ADDN(Save[8],SaveSlot8); ADDN(Save[9],SaveSlot9);
ADDN(Load[0],LoadSlot0); ADDN(Load[1],LoadSlot1); ADDN(Load[2],LoadSlot2); ADDN(Load[3],LoadSlot3); ADDN(Load[4],LoadSlot4); ADDN(Load[5],LoadSlot5); ADDN(Load[6],LoadSlot6); ADDN(Load[7],LoadSlot7); ADDN(Load[8],LoadSlot8); ADDN(Load[9],LoadSlot9);
ADDN(SelectSave[0],SelectSlot0); ADDN(SelectSave[1],SelectSlot1); ADDN(SelectSave[2],SelectSlot2); ADDN(SelectSave[3],SelectSlot3); ADDN(SelectSave[4],SelectSlot4); ADDN(SelectSave[5],SelectSlot5); ADDN(SelectSave[6],SelectSlot6); ADDN(SelectSave[7],SelectSlot7); ADDN(SelectSave[8],SelectSlot8); ADDN(SelectSave[9],SelectSlot9);
ADD(SaveScreenShot); ADD(SlotPlus); ADD(SlotMinus); ADD(SlotSave); ADD(SlotLoad);
ADD(SaveScreenShot); ADD(SlotPlus); ADD(SlotMinus); ADD(SlotSave); ADD(SlotLoad); ADD(DialogSave); ADD(DialogLoad);
ADD(BGL1); ADD(BGL2); ADD(BGL3); ADD(BGL4); ADD(BGL5);
ADD(ClippingWindows); /*ADD(BGLHack);*/ ADD(Transparency); /*ADD(HDMA)*/; /*ADD(GLCube);*/
/*ADD(InterpMode7);*/ ADD(JoypadSwap); ADD(SwitchControllers); ADD(ResetGame); ADD(ToggleCheats);

View File

@ -368,16 +368,15 @@ struct SCustomKeys CustomKeys = {
{0,0}, // slot minus (disabled by default)
{0,0}, // slot save (disabled by default)
{0,0}, // slot load (disabled by default)
{VK_F11,CUSTKEY_SHIFT_MASK}, // dialog save
{VK_F11,0}, // dialog load
{0,0}, // background layer 1
{0,0}, // background layer 2
{0,0}, // background layer 3
{0,0}, // background layer 4
{0,0}, // sprite layer
{0,0}, // Clipping Windows
// {'8',0}, // BG Layering hack
{0,0}, // Transparency
// {'6',CUSTKEY_SHIFT_MASK}, // GLCube Mode
// {'9',CUSTKEY_SHIFT_MASK}, // Interpolate Mode 7
{'6',0}, // Joypad Swap
{'7',0}, // Switch Controllers
{VK_NEXT,CUSTKEY_SHIFT_MASK}, // Turbo A
@ -856,6 +855,18 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
FreezeUnfreezeSlot (GUI.CurrentSaveSlot, false);
hitHotKey = true;
}
if(wParam == CustomKeys.DialogSave.key
&& modifiers == CustomKeys.DialogSave.modifiers)
{
FreezeUnfreezeDialogPreview(true);
hitHotKey = true;
}
if(wParam == CustomKeys.DialogLoad.key
&& modifiers == CustomKeys.DialogLoad.modifiers)
{
FreezeUnfreezeDialogPreview(false);
hitHotKey = true;
}
if(wParam == CustomKeys.SlotPlus.key
&& modifiers == CustomKeys.SlotPlus.modifiers)
{
@ -2147,13 +2158,8 @@ LRESULT CALLBACK WinProc(
FreezeUnfreezeDialog(FALSE);
break;
case ID_FILE_LOAD_PREVIEW:
{
CSaveLoadWithPreviewDlg dlg;
int slot = dlg.show();
if(slot >= 0)
FreezeUnfreezeSlot(slot, FALSE);
FreezeUnfreezeDialogPreview(FALSE);
break;
}
case ID_FILE_SAVE0:
FreezeUnfreezeSlot (0, TRUE);
break;
@ -2188,13 +2194,8 @@ LRESULT CALLBACK WinProc(
FreezeUnfreezeDialog(TRUE);
break;
case ID_FILE_SAVE_PREVIEW:
{
CSaveLoadWithPreviewDlg dlg(true);
int slot = dlg.show();
if(slot >= 0)
FreezeUnfreezeSlot(slot, TRUE);
FreezeUnfreezeDialogPreview(TRUE);
break;
}
case ID_CHEAT_ENTER:
RestoreGUIDisplay ();
while (DialogBox(g_hInst, MAKEINTRESOURCE(IDD_CHEATER), hWnd, DlgCheater) == NC_SEARCHDB)
@ -3622,6 +3623,17 @@ void FreezeUnfreezeDialog(bool8 freeze)
}
}
void FreezeUnfreezeDialogPreview(bool8 freeze)
{
if(Settings.StopEmulation)
return;
CSaveLoadWithPreviewDlg dlg(freeze);
int slot = dlg.show();
if(slot >= 0)
FreezeUnfreezeSlot(slot, freeze);
}
void GetSlotFilename(int slot, char filename[_MAX_PATH + 1])
{
char ext[_MAX_EXT + 1];
@ -3652,6 +3664,9 @@ void FreezeUnfreeze (const char *filename, bool8 freeze)
}
#endif
if(Settings.StopEmulation)
return;
if (GUI.ConfirmSaveLoad)
{
std::string msg, title;
@ -8397,6 +8412,8 @@ static void set_hotkeyinfo(HWND hDlg)
SendDlgItemMessage(hDlg,IDC_SLOTMINUS,WM_USER+44,CustomKeys.SlotMinus.key,CustomKeys.SlotMinus.modifiers);
SendDlgItemMessage(hDlg,IDC_SLOTSAVE,WM_USER+44,CustomKeys.SlotSave.key,CustomKeys.SlotSave.modifiers);
SendDlgItemMessage(hDlg,IDC_SLOTLOAD,WM_USER+44,CustomKeys.SlotLoad.key,CustomKeys.SlotLoad.modifiers);
SendDlgItemMessage(hDlg, IDC_DIALOGSAVE, WM_USER + 44, CustomKeys.DialogSave.key, CustomKeys.DialogSave.modifiers);
SendDlgItemMessage(hDlg, IDC_DIALOGLOAD, WM_USER + 44, CustomKeys.DialogLoad.key, CustomKeys.DialogLoad.modifiers);
int i;
for(i = 0 ; i < 10 ; i++) SendDlgItemMessage(hDlg,IDC_SAVE1+i,WM_USER+44,CustomKeys.Save[i].key,CustomKeys.Save[i].modifiers);
for(i = 0 ; i < 10 ; i++) SendDlgItemMessage(hDlg,IDC_SAVE11+i,WM_USER+44,CustomKeys.Load[i].key,CustomKeys.Load[i].modifiers);
@ -8641,6 +8658,16 @@ switch(msg)
CustomKeys.SlotSave.key = wParam;
CustomKeys.SlotSave.modifiers = modifiers;
break;
case IDC_DIALOGSAVE:
CustomKeys.DialogSave.key = wParam;
CustomKeys.DialogSave.modifiers = modifiers;
break;
case IDC_DIALOGLOAD:
CustomKeys.DialogLoad.key = wParam;
CustomKeys.DialogLoad.modifiers = modifiers;
break;
}
if(which >= IDC_SAVE1 && which <= IDC_SAVE10)

View File

@ -308,17 +308,15 @@ struct SCustomKeys {
SCustomKey SlotMinus;
SCustomKey SlotSave;
SCustomKey SlotLoad;
SCustomKey DialogSave;
SCustomKey DialogLoad;
SCustomKey BGL1;
SCustomKey BGL2;
SCustomKey BGL3;
SCustomKey BGL4;
SCustomKey BGL5;
SCustomKey ClippingWindows;
// SCustomKey BGLHack;
SCustomKey Transparency;
// SCustomKey GLCube;
// SCustomKey HDMA;
// SCustomKey InterpMode7;
SCustomKey JoypadSwap;
SCustomKey SwitchControllers;
SCustomKey TurboA, TurboB, TurboY, TurboX, TurboL, TurboR, TurboStart, TurboSelect, TurboLeft, TurboUp, TurboRight, TurboDown;
@ -462,6 +460,7 @@ RECT GetWindowMargins(HWND hwnd, UINT width);
void GetSlotFilename(int slot, char filename[_MAX_PATH + 1]);
void FreezeUnfreezeSlot(int slot, bool8 freeze);
void FreezeUnfreezeDialog(bool8 freeze);
void FreezeUnfreezeDialogPreview(bool8 freeze);
void FreezeUnfreeze(const char *filename, bool8 freeze);
bool UnfreezeScreenshotSlot(int slot, uint16 **image_buffer, int &width, int &height);