Apply suggestions from code review

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
This commit is contained in:
Ted John 2020-12-30 00:02:23 +00:00
parent 9f790371fe
commit 28a0f2c942
5 changed files with 11 additions and 7 deletions

View File

@ -4,6 +4,7 @@
- Fix: [#151] Mouse moves out of window when looking around.
- Fix: [#588] 'Cancel or Show Last Announcement' shortcut doesn't close announcements.
- Fix: [#679] Crash when changing ground texture.
- Change: [#690] Default saved game directory is now in OpenLoco user directory.
20.10 (2020-10-25)
------------------------------------------------------------------------

View File

@ -177,8 +177,8 @@ namespace OpenLoco::Environment
{
auto basePath = resolveLocoInstallPath();
setDirectory(_path_install, basePath);
setDirectory(_path_saves_single_player, basePath / "Single Player Saved Games/");
setDirectory(_path_saves_two_player, basePath / "Two Player Saved Games/");
setDirectory(_path_saves_single_player, getPath(path_id::save));
setDirectory(_path_saves_two_player, getPath(path_id::save));
setDirectory(_path_scenarios, basePath / "Scenarios/*.SC5");
setDirectory(_path_landscapes, basePath / "Scenarios/Landscapes/*.SC5");
setDirectory(_path_objects, basePath / "ObjData/*.DAT");
@ -193,6 +193,7 @@ namespace OpenLoco::Environment
case path_id::gamecfg:
case path_id::scores:
case path_id::openloco_yml:
case path_id::save:
case path_id::autosave:
return platform::getUserDirectory();
case path_id::language_files:
@ -259,6 +260,7 @@ namespace OpenLoco::Environment
"Data/TUT800_3.DAT",
"openloco.yml",
"language",
"save",
"save/autosave",
};

View File

@ -56,6 +56,7 @@ namespace OpenLoco::Environment
tut800_3,
openloco_yml,
language_files,
save,
autosave,
};

View File

@ -1842,7 +1842,7 @@ namespace OpenLoco::Ui::Options
namespace Misc
{
static const Gfx::ui_size_t _window_size = { 420, 239 };
static const Gfx::ui_size_t _window_size = { 420, 159 };
namespace Widx
{
@ -1870,9 +1870,9 @@ namespace OpenLoco::Ui::Options
makeWidget({ 10, 79 }, { 400, 12 }, widget_type::checkbox, 1, StringIds::use_preferred_owner_name, StringIds::use_preferred_owner_name_tip),
makeWidget({ 335, 94 }, { 75, 12 }, widget_type::wt_11, 1, StringIds::change),
makeWidget({ 10, 109 }, { 400, 12 }, widget_type::checkbox, 1, StringIds::export_plugin_objects, StringIds::export_plugin_objects_tip),
makeWidget({ 235, 123 }, { 156, 12 }, widget_type::wt_18, 1, StringIds::empty),
makeWidget({ 379, 124 }, { 11, 10 }, widget_type::wt_11, 1, StringIds::dropdown),
makeStepperWidgets({ 235, 139 }, { 156, 12 }, widget_type::wt_17, 1, StringIds::empty),
makeWidget({ 250, 123 }, { 156, 12 }, widget_type::wt_18, 1, StringIds::empty),
makeWidget({ 394, 124 }, { 11, 10 }, widget_type::wt_11, 1, StringIds::dropdown),
makeStepperWidgets({ 250, 139 }, { 156, 12 }, widget_type::wt_17, 1, StringIds::empty),
widgetEnd(),
};

View File

@ -657,7 +657,7 @@ namespace OpenLoco::Ui::PromptBrowse
return path;
}
}
return fs::path();
return str / fs::path();
}
}