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.
This commit is contained in:
Stenzek 2018-01-26 15:12:26 +10:00
parent d96e8c9d76
commit c790077c13
10 changed files with 0 additions and 38 deletions

View File

@ -18,7 +18,5 @@ class VideoBackend : public VideoBackendBase
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
void InitBackendInfo() override; void InitBackendInfo() override;
unsigned int PeekMessages() override;
}; };
} }

View File

@ -26,19 +26,6 @@
namespace DX11 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 std::string VideoBackend::GetName() const
{ {
return "D3D"; return "D3D";

View File

@ -16,7 +16,5 @@ class VideoBackend : public VideoBackendBase
std::string GetName() const override { return "Null"; } std::string GetName() const override { return "Null"; }
std::string GetDisplayName() const override { return "Null"; } std::string GetDisplayName() const override { return "Null"; }
void InitBackendInfo() override; void InitBackendInfo() override;
unsigned int PeekMessages() override { return 0; }
}; };
} }

View File

@ -19,8 +19,6 @@ class VideoBackend : public VideoBackendBase
void InitBackendInfo() override; void InitBackendInfo() override;
unsigned int PeekMessages() override;
private: private:
bool InitializeGLExtensions(); bool InitializeGLExtensions();
bool FillBackendInfo(); bool FillBackendInfo();

View File

@ -58,12 +58,6 @@ Make AA apply instantly during gameplay if possible
namespace OGL namespace OGL
{ {
// Draw messages on top of the screen
unsigned int VideoBackend::PeekMessages()
{
return GLInterface->PeekMessages();
}
std::string VideoBackend::GetName() const std::string VideoBackend::GetName() const
{ {
return "OGL"; return "OGL";

View File

@ -114,9 +114,4 @@ void VideoSoftware::Shutdown()
g_renderer.reset(); g_renderer.reset();
ShutdownShared(); ShutdownShared();
} }
unsigned int VideoSoftware::PeekMessages()
{
return SWOGLWindow::s_instance->PeekMessages();
}
} }

View File

@ -18,7 +18,5 @@ class VideoSoftware : public VideoBackendBase
std::string GetDisplayName() const override; std::string GetDisplayName() const override;
void InitBackendInfo() override; void InitBackendInfo() override;
unsigned int PeekMessages() override;
}; };
} }

View File

@ -17,7 +17,5 @@ public:
std::string GetName() const override { return "Vulkan"; } std::string GetName() const override { return "Vulkan"; }
std::string GetDisplayName() const override { return "Vulkan (experimental)"; } std::string GetDisplayName() const override { return "Vulkan (experimental)"; }
void InitBackendInfo() override; void InitBackendInfo() override;
unsigned int PeekMessages() override { return 0; }
}; };
} }

View File

@ -299,8 +299,6 @@ void RunGpuLoop()
[] { [] {
const SConfig& param = SConfig::GetInstance(); const SConfig& param = SConfig::GetInstance();
g_video_backend->PeekMessages();
// Do nothing while paused // Do nothing while paused
if (!s_emu_running_state.IsSet()) if (!s_emu_running_state.IsSet())
return; return;

View File

@ -35,8 +35,6 @@ class VideoBackendBase
{ {
public: public:
virtual ~VideoBackendBase() {} virtual ~VideoBackendBase() {}
virtual unsigned int PeekMessages() = 0;
virtual bool Initialize(void* window_handle) = 0; virtual bool Initialize(void* window_handle) = 0;
virtual void Shutdown() = 0; virtual void Shutdown() = 0;