[win32, multisurface] putting 'present' call for guest and surface overlay next to each other.
This commit is contained in:
parent
238963df0b
commit
472d3031b2
17
src/main.c
17
src/main.c
|
@ -567,11 +567,6 @@ void* orca_runloop(void* user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(eventHandlers[G_EVENT_FRAME_REFRESH])
|
|
||||||
{
|
|
||||||
m3_Call(eventHandlers[G_EVENT_FRAME_REFRESH], 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(app->debugOverlay.show)
|
if(app->debugOverlay.show)
|
||||||
{
|
{
|
||||||
ui_style debugUIDefaultStyle = {.bgColor = {0},
|
ui_style debugUIDefaultStyle = {.bgColor = {0},
|
||||||
|
@ -707,6 +702,17 @@ void* orca_runloop(void* user)
|
||||||
ui_draw();
|
ui_draw();
|
||||||
|
|
||||||
mg_render(app->debugOverlay.surface, app->debugOverlay.canvas);
|
mg_render(app->debugOverlay.surface, app->debugOverlay.canvas);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(eventHandlers[G_EVENT_FRAME_REFRESH])
|
||||||
|
{
|
||||||
|
mg_surface_prepare(app->surface);
|
||||||
|
m3_Call(eventHandlers[G_EVENT_FRAME_REFRESH], 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(app->debugOverlay.show)
|
||||||
|
{
|
||||||
|
mg_surface_prepare(app->debugOverlay.surface);
|
||||||
mg_surface_present(app->debugOverlay.surface);
|
mg_surface_present(app->debugOverlay.surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,6 +752,7 @@ int main(int argc, char** argv)
|
||||||
mg_surface_set_hidden(app->debugOverlay.surface, true);
|
mg_surface_set_hidden(app->debugOverlay.surface, true);
|
||||||
|
|
||||||
mg_surface dummy = mg_surface_create_for_window(app->window, MG_CANVAS);
|
mg_surface dummy = mg_surface_create_for_window(app->window, MG_CANVAS);
|
||||||
|
mg_surface_destroy(dummy);
|
||||||
|
|
||||||
//WARN: this is a workaround to avoid stalling the first few times we acquire drawables from
|
//WARN: this is a workaround to avoid stalling the first few times we acquire drawables from
|
||||||
// the surfaces... This should probably be fixed in the implementation of mtl_surface!
|
// the surfaces... This should probably be fixed in the implementation of mtl_surface!
|
||||||
|
|
Loading…
Reference in New Issue