mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 23:59:25 -05:00
renderer_opengl: refactor context acquire
This commit is contained in:
committed by
Alexander Orzechowski
parent
a4696285af
commit
d5f53da79d
@ -223,8 +223,6 @@ struct GPU::Impl {
|
||||
/// core timing events.
|
||||
void Start() {
|
||||
gpu_thread.StartThread(*renderer, renderer->Context(), *scheduler);
|
||||
cpu_context = renderer->GetRenderWindow().CreateSharedContext();
|
||||
cpu_context->MakeCurrent();
|
||||
}
|
||||
|
||||
void NotifyShutdown() {
|
||||
@ -235,6 +233,9 @@ struct GPU::Impl {
|
||||
|
||||
/// Obtain the CPU Context
|
||||
void ObtainContext() {
|
||||
if (!cpu_context) {
|
||||
cpu_context = renderer->GetRenderWindow().CreateSharedContext();
|
||||
}
|
||||
cpu_context->MakeCurrent();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user