From 16d3cfadb4995c2e6318835bbbcbf4a17187b268 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Tue, 13 Apr 2010 02:12:09 +0000 Subject: [PATCH] Make "Start in Fullscreen" work with the DX9 plugin. Also a partial fix to the problem with Windows not saving the window size correctly when not rendering to main. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5352 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/Frame.h | 2 +- Source/Core/DolphinWX/Src/FrameTools.cpp | 7 +++++++ Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index b544ac4ea2..14c09fb55e 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -121,7 +121,7 @@ class CFrame : public wxFrame void OnRenderParentClose(wxCloseEvent& event); void OnRenderParentMove(wxMoveEvent& event); bool RendererHasFocus(); - void DoFullscreen(bool _F); + void DoFullscreen(bool bF); // AUI wxAuiManager *m_Mgr; diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index b325500cbc..592351f51e 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -844,7 +844,14 @@ void CFrame::DoStop() if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor) m_RenderParent->SetCursor(wxCURSOR_ARROW); if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain) + { +#ifdef _WIN32 + if (!RendererIsFullscreen() && !m_RenderFrame->IsMaximized()) + m_RenderParent->GetSize(&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth, + &SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight); +#endif m_RenderFrame->Destroy(); + } m_RenderParent = NULL; // Clean framerate indications from the status bar. diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index aea97dfb47..7738c3d610 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -248,6 +248,9 @@ void Initialize(void *init) void Video_Prepare() { + // Tell the host the window is ready + g_VideoInitialize.pCoreMessage(WM_USER_CREATE); + // Better be safe... s_efbAccessRequested = FALSE; s_FifoShuttingDown = FALSE;