mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-04 20:13:08 +00:00
Use settings values for navigator in the launcher
This commit is contained in:
parent
01316f15b8
commit
8f27178a0b
1 changed files with 4 additions and 5 deletions
|
|
@ -26,7 +26,7 @@
|
|||
#include <components/files/qtconversion.hpp>
|
||||
#include <components/misc/strings/conversion.hpp>
|
||||
#include <components/navmeshtool/protocol.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/settings/values.hpp>
|
||||
#include <components/vfs/bsaarchive.hpp>
|
||||
|
||||
#include "utils/profilescombobox.hpp"
|
||||
|
|
@ -123,7 +123,7 @@ namespace Launcher
|
|||
|
||||
int getMaxNavMeshDbFileSizeMiB()
|
||||
{
|
||||
return Settings::Manager::getUInt64("max navmeshdb file size", "Navigator") / (1024 * 1024);
|
||||
return Settings::navigator().mMaxNavmeshdbFileSize / (1024 * 1024);
|
||||
}
|
||||
|
||||
std::optional<QString> findFirstPath(const QStringList& directories, const QString& fileName)
|
||||
|
|
@ -359,9 +359,8 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
|
|||
|
||||
void Launcher::DataFilesPage::saveSettings(const QString& profile)
|
||||
{
|
||||
if (const int value = ui.navMeshMaxSizeSpinBox->value(); value != getMaxNavMeshDbFileSizeMiB())
|
||||
Settings::Manager::setUInt64(
|
||||
"max navmeshdb file size", "Navigator", static_cast<std::uint64_t>(std::max(0, value)) * 1024 * 1024);
|
||||
Settings::navigator().mMaxNavmeshdbFileSize.set(
|
||||
static_cast<std::uint64_t>(std::max(0, ui.navMeshMaxSizeSpinBox->value())) * 1024 * 1024);
|
||||
|
||||
QString profileName = profile;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue