Win32: Plumb through an attempt at handling Vulkan device lost.

Unfortunately, recreating the device fails on NV.
This commit is contained in:
Henrik Rydgård committed 2023-05-29 18:32:29 +02:00
1 parent f33776bc4a
commit 485131a29c
23 files changed
+184 -43

No files matched your search

+5 -2
View File
@@ -1414,10 +1414,12 @@ static void DrawFrameTimes(UIContext *ctx, const Bounds &bounds) {
ctx->RebindTexture();
}
void EmuScreen::preRender() {
bool EmuScreen::preRender() {
using namespace Draw;
DrawContext *draw = screenManager()->getDrawContext();
draw->BeginFrame();
if (!draw->BeginFrame()) {
return false;
}
// Here we do NOT bind the backbuffer or clear the screen, unless non-buffered.
// The emuscreen is different than the others - we really want to allow the game to render to framebuffers
// before we ever bind the backbuffer for rendering. On mobile GPUs, switching back and forth between render
@@ -1443,6 +1445,7 @@ void EmuScreen::preRender() {
draw->SetViewport(viewport);
}
draw->SetTargetSize(g_display.pixel_xres, g_display.pixel_yres);
return true;
}
void EmuScreen::postRender() {