From a3854eef4d7efc609489f81a3cccf34933c0cd27 Mon Sep 17 00:00:00 2001 From: squall-leonhart Date: Sun, 24 Oct 2010 15:41:11 +0000 Subject: [PATCH] more patches, save type detection now only available when a rom is loaded. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@961 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/MainWnd.cpp | 1 + src/win32/MainWnd.h | 1 + src/win32/MainWndOptions.cpp | 5 +++++ src/win32/VBA.rc | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 8a1f657f..73416365 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -189,6 +189,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_COMMAND(ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M, OnOptionsEmulatorSavetypeFlash1m) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M, OnUpdateOptionsEmulatorSavetypeFlash1m) ON_COMMAND(ID_OPTIONS_EMULATOR_SAVETYPE_DETECTNOW, OnOptionsEmulatorSavetypeDetectNow) + ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_SAVETYPE_DETECTNOW, OnUpdateOptionsEmulatorSavetypeDetectNow) ON_COMMAND(ID_OPTIONS_EMULATOR_PNGFORMAT, OnOptionsEmulatorPngformat) ON_UPDATE_COMMAND_UI(ID_OPTIONS_EMULATOR_PNGFORMAT, OnUpdateOptionsEmulatorPngformat) diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index 21c30c3d..49993323 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -192,6 +192,7 @@ protected: afx_msg void OnOptionsEmulatorSavetypeFlash1m(); afx_msg void OnUpdateOptionsEmulatorSavetypeFlash1m(CCmdUI* pCmdUI); afx_msg void OnOptionsEmulatorSavetypeDetectNow(); + afx_msg void OnUpdateOptionsEmulatorSavetypeDetectNow(CCmdUI* pCmdUI); afx_msg void OnOptionsEmulatorPngformat(); afx_msg void OnUpdateOptionsEmulatorPngformat(CCmdUI* pCmdUI); afx_msg void OnOptionsEmulatorBmpformat(); diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp index d5777e15..6b507581 100644 --- a/src/win32/MainWndOptions.cpp +++ b/src/win32/MainWndOptions.cpp @@ -841,6 +841,11 @@ void MainWnd::OnOptionsEmulatorSavetypeDetectNow() MessageBox( answer ); } +void MainWnd::OnUpdateOptionsEmulatorSavetypeDetectNow(CCmdUI* pCmdUI) +{ + pCmdUI->Enable(emulating); +} + void MainWnd::OnOptionsEmulatorPngformat() { theApp.captureFormat = 0; diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc index 8ce20fa7..835ac5f7 100644 --- a/src/win32/VBA.rc +++ b/src/win32/VBA.rc @@ -1919,7 +1919,7 @@ BEGIN MENUITEM "Flash 64 KB", ID_OPTIONS_EMULATOR_SAVETYPE_FLASH512K MENUITEM "Flash 128 KB", ID_OPTIONS_EMULATOR_SAVETYPE_FLASH1M MENUITEM SEPARATOR - MENUITEM "Detect now...", 40372 + MENUITEM "Detect now...", ID_OPTIONS_EMULATOR_SAVETYPE_DETECTNOW END POPUP "Screenshot &Format" BEGIN