Fix: disable hardware acceleration when GPU driver crashed the game last attempt (#10928)
(cherry picked from commit 0e56a73fb8)
This commit is contained in:
committed by
Jonathan G Rennison
parent
0cb7e253e9
commit
27f305696c
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user