mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-20 00:08:42 +00:00
VideoBackends: Pass window system info from host on creation
This commit is contained in:
parent
9c57a98723
commit
eb284b5d66
26 changed files with 148 additions and 75 deletions
|
@ -13,9 +13,9 @@
|
|||
|
||||
std::unique_ptr<SWOGLWindow> SWOGLWindow::s_instance;
|
||||
|
||||
void SWOGLWindow::Init(void* display_handle, void* window_handle)
|
||||
void SWOGLWindow::Init(const WindowSystemInfo& wsi)
|
||||
{
|
||||
g_main_gl_context = GLContext::Create(display_handle, window_handle);
|
||||
g_main_gl_context = GLContext::Create(wsi);
|
||||
if (!g_main_gl_context)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "GLInterface::Create failed.");
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
class AbstractTexture;
|
||||
struct WindowSystemInfo;
|
||||
|
||||
class SWOGLWindow
|
||||
{
|
||||
public:
|
||||
static void Init(void* display_handle, void* window_handle);
|
||||
static void Init(const WindowSystemInfo& wsi);
|
||||
static void Shutdown();
|
||||
void Prepare();
|
||||
|
||||
|
|
|
@ -78,11 +78,11 @@ void VideoSoftware::InitBackendInfo()
|
|||
g_Config.backend_info.AAModes = {1};
|
||||
}
|
||||
|
||||
bool VideoSoftware::Initialize(void* display_handle, void* window_handle)
|
||||
bool VideoSoftware::Initialize(const WindowSystemInfo& wsi)
|
||||
{
|
||||
InitializeShared();
|
||||
|
||||
SWOGLWindow::Init(display_handle, window_handle);
|
||||
SWOGLWindow::Init(wsi);
|
||||
|
||||
Clipper::Init();
|
||||
Rasterizer::Init();
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace SW
|
|||
{
|
||||
class VideoSoftware : public VideoBackendBase
|
||||
{
|
||||
bool Initialize(void* display_handle, void* window_handle) override;
|
||||
bool Initialize(const WindowSystemInfo& wsi) override;
|
||||
void Shutdown() override;
|
||||
|
||||
std::string GetName() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue