diff options
author | D G Turner | 2018-07-31 13:38:33 +0100 |
---|---|---|
committer | D G Turner | 2018-07-31 13:38:33 +0100 |
commit | 574318c052752a789461fe463d904a889e59ef8c (patch) | |
tree | ce3f3c68d31d10d50b884217cae0699cfbc02e67 | |
parent | 2a4fa26d5241f7febbb47e4419e6ca1c3f6925d9 (diff) | |
download | scummvm-rg350-574318c052752a789461fe463d904a889e59ef8c.tar.gz scummvm-rg350-574318c052752a789461fe463d904a889e59ef8c.tar.bz2 scummvm-rg350-574318c052752a789461fe463d904a889e59ef8c.zip |
MOHAWK: Fix Unused Variable Compiler Warning.
This occurs when FreeType2 is not enabled and thus fontHeight variable
is unused.
-rw-r--r-- | engines/mohawk/riven_stacks/aspit.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp index 59cc3b9912..6f22786777 100644 --- a/engines/mohawk/riven_stacks/aspit.cpp +++ b/engines/mohawk/riven_stacks/aspit.cpp @@ -98,17 +98,21 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) { const char *fontname; const Graphics::Font *font = nullptr; - int fontHeight; if (_vm->getLanguage() != Common::JA_JPN) { fontname = "FreeSans.ttf"; - fontHeight = 12; } else { fontname = "mplus-2c-regular.ttf"; - fontHeight = 11; } - #if defined(USE_FREETYPE2) + int fontHeight; + + if (_vm->getLanguage() != Common::JA_JPN) { + fontHeight = 12; + } else { + fontHeight = 11; + } + if (file.open(fontname)) { font = Graphics::loadTTFFont(file, fontHeight); } |