Skip to content

Commit

Permalink
start replacing some initUnset... with proto defaults
Browse files Browse the repository at this point in the history
I think this is going to be a long road, but this is the kind of thing
that's possible even without a board config in place
  • Loading branch information
bsstephan committed Apr 13, 2024
1 parent 59e2d19 commit 5723f47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions proto/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "enums.proto";
message GamepadOptions
{
optional InputMode inputMode = 1;
optional DpadMode dpadMode = 2;
optional SOCDMode socdMode = 3;
optional DpadMode dpadMode = 2 [default = DPAD_MODE_DIGITAL];
optional SOCDMode socdMode = 3 [default = SOCD_MODE_NEUTRAL];
optional bool invertXAxis = 4;
optional bool invertYAxis = 5;
optional bool switchTpShareForDs4 = 6;
Expand Down
8 changes: 0 additions & 8 deletions src/config_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@
#ifndef DEFAULT_INPUT_MODE_R2
#define DEFAULT_INPUT_MODE_R2 INPUT_MODE_KEYBOARD
#endif
#ifndef DEFAULT_DPAD_MODE
#define DEFAULT_DPAD_MODE DPAD_MODE_DIGITAL
#endif
#ifndef DEFAULT_SOCD_MODE
#define DEFAULT_SOCD_MODE SOCD_MODE_NEUTRAL
#endif
#ifndef DEFAULT_FORCED_SETUP_MODE
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF
#endif
Expand Down Expand Up @@ -247,8 +241,6 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)

// gamepadOptions
INIT_UNSET_PROPERTY(config.gamepadOptions, inputMode, DEFAULT_INPUT_MODE);
INIT_UNSET_PROPERTY(config.gamepadOptions, dpadMode, DEFAULT_DPAD_MODE);
INIT_UNSET_PROPERTY(config.gamepadOptions, socdMode, DEFAULT_SOCD_MODE);
INIT_UNSET_PROPERTY(config.gamepadOptions, invertXAxis, false);
INIT_UNSET_PROPERTY(config.gamepadOptions, switchTpShareForDs4, false);
INIT_UNSET_PROPERTY(config.gamepadOptions, lockHotkeys, DEFAULT_LOCK_HOTKEYS);
Expand Down

0 comments on commit 5723f47

Please sign in to comment.