mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
Create our OGL context on the same thread in the OpenGL backend. Same issue with Qualcomm not working with threading correctly.
This commit is contained in:
parent
f06fc78814
commit
2697b8c04f
@ -24,7 +24,10 @@ namespace OGL
|
|||||||
// Draw messages on top of the screen
|
// Draw messages on top of the screen
|
||||||
unsigned int VideoBackend::PeekMessages()
|
unsigned int VideoBackend::PeekMessages()
|
||||||
{
|
{
|
||||||
|
if (GLInterface)
|
||||||
return GLInterface->PeekMessages();
|
return GLInterface->PeekMessages();
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the current FPS
|
// Show the current FPS
|
||||||
|
@ -89,6 +89,7 @@ Make AA apply instantly during gameplay if possible
|
|||||||
|
|
||||||
namespace OGL
|
namespace OGL
|
||||||
{
|
{
|
||||||
|
static void* m_windowhandle;
|
||||||
|
|
||||||
std::string VideoBackend::GetName()
|
std::string VideoBackend::GetName()
|
||||||
{
|
{
|
||||||
@ -149,15 +150,12 @@ void VideoBackend::ShowConfig(void *_hParent)
|
|||||||
diag.ShowModal();
|
diag.ShowModal();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void Test(u32 Data)
|
|
||||||
{
|
|
||||||
printf("Data: %d\n", Data);
|
|
||||||
}
|
|
||||||
bool VideoBackend::Initialize(void *&window_handle)
|
bool VideoBackend::Initialize(void *&window_handle)
|
||||||
{
|
{
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
InitBackendInfo();
|
InitBackendInfo();
|
||||||
|
|
||||||
|
m_windowhandle = window_handle;
|
||||||
frameCount = 0;
|
frameCount = 0;
|
||||||
|
|
||||||
g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini").c_str());
|
g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini").c_str());
|
||||||
@ -166,12 +164,6 @@ bool VideoBackend::Initialize(void *&window_handle)
|
|||||||
g_Config.VerifyValidity();
|
g_Config.VerifyValidity();
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
|
||||||
InitInterface();
|
|
||||||
if (!GLInterface->Create(window_handle))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Do our OSD callbacks
|
|
||||||
OSD::DoCallbacks(OSD::OSD_INIT);
|
|
||||||
|
|
||||||
s_BackendInitialized = true;
|
s_BackendInitialized = true;
|
||||||
|
|
||||||
@ -182,6 +174,16 @@ bool VideoBackend::Initialize(void *&window_handle)
|
|||||||
// Run from the graphics thread
|
// Run from the graphics thread
|
||||||
void VideoBackend::Video_Prepare()
|
void VideoBackend::Video_Prepare()
|
||||||
{
|
{
|
||||||
|
InitInterface();
|
||||||
|
if (!GLInterface->Create(m_windowhandle))
|
||||||
|
{
|
||||||
|
INFO_LOG(VIDEO, "%s", "GLInterface::Create failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do our OSD callbacks
|
||||||
|
OSD::DoCallbacks(OSD::OSD_INIT);
|
||||||
|
|
||||||
GLInterface->MakeCurrent();
|
GLInterface->MakeCurrent();
|
||||||
|
|
||||||
g_renderer = new Renderer;
|
g_renderer = new Renderer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user