mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
VideoBackends: Pass window system info from host on creation
This commit is contained in:
@ -82,8 +82,7 @@ void* GLContext::GetFuncAddress(const std::string& name)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<GLContext> GLContext::Create(void* display_handle, void* window_handle, bool stereo,
|
||||
bool core)
|
||||
std::unique_ptr<GLContext> GLContext::Create(const WindowSystemInfo& wsi, bool stereo, bool core)
|
||||
{
|
||||
std::unique_ptr<GLContext> context;
|
||||
#if defined(__APPLE__)
|
||||
@ -103,7 +102,7 @@ std::unique_ptr<GLContext> GLContext::Create(void* display_handle, void* window_
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
if (!context->Initialize(display_handle, window_handle, stereo, core))
|
||||
if (!context->Initialize(wsi.display_connection, wsi.render_surface, stereo, core))
|
||||
return nullptr;
|
||||
|
||||
return context;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/WindowSystemInfo.h"
|
||||
|
||||
class GLContext
|
||||
{
|
||||
@ -44,8 +45,8 @@ public:
|
||||
virtual void* GetFuncAddress(const std::string& name);
|
||||
|
||||
// Creates an instance of GLInterface specific to the platform we are running on.
|
||||
static std::unique_ptr<GLContext> Create(void* display_handle, void* window_handle,
|
||||
bool stereo = false, bool core = true);
|
||||
static std::unique_ptr<GLContext> Create(const WindowSystemInfo& wsi, bool stereo = false,
|
||||
bool core = true);
|
||||
|
||||
protected:
|
||||
virtual bool Initialize(void* display_handle, void* window_handle, bool stereo, bool core);
|
||||
|
Reference in New Issue
Block a user