From f2759ffe65b00b1e49486e7ab050a1ac079921c1 Mon Sep 17 00:00:00 2001 From: Armada Date: Sun, 15 Jun 2014 00:23:43 +0200 Subject: Remove EmuWindow. All it did was raise complexity. --- Source/Core/VideoBackends/D3D/Render.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'Source/Core/VideoBackends/D3D/Render.cpp') diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index f7c493577c..0db11ec1c2 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -26,7 +26,6 @@ #include "VideoCommon/AVIDump.h" #include "VideoCommon/BPFunctions.h" -#include "VideoCommon/EmuWindow.h" #include "VideoCommon/Fifo.h" #include "VideoCommon/FPSCounter.h" #include "VideoCommon/ImageWrite.h" @@ -178,7 +177,7 @@ void CreateScreenshotTexture(const TargetRectangle& rc) D3D::SetDebugObjectName((ID3D11DeviceChild*)s_screenshot_texture, "staging screenshot texture"); } -Renderer::Renderer() +Renderer::Renderer(void *&window_handle) { int x, y, w_temp, h_temp; @@ -186,7 +185,7 @@ Renderer::Renderer() Host_GetRenderWindowSize(x, y, w_temp, h_temp); - D3D::Create(EmuWindow::GetWnd()); + D3D::Create((HWND)window_handle); s_backbuffer_width = D3D::GetBackBufferWidth(); s_backbuffer_height = D3D::GetBackBufferHeight(); @@ -275,21 +274,8 @@ TargetRectangle Renderer::ConvertEFBRectangle(const EFBRectangle& rc) // size. bool Renderer::CheckForResize() { - while (EmuWindow::IsSizing()) - Sleep(10); - - if (EmuWindow::GetParentWnd()) - { - // Re-stretch window to parent window size again, if it has a parent window. - RECT rcParentWindow; - GetWindowRect(EmuWindow::GetParentWnd(), &rcParentWindow); - int width = rcParentWindow.right - rcParentWindow.left; - int height = rcParentWindow.bottom - rcParentWindow.top; - if (width != Renderer::GetBackbufferWidth() || height != Renderer::GetBackbufferHeight()) - MoveWindow(EmuWindow::GetWnd(), 0, 0, width, height, FALSE); - } RECT rcWindow; - GetClientRect(EmuWindow::GetWnd(), &rcWindow); + GetClientRect(D3D::hWnd, &rcWindow); int client_width = rcWindow.right - rcWindow.left; int client_height = rcWindow.bottom - rcWindow.top; @@ -866,7 +852,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl { s_recordWidth = GetTargetRectangle().GetWidth(); s_recordHeight = GetTargetRectangle().GetHeight(); - bAVIDumping = AVIDump::Start(EmuWindow::GetParentWnd(), s_recordWidth, s_recordHeight); + bAVIDumping = AVIDump::Start(D3D::hWnd, s_recordWidth, s_recordHeight); if (!bAVIDumping) { PanicAlert("Error dumping frames to AVI."); -- cgit v1.2.3