diff --git a/src/xenia/gpu/gl4/gl4_graphics_system.cc b/src/xenia/gpu/gl4/gl4_graphics_system.cc index f29d186d8..5838bc7df 100644 --- a/src/xenia/gpu/gl4/gl4_graphics_system.cc +++ b/src/xenia/gpu/gl4/gl4_graphics_system.cc @@ -262,7 +262,7 @@ void GL4GraphicsSystem::SwapHandler(const SwapParameters& swap_params) { // Swap requested. Synchronously post a request to the loop so that // we do the swap in the right thread. - control_->SynchronousRepaint([&]() { + control_->SynchronousRepaint([this, swap_params]() { if (!swap_params.framebuffer_texture) { // no-op. return; diff --git a/src/xenia/gpu/gl4/wgl_control.cc b/src/xenia/gpu/gl4/wgl_control.cc index bd708597f..25a6ced0e 100644 --- a/src/xenia/gpu/gl4/wgl_control.cc +++ b/src/xenia/gpu/gl4/wgl_control.cc @@ -107,10 +107,12 @@ LRESULT WGLControl::WndProc(HWND hWnd, UINT message, WPARAM wParam, void WGLControl::SynchronousRepaint(std::function paint_callback) { SCOPE_profile_cpu_f("gpu"); - assert_null(current_paint_callback_); + // We may already have a pending paint from a previous request when we + // were minimized. We just overwrite it. current_paint_callback_ = std::move(paint_callback); // This will not return until the WM_PAINT has completed. + // Note, if we are minimized this won't do anything. RedrawWindow(hwnd(), nullptr, nullptr, RDW_INTERNALPAINT | RDW_UPDATENOW | RDW_ALLCHILDREN); }