Fix: disable hardware acceleration when GPU driver crashed the game last attempt (#10928)

(cherry picked from commit 0e56a73fb8)
This commit is contained in:
Patric Stout
2023-06-04 16:40:17 +02:00
committed by Jonathan G Rennison
parent 0cb7e253e9
commit 27f305696c
3 changed files with 54 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
#include "../network/network.h"
#include "../blitter/factory.hpp"
#include "../debug.h"
#include "../driver.h"
#include "../fontcache.h"
#include "../gfx_func.h"
#include "../gfxinit.h"
@@ -176,6 +177,13 @@ void VideoDriver::Tick()
this->Paint();
this->UnlockVideoBuffer();
/* Wait till the first successful drawing tick before marking the driver as operational. */
static bool first_draw_tick = true;
if (first_draw_tick) {
first_draw_tick = false;
DriverFactoryBase::MarkVideoDriverOperational();
}
}
}