TESTBED: Don't fail when pixel format couldn't be set

When pixel format isn't supported an assertion can be raised during
blitting. Don't draw anything instead.
This commit is contained in:
Le Philousophe 2021-07-04 16:49:05 +02:00 committed by lolbot-iichan
parent 39ffd5b784
commit f94c56f100

View File

@ -1398,7 +1398,11 @@ void GFXtests::showPixelFormat(const Graphics::PixelFormat &pf, uint aLoss) {
g_system->beginGFXTransaction();
g_system->initSize(320, 200, &pf);
g_system->endGFXTransaction();
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
if (gfxError) {
Testsuite::logPrintf("WARNING! Pixel Format %s is unsupported\n", pf.toString().c_str());
return;
}
Testsuite::clearScreen(true);
Graphics::Surface *screen = g_system->lockScreen();