OSDN Git Service

[Fix] ユーザー操作での.prfファイル読み込みをANGBAND_DIR_USERからに限定する
authorshimitei <shimitei@gmail.com>
Wed, 19 May 2021 12:28:15 +0000 (21:28 +0900)
committershimitei <shimitei@gmail.com>
Wed, 19 May 2021 12:28:15 +0000 (21:28 +0900)
同名ファイルがANGBAND_DIR_PREFに存在する場合に読み込めないため、カラーの設定/マクロの設定/画面表示の設定での「ユーザー設定ファイルのロード」はANGBAND_DIR_USERからに限定する。

src/cmd-io/cmd-dump.cpp
src/cmd-io/cmd-macro.cpp
src/cmd-visual/cmd-visuals.cpp

index 981a16e..dfba678 100644 (file)
@@ -84,7 +84,7 @@ void do_cmd_colors(player_type *creature_ptr)
             if (!askfor(tmp, 70))
                 continue;
 
-            (void)process_pref_file(creature_ptr, tmp);
+            (void)process_pref_file(creature_ptr, tmp, true);
             term_xtra(TERM_XTRA_REACT, 0);
             term_redraw();
         } else if (i == '2') {
index fdf47bc..96b5ab2 100644 (file)
@@ -185,7 +185,7 @@ void do_cmd_macros(player_type *creature_ptr)
             if (!askfor(tmp, 80))
                 continue;
 
-            errr err = process_pref_file(creature_ptr, tmp);
+            errr err = process_pref_file(creature_ptr, tmp, true);
             if (-2 == err)
                 msg_format(_("標準の設定ファイル'%s'を読み込みました。", "Loaded default '%s'."), tmp);
             else if (err)
index 84f1983..6a1c7e2 100644 (file)
@@ -101,7 +101,7 @@ void do_cmd_visuals(player_type *creature_ptr)
             if (!askfor(tmp, 70))
                 continue;
 
-            (void)process_pref_file(creature_ptr, tmp);
+            (void)process_pref_file(creature_ptr, tmp, true);
             need_redraw = TRUE;
             break;
         }