ADDED video layer reset "OptionsVideoLayersReset" function to commands list, CTRL+0

This commit is contained in:
spacy51 2008-10-24 11:59:30 +00:00
parent 6972fb6e7f
commit 217548de1e
6 changed files with 18 additions and 5 deletions

View File

@ -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 },

View File

@ -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)

View File

@ -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();

View File

@ -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);

View File

@ -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

View File

@ -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