diff --git a/src/win32/Commands.cpp b/src/win32/Commands.cpp index 4bb7cf1e..57921df3 100644 --- a/src/win32/Commands.cpp +++ b/src/win32/Commands.cpp @@ -115,14 +115,15 @@ struct { { "OptionsVideo800x600", ID_OPTIONS_VIDEO_FULLSCREEN800X600 }, { "OptionsVideoFullscreen", ID_OPTIONS_VIDEO_FULLSCREEN }, { "OptionsVideoFullscreenMaxScale", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE }, - { "OptionsVideoLayersBg0", ID_OPTIONS_VIDEO_LAYERS_BG0 }, - { "OptionsVideoLayersBg1", ID_OPTIONS_VIDEO_LAYERS_BG1 }, - { "OptionsVideoLayersBg2", ID_OPTIONS_VIDEO_LAYERS_BG2 }, - { "OptionsVideoLayersBg3", ID_OPTIONS_VIDEO_LAYERS_BG3 }, + { "OptionsVideoLayersBG0", ID_OPTIONS_VIDEO_LAYERS_BG0 }, + { "OptionsVideoLayersBG1", ID_OPTIONS_VIDEO_LAYERS_BG1 }, + { "OptionsVideoLayersBG2", ID_OPTIONS_VIDEO_LAYERS_BG2 }, + { "OptionsVideoLayersBG3", ID_OPTIONS_VIDEO_LAYERS_BG3 }, { "OptionsVideoLayersOBJ", ID_OPTIONS_VIDEO_LAYERS_OBJ }, { "OptionsVideoLayersWIN0", ID_OPTIONS_VIDEO_LAYERS_WIN0 }, { "OptionsVideoLayersWIN1", ID_OPTIONS_VIDEO_LAYERS_WIN1 }, { "OptionsVideoLayersOBJWIN", ID_OPTIONS_VIDEO_LAYERS_OBJWIN }, + { "OptionsVideoLayersReset", ID_OPTIONS_VIDEO_LAYERS_RESET }, { "OptionsEmulatorAssociate", ID_OPTIONS_EMULATOR_ASSOCIATE }, { "OptionsEmulatorDirectories", ID_OPTIONS_EMULATOR_DIRECTORIES }, { "OptionsEmulatorGameOverrides", ID_OPTIONS_EMULATOR_GAMEOVERRIDES }, diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index cf0b5f44..8b303afd 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -351,6 +351,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_COMMAND_EX_RANGE(ID_OPTIONS_VIDEO_X1, ID_OPTIONS_VIDEO_X4, OnOptionVideoSize) ON_COMMAND_EX_RANGE(ID_OPTIONS_VIDEO_LAYERS_BG0, ID_OPTIONS_VIDEO_LAYERS_OBJWIN, OnVideoLayer) ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_VIDEO_LAYERS_BG0, ID_OPTIONS_VIDEO_LAYERS_OBJWIN, OnUpdateVideoLayer) + ON_COMMAND(ID_OPTIONS_VIDEO_LAYERS_RESET, OnVideoLayerReset) ON_COMMAND(ID_SYSTEM_MINIMIZE, OnSystemMinimize) ON_COMMAND_EX_RANGE(ID_OPTIONS_EMULATOR_SHOWSPEED_NONE, ID_OPTIONS_EMULATOR_SHOWSPEED_TRANSPARENT, OnOptionsEmulatorShowSpeed) ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_EMULATOR_SHOWSPEED_NONE, ID_OPTIONS_EMULATOR_SHOWSPEED_TRANSPARENT, OnUpdateOptionsEmulatorShowSpeed) diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index 59aa1074..4ebc1a9f 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -76,6 +76,7 @@ protected: afx_msg void OnSystemMinimize(); afx_msg void OnUpdateVideoLayer(CCmdUI* pCmdUI); afx_msg BOOL OnVideoLayer(UINT nID); + afx_msg void OnVideoLayerReset(); afx_msg BOOL OnOptionVideoSize(UINT nID); afx_msg BOOL OnOptionsFrameskip(UINT nID); afx_msg void OnClose(); diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp index 6d9eda4c..792df874 100644 --- a/src/win32/MainWndOptions.cpp +++ b/src/win32/MainWndOptions.cpp @@ -389,6 +389,14 @@ BOOL MainWnd::OnVideoLayer(UINT nID) return TRUE; } +void MainWnd::OnVideoLayerReset() +{ + layerSettings = 0xFF00; + layerEnable = DISPCNT & layerSettings; + CPUUpdateRenderBuffers(false); + systemScreenMessage( "All layers enabled" ); +} + void MainWnd::OnUpdateVideoLayer(CCmdUI *pCmdUI) { pCmdUI->SetCheck((layerSettings >> (8 + pCmdUI->m_nID - ID_OPTIONS_VIDEO_LAYERS_BG0)) & 1); diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc index 0256bad5..9d069531 100644 --- a/src/win32/VBA.rc +++ b/src/win32/VBA.rc @@ -2042,6 +2042,7 @@ BEGIN "6", ID_OPTIONS_VIDEO_LAYERS_WIN0, VIRTKEY, CONTROL, NOINVERT "7", ID_OPTIONS_VIDEO_LAYERS_WIN1, VIRTKEY, CONTROL, NOINVERT "B", ID_TOOLS_REWIND, VIRTKEY, CONTROL, NOINVERT + "0", ID_OPTIONS_VIDEO_LAYERS_RESET, VIRTKEY, CONTROL, NOINVERT END diff --git a/src/win32/resource.h b/src/win32/resource.h index b226a6d9..b690005b 100644 --- a/src/win32/resource.h +++ b/src/win32/resource.h @@ -867,13 +867,14 @@ #define ID_AUDIO_CORE_SETTINGS 40365 #define ID_FILE_OPEN_GBA 40366 #define ID_FILE_QUICKOPENROM 40367 +#define ID_OPTIONS_VIDEO_LAYERS_RESET 40368 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 165 -#define _APS_NEXT_COMMAND_VALUE 40368 +#define _APS_NEXT_COMMAND_VALUE 40370 #define _APS_NEXT_CONTROL_VALUE 1297 #define _APS_NEXT_SYMED_VALUE 103 #endif