Skip to content

Commit

Permalink
Move softkey flag into json
Browse files Browse the repository at this point in the history
This is not setting that controls platform backend behaviour,
so it shouldn't be in its config.
  • Loading branch information
Milek7 committed Aug 29, 2023
1 parent 22dc58e commit 421f0d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion DMI/Config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using json = nlohmann::json;
extern int maxSpeed;
extern int etcsDialMaxSpeed;
extern bool softkeys;
extern std::string stm_layout_file;
void load_config(std::string serie)
{
Expand All @@ -28,9 +29,12 @@ void load_config(std::string serie)
if (cfg.contains("STMLayout")) {
stm_layout_file = cfg["STMLayout"];
}
if (cfg.contains("SoftKeys")) {
softkeys = cfg["SoftKeys"];
}
}
} else {
platform->debug_print("failed to load config.json");
}
maxSpeed = etcsDialMaxSpeed;
}
}
2 changes: 0 additions & 2 deletions platform/sdl_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ SdlPlatform::SdlPlatform(float virtual_w, float virtual_h, const std::vector<std
int ypos = std::stoi(get_config("ypos", "0"));
bool borderless = get_config("borderless") == "true";
bool rotate = get_config("rotateScreen") == "true";
extern bool softkeys;
softkeys = get_config("softkeys") == "true";
bool ontop = get_config("alwaysOnTop") == "true";
bool hidecursor = get_config("hideCursor") == "true";

Expand Down

0 comments on commit 421f0d9

Please sign in to comment.