diff options
author | Patric Stout <truebrain@openttd.org> | 2021-02-27 12:11:58 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-08 19:18:55 +0100 |
commit | b9eac7c6dc5ca1e60c84aa32805936b616f68d6e (patch) | |
tree | ed67e89036b6363930d7ebd3af775126cc50f958 /src/gfxinit.cpp | |
parent | 4610aa7ae3db6cf561e156ba011de3c7b516876d (diff) | |
download | openttd-b9eac7c6dc5ca1e60c84aa32805936b616f68d6e.tar.xz |
Codechange: remove the unused lock around Blitter
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r-- | src/gfxinit.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 404f85eb4..2883d3ee3 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -295,8 +295,6 @@ static bool SwitchNewGRFBlitter() const bool animation_wanted = HasBit(_display_opt, DO_FULL_ANIMATION); const char *cur_blitter = BlitterFactory::GetCurrentBlitter()->GetName(); - VideoDriver::GetInstance()->AcquireBlitterLock(); - for (uint i = 0; i < lengthof(replacement_blitters); i++) { if (animation_wanted && (replacement_blitters[i].animation == 0)) continue; if (!animation_wanted && (replacement_blitters[i].animation == 1)) continue; @@ -306,7 +304,6 @@ static bool SwitchNewGRFBlitter() const char *repl_blitter = replacement_blitters[i].name; if (strcmp(repl_blitter, cur_blitter) == 0) { - VideoDriver::GetInstance()->ReleaseBlitterLock(); return false; } if (BlitterFactory::GetBlitterFactory(repl_blitter) == nullptr) continue; @@ -323,8 +320,6 @@ static bool SwitchNewGRFBlitter() if (BlitterFactory::SelectBlitter(cur_blitter) == nullptr || !VideoDriver::GetInstance()->AfterBlitterChange()) usererror("Failed to reinitialize video driver. Specify a fixed blitter in the config"); } - VideoDriver::GetInstance()->ReleaseBlitterLock(); - return true; } |