summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-20 19:30:49 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-20 19:30:49 +0000
commit73ea8cdb21ffc314555f41d78ea6de8d57f62c10 (patch)
tree9bfaa1982d36ca9c1dc0daaa9f1820de03182cee
parente8ea4748edf92c4778ecb67a41f970fa95bddd92 (diff)
downloadopenttd-73ea8cdb21ffc314555f41d78ea6de8d57f62c10.tar.xz
(svn r27816) -Fix [FS#6421]: Do not search directories when opening ini files as we already have their full path.
-rw-r--r--src/hotkeys.cpp2
-rw-r--r--src/settings.cpp2
-rw-r--r--src/window.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index 84288a0e8..870e2cbea 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -311,7 +311,7 @@ int HotkeyList::CheckMatch(uint16 keycode, bool global_only) const
static void SaveLoadHotkeys(bool save)
{
IniFile *ini = new IniFile();
- ini->LoadFromDisk(_hotkeys_file, BASE_DIR);
+ ini->LoadFromDisk(_hotkeys_file, NO_DIRECTORY);
for (HotkeyList **list = _hotkey_lists->Begin(); list != _hotkey_lists->End(); ++list) {
if (save) {
diff --git a/src/settings.cpp b/src/settings.cpp
index e6754bb90..9fba3a13f 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1688,7 +1688,7 @@ static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc, SettingDescP
static IniFile *IniLoadConfig()
{
IniFile *ini = new IniFile(_list_group_names);
- ini->LoadFromDisk(_config_file, BASE_DIR);
+ ini->LoadFromDisk(_config_file, NO_DIRECTORY);
return ini;
}
diff --git a/src/window.cpp b/src/window.cpp
index 0ffbf8bf1..f1c53f204 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -139,7 +139,7 @@ int16 WindowDesc::GetDefaultHeight() const
void WindowDesc::LoadFromConfig()
{
IniFile *ini = new IniFile();
- ini->LoadFromDisk(_windows_file, BASE_DIR);
+ ini->LoadFromDisk(_windows_file, NO_DIRECTORY);
for (WindowDesc **it = _window_descs->Begin(); it != _window_descs->End(); ++it) {
if ((*it)->ini_key == NULL) continue;
IniLoadWindowSettings(ini, (*it)->ini_key, *it);
@@ -165,7 +165,7 @@ void WindowDesc::SaveToConfig()
QSortT(_window_descs->Begin(), _window_descs->Length(), DescSorter);
IniFile *ini = new IniFile();
- ini->LoadFromDisk(_windows_file, BASE_DIR);
+ ini->LoadFromDisk(_windows_file, NO_DIRECTORY);
for (WindowDesc **it = _window_descs->Begin(); it != _window_descs->End(); ++it) {
if ((*it)->ini_key == NULL) continue;
IniSaveWindowSettings(ini, (*it)->ini_key, *it);