From d8601e00a338cc06979f0e1bedb2ebffccbbcf25 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 12 Apr 2009 21:30:03 +0000 Subject: [PATCH] Win32 - Record AVI and Stop AVI menu items enabled/grayed based on whether an AVI is recording or not. --- desmume/src/windows/main.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index cf055bab6..f68df57bf 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2329,16 +2329,13 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM static int tmp_execute; switch (message) // handle the messages { - /*case WM_ENTERMENULOOP: // temporally removed it (freezes) + case WM_ENTERMENULOOP: //Update menu items that needs to be updated dynamically { - if (execute) - { - NDS_Pause(); - tmp_execute=2; - } else tmp_execute=-1; - return 0; + EnableMenuItem(mainMenu, IDM_FILE_RECORDAVI, MF_BYCOMMAND | (!DRV_AviIsRecording()) ? MF_ENABLED : MF_GRAYED); + EnableMenuItem(mainMenu, IDM_FILE_STOPAVI, MF_BYCOMMAND | (DRV_AviIsRecording()) ? MF_ENABLED : MF_GRAYED); + return 0; } - case WM_EXITMENULOOP: + /*case WM_EXITMENULOOP: { if (tmp_execute==2) NDS_UnPause(); return 0;