From cae89fb315afb4dfd83d9e33298505a58ecb7a08 Mon Sep 17 00:00:00 2001 From: archshift <gh@archshift.com> Date: Fri, 3 Apr 2015 15:35:51 -0700 Subject: Allow the user to set the background clear color during emulation The background color can be seen at the sides of the bottom screen or when the window is wider than normal. --- src/citra_qt/config.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/citra_qt/config.cpp') diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index ac250e0a5e..fb85121b33 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -53,6 +53,12 @@ void Config::ReadValues() { Settings::values.frame_skip = qt_config->value("frame_skip", 0).toInt(); qt_config->endGroup(); + qt_config->beginGroup("Renderer"); + Settings::values.bg_red = qt_config->value("bg_red", 1.0).toFloat(); + Settings::values.bg_green = qt_config->value("bg_green", 1.0).toFloat(); + Settings::values.bg_blue = qt_config->value("bg_blue", 1.0).toFloat(); + qt_config->endGroup(); + qt_config->beginGroup("Data Storage"); Settings::values.use_virtual_sd = qt_config->value("use_virtual_sd", true).toBool(); qt_config->endGroup(); @@ -98,6 +104,13 @@ void Config::SaveValues() { qt_config->setValue("frame_skip", Settings::values.frame_skip); qt_config->endGroup(); + qt_config->beginGroup("Renderer"); + // Cast to double because Qt's written float values are not human-readable + qt_config->setValue("bg_red", (double)Settings::values.bg_red); + qt_config->setValue("bg_green", (double)Settings::values.bg_green); + qt_config->setValue("bg_blue", (double)Settings::values.bg_blue); + qt_config->endGroup(); + qt_config->beginGroup("Data Storage"); qt_config->setValue("use_virtual_sd", Settings::values.use_virtual_sd); qt_config->endGroup(); -- cgit v1.2.3-70-g09d2