From c790077c139dad43586a87d8080b4b9107167930 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 26 Jan 2018 15:12:26 +1000 Subject: [PATCH] VideoBackend: Remove PeekMessages method The video thread and backend no longer create any windows, therefore there will never be any messages dispatched to their thread. --- Source/Core/VideoBackends/D3D/VideoBackend.h | 2 -- Source/Core/VideoBackends/D3D/main.cpp | 13 ------------- Source/Core/VideoBackends/Null/VideoBackend.h | 2 -- Source/Core/VideoBackends/OGL/VideoBackend.h | 2 -- Source/Core/VideoBackends/OGL/main.cpp | 6 ------ Source/Core/VideoBackends/Software/SWmain.cpp | 5 ----- Source/Core/VideoBackends/Software/VideoBackend.h | 2 -- Source/Core/VideoBackends/Vulkan/VideoBackend.h | 2 -- Source/Core/VideoCommon/Fifo.cpp | 2 -- Source/Core/VideoCommon/VideoBackendBase.h | 2 -- 10 files changed, 38 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/VideoBackend.h b/Source/Core/VideoBackends/D3D/VideoBackend.h index 97870ffdea..59bd8d9b73 100644 --- a/Source/Core/VideoBackends/D3D/VideoBackend.h +++ b/Source/Core/VideoBackends/D3D/VideoBackend.h @@ -18,7 +18,5 @@ class VideoBackend : public VideoBackendBase std::string GetDisplayName() const override; void InitBackendInfo() override; - - unsigned int PeekMessages() override; }; } diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp index 3f9529d318..6d689573b9 100644 --- a/Source/Core/VideoBackends/D3D/main.cpp +++ b/Source/Core/VideoBackends/D3D/main.cpp @@ -26,19 +26,6 @@ namespace DX11 { -unsigned int VideoBackend::PeekMessages() -{ - MSG msg; - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_QUIT) - return FALSE; - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return TRUE; -} - std::string VideoBackend::GetName() const { return "D3D"; diff --git a/Source/Core/VideoBackends/Null/VideoBackend.h b/Source/Core/VideoBackends/Null/VideoBackend.h index bb7da23c8d..eb1d419775 100644 --- a/Source/Core/VideoBackends/Null/VideoBackend.h +++ b/Source/Core/VideoBackends/Null/VideoBackend.h @@ -16,7 +16,5 @@ class VideoBackend : public VideoBackendBase std::string GetName() const override { return "Null"; } std::string GetDisplayName() const override { return "Null"; } void InitBackendInfo() override; - - unsigned int PeekMessages() override { return 0; } }; } diff --git a/Source/Core/VideoBackends/OGL/VideoBackend.h b/Source/Core/VideoBackends/OGL/VideoBackend.h index a42fc3cce6..1bb4cb3af1 100644 --- a/Source/Core/VideoBackends/OGL/VideoBackend.h +++ b/Source/Core/VideoBackends/OGL/VideoBackend.h @@ -19,8 +19,6 @@ class VideoBackend : public VideoBackendBase void InitBackendInfo() override; - unsigned int PeekMessages() override; - private: bool InitializeGLExtensions(); bool FillBackendInfo(); diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index 64aea5f2c5..acabd3d530 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -58,12 +58,6 @@ Make AA apply instantly during gameplay if possible namespace OGL { -// Draw messages on top of the screen -unsigned int VideoBackend::PeekMessages() -{ - return GLInterface->PeekMessages(); -} - std::string VideoBackend::GetName() const { return "OGL"; diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index a79540891f..37d626c854 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -114,9 +114,4 @@ void VideoSoftware::Shutdown() g_renderer.reset(); ShutdownShared(); } - -unsigned int VideoSoftware::PeekMessages() -{ - return SWOGLWindow::s_instance->PeekMessages(); -} } diff --git a/Source/Core/VideoBackends/Software/VideoBackend.h b/Source/Core/VideoBackends/Software/VideoBackend.h index 0221aba9c7..f618ea44ab 100644 --- a/Source/Core/VideoBackends/Software/VideoBackend.h +++ b/Source/Core/VideoBackends/Software/VideoBackend.h @@ -18,7 +18,5 @@ class VideoSoftware : public VideoBackendBase std::string GetDisplayName() const override; void InitBackendInfo() override; - - unsigned int PeekMessages() override; }; } diff --git a/Source/Core/VideoBackends/Vulkan/VideoBackend.h b/Source/Core/VideoBackends/Vulkan/VideoBackend.h index b38ec28131..c511013394 100644 --- a/Source/Core/VideoBackends/Vulkan/VideoBackend.h +++ b/Source/Core/VideoBackends/Vulkan/VideoBackend.h @@ -17,7 +17,5 @@ public: std::string GetName() const override { return "Vulkan"; } std::string GetDisplayName() const override { return "Vulkan (experimental)"; } void InitBackendInfo() override; - - unsigned int PeekMessages() override { return 0; } }; } diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index abf2d78f0c..7b6a412c2c 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -299,8 +299,6 @@ void RunGpuLoop() [] { const SConfig& param = SConfig::GetInstance(); - g_video_backend->PeekMessages(); - // Do nothing while paused if (!s_emu_running_state.IsSet()) return; diff --git a/Source/Core/VideoCommon/VideoBackendBase.h b/Source/Core/VideoCommon/VideoBackendBase.h index 060c52916a..b3c7cbe49d 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.h +++ b/Source/Core/VideoCommon/VideoBackendBase.h @@ -35,8 +35,6 @@ class VideoBackendBase { public: virtual ~VideoBackendBase() {} - virtual unsigned int PeekMessages() = 0; - virtual bool Initialize(void* window_handle) = 0; virtual void Shutdown() = 0;