mirror of https://github.com/snes9xgit/snes9x.git
win32: easier definition of hotkey config dialog layout, change order of
hotkeys
This commit is contained in:
parent
e47e41627f
commit
0291042e1c
|
@ -81,15 +81,15 @@ Nintendo is a trademark.")
|
||||||
#define HOTKEYS_LABEL_1_1 TEXT("Speed +:")
|
#define HOTKEYS_LABEL_1_1 TEXT("Speed +:")
|
||||||
#define HOTKEYS_LABEL_1_2 TEXT("Speed -:")
|
#define HOTKEYS_LABEL_1_2 TEXT("Speed -:")
|
||||||
#define HOTKEYS_LABEL_1_3 TEXT("Pause:")
|
#define HOTKEYS_LABEL_1_3 TEXT("Pause:")
|
||||||
#define HOTKEYS_LABEL_1_4 TEXT("Frame advance:")
|
#define HOTKEYS_LABEL_1_4 TEXT("Fast-forward toggle:")
|
||||||
#define HOTKEYS_LABEL_1_5 TEXT("Fast forward:")
|
#define HOTKEYS_LABEL_1_5 TEXT("Fast forward:")
|
||||||
#define HOTKEYS_LABEL_1_6 TEXT("Skip frames +:")
|
#define HOTKEYS_LABEL_1_6 TEXT("Rewind:")
|
||||||
#define HOTKEYS_LABEL_1_7 TEXT("Skip frames -:")
|
#define HOTKEYS_LABEL_1_7 TEXT("Skip frames +:")
|
||||||
#define HOTKEYS_LABEL_1_8 TEXT("SuperScope turbo:")
|
#define HOTKEYS_LABEL_1_8 TEXT("Skip frames -:")
|
||||||
#define HOTKEYS_LABEL_1_9 TEXT("SuperScope pause:")
|
#define HOTKEYS_LABEL_1_9 TEXT("Toggle mute:")
|
||||||
#define HOTKEYS_LABEL_1_10 TEXT("Show pressed keys:")
|
#define HOTKEYS_LABEL_1_10 TEXT("Toggle cheats:")
|
||||||
#define HOTKEYS_LABEL_1_11 TEXT("Movie frame count:")
|
#define HOTKEYS_LABEL_1_11 TEXT("Quit Snes9x:")
|
||||||
#define HOTKEYS_LABEL_1_12 TEXT("Movie read-only:")
|
#define HOTKEYS_LABEL_1_12 TEXT("Reset game:")
|
||||||
#define HOTKEYS_LABEL_1_13 TEXT("Save screenshot")
|
#define HOTKEYS_LABEL_1_13 TEXT("Save screenshot")
|
||||||
#define HOTKEYS_LABEL_2_1 TEXT("Graphics layer 1:")
|
#define HOTKEYS_LABEL_2_1 TEXT("Graphics layer 1:")
|
||||||
#define HOTKEYS_LABEL_2_2 TEXT("Graphics layer 2:")
|
#define HOTKEYS_LABEL_2_2 TEXT("Graphics layer 2:")
|
||||||
|
@ -98,12 +98,12 @@ Nintendo is a trademark.")
|
||||||
#define HOTKEYS_LABEL_2_5 TEXT("Sprites layer:")
|
#define HOTKEYS_LABEL_2_5 TEXT("Sprites layer:")
|
||||||
#define HOTKEYS_LABEL_2_6 TEXT("Clipping Windows:")
|
#define HOTKEYS_LABEL_2_6 TEXT("Clipping Windows:")
|
||||||
#define HOTKEYS_LABEL_2_7 TEXT("Transparency:")
|
#define HOTKEYS_LABEL_2_7 TEXT("Transparency:")
|
||||||
#define HOTKEYS_LABEL_2_8 TEXT("Fast-forward toggle:")
|
#define HOTKEYS_LABEL_2_8 TEXT("Frame advance:")
|
||||||
#define HOTKEYS_LABEL_2_9 TEXT("Rewind:")
|
#define HOTKEYS_LABEL_2_9 TEXT("SuperScope pause:")
|
||||||
#define HOTKEYS_LABEL_2_10 TEXT("Switch controllers:")
|
#define HOTKEYS_LABEL_2_10 TEXT("Switch controllers:")
|
||||||
#define HOTKEYS_LABEL_2_11 TEXT("Joypad swap:")
|
#define HOTKEYS_LABEL_2_11 TEXT("Joypad swap:")
|
||||||
#define HOTKEYS_LABEL_2_12 TEXT("Reset game:")
|
#define HOTKEYS_LABEL_2_12 TEXT("Show pressed keys:")
|
||||||
#define HOTKEYS_LABEL_2_13 TEXT("Toggle cheats:")
|
#define HOTKEYS_LABEL_2_13 TEXT("Movie frame count:")
|
||||||
#define HOTKEYS_LABEL_3_1 TEXT("Turbo A mode:")
|
#define HOTKEYS_LABEL_3_1 TEXT("Turbo A mode:")
|
||||||
#define HOTKEYS_LABEL_3_2 TEXT("Turbo B mode:")
|
#define HOTKEYS_LABEL_3_2 TEXT("Turbo B mode:")
|
||||||
#define HOTKEYS_LABEL_3_3 TEXT("Turbo Y mode:")
|
#define HOTKEYS_LABEL_3_3 TEXT("Turbo Y mode:")
|
||||||
|
@ -116,10 +116,20 @@ Nintendo is a trademark.")
|
||||||
#define HOTKEYS_LABEL_3_10 TEXT("Turbo Up mode:")
|
#define HOTKEYS_LABEL_3_10 TEXT("Turbo Up mode:")
|
||||||
#define HOTKEYS_LABEL_3_11 TEXT("Turbo Right mode:")
|
#define HOTKEYS_LABEL_3_11 TEXT("Turbo Right mode:")
|
||||||
#define HOTKEYS_LABEL_3_12 TEXT("Turbo Down mode:")
|
#define HOTKEYS_LABEL_3_12 TEXT("Turbo Down mode:")
|
||||||
#define HOTKEYS_LABEL_3_13 TEXT("Toggle mute:")
|
#define HOTKEYS_LABEL_3_13 TEXT("SuperScope turbo:")
|
||||||
|
#define HOTKEYS_LABEL_4_1 TEXT("Select Slot 0:")
|
||||||
|
#define HOTKEYS_LABEL_4_2 TEXT("Select Slot 1:")
|
||||||
|
#define HOTKEYS_LABEL_4_3 TEXT("Select Slot 2:")
|
||||||
|
#define HOTKEYS_LABEL_4_4 TEXT("Select Slot 3:")
|
||||||
|
#define HOTKEYS_LABEL_4_5 TEXT("Select Slot 4:")
|
||||||
|
#define HOTKEYS_LABEL_4_6 TEXT("Select Slot 5:")
|
||||||
|
#define HOTKEYS_LABEL_4_7 TEXT("Select Slot 6:")
|
||||||
|
#define HOTKEYS_LABEL_4_8 TEXT("Select Slot 7:")
|
||||||
|
#define HOTKEYS_LABEL_4_9 TEXT("Select Slot 8:")
|
||||||
|
#define HOTKEYS_LABEL_4_10 TEXT("Select Slot 9:")
|
||||||
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
#define HOTKEYS_LABEL_4_11 TEXT("Save to file:")
|
||||||
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
#define HOTKEYS_LABEL_4_12 TEXT("Load from file:")
|
||||||
#define HOTKEYS_LABEL_4_13 TEXT("Quit Snes9x:")
|
#define HOTKEYS_LABEL_4_13 TEXT("Movie read-only:")
|
||||||
|
|
||||||
// gaming buttons and axes
|
// gaming buttons and axes
|
||||||
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
|
||||||
|
|
|
@ -126,6 +126,8 @@ void S9xDetectJoypads();
|
||||||
#define TIMER_SCANJOYPADS (99999)
|
#define TIMER_SCANJOYPADS (99999)
|
||||||
#define NC_SEARCHDB 0x8000
|
#define NC_SEARCHDB 0x8000
|
||||||
|
|
||||||
|
#define MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS 13
|
||||||
|
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define S9XW_SHARD_PATH SHARD_PATHW
|
#define S9XW_SHARD_PATH SHARD_PATHW
|
||||||
#else
|
#else
|
||||||
|
@ -8346,66 +8348,89 @@ switch(msg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct hotkey_dialog_item {
|
||||||
|
SCustomKey *key_entry;
|
||||||
|
TCHAR *description;
|
||||||
|
};
|
||||||
|
|
||||||
|
// this structure defines the four sub pages in the hotkey config dialog
|
||||||
|
// to keep an entry blank, set the SCustomKey pointer to NULL and the text to an empty string
|
||||||
|
static hotkey_dialog_item hotkey_dialog_items[4][MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS] = {
|
||||||
|
{
|
||||||
|
{ &CustomKeys.SpeedUp, HOTKEYS_LABEL_1_1 },
|
||||||
|
{ &CustomKeys.SpeedDown, HOTKEYS_LABEL_1_2 },
|
||||||
|
{ &CustomKeys.Pause, HOTKEYS_LABEL_1_3 },
|
||||||
|
{ &CustomKeys.FastForwardToggle, HOTKEYS_LABEL_1_4 },
|
||||||
|
{ &CustomKeys.FastForward, HOTKEYS_LABEL_1_5 },
|
||||||
|
{ &CustomKeys.Rewind, HOTKEYS_LABEL_1_6 },
|
||||||
|
{ &CustomKeys.SkipUp, HOTKEYS_LABEL_1_7 },
|
||||||
|
{ &CustomKeys.SkipDown, HOTKEYS_LABEL_1_8 },
|
||||||
|
{ &CustomKeys.Mute, HOTKEYS_LABEL_1_9 },
|
||||||
|
{ &CustomKeys.ToggleCheats, HOTKEYS_LABEL_1_10 },
|
||||||
|
{ &CustomKeys.QuitS9X, HOTKEYS_LABEL_1_11 },
|
||||||
|
{ &CustomKeys.ResetGame, HOTKEYS_LABEL_1_12 },
|
||||||
|
{ &CustomKeys.SaveScreenShot, HOTKEYS_LABEL_1_13 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ &CustomKeys.BGL1, HOTKEYS_LABEL_2_1 },
|
||||||
|
{ &CustomKeys.BGL2, HOTKEYS_LABEL_2_2 },
|
||||||
|
{ &CustomKeys.BGL3, HOTKEYS_LABEL_2_3 },
|
||||||
|
{ &CustomKeys.BGL4, HOTKEYS_LABEL_2_4 },
|
||||||
|
{ &CustomKeys.BGL5, HOTKEYS_LABEL_2_5 },
|
||||||
|
{ &CustomKeys.ClippingWindows, HOTKEYS_LABEL_2_6 },
|
||||||
|
{ &CustomKeys.Transparency, HOTKEYS_LABEL_2_7 },
|
||||||
|
{ &CustomKeys.FrameAdvance, HOTKEYS_LABEL_2_8 },
|
||||||
|
{ &CustomKeys.ScopePause, HOTKEYS_LABEL_2_9 },
|
||||||
|
{ &CustomKeys.SwitchControllers, HOTKEYS_LABEL_2_10 },
|
||||||
|
{ &CustomKeys.JoypadSwap, HOTKEYS_LABEL_2_11 },
|
||||||
|
{ &CustomKeys.ShowPressed, HOTKEYS_LABEL_2_12 },
|
||||||
|
{ &CustomKeys.FrameCount, HOTKEYS_LABEL_2_13 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ &CustomKeys.TurboA, HOTKEYS_LABEL_3_1 },
|
||||||
|
{ &CustomKeys.TurboB, HOTKEYS_LABEL_3_2 },
|
||||||
|
{ &CustomKeys.TurboY, HOTKEYS_LABEL_3_3 },
|
||||||
|
{ &CustomKeys.TurboX, HOTKEYS_LABEL_3_4 },
|
||||||
|
{ &CustomKeys.TurboL, HOTKEYS_LABEL_3_5 },
|
||||||
|
{ &CustomKeys.TurboR, HOTKEYS_LABEL_3_6 },
|
||||||
|
{ &CustomKeys.TurboStart, HOTKEYS_LABEL_3_7 },
|
||||||
|
{ &CustomKeys.TurboSelect, HOTKEYS_LABEL_3_8 },
|
||||||
|
{ &CustomKeys.TurboLeft, HOTKEYS_LABEL_3_9 },
|
||||||
|
{ &CustomKeys.TurboUp, HOTKEYS_LABEL_3_10 },
|
||||||
|
{ &CustomKeys.TurboRight, HOTKEYS_LABEL_3_11 },
|
||||||
|
{ &CustomKeys.TurboDown, HOTKEYS_LABEL_3_12 },
|
||||||
|
{ &CustomKeys.ScopeTurbo, HOTKEYS_LABEL_3_13 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ &CustomKeys.SelectSave[0], HOTKEYS_LABEL_4_1 },
|
||||||
|
{ &CustomKeys.SelectSave[1], HOTKEYS_LABEL_4_2 },
|
||||||
|
{ &CustomKeys.SelectSave[2], HOTKEYS_LABEL_4_3 },
|
||||||
|
{ &CustomKeys.SelectSave[3], HOTKEYS_LABEL_4_4 },
|
||||||
|
{ &CustomKeys.SelectSave[4], HOTKEYS_LABEL_4_5 },
|
||||||
|
{ &CustomKeys.SelectSave[5], HOTKEYS_LABEL_4_6 },
|
||||||
|
{ &CustomKeys.SelectSave[6], HOTKEYS_LABEL_4_7 },
|
||||||
|
{ &CustomKeys.SelectSave[7], HOTKEYS_LABEL_4_8 },
|
||||||
|
{ &CustomKeys.SelectSave[8], HOTKEYS_LABEL_4_9 },
|
||||||
|
{ &CustomKeys.SelectSave[9], HOTKEYS_LABEL_4_10 },
|
||||||
|
{ &CustomKeys.SaveFileSelect, HOTKEYS_LABEL_4_11 },
|
||||||
|
{ &CustomKeys.LoadFileSelect, HOTKEYS_LABEL_4_12 },
|
||||||
|
{ &CustomKeys.ReadOnly, HOTKEYS_LABEL_4_13 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static void set_hotkeyinfo(HWND hDlg)
|
static void set_hotkeyinfo(HWND hDlg)
|
||||||
{
|
{
|
||||||
int index = SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_GETCURSEL,0,0);
|
int index = SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_GETCURSEL,0,0);
|
||||||
|
|
||||||
switch(index)
|
for(int i = 0; i < MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS; i++)
|
||||||
{
|
{
|
||||||
case 0:
|
int wParam = 0, lParam = 0;
|
||||||
// set page 1 fields
|
if(hotkey_dialog_items[index][i].key_entry)
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY1,WM_USER+44,CustomKeys.SpeedUp.key,CustomKeys.SpeedUp.modifiers);
|
{
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY2,WM_USER+44,CustomKeys.SpeedDown.key,CustomKeys.SpeedDown.modifiers);
|
wParam = hotkey_dialog_items[index][i].key_entry->key;
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY3,WM_USER+44,CustomKeys.Pause.key,CustomKeys.Pause.modifiers);
|
lParam = hotkey_dialog_items[index][i].key_entry->modifiers;
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY4,WM_USER+44,CustomKeys.FrameAdvance.key,CustomKeys.FrameAdvance.modifiers);
|
}
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY5,WM_USER+44,CustomKeys.FastForward.key,CustomKeys.FastForward.modifiers);
|
SendDlgItemMessage(hDlg, IDC_HOTKEY1 + i, WM_USER + 44, wParam, lParam);
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY6,WM_USER+44,CustomKeys.SkipUp.key,CustomKeys.SkipUp.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY7,WM_USER+44,CustomKeys.SkipDown.key,CustomKeys.SkipDown.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY8,WM_USER+44,CustomKeys.ScopeTurbo.key,CustomKeys.ScopeTurbo.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY9,WM_USER+44,CustomKeys.ScopePause.key,CustomKeys.ScopePause.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY10,WM_USER+44,CustomKeys.ShowPressed.key,CustomKeys.ShowPressed.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44,CustomKeys.FrameCount.key,CustomKeys.FrameCount.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44,CustomKeys.ReadOnly.key,CustomKeys.ReadOnly.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44,CustomKeys.SaveScreenShot.key,CustomKeys.SaveScreenShot.modifiers);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY1,WM_USER+44,CustomKeys.BGL1.key,CustomKeys.BGL1.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY2,WM_USER+44,CustomKeys.BGL2.key,CustomKeys.BGL2.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY3,WM_USER+44,CustomKeys.BGL3.key,CustomKeys.BGL3.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY4,WM_USER+44,CustomKeys.BGL4.key,CustomKeys.BGL4.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY5,WM_USER+44,CustomKeys.BGL5.key,CustomKeys.BGL5.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY6,WM_USER+44,CustomKeys.ClippingWindows.key,CustomKeys.ClippingWindows.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY7,WM_USER+44,CustomKeys.Transparency.key,CustomKeys.Transparency.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY8,WM_USER+44,CustomKeys.FastForwardToggle.key,CustomKeys.FastForwardToggle.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY9,WM_USER+44,CustomKeys.Rewind.key,CustomKeys.Rewind.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY10,WM_USER+44,CustomKeys.SwitchControllers.key,CustomKeys.SwitchControllers.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44,CustomKeys.JoypadSwap.key,CustomKeys.JoypadSwap.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44,CustomKeys.ResetGame.key,CustomKeys.ResetGame.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44,CustomKeys.ToggleCheats.key,CustomKeys.ToggleCheats.modifiers);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY1,WM_USER+44,CustomKeys.TurboA.key,CustomKeys.TurboA.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY2,WM_USER+44,CustomKeys.TurboB.key,CustomKeys.TurboB.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY3,WM_USER+44,CustomKeys.TurboY.key,CustomKeys.TurboY.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY4,WM_USER+44,CustomKeys.TurboX.key,CustomKeys.TurboX.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY5,WM_USER+44,CustomKeys.TurboL.key,CustomKeys.TurboL.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY6,WM_USER+44,CustomKeys.TurboR.key,CustomKeys.TurboR.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY7,WM_USER+44,CustomKeys.TurboStart.key,CustomKeys.TurboStart.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY8,WM_USER+44,CustomKeys.TurboSelect.key,CustomKeys.TurboSelect.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY9,WM_USER+44,CustomKeys.TurboLeft.key,CustomKeys.TurboLeft.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY10,WM_USER+44,CustomKeys.TurboUp.key,CustomKeys.TurboUp.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44,CustomKeys.TurboRight.key,CustomKeys.TurboRight.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44,CustomKeys.TurboDown.key,CustomKeys.TurboDown.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44, CustomKeys.Mute.key, CustomKeys.Mute.modifiers);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
for(int i = 0 ; i < 10 ; i++)
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY1+i,WM_USER+44,CustomKeys.SelectSave[i].key,CustomKeys.SelectSave[i].modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY11,WM_USER+44, CustomKeys.SaveFileSelect.key, CustomKeys.SaveFileSelect.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY12,WM_USER+44, CustomKeys.LoadFileSelect.key, CustomKeys.LoadFileSelect.modifiers);
|
|
||||||
SendDlgItemMessage(hDlg,IDC_HOTKEY13,WM_USER+44,CustomKeys.QuitS9X.key,CustomKeys.QuitS9X.modifiers);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SendDlgItemMessage(hDlg,IDC_SLOTPLUS,WM_USER+44,CustomKeys.SlotPlus.key,CustomKeys.SlotPlus.modifiers);
|
SendDlgItemMessage(hDlg,IDC_SLOTPLUS,WM_USER+44,CustomKeys.SlotPlus.key,CustomKeys.SlotPlus.modifiers);
|
||||||
|
@ -8418,67 +8443,9 @@ static void set_hotkeyinfo(HWND hDlg)
|
||||||
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_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);
|
for(i = 0 ; i < 10 ; i++) SendDlgItemMessage(hDlg,IDC_SAVE11+i,WM_USER+44,CustomKeys.Load[i].key,CustomKeys.Load[i].modifiers);
|
||||||
|
|
||||||
switch(index)
|
for(int i = 0; i < MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS; i++)
|
||||||
{
|
{
|
||||||
case 0:
|
SetDlgItemText(hDlg, IDC_LABEL_HK1 + i, hotkey_dialog_items[index][i].description);
|
||||||
// set page 1 label text
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK1,HOTKEYS_LABEL_1_1);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK2,HOTKEYS_LABEL_1_2);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK3,HOTKEYS_LABEL_1_3);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK4,HOTKEYS_LABEL_1_4);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK5,HOTKEYS_LABEL_1_5);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK6,HOTKEYS_LABEL_1_6);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK7,HOTKEYS_LABEL_1_7);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK8,HOTKEYS_LABEL_1_8);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK9,HOTKEYS_LABEL_1_9);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK10,HOTKEYS_LABEL_1_10);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK11,HOTKEYS_LABEL_1_11);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK12,HOTKEYS_LABEL_1_12);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK13,HOTKEYS_LABEL_1_13);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK1,HOTKEYS_LABEL_2_1);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK2,HOTKEYS_LABEL_2_2);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK3,HOTKEYS_LABEL_2_3);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK4,HOTKEYS_LABEL_2_4);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK5,HOTKEYS_LABEL_2_5);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK6,HOTKEYS_LABEL_2_6);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK7,HOTKEYS_LABEL_2_7);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK8,HOTKEYS_LABEL_2_8);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK9,HOTKEYS_LABEL_2_9);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK10,HOTKEYS_LABEL_2_10);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK11,HOTKEYS_LABEL_2_11);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK12,HOTKEYS_LABEL_2_12);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK13,HOTKEYS_LABEL_2_13);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK1,HOTKEYS_LABEL_3_1);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK2,HOTKEYS_LABEL_3_2);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK3,HOTKEYS_LABEL_3_3);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK4,HOTKEYS_LABEL_3_4);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK5,HOTKEYS_LABEL_3_5);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK6,HOTKEYS_LABEL_3_6);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK7,HOTKEYS_LABEL_3_7);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK8,HOTKEYS_LABEL_3_8);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK9,HOTKEYS_LABEL_3_9);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK10,HOTKEYS_LABEL_3_10);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK11,HOTKEYS_LABEL_3_11);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK12,HOTKEYS_LABEL_3_12);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK13, HOTKEYS_LABEL_3_13);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
for(int i = 0 ; i < 10 ; i++)
|
|
||||||
{
|
|
||||||
TCHAR temp [64];
|
|
||||||
_stprintf(temp, TEXT("Select Slot %d"), i);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK1+i,temp);
|
|
||||||
}
|
|
||||||
SetDlgItemText(hDlg, IDC_LABEL_HK11, HOTKEYS_LABEL_4_11);
|
|
||||||
SetDlgItemText(hDlg, IDC_LABEL_HK12, HOTKEYS_LABEL_4_12);
|
|
||||||
SetDlgItemText(hDlg,IDC_LABEL_HK13,HOTKEYS_LABEL_4_13);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8560,85 +8527,6 @@ switch(msg)
|
||||||
|
|
||||||
switch(which)
|
switch(which)
|
||||||
{
|
{
|
||||||
case IDC_HOTKEY1:
|
|
||||||
if(index == 0) CustomKeys.SpeedUp.key = wParam, CustomKeys.SpeedUp.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.BGL1.key = wParam, CustomKeys.BGL1.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboA.key = wParam, CustomKeys.TurboA.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[0].key = wParam, CustomKeys.SelectSave[0].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY2:
|
|
||||||
if(index == 0) CustomKeys.SpeedDown.key = wParam, CustomKeys.SpeedDown.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.BGL2.key = wParam, CustomKeys.BGL2.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboB.key = wParam, CustomKeys.TurboB.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[1].key = wParam, CustomKeys.SelectSave[1].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY3:
|
|
||||||
if(index == 0) CustomKeys.Pause.key = wParam, CustomKeys.Pause.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.BGL3.key = wParam, CustomKeys.BGL3.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboY.key = wParam, CustomKeys.TurboY.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[2].key = wParam, CustomKeys.SelectSave[2].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY4:
|
|
||||||
if(index == 0) CustomKeys.FrameAdvance.key = wParam, CustomKeys.FrameAdvance.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.BGL4.key = wParam, CustomKeys.BGL4.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboX.key = wParam, CustomKeys.TurboX.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[3].key = wParam, CustomKeys.SelectSave[3].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY5:
|
|
||||||
if(index == 0) CustomKeys.FastForward.key = wParam, CustomKeys.FastForward.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.BGL5.key = wParam, CustomKeys.BGL5.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboL.key = wParam, CustomKeys.TurboL.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[4].key = wParam, CustomKeys.SelectSave[4].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY6:
|
|
||||||
if(index == 0) CustomKeys.SkipUp.key = wParam, CustomKeys.SkipUp.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.ClippingWindows.key = wParam, CustomKeys.ClippingWindows.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboR.key = wParam, CustomKeys.TurboR.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[5].key = wParam, CustomKeys.SelectSave[5].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY7:
|
|
||||||
if(index == 0) CustomKeys.SkipDown.key = wParam, CustomKeys.SkipDown.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.Transparency.key = wParam, CustomKeys.Transparency.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboStart.key = wParam, CustomKeys.TurboStart.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[6].key = wParam, CustomKeys.SelectSave[6].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY8:
|
|
||||||
if(index == 0) CustomKeys.ScopeTurbo.key = wParam, CustomKeys.ScopeTurbo.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.FastForwardToggle.key = wParam, CustomKeys.FastForwardToggle.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboSelect.key = wParam, CustomKeys.TurboSelect.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[7].key = wParam, CustomKeys.SelectSave[7].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY9:
|
|
||||||
if(index == 0) CustomKeys.ScopePause.key = wParam, CustomKeys.ScopePause.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.Rewind.key = wParam, CustomKeys.Rewind.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboLeft.key = wParam, CustomKeys.TurboLeft.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[8].key = wParam, CustomKeys.SelectSave[8].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY10:
|
|
||||||
if(index == 0) CustomKeys.ShowPressed.key = wParam, CustomKeys.ShowPressed.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.SwitchControllers.key = wParam, CustomKeys.SwitchControllers.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboUp.key = wParam, CustomKeys.TurboUp.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SelectSave[9].key = wParam, CustomKeys.SelectSave[9].modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY11:
|
|
||||||
if(index == 0) CustomKeys.FrameCount.key = wParam, CustomKeys.FrameCount.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.JoypadSwap.key = wParam, CustomKeys.JoypadSwap.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboRight.key = wParam, CustomKeys.TurboRight.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.SaveFileSelect.key = wParam, CustomKeys.SaveFileSelect.modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY12:
|
|
||||||
if(index == 0) CustomKeys.ReadOnly.key = wParam, CustomKeys.ReadOnly.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.ResetGame.key = wParam, CustomKeys.ResetGame.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.TurboDown.key = wParam, CustomKeys.TurboDown.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.LoadFileSelect.key = wParam, CustomKeys.LoadFileSelect.modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
case IDC_HOTKEY13:
|
|
||||||
if(index == 0) CustomKeys.SaveScreenShot.key = wParam, CustomKeys.SaveScreenShot.modifiers = modifiers;
|
|
||||||
if(index == 1) CustomKeys.ToggleCheats.key = wParam, CustomKeys.ToggleCheats.modifiers = modifiers;
|
|
||||||
if(index == 2) CustomKeys.Mute.key = wParam, CustomKeys.Mute.modifiers = modifiers;
|
|
||||||
if(index == 3) CustomKeys.QuitS9X.key = wParam, CustomKeys.QuitS9X.modifiers = modifiers;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IDC_SLOTPLUS:
|
case IDC_SLOTPLUS:
|
||||||
CustomKeys.SlotPlus.key = wParam;
|
CustomKeys.SlotPlus.key = wParam;
|
||||||
CustomKeys.SlotPlus.modifiers = modifiers;
|
CustomKeys.SlotPlus.modifiers = modifiers;
|
||||||
|
@ -8670,6 +8558,13 @@ switch(msg)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(which >= IDC_HOTKEY1 && which <= IDC_HOTKEY13)
|
||||||
|
{
|
||||||
|
int offset = which - IDC_HOTKEY1;
|
||||||
|
hotkey_dialog_items[index][offset].key_entry->key = wParam;
|
||||||
|
hotkey_dialog_items[index][offset].key_entry->modifiers = modifiers;
|
||||||
|
}
|
||||||
|
|
||||||
if(which >= IDC_SAVE1 && which <= IDC_SAVE10)
|
if(which >= IDC_SAVE1 && which <= IDC_SAVE10)
|
||||||
{
|
{
|
||||||
CustomKeys.Save[which-IDC_SAVE1].key = wParam;
|
CustomKeys.Save[which-IDC_SAVE1].key = wParam;
|
||||||
|
|
Loading…
Reference in New Issue