win32: add superfx speed setting

This commit is contained in:
OV2 2018-05-29 20:36:36 +02:00
parent 756ef37d7f
commit 18fb82c2b6
4 changed files with 29 additions and 12 deletions

View File

@ -45,7 +45,6 @@
#define IDC_RATE 1003 #define IDC_RATE 1003
#define IDC_MIX 1004 #define IDC_MIX 1004
#define IDC_DYNRATECONTROL 1005 #define IDC_DYNRATECONTROL 1005
#define IDC_AUTOMATICINPUTRATE 1021
#define IDC_STEREO 1006 #define IDC_STEREO 1006
#define IDC_REV_STEREO 1007 #define IDC_REV_STEREO 1007
#define IDC_LINEAR_INTER 1008 #define IDC_LINEAR_INTER 1008
@ -64,6 +63,7 @@
#define IDC_WIP1 1019 #define IDC_WIP1 1019
#define IDC_ADDRESS 1020 #define IDC_ADDRESS 1020
#define IDC_FAMT 1020 #define IDC_FAMT 1020
#define IDC_AUTOMATICINPUTRATE 1021
#define IDC_ROM_DATA 1051 #define IDC_ROM_DATA 1051
#define IDC_WARNINGS 1052 #define IDC_WARNINGS 1052
#define IDC_DISCLAIMER 1053 #define IDC_DISCLAIMER 1053
@ -90,6 +90,8 @@
#define IDC_REWIND_BUFFER_SPIN 1069 #define IDC_REWIND_BUFFER_SPIN 1069
#define IDC_REWIND_GRANULARITY 1070 #define IDC_REWIND_GRANULARITY 1070
#define IDC_REWIND_GRANULARITY_SPIN 1071 #define IDC_REWIND_GRANULARITY_SPIN 1071
#define IDC_SFXSPEED 1072
#define IDC_SFXSPEED_SPIN 1073
#define IDC_HOSTNAME 1086 #define IDC_HOSTNAME 1086
#define IDC_PORTNUMBER 1087 #define IDC_PORTNUMBER 1087
#define IDC_CLEARHISTORY 1088 #define IDC_CLEARHISTORY 1088
@ -250,8 +252,10 @@
#define IDC_LABEL_GRANU_TEXT 1187 #define IDC_LABEL_GRANU_TEXT 1187
#define IDC_LABEL_PAUSEINTERVAL 1188 #define IDC_LABEL_PAUSEINTERVAL 1188
#define IDC_LABEL_UP9 1188 #define IDC_LABEL_UP9 1188
#define IDC_LABEL_SFXSPEED 1188
#define IDC_LABEL_PAUSEINTERVAL_TEXT 1189 #define IDC_LABEL_PAUSEINTERVAL_TEXT 1189
#define IDC_LABEL_UP10 1189 #define IDC_LABEL_UP10 1189
#define IDC_LABEL_SFXSPEED_2 1189
#define IDC_LABEL_MAXSKIP 1190 #define IDC_LABEL_MAXSKIP 1190
#define IDC_LABEL_UP11 1190 #define IDC_LABEL_UP11 1190
#define IDC_LABEL_CHEAT_CODE 1191 #define IDC_LABEL_CHEAT_CODE 1191
@ -523,7 +527,7 @@
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 157 #define _APS_NEXT_RESOURCE_VALUE 158
#define _APS_NEXT_COMMAND_VALUE 40178 #define _APS_NEXT_COMMAND_VALUE 40178
#define _APS_NEXT_CONTROL_VALUE 3023 #define _APS_NEXT_CONTROL_VALUE 3023
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101

View File

@ -14,7 +14,6 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// English (United States) resources // English (United States) resources
@ -81,8 +80,8 @@ BEGIN
EDITTEXT IDC_DISCLAIMER,7,7,218,148,ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL,WS_EX_STATICEDGE EDITTEXT IDC_DISCLAIMER,7,7,218,148,ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL,WS_EX_STATICEDGE
END END
IDD_EMU_SETTINGS DIALOGEX 0, 0, 341, 173 IDD_EMU_SETTINGS DIALOGEX 0, 0, 341, 198
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
CAPTION "APP - Emulator Settings" CAPTION "APP - Emulator Settings"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
@ -98,11 +97,13 @@ BEGIN
CONTROL "",IDC_REWIND_BUFFER_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,305,114,11,13 CONTROL "",IDC_REWIND_BUFFER_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,305,114,11,13
EDITTEXT IDC_REWIND_GRANULARITY,102,120,49,14,ES_AUTOHSCROLL | ES_NUMBER EDITTEXT IDC_REWIND_GRANULARITY,102,120,49,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_REWIND_GRANULARITY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,304,131,11,13 CONTROL "",IDC_REWIND_GRANULARITY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,304,131,11,13
CONTROL "Pause When Inactive",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,136,100,12 EDITTEXT IDC_SFXSPEED,102,138,49,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Custom ROM Open Dialog",IDC_CUSTOMROMOPEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,147,117,12 CONTROL "",IDC_SFXSPEED_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,302,147,11,13
CONTROL "Hi-Res AVI Recording",IDC_HIRESAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,158,117,12 CONTROL "Pause When Inactive",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,155,100,12
DEFPUSHBUTTON "&OK",IDOK,226,157,46,14 CONTROL "Custom ROM Open Dialog",IDC_CUSTOMROMOPEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,166,117,12
PUSHBUTTON "&Cancel",IDCANCEL,288,157,46,14 CONTROL "Hi-Res AVI Recording",IDC_HIRESAVI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,177,117,12
DEFPUSHBUTTON "&OK",IDOK,226,176,46,14
PUSHBUTTON "&Cancel",IDCANCEL,288,176,46,14
COMBOBOX IDC_DIRCOMBO,7,29,53,30,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_DIRCOMBO,7,29,53,30,CBS_DROPDOWNLIST | WS_TABSTOP
RTEXT "Directory",IDC_LABEL_FREEZE,64,28,32,14,SS_CENTERIMAGE RTEXT "Directory",IDC_LABEL_FREEZE,64,28,32,14,SS_CENTERIMAGE
RTEXT "Auto-Save S-RAM",IDC_LABEL_ASRAM,32,47,64,14,SS_CENTERIMAGE RTEXT "Auto-Save S-RAM",IDC_LABEL_ASRAM,32,47,64,14,SS_CENTERIMAGE
@ -118,6 +119,8 @@ BEGIN
LTEXT "MB (set to 0 to disable rewind support)",IDC_LABEL_RBUFFER_TEXT,156,102,131,14,SS_CENTERIMAGE LTEXT "MB (set to 0 to disable rewind support)",IDC_LABEL_RBUFFER_TEXT,156,102,131,14,SS_CENTERIMAGE
RTEXT "Rewind Granularity",IDC_LABEL_RGRANU,29,120,64,14,SS_CENTERIMAGE RTEXT "Rewind Granularity",IDC_LABEL_RGRANU,29,120,64,14,SS_CENTERIMAGE
LTEXT "frames",IDC_LABEL_GRANU_TEXT,156,120,131,14,SS_CENTERIMAGE LTEXT "frames",IDC_LABEL_GRANU_TEXT,156,120,131,14,SS_CENTERIMAGE
RTEXT "SuperFX Speed",IDC_LABEL_SFXSPEED,30,138,64,14,SS_CENTERIMAGE
LTEXT "%",IDC_LABEL_SFXSPEED_2,156,138,131,14,SS_CENTERIMAGE
END END
IDD_OPEN_ROM DIALOGEX 0, 0, 430, 223 IDD_OPEN_ROM DIALOGEX 0, 0, 430, 223
@ -583,7 +586,7 @@ BEGIN
BEGIN BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 334 RIGHTMARGIN, 334
BOTTOMMARGIN, 166 BOTTOMMARGIN, 191
END END
IDD_OPEN_ROM, DIALOG IDD_OPEN_ROM, DIALOG
@ -717,6 +720,11 @@ BEGIN
0 0
END END
IDD_EMU_SETTINGS AFX_DIALOG_LAYOUT
BEGIN
0
END
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //

View File

@ -1067,7 +1067,9 @@ void WinRegisterConfigItems()
#undef ADD #undef ADD
#undef ADDN #undef ADDN
#undef CATEGORY #undef CATEGORY
#define CATEGORY "Hack"
AddUIntC("SuperFXClockMultiplier", Settings.SuperFXClockMultiplier, 100, "SuperFX speed, in percent (default 100)");
#undef CATEGORY
} }

View File

@ -5255,6 +5255,8 @@ 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_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_SETRANGE, 0, MAKELPARAM((short)300, (short)1));
SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN,UDM_SETPOS,0, GUI.rewindGranularity); SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN,UDM_SETPOS,0, GUI.rewindGranularity);
SendDlgItemMessage(hDlg, IDC_SFXSPEED_SPIN, UDM_SETRANGE, 0, MAKELPARAM((short)400, (short)50));
SendDlgItemMessage(hDlg, IDC_SFXSPEED_SPIN, UDM_SETPOS, 0, Settings.SuperFXClockMultiplier);
CheckDlgButton(hDlg,IDC_INACTIVE_PAUSE,GUI.InactivePause ? 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_CUSTOMROMOPEN,GUI.CustomRomOpen ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_HIRESAVI,GUI.AVIHiRes ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hDlg,IDC_HIRESAVI,GUI.AVIHiRes ? BST_CHECKED : BST_UNCHECKED);
@ -5353,6 +5355,7 @@ INT_PTR CALLBACK DlgEmulatorProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
Settings.AutoMaxSkipFrames=SendDlgItemMessage(hDlg, IDC_SPIN_MAX_SKIP, UDM_GETPOS, 0,0); Settings.AutoMaxSkipFrames=SendDlgItemMessage(hDlg, IDC_SPIN_MAX_SKIP, UDM_GETPOS, 0,0);
Settings.AutoSaveDelay=SendDlgItemMessage(hDlg, IDC_SRAM_SPIN, UDM_GETPOS, 0,0); Settings.AutoSaveDelay=SendDlgItemMessage(hDlg, IDC_SRAM_SPIN, UDM_GETPOS, 0,0);
GUI.rewindGranularity = SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN, UDM_GETPOS, 0,0); GUI.rewindGranularity = SendDlgItemMessage(hDlg, IDC_REWIND_GRANULARITY_SPIN, UDM_GETPOS, 0,0);
Settings.SuperFXClockMultiplier = SendDlgItemMessage(hDlg, IDC_SFXSPEED_SPIN, UDM_GETPOS, 0, 0);
if(GUI.rewindGranularity==0) GUI.rewindGranularity = 1; if(GUI.rewindGranularity==0) GUI.rewindGranularity = 1;
unsigned int newRewindBufSize = SendDlgItemMessage(hDlg, IDC_REWIND_BUFFER_SPIN, UDM_GETPOS, 0,0); unsigned int newRewindBufSize = SendDlgItemMessage(hDlg, IDC_REWIND_BUFFER_SPIN, UDM_GETPOS, 0,0);
if(GUI.rewindBufferSize != newRewindBufSize) { if(GUI.rewindBufferSize != newRewindBufSize) {