diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 8a757695..82a0d16b 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -458,6 +458,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_COMMAND(ID_OUTPUTAPI_OPENAL, &MainWnd::OnOutputapiOpenal) ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OPENAL, &MainWnd::OnUpdateOutputapiOpenal) ON_COMMAND(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnOutputapiOalconfiguration) + ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_OALCONFIGURATION, &MainWnd::OnUpdateOutputapiOalconfiguration) END_MESSAGE_MAP() diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index 5495e178..4b4fe999 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -452,6 +452,7 @@ public: afx_msg void OnOutputapiOpenal(); afx_msg void OnUpdateOutputapiOpenal(CCmdUI *pCmdUI); afx_msg void OnOutputapiOalconfiguration(); + afx_msg void OnUpdateOutputapiOalconfiguration(CCmdUI *pCmdUI); }; ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp index 1f9176b5..c0925ec4 100644 --- a/src/win32/MainWndOptions.cpp +++ b/src/win32/MainWndOptions.cpp @@ -976,6 +976,7 @@ void MainWnd::OnOptionsSoundOff() void MainWnd::OnUpdateOptionsSoundOff(CCmdUI* pCmdUI) { pCmdUI->SetCheck(soundOffFlag); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } void MainWnd::OnOptionsSoundMute() @@ -1002,6 +1003,7 @@ void MainWnd::OnUpdateOptionsSoundOn(CCmdUI* pCmdUI) { int active = soundGetEnable() & 0x30f; pCmdUI->SetCheck(active != 0 && !soundOffFlag); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } void MainWnd::OnOptionsSoundUseoldsynchronization() @@ -1057,6 +1059,7 @@ void MainWnd::OnOptionsSound11khz() void MainWnd::OnUpdateOptionsSound11khz(CCmdUI* pCmdUI) { pCmdUI->SetCheck(soundQuality == 4); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } void MainWnd::OnOptionsSound22khz() @@ -1070,6 +1073,7 @@ void MainWnd::OnOptionsSound22khz() void MainWnd::OnUpdateOptionsSound22khz(CCmdUI* pCmdUI) { pCmdUI->SetCheck(soundQuality == 2); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } void MainWnd::OnOptionsSound44khz() @@ -1083,6 +1087,7 @@ void MainWnd::OnOptionsSound44khz() void MainWnd::OnUpdateOptionsSound44khz(CCmdUI* pCmdUI) { pCmdUI->SetCheck(soundQuality == 1); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } BOOL MainWnd::OnOptionsSoundVolume(UINT nID) @@ -1988,6 +1993,7 @@ void MainWnd::OnOutputapiDirectsound() void MainWnd::OnUpdateOutputapiDirectsound(CCmdUI *pCmdUI) { pCmdUI->SetCheck( ( theApp.audioAPI == DIRECTSOUND ) ? 1 : 0 ); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); } void MainWnd::OnOutputapiOpenal() @@ -2005,6 +2011,7 @@ void MainWnd::OnUpdateOutputapiOpenal(CCmdUI *pCmdUI) { #ifndef NO_OAL pCmdUI->SetCheck( ( theApp.audioAPI == OPENAL_SOUND ) ? 1 : 0 ); + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); #endif } @@ -2029,3 +2036,10 @@ void MainWnd::OnOutputapiOalconfiguration() } #endif } + +void MainWnd::OnUpdateOutputapiOalconfiguration(CCmdUI *pCmdUI) +{ +#ifndef NO_OAL + pCmdUI->Enable(!theApp.aviRecording && !theApp.soundRecording); +#endif +}