FIXED: Entering fullscreen while logging window was active caused dead-lock

This commit is contained in:
spacy51 2008-01-26 12:12:16 +00:00
parent 1d53cf0881
commit c87a8b583f
3 changed files with 12 additions and 0 deletions

View File

@ -268,6 +268,14 @@ void toolsLogging()
}
}
void toolsLoggingClose()
{
if(Logging::instance != NULL) {
Logging::instance->DestroyWindow();
Logging::instance = NULL;
}
}
void toolsLog(const char *s)
{
CString str;

View File

@ -97,6 +97,7 @@ class Logging : public ResizeDlg
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
void toolsLogging();
void toolsLoggingClose();
void toolsLog(const char *s);
void toolsClearLog();

View File

@ -27,6 +27,7 @@
#include "RomInfo.h"
#include "Reg.h"
#include "WinResUtil.h"
#include "Logging.h"
#include "../GBA.h"
#include "../Globals.h"
@ -689,10 +690,12 @@ void MainWnd::OnUpdateFileRominformation(CCmdUI* pCmdUI)
pCmdUI->Enable(emulating);
}
//OnFileToggleFullscreen
void MainWnd::OnFileTogglemenu()
{
if( theApp.videoOption <= VIDEO_4X ) {
// switch to full screen
toolsLoggingClose(); // close log dialog
theApp.updateWindowSize( theApp.lastFullscreen );
} else {
// switch to windowed mode