Win32 - doloopy code clean up, Memwatch - fix bug in RamChange()
This commit is contained in:
parent
a0d143c3ec
commit
2b34f2624c
|
@ -97,9 +97,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// External functions
|
// External functions
|
||||||
extern std::string cfgFile;
|
extern std::string cfgFile; //Contains the filename of the config file used.
|
||||||
extern bool turbo;
|
extern bool turbo; //Is game in turbo mode?
|
||||||
int counter = 0;
|
|
||||||
void ResetVideo(void);
|
void ResetVideo(void);
|
||||||
void ShowCursorAbs(int w);
|
void ShowCursorAbs(int w);
|
||||||
void HideFWindow(int h);
|
void HideFWindow(int h);
|
||||||
|
@ -128,7 +127,8 @@ int pal_emulation = 0;
|
||||||
int ntsccol = 0, ntsctint, ntschue;
|
int ntsccol = 0, ntsctint, ntschue;
|
||||||
std::string BaseDirectory;
|
std::string BaseDirectory;
|
||||||
int PauseAfterLoad;
|
int PauseAfterLoad;
|
||||||
unsigned int skippy = 0; //Frame skip
|
unsigned int skippy = 0; //Frame skip
|
||||||
|
int frameSkipCounter = 0; //Counter for managing frame skip
|
||||||
// Contains the names of the overridden standard directories
|
// Contains the names of the overridden standard directories
|
||||||
// in the order roms, nonvol, states, fdsrom, snaps, cheats, movies, memwatch, macro, input presets, lua scripts, base
|
// in the order roms, nonvol, states, fdsrom, snaps, cheats, movies, memwatch, macro, input presets, lua scripts, base
|
||||||
char *directory_names[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
char *directory_names[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
@ -681,14 +681,14 @@ doloopy:
|
||||||
|
|
||||||
if (turbo)
|
if (turbo)
|
||||||
{
|
{
|
||||||
if (!counter)
|
if (!frameSkipCounter)
|
||||||
{
|
{
|
||||||
counter = 15;
|
frameSkipCounter = 15;
|
||||||
skippy = 0;
|
skippy = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
counter--;
|
frameSkipCounter--;
|
||||||
skippy = 1;
|
skippy = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -923,7 +923,11 @@ void RamChange()
|
||||||
if (!RamChangeInitialize) return;
|
if (!RamChangeInitialize) return;
|
||||||
for (int x = 0; x < MAX_RAMMONITOR; x++)
|
for (int x = 0; x < MAX_RAMMONITOR; x++)
|
||||||
{
|
{
|
||||||
MWRec& mwrec = mwrecs[x];
|
int whichRec;
|
||||||
|
if (x<2) whichRec = x;
|
||||||
|
else whichRec = x+10; //If ramchange monitor 3 or 4, must use 1st two of 2nd column (12 & 13)
|
||||||
|
MWRec& mwrec = mwrecs[whichRec];
|
||||||
|
|
||||||
if(mwrec.valid && GameInfo)
|
if(mwrec.valid && GameInfo)
|
||||||
{
|
{
|
||||||
int whichADDR = 0;
|
int whichADDR = 0;
|
||||||
|
|
|
@ -394,6 +394,7 @@ static void UpdateSD(HWND hwndDlg)
|
||||||
CheckDlgButton(hwndDlg,CHECK_SOUND_GLOBAL_FOCUS,(soundoptions&SO_GFOCUS)?BST_CHECKED:BST_UNCHECKED);
|
CheckDlgButton(hwndDlg,CHECK_SOUND_GLOBAL_FOCUS,(soundoptions&SO_GFOCUS)?BST_CHECKED:BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg,CHECK_SOUND_MUTEFA,(soundoptions&SO_MUTEFA)?BST_CHECKED:BST_UNCHECKED);
|
CheckDlgButton(hwndDlg,CHECK_SOUND_MUTEFA,(soundoptions&SO_MUTEFA)?BST_CHECKED:BST_UNCHECKED);
|
||||||
CheckDlgButton(hwndDlg,CHECK_SOUND_MUTETURBO,(muteTurbo)?BST_CHECKED:BST_UNCHECKED);
|
CheckDlgButton(hwndDlg,CHECK_SOUND_MUTETURBO,(muteTurbo)?BST_CHECKED:BST_UNCHECKED);
|
||||||
|
|
||||||
// The option formerly flagged by SO_OLDUP can no longer be enabled.
|
// The option formerly flagged by SO_OLDUP can no longer be enabled.
|
||||||
// CheckDlgButton(hwndDlg,131,(soundoptions&SO_OLDUP)?BST_CHECKED:BST_UNCHECKED);
|
// CheckDlgButton(hwndDlg,131,(soundoptions&SO_OLDUP)?BST_CHECKED:BST_UNCHECKED);
|
||||||
SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_SETCURSEL,soundquality,(LPARAM)(LPSTR)0);
|
SendDlgItemMessage(hwndDlg,COMBO_SOUND_QUALITY,CB_SETCURSEL,soundquality,(LPARAM)(LPSTR)0);
|
||||||
|
|
Loading…
Reference in New Issue