aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/glk/frotz/config.cpp7
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 {