found some more protector code to remove, and added back in pause when inactive toggle/function.
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@863 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
b0682b232e
commit
f84cb6009d
|
@ -155,6 +155,8 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
|
|||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_DISABLESTATUSMESSAGES, OnUpdateOptionsEmulatorDisablestatusmessages)
|
||||
ON_COMMAND(ID_OPTIONS_EMULATOR_SYNCHRONIZE, OnOptionsEmulatorSynchronize)
|
||||
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_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SPEEDUPTOGGLE, OnUpdateOptionsEmulatorSpeeduptoggle)
|
||||
ON_COMMAND(ID_OPTIONS_EMULATOR_AUTOMATICALLYAPPLYPATCHFILES, OnOptionsEmulatorAutomaticallyApplyPatchFiles)
|
||||
|
@ -1154,8 +1156,11 @@ void MainWnd::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
|
|||
}
|
||||
} else {
|
||||
theApp.wasPaused = true;
|
||||
if(emulating) {
|
||||
if(theApp.pauseWhenInactive) {
|
||||
if(emulating) {
|
||||
soundPause();
|
||||
}
|
||||
theApp.active = a;
|
||||
}
|
||||
theApp.active = a;
|
||||
|
||||
|
|
|
@ -158,6 +158,8 @@ protected:
|
|||
afx_msg void OnUpdateOptionsEmulatorDisablestatusmessages(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsEmulatorSynchronize();
|
||||
afx_msg void OnUpdateOptionsEmulatorSynchronize(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsEmulatorPausewheninactive();
|
||||
afx_msg void OnUpdateOptionsEmulatorPausewheninactive(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsEmulatorSpeeduptoggle();
|
||||
afx_msg void OnUpdateOptionsEmulatorSpeeduptoggle(CCmdUI* pCmdUI);
|
||||
afx_msg void OnOptionsEmulatorAutomaticallyApplyPatchFiles();
|
||||
|
|
|
@ -275,6 +275,7 @@ VBA::VBA()
|
|||
iconic = false;
|
||||
glFilter = 0;
|
||||
regEnabled = false;
|
||||
pauseWhenInactive = true;
|
||||
speedupToggle = false;
|
||||
winGbPrinterEnabled = false;
|
||||
threadPriority = 2;
|
||||
|
@ -2046,7 +2047,7 @@ bool VBA::updateRenderMethod(bool force)
|
|||
|
||||
Sm60FPS_Init();
|
||||
|
||||
if( !(this->*secondaryTrapPointer)( force ) ) {
|
||||
if( !updateRenderMethod0( force ) ) {
|
||||
// fall back to safe configuration
|
||||
renderMethod = DIRECT_3D;
|
||||
fsAdapter = 0;
|
||||
|
|
|
@ -58,9 +58,6 @@ enum AUDIO_API {
|
|||
class AVIWrite;
|
||||
class WavWriter;
|
||||
|
||||
typedef DWORD (WINAPI* lpGetModuleFileNameA)(HINSTANCE, LPSTR, DWORD);
|
||||
typedef VOID (WINAPI* lpExitProcess)(UINT);
|
||||
|
||||
class VBA : public CWinApp
|
||||
{
|
||||
public:
|
||||
|
@ -152,6 +149,7 @@ class VBA : public CWinApp
|
|||
bool iconic;
|
||||
int glFilter;
|
||||
bool dinputKeyFocus;
|
||||
bool pauseWhenInactive;
|
||||
bool speedupToggle;
|
||||
bool winGbPrinterEnabled;
|
||||
int threadPriority;
|
||||
|
@ -209,12 +207,6 @@ class VBA : public CWinApp
|
|||
|
||||
CString wndClass;
|
||||
|
||||
lpGetModuleFileNameA pGetModuleFileNameA;
|
||||
lpExitProcess pExitProcess;
|
||||
|
||||
int securityCheck;
|
||||
int securityCheck2;
|
||||
|
||||
public:
|
||||
VBA();
|
||||
~VBA();
|
||||
|
@ -260,14 +252,12 @@ class VBA : public CWinApp
|
|||
void loadSettings();
|
||||
void addRecentFile(CString file);
|
||||
|
||||
bool trap(bool);
|
||||
|
||||
private:
|
||||
unsigned int detectCpuCores();
|
||||
};
|
||||
|
||||
extern VBA theApp;
|
||||
extern int emulating;
|
||||
extern VBA theApp;
|
||||
extern int emulating;
|
||||
|
||||
#ifdef MMX
|
||||
extern "C" bool cpu_mmx;
|
||||
|
|
|
@ -1860,6 +1860,7 @@ BEGIN
|
|||
END
|
||||
MENUITEM "&Remove intros (GBA)", ID_OPTIONS_EMULATOR_REMOVEINTROSGBA
|
||||
MENUITEM "Auto-apply IPS/UPS/PPF", ID_OPTIONS_EMULATOR_AUTOMATICALLYAPPLYPATCHFILES
|
||||
MENUITEM "Pause when inactive", ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE
|
||||
MENUITEM "AGB Print", ID_OPTIONS_EMULATOR_AGBPRINT
|
||||
MENUITEM "Real Time Clock", ID_OPTIONS_EMULATOR_REALTIMECLOCK
|
||||
MENUITEM "&Game Overrides...", ID_OPTIONS_EMULATOR_GAMEOVERRIDES
|
||||
|
|
|
@ -674,6 +674,7 @@
|
|||
#define ID_FILE_EXPORT_BATTERYFILE 40118
|
||||
#define ID_OPTIONS_FILTER16BIT_PIXELATEEXPERIMENTAL 40121
|
||||
#define ID_OPTIONS_FILTER16BIT_MOTIONBLUREXPERIMENTAL 40122
|
||||
#define ID_OPTIONS_EMULATOR_PAUSEWHENINACTIVE 40124
|
||||
#define ID_OPTIONS_SOUND_STARTRECORDING 40125
|
||||
#define ID_OPTIONS_SOUND_STOPRECORDING 40126
|
||||
#define ID_OPTIONS_VIDEO_LAYERS_BG0 40127
|
||||
|
|
Loading…
Reference in New Issue