Browse files

VideoBackend: Add a virtual PrepareWindow function

Executes backend-specific commands on the main thread.
  • Loading branch information...
stenzek committed Nov 7, 2018
1 parent 2e370b4 commit 487ea5ab36120130ec2e43a458780df4deea963b
Showing with 7 additions and 0 deletions.
  1. +3 −0 Source/Core/Core/Core.cpp
  2. +4 −0 Source/Core/VideoCommon/VideoBackendBase.h
@@ -214,6 +214,9 @@ bool Init(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)

Host_UpdateMainFrame(); // Disable any menus or buttons at boot

// Issue any API calls which must occur on the main thread for the graphics backend.

// Start the emu thread
s_emu_thread = std::thread(EmuThread, std::move(boot), wsi);
return true;
@@ -43,6 +43,10 @@ class VideoBackendBase
virtual std::string GetDisplayName() const { return GetName(); }
virtual void InitBackendInfo() = 0;

// Prepares a native window for rendering. This is called on the main thread, or the
// thread which owns the window.
virtual void PrepareWindow(const WindowSystemInfo& wsi) {}

void Video_ExitLoop();

void Video_BeginField(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u64 ticks);

0 comments on commit 487ea5a

Please sign in to comment.