REMOVED pause when inactive option as audio skips were inevitable when it was disabled.

REMOVED remains of generic flashcard option in GUI
This commit is contained in:
spacy51 2008-08-13 12:46:49 +00:00
parent dd40cfdc00
commit 86a59cdbcf
8 changed files with 7 additions and 65 deletions

View File

@ -140,7 +140,6 @@ struct {
{ "OptionsEmulatorAutoIPSPatch", ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH }, { "OptionsEmulatorAutoIPSPatch", ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH },
{ "OptionsEmulatorAGBPrint", ID_OPTIONS_EMULATOR_AGBPRINT }, { "OptionsEmulatorAGBPrint", ID_OPTIONS_EMULATOR_AGBPRINT },
{ "OptionsEmulatorRTC", ID_OPTIONS_EMULATOR_REALTIMECLOCK }, { "OptionsEmulatorRTC", ID_OPTIONS_EMULATOR_REALTIMECLOCK },
{ "OptionsEmulatorGenericflashcard", ID_OPTIONS_EMULATOR_GENERICFLASHCARD },
{ "OptionsEmulatorRewindInterval", ID_OPTIONS_EMULATOR_REWINDINTERVAL }, { "OptionsEmulatorRewindInterval", ID_OPTIONS_EMULATOR_REWINDINTERVAL },
{ "OptionsSoundOff", ID_OPTIONS_SOUND_OFF }, { "OptionsSoundOff", ID_OPTIONS_SOUND_OFF },
{ "OptionsSoundMute", ID_OPTIONS_SOUND_MUTE }, { "OptionsSoundMute", ID_OPTIONS_SOUND_MUTE },

View File

@ -175,8 +175,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES, OnUpdateOptionsEmulatorDisablestatusmessages) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES, OnUpdateOptionsEmulatorDisablestatusmessages)
ON_COMMAND(ID_OPTIONS_EMULATOR_SYNCHRONIZE, OnOptionsEmulatorSynchronize) ON_COMMAND(ID_OPTIONS_EMULATOR_SYNCHRONIZE, OnOptionsEmulatorSynchronize)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SYNCHRONIZE, OnUpdateOptionsEmulatorSynchronize) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SYNCHRONIZE, OnUpdateOptionsEmulatorSynchronize)
ON_COMMAND(ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE, OnOptionsEmulatorPausewheninactive)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE, OnUpdateOptionsEmulatorPausewheninactive)
ON_COMMAND(ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE, OnOptionsEmulatorSpeeduptoggle) ON_COMMAND(ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE, OnOptionsEmulatorSpeeduptoggle)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE, OnUpdateOptionsEmulatorSpeeduptoggle) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE, OnUpdateOptionsEmulatorSpeeduptoggle)
ON_COMMAND(ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH, OnOptionsEmulatorAutomaticallyipspatch) ON_COMMAND(ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH, OnOptionsEmulatorAutomaticallyipspatch)
@ -185,8 +183,6 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_AGBPRINT, OnUpdateOptionsEmulatorAgbprint) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_AGBPRINT, OnUpdateOptionsEmulatorAgbprint)
ON_COMMAND(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnOptionsEmulatorRealtimeclock) ON_COMMAND(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnOptionsEmulatorRealtimeclock)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnUpdateOptionsEmulatorRealtimeclock) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_REALTIMECLOCK, OnUpdateOptionsEmulatorRealtimeclock)
ON_COMMAND(ID_OPTIONS_EMULATOR_GENERICFLASHCARD, OnOptionsEmulatorGenericflashcard)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_GENERICFLASHCARD, OnUpdateOptionsEmulatorGenericflashcard)
ON_COMMAND(ID_OPTIONS_EMULATOR_REWINDINTERVAL, OnOptionsEmulatorRewindinterval) ON_COMMAND(ID_OPTIONS_EMULATOR_REWINDINTERVAL, OnOptionsEmulatorRewindinterval)
ON_COMMAND(ID_OPTIONS_EMULATOR_SAVETYPE_AUTOMATIC, OnOptionsEmulatorSavetypeAutomatic) ON_COMMAND(ID_OPTIONS_EMULATOR_SAVETYPE_AUTOMATIC, OnOptionsEmulatorSavetypeAutomatic)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_AUTOMATIC, OnUpdateOptionsEmulatorSavetypeAutomatic) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_AUTOMATIC, OnUpdateOptionsEmulatorSavetypeAutomatic)
@ -510,9 +506,6 @@ bool MainWnd::FileRun()
systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED; systemSaveUpdateCounter = SYSTEM_SAVE_NOT_UPDATED;
theApp.cartridgeType = type; theApp.cartridgeType = type;
if(type == IMAGE_GB) { if(type == IMAGE_GB) {
genericflashcardEnable = theApp.winGenericflashcardEnable;
if(!gbLoadRom(theApp.szFile)) if(!gbLoadRom(theApp.szFile))
return false; return false;
@ -1258,12 +1251,10 @@ void MainWnd::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
} }
} else { } else {
theApp.wasPaused = true; theApp.wasPaused = true;
if(theApp.pauseWhenInactive) {
if(emulating) { if(emulating) {
soundPause(); soundPause();
} }
theApp.active = a; theApp.active = a;
}
memset(theApp.delta,255,sizeof(theApp.delta)); memset(theApp.delta,255,sizeof(theApp.delta));
} }

View File

@ -176,8 +176,6 @@ public:
afx_msg void OnUpdateOptionsEmulatorDisablestatusmessages(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorDisablestatusmessages(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorSynchronize(); afx_msg void OnOptionsEmulatorSynchronize();
afx_msg void OnUpdateOptionsEmulatorSynchronize(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorSynchronize(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorPausewheninactive();
afx_msg void OnUpdateOptionsEmulatorPausewheninactive(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorSpeeduptoggle(); afx_msg void OnOptionsEmulatorSpeeduptoggle();
afx_msg void OnUpdateOptionsEmulatorSpeeduptoggle(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorSpeeduptoggle(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorAutomaticallyipspatch(); afx_msg void OnOptionsEmulatorAutomaticallyipspatch();
@ -186,8 +184,6 @@ public:
afx_msg void OnUpdateOptionsEmulatorAgbprint(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorAgbprint(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorRealtimeclock(); afx_msg void OnOptionsEmulatorRealtimeclock();
afx_msg void OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorGenericflashcard();
afx_msg void OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorRewindinterval(); afx_msg void OnOptionsEmulatorRewindinterval();
afx_msg void OnOptionsEmulatorSavetypeAutomatic(); afx_msg void OnOptionsEmulatorSavetypeAutomatic();
afx_msg void OnUpdateOptionsEmulatorSavetypeAutomatic(CCmdUI* pCmdUI); afx_msg void OnUpdateOptionsEmulatorSavetypeAutomatic(CCmdUI* pCmdUI);

View File

@ -589,16 +589,6 @@ void MainWnd::OnUpdateOptionsEmulatorSynchronize(CCmdUI* pCmdUI)
pCmdUI->SetCheck(synchronize); pCmdUI->SetCheck(synchronize);
} }
void MainWnd::OnOptionsEmulatorPausewheninactive()
{
theApp.pauseWhenInactive = !theApp.pauseWhenInactive;
}
void MainWnd::OnUpdateOptionsEmulatorPausewheninactive(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(theApp.pauseWhenInactive);
}
void MainWnd::OnOptionsEmulatorSpeeduptoggle() void MainWnd::OnOptionsEmulatorSpeeduptoggle()
{ {
theApp.speedupToggle = !theApp.speedupToggle; theApp.speedupToggle = !theApp.speedupToggle;
@ -639,22 +629,6 @@ void MainWnd::OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI)
pCmdUI->SetCheck(theApp.winRtcEnable); pCmdUI->SetCheck(theApp.winRtcEnable);
} }
void MainWnd::OnOptionsEmulatorGenericflashcard()
{
if(emulating && theApp.cartridgeType == IMAGE_GB)
theApp.winGenericflashcardEnable = !theApp.winGenericflashcardEnable;
}
void MainWnd::OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI)
{
if(emulating && theApp.cartridgeType == IMAGE_GB)
pCmdUI->SetCheck(theApp.winGenericflashcardEnable);
else
pCmdUI->SetCheck(false);
pCmdUI->Enable(emulating && theApp.cartridgeType == IMAGE_GB);
}
void MainWnd::OnOptionsEmulatorRewindinterval() void MainWnd::OnOptionsEmulatorRewindinterval()
{ {
RewindInterval dlg(theApp.rewindTimer/6); RewindInterval dlg(theApp.rewindTimer/6);

View File

@ -272,7 +272,6 @@ VBA::VBA()
winGbBorderOn = 0; winGbBorderOn = 0;
winFlashSize = 0x20000; winFlashSize = 0x20000;
winRtcEnable = false; winRtcEnable = false;
winGenericflashcardEnable = false;
winSaveType = 0; winSaveType = 0;
rewindMemory = NULL; rewindMemory = NULL;
rewindPos = 0; rewindPos = 0;
@ -307,7 +306,6 @@ VBA::VBA()
iconic = false; iconic = false;
glFilter = 0; glFilter = 0;
regEnabled = false; regEnabled = false;
pauseWhenInactive = true;
speedupToggle = false; speedupToggle = false;
winGbPrinterEnabled = false; winGbPrinterEnabled = false;
threadPriority = 2; threadPriority = 2;
@ -1655,9 +1653,6 @@ void VBA::loadSettings()
else else
gbSerialFunction = NULL; gbSerialFunction = NULL;
pauseWhenInactive = regQueryDwordValue("pauseWhenInactive", 1) ?
true : false;
captureFormat = regQueryDwordValue("captureFormat", 0); captureFormat = regQueryDwordValue("captureFormat", 0);
removeIntros = regQueryDwordValue("removeIntros", false) ? true : false; removeIntros = regQueryDwordValue("removeIntros", false) ? true : false;
@ -2641,8 +2636,6 @@ void VBA::saveSettings()
regSetDwordValue("gbPrinter", winGbPrinterEnabled); regSetDwordValue("gbPrinter", winGbPrinterEnabled);
regSetDwordValue("pauseWhenInactive", pauseWhenInactive);
regSetDwordValue("captureFormat", captureFormat); regSetDwordValue("captureFormat", captureFormat);
regSetDwordValue("removeIntros", removeIntros); regSetDwordValue("removeIntros", removeIntros);

View File

@ -134,7 +134,6 @@ class VBA : public CWinApp
int winGbBorderOn; int winGbBorderOn;
int winFlashSize; int winFlashSize;
bool winRtcEnable; bool winRtcEnable;
bool winGenericflashcardEnable;
int winSaveType; int winSaveType;
char *rewindMemory; char *rewindMemory;
int rewindPos; int rewindPos;
@ -168,7 +167,6 @@ class VBA : public CWinApp
bool iconic; bool iconic;
int glFilter; int glFilter;
bool dinputKeyFocus; bool dinputKeyFocus;
bool pauseWhenInactive;
bool speedupToggle; bool speedupToggle;
bool winGbPrinterEnabled; bool winGbPrinterEnabled;
int threadPriority; int threadPriority;

View File

@ -1865,7 +1865,6 @@ BEGIN
END END
MENUITEM "&Remove intros (GBA)", ID_OPTIONS_EMULATOR_REMOVEINTROSGBA MENUITEM "&Remove intros (GBA)", ID_OPTIONS_EMULATOR_REMOVEINTROSGBA
MENUITEM "Automatic IPS patching", ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH MENUITEM "Automatic IPS patching", ID_OPTIONS_EMULATOR_AUTOMATICALLYIPSPATCH
MENUITEM "Pause when inactive", ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE
MENUITEM "AGB Print", ID_OPTIONS_EMULATOR_AGBPRINT MENUITEM "AGB Print", ID_OPTIONS_EMULATOR_AGBPRINT
MENUITEM "Real Time Clock", ID_OPTIONS_EMULATOR_REALTIMECLOCK MENUITEM "Real Time Clock", ID_OPTIONS_EMULATOR_REALTIMECLOCK
MENUITEM "&Game Overrides...", ID_OPTIONS_EMULATOR_GAMEOVERRIDES MENUITEM "&Game Overrides...", ID_OPTIONS_EMULATOR_GAMEOVERRIDES

View File

@ -640,10 +640,6 @@
#define ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT 40089 #define ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT 40089
#define ID_OPTIONS_EMULATOR_ASSOCIATE 40091 #define ID_OPTIONS_EMULATOR_ASSOCIATE 40091
#define ID_OPTIONS_FILTER_DISABLEMMX 40093 #define ID_OPTIONS_FILTER_DISABLEMMX 40093
#define ID_OPTIONS_1X 40096
#define ID_OPTIONS_2X 40097
#define ID_OPTIONS_3X 40098
#define ID_OPTIONS_4X 40099
#define ID_FILE_ROMINFORMATION 40100 #define ID_FILE_ROMINFORMATION 40100
#define ID_CHEATS_ADDCHEATCODE 40101 #define ID_CHEATS_ADDCHEATCODE 40101
#define ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES 40102 #define ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES 40102
@ -663,7 +659,6 @@
#define ID_FILE_EXPORT_BATTERYFILE 40118 #define ID_FILE_EXPORT_BATTERYFILE 40118
#define ID_OPTIONS_FILTER16BIT_PIXELATEEXPERIMENTAL 40121 #define ID_OPTIONS_FILTER16BIT_PIXELATEEXPERIMENTAL 40121
#define ID_OPTIONS_FILTER16BIT_MOTIONBLUREXPERIMENTAL 40122 #define ID_OPTIONS_FILTER16BIT_MOTIONBLUREXPERIMENTAL 40122
#define ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE 40124
#define ID_OPTIONS_SOUND_STARTRECORDING 40125 #define ID_OPTIONS_SOUND_STARTRECORDING 40125
#define ID_OPTIONS_SOUND_STOPRECORDING 40126 #define ID_OPTIONS_SOUND_STOPRECORDING 40126
#define ID_OPTIONS_VIDEO_LAYERS_BG0 40127 #define ID_OPTIONS_VIDEO_LAYERS_BG0 40127
@ -769,7 +764,6 @@
#define ID_TOOLS_RECORD_STOPMOVIERECORDING 40252 #define ID_TOOLS_RECORD_STOPMOVIERECORDING 40252
#define ID_TOOLS_PLAY_STARTMOVIEPLAYING 40253 #define ID_TOOLS_PLAY_STARTMOVIEPLAYING 40253
#define ID_TOOLS_PLAY_STOPMOVIEPLAYING 40254 #define ID_TOOLS_PLAY_STOPMOVIEPLAYING 40254
#define ID_OPTIONS_EMULATOR_AUTOHIDEMENU 40255
#define ID_OPTIONS_GAMEBOY_BORDERAUTOMATIC 40256 #define ID_OPTIONS_GAMEBOY_BORDERAUTOMATIC 40256
#define ID_OPTIONS_EMULATOR_REWIND 40257 #define ID_OPTIONS_EMULATOR_REWIND 40257
#define ID_TOOLS_REWIND 40258 #define ID_TOOLS_REWIND 40258
@ -791,7 +785,6 @@
#define ID_OPTIONS_FILTER_LQ2X 40275 #define ID_OPTIONS_FILTER_LQ2X 40275
#define ID_OPTIONS_EMULATOR_GAMEOVERRIDES 40276 #define ID_OPTIONS_EMULATOR_GAMEOVERRIDES 40276
#define ID_HELP_GNUPUBLICLICENSE 40277 #define ID_HELP_GNUPUBLICLICENSE 40277
#define ID_OPTIONS_EMULATOR_GENERICFLASHCARD 40279
#define ID_OPTIONS_SOUND_HARDWAREACCELERATION 40281 #define ID_OPTIONS_SOUND_HARDWAREACCELERATION 40281
#define ID_OPTIONS_VIDEO_FULLSCREEN1024X768 40282 #define ID_OPTIONS_VIDEO_FULLSCREEN1024X768 40282
#define ID_OPTIONS_VIDEO_FULLSCREEN1280X1024 40283 #define ID_OPTIONS_VIDEO_FULLSCREEN1280X1024 40283
@ -872,10 +865,9 @@
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 164 #define _APS_NEXT_RESOURCE_VALUE 164
#define _APS_NEXT_COMMAND_VALUE 40365
#define _APS_NEXT_CONTROL_VALUE 1288 #define _APS_NEXT_CONTROL_VALUE 1288
#define _APS_NEXT_SYMED_VALUE 103 #define _APS_NEXT_SYMED_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40365
#endif #endif
#endif #endif