diff options
Diffstat (limited to 'src/Config.cpp')
-rw-r--r-- | src/Config.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Config.cpp b/src/Config.cpp index ebdc0ca..734f827 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -6,6 +6,7 @@ #include <limits.h> #include <inttypes.h> #include <libgen.h> +#include <string.h> #include <assert.h> #include <mglpp/window/Keyboard.hpp> @@ -45,6 +46,19 @@ namespace gsr { } } + ReplayStartupMode replay_startup_string_to_type(const char *startup_mode_str) { + if(strcmp(startup_mode_str, "dont_turn_on_automatically") == 0) + return ReplayStartupMode::DONT_TURN_ON_AUTOMATICALLY; + else if(strcmp(startup_mode_str, "turn_on_at_system_startup") == 0) + return ReplayStartupMode::TURN_ON_AT_SYSTEM_STARTUP; + else if(strcmp(startup_mode_str, "turn_on_at_fullscreen") == 0) + return ReplayStartupMode::TURN_ON_AT_FULLSCREEN; + else if(strcmp(startup_mode_str, "turn_on_at_power_supply_connected") == 0) + return ReplayStartupMode::TURN_ON_AT_POWER_SUPPLY_CONNECTED; + else + return ReplayStartupMode::DONT_TURN_ON_AUTOMATICALLY; + } + bool ConfigHotkey::operator==(const ConfigHotkey &other) const { return key == other.key && modifiers == other.modifiers; } |