diff options
Diffstat (limited to 'src/frontend/qt_sdl/Config.cpp')
-rw-r--r-- | src/frontend/qt_sdl/Config.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/Config.cpp b/src/frontend/qt_sdl/Config.cpp index da08c28..c28f63a 100644 --- a/src/frontend/qt_sdl/Config.cpp +++ b/src/frontend/qt_sdl/Config.cpp @@ -19,6 +19,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <inttypes.h> #include "Platform.h" #include "Config.h" @@ -140,6 +141,8 @@ int MouseHideSeconds; bool PauseLostFocus; +int64_t RTCOffset; + bool DSBatteryLevelOkay; int DSiBatteryLevel; bool DSiBatteryCharging; @@ -339,6 +342,8 @@ ConfigEntry ConfigFile[] = {"MouseHideSeconds", 0, &MouseHideSeconds, 5, false}, {"PauseLostFocus", 1, &PauseLostFocus, false, false}, + {"RTCOffset", 3, &RTCOffset, (int64_t)0, true}, + {"DSBatteryLevelOkay", 1, &DSBatteryLevelOkay, true, true}, {"DSiBatteryLevel", 0, &DSiBatteryLevel, 0xF, true}, {"DSiBatteryCharging", 1, &DSiBatteryCharging, true, true}, @@ -406,6 +411,7 @@ void LoadFile(int inst) case 0: *(int*)entry->Value = strtol(entryval, NULL, 10); break; case 1: *(bool*)entry->Value = strtol(entryval, NULL, 10) ? true:false; break; case 2: *(std::string*)entry->Value = entryval; break; + case 3: *(int64_t*)entry->Value = strtoll(entryval, NULL, 10); break; } break; @@ -426,6 +432,7 @@ void Load() case 0: *(int*)entry->Value = std::get<int>(entry->Default); break; case 1: *(bool*)entry->Value = std::get<bool>(entry->Default); break; case 2: *(std::string*)entry->Value = std::get<std::string>(entry->Default); break; + case 3: *(int64_t*)entry->Value = std::get<int64_t>(entry->Default); break; } } @@ -462,6 +469,7 @@ void Save() case 0: Platform::FileWriteFormatted(f, "%s=%d\r\n", entry->Name, *(int*)entry->Value); break; case 1: Platform::FileWriteFormatted(f, "%s=%d\r\n", entry->Name, *(bool*)entry->Value ? 1:0); break; case 2: Platform::FileWriteFormatted(f, "%s=%s\r\n", entry->Name, (*(std::string*)entry->Value).c_str()); break; + case 3: Platform::FileWriteFormatted(f, "%s=%" PRId64 "\r\n", entry->Name, *(int64_t*)entry->Value); break; } } |