win32: remove "Toggled fast forward mode" checkbox, and give "fast forward toggle" hotkey

This commit is contained in:
gocha 2012-08-03 08:05:57 +09:00 committed by OV2
parent 95e71e726f
commit fb2935d454
6 changed files with 33 additions and 36 deletions

View File

@ -68,7 +68,6 @@
#define IDC_AUTO_SAVE_DELAY 1057
#define IDC_MAX_SKIP 1058
#define IDC_TURBO_SKIP 1059
#define IDC_TOGGLE_TURBO 1060
#define IDC_SRAM_SPIN 1061
#define IDC_SPIN_MAX_SKIP 1062
#define IDC_SPIN_TURBO_SKIP 1063

View File

@ -100,7 +100,7 @@ BEGIN
EDITTEXT IDC_DISCLAIMER,7,7,218,148,ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL,WS_EX_STATICEDGE
END
IDD_EMU_SETTINGS DIALOGEX 0, 0, 319, 184
IDD_EMU_SETTINGS DIALOGEX 0, 0, 319, 173
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
CAPTION "APP - Emulator Settings"
FONT 8, "MS Sans Serif", 0, 0, 0x0
@ -117,12 +117,11 @@ BEGIN
CONTROL "",IDC_REWIND_BUFFER_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,294,114,11,13
EDITTEXT IDC_REWIND_GRANULARITY,91,120,49,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_REWIND_GRANULARITY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,293,131,11,13
CONTROL "Toggled Turbo Mode",IDC_TOGGLE_TURBO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,136,123,12
CONTROL "Pause When Inactive",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,147,100,12
CONTROL "Custom ROM Open Dialog",IDC_CUSTOMROMOPEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,158,117,12
CONTROL "Hi-Res AVI Recording",IDC_HIRESAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,169,117,12
DEFPUSHBUTTON "&OK",IDOK,215,168,46,14
PUSHBUTTON "&Cancel",IDCANCEL,266,168,46,14
CONTROL "Pause When Inactive",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,136,100,12
CONTROL "Custom ROM Open Dialog",IDC_CUSTOMROMOPEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,147,117,12
CONTROL "Hi-Res AVI Recording",IDC_HIRESAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,91,158,117,12
DEFPUSHBUTTON "&OK",IDOK,215,157,46,14
PUSHBUTTON "&Cancel",IDCANCEL,266,157,46,14
COMBOBOX IDC_DIRCOMBO,7,29,44,30,CBS_DROPDOWNLIST | WS_TABSTOP
RTEXT "Directory",IDC_LABEL_FREEZE,53,28,32,14,SS_CENTERIMAGE
RTEXT "Auto-Save S-RAM",IDC_LABEL_ASRAM,21,47,64,14,SS_CENTERIMAGE
@ -589,7 +588,7 @@ BEGIN
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 312
BOTTOMMARGIN, 177
BOTTOMMARGIN, 166
END
IDD_OPEN_ROM, DIALOG

View File

@ -911,7 +911,6 @@ void WinRegisterConfigItems()
AddBoolC("PauseWhenInactive", GUI.InactivePause, TRUE, "true to pause Snes9x when it is not the active window");
AddBoolC("CustomRomOpenDialog", GUI.CustomRomOpen, false, "false to use standard Windows open dialog for the ROM open dialog");
AddBoolC("AVIHiRes", GUI.AVIHiRes, false, "true to record AVI in Hi-Res scale");
AddBoolC("ToggledTurbo", GUI.TurboModeToggle, FALSE, "true to allow fast-forward to stay on without holding the turbo button");
// AddUIntC("Language", GUI.Language, 0, "0=English, 1=Nederlands"); // NYI
AddBoolC("FrameAdvanceSkipsNonInput", GUI.FASkipsNonInput, false, "causes frame advance to fast-forward past frames where the game is definitely not checking input, such as during lag or loading time. EXPERIMENTAL");
AddBool("MovieDefaultClearSRAM", GUI.MovieClearSRAM, false);
@ -1009,7 +1008,7 @@ void WinRegisterConfigItems()
#define ADDN(x,n2) AddVKey("Key:" #n2, CustomKeys.x.key, CustomKeys.x.key); AddVKMod("Mods:" #n2, CustomKeys.x.modifiers, CustomKeys.x.modifiers)
ADD(SpeedUp); ADD(SpeedDown); ADD(Pause); ADD(FrameAdvance);
ADD(SkipUp); ADD(SkipDown); ADD(ScopeTurbo); ADD(ScopePause);
ADD(FrameCount); ADD(ReadOnly); ADD(FastForward); ADD(ShowPressed);
ADD(FrameCount); ADD(ReadOnly); ADD(FastForward); ADD(FastForwardToggle); ADD(ShowPressed);
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);

View File

@ -272,6 +272,7 @@ Nintendo is a trade mark.")
#define HOTKEYS_LABEL_2_5 TEXT("Sprites Layer")
#define HOTKEYS_LABEL_2_6 TEXT("Clipping Windows")
#define HOTKEYS_LABEL_2_7 TEXT("Transparency")
#define HOTKEYS_LABEL_2_8 TEXT("fast forward toggle")
#define HOTKEYS_LABEL_2_9 TEXT("Rewind")
#define HOTKEYS_LABEL_2_10 TEXT("Switch Controllers")
#define HOTKEYS_LABEL_2_11 TEXT("Joypad Swap")
@ -459,7 +460,6 @@ Nintendo is a trade mark.")
#define EMUSET_LABEL_SMAX_TEXT TEXT("frames in auto-frame rate mode")
#define EMUSET_LABEL_STURBO TEXT("Skip Rendering")
#define EMUSET_LABEL_STURBO_TEXT TEXT("frames in fast-forward mode")
#define EMUSET_TOGGLE_TURBO TEXT("Toggled fast-forward mode")
//Netplay Options

View File

@ -521,6 +521,7 @@ struct SCustomKeys CustomKeys = {
{VK_F9,0},
{VK_F10,0}},
{VK_TAB,0}, // fast forward (TAB)
{0,0}, // fast forward toggle
{/*VK_OEM_COMMA*/0xBC,0}, // show pressed keys/buttons (,)
{VK_F12,0}, // save screenshot (F12)
{0,0}, // slot plus (disabled by default)
@ -1046,22 +1047,25 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
{
if(Settings.SPC7110RTC)
return 1;
if (GUI.TurboModeToggle)
{
Settings.TurboMode ^= TRUE;
if (Settings.TurboMode)
S9xMessage (S9X_INFO, S9X_TURBO_MODE,
WINPROC_TURBOMODE_ON);
else
S9xMessage (S9X_INFO, S9X_TURBO_MODE,
WINPROC_TURBOMODE_OFF);
}
if(!Settings.TurboMode)
S9xMessage (S9X_INFO, S9X_TURBO_MODE, WINPROC_TURBOMODE_TEXT);
Settings.TurboMode = TRUE;
hitHotKey = true;
}
if(wParam == CustomKeys.FastForwardToggle.key
&& modifiers == CustomKeys.FastForwardToggle.modifiers)
{
if(Settings.SPC7110RTC)
return 1;
Settings.TurboMode ^= TRUE;
if (Settings.TurboMode)
S9xMessage (S9X_INFO, S9X_TURBO_MODE,
WINPROC_TURBOMODE_ON);
else
{
if(!Settings.TurboMode)
S9xMessage (S9X_INFO, S9X_TURBO_MODE, WINPROC_TURBOMODE_TEXT);
Settings.TurboMode = TRUE;
}
S9xMessage (S9X_INFO, S9X_TURBO_MODE,
WINPROC_TURBOMODE_OFF);
hitHotKey = true;
}
if(wParam == CustomKeys.ShowPressed.key
@ -1480,8 +1484,7 @@ LRESULT CALLBACK WinProc(
if(wParam == CustomKeys.FastForward.key
&& modifiers == CustomKeys.FastForward.modifiers)
{
if (!GUI.TurboModeToggle)
Settings.TurboMode = FALSE;
Settings.TurboMode = FALSE;
}
if(wParam == CustomKeys.ScopePause.key
&& modifiers == CustomKeys.ScopePause.modifiers)
@ -4921,7 +4924,6 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
WinRefreshDisplay();
{
SetWindowText(hDlg, EMUSET_TITLE);
SetDlgItemText(hDlg, IDC_TOGGLE_TURBO, EMUSET_TOGGLE_TURBO);
SetDlgItemText(hDlg, IDC_LABEL_FREEZE, EMUSET_LABEL_DIRECTORY);
SetDlgItemText(hDlg, IDOK, BUTTON_OK);
SetDlgItemText(hDlg, IDCANCEL, BUTTON_CANCEL);
@ -4944,7 +4946,6 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hDlg, IDC_REWIND_BUFFER_SPIN,UDM_SETPOS,0, GUI.rewindBufferSize);
SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN, UDM_SETRANGE, 0, MAKELPARAM((short)300, (short)1));
SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN,UDM_SETPOS,0, GUI.rewindGranularity);
CheckDlgButton(hDlg,IDC_TOGGLE_TURBO,GUI.TurboModeToggle ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_INACTIVE_PAUSE,GUI.InactivePause ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_CUSTOMROMOPEN,GUI.CustomRomOpen ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_HIRESAVI,GUI.AVIHiRes ? BST_CHECKED : BST_UNCHECKED);
@ -5028,7 +5029,6 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
lstrcpy(GUI.PatchDir,paths[inum++]);
lstrcpy(GUI.BiosDir,paths[inum++]);
GUI.TurboModeToggle = (BST_CHECKED==IsDlgButtonChecked(hDlg, IDC_TOGGLE_TURBO));
GUI.InactivePause = (BST_CHECKED==IsDlgButtonChecked(hDlg, IDC_INACTIVE_PAUSE));
GUI.CustomRomOpen = (BST_CHECKED==IsDlgButtonChecked(hDlg, IDC_CUSTOMROMOPEN));
GUI.AVIHiRes = (BST_CHECKED==IsDlgButtonChecked(hDlg, IDC_HIRESAVI));
@ -7790,7 +7790,7 @@ static void set_hotkeyinfo(HWND hDlg)
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,0,0);
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);
@ -7855,7 +7855,7 @@ static void set_hotkeyinfo(HWND hDlg)
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,INPUTCONFIG_LABEL_UNUSED);
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);
@ -8015,7 +8015,7 @@ switch(msg)
break;
case IDC_HOTKEY8:
if(index == 0) CustomKeys.ScopeTurbo.key = wParam, CustomKeys.ScopeTurbo.modifiers = modifiers;
// if(index == 1) CustomKeys.HDMA.key = wParam, CustomKeys.HDMA.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;

View File

@ -338,7 +338,6 @@ struct sGUI {
bool NeedDepthConvert;
bool DepthConverted;
bool TurboModeToggle;
bool InactivePause;
bool CustomRomOpen;
bool FASkipsNonInput;
@ -446,6 +445,7 @@ struct SCustomKeys {
SCustomKey Save [10];
SCustomKey Load [10];
SCustomKey FastForward;
SCustomKey FastForwardToggle;
SCustomKey ShowPressed;
SCustomKey SaveScreenShot;
SCustomKey SlotPlus;