diff options
author | Paul Gilbert | 2019-02-16 14:44:09 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-02-16 15:17:51 -0800 |
commit | 4c3729acd75723b31af3931f59714080811b5d3f (patch) | |
tree | 4882200df8d63e718677d32216bd46b16b6ced47 | |
parent | 25b066520ed1247e2b3cd70433f9aa86c3587f7c (diff) | |
download | scummvm-rg350-4c3729acd75723b31af3931f59714080811b5d3f.tar.gz scummvm-rg350-4c3729acd75723b31af3931f59714080811b5d3f.tar.bz2 scummvm-rg350-4c3729acd75723b31af3931f59714080811b5d3f.zip |
GLK: FROTZ: Fix setting default fg & bg color
-rw-r--r-- | engines/glk/frotz/config.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/glk/frotz/config.cpp b/engines/glk/frotz/config.cpp index 6e7c260599..28e9c7f122 100644 --- a/engines/glk/frotz/config.cpp +++ b/engines/glk/frotz/config.cpp @@ -168,9 +168,12 @@ void UserOptions::initialize(uint hVersion) { int defaultFg = hVersion == V6 ? 0 : 0xffffff; int defaultBg = hVersion == V6 ? 0xffffff : 0; + defaultFg = getConfigInt("foreground", defaultFg, 0xffffff); + defaultBg = getConfigInt("background", defaultBg, 0xffffff); - _defaultForeground = getConfigInt("foreground", defaultFg, 0xffffff); - _defaultBackground = getConfigInt("background", defaultBg, 0xffffff); + Graphics::PixelFormat format = g_system->getScreenFormat(); + _defaultForeground = format.RGBToColor(defaultFg & 0xff, (defaultFg >> 8) & 0xff, (defaultFg >> 16) & 0xff); + _defaultBackground = format.RGBToColor(defaultBg & 0xff, (defaultBg >> 8) & 0xff, (defaultBg >> 16) & 0xff); } bool UserOptions::isInfocom() const { |