Skip to content

Commit

Permalink
desktop-ui: Fix broken firmware path setting. (#1374)
Browse files Browse the repository at this point in the history
* Fix the firmware search path not being saved or loaded from the
settings file.
* Fix `FirmwareSettings::findFirmware` not using the right casing when
locating the firmware directory.
  • Loading branch information
Steveice10 authored Jan 22, 2024
1 parent d6b2ca5 commit 801eaa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desktop-ui/settings/firmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ auto FirmwareSettings::eventScan() -> void {
}

auto FirmwareSettings::findFirmware(string hash) -> string {
auto firmwarePath = settings.paths.firmware ? settings.paths.firmware : locate("firmware/");
auto firmwarePath = settings.paths.firmware ? settings.paths.firmware : locate("Firmware/");
if(!directory::exists(firmwarePath)) return {};

for(auto& filename : directory::files(firmwarePath)) {
Expand All @@ -131,4 +131,4 @@ auto FirmwareSettings::findFirmware(string hash) -> string {
}

return {};
}
}
1 change: 1 addition & 0 deletions desktop-ui/settings/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ auto Settings::process(bool load) -> void {
bind(natural, "Rewind/Frequency", rewind.frequency);

bind(string, "Paths/Home", paths.home);
bind(string, "Paths/Firmware", paths.firmware);
bind(string, "Paths/Saves", paths.saves);
bind(string, "Paths/Screenshots", paths.screenshots);
bind(string, "Paths/Debugging", paths.debugging);
Expand Down

0 comments on commit 801eaa4

Please sign in to comment.