X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fmain-win.c;h=a848e2a0a588e3edf248d090a81234610fff546a;hb=refs%2Fheads%2Fmaster;hp=5653dd54b17958cbce4f187065a3f23861b4ffc4;hpb=d4a9f4e7fbea3a846037be7bde15aab8ec4c19a4;p=hengband%2Fhengband.git diff --git a/src/main-win.c b/src/main-win.c index 5653dd54b..d50d04f50 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -947,15 +947,17 @@ static void load_sound_prefs(void) char wav_path[1024]; char *zz[SAMPLE_SOUND_MAX]; - path_build(ini_path, 1024, ANGBAND_DIR_XTRA_SOUND, "sound.cfg"); + path_build(ini_path, 1024, ANGBAND_DIR_XTRA_SOUND, "sound_debug.cfg"); + if (GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path) == 0) { + path_build(ini_path, 1024, ANGBAND_DIR_XTRA_SOUND, "sound.cfg"); + GetPrivateProfileString("Device", "type", "", mci_device_type, 256, ini_path); + } + for (int i = 0; i < SOUND_MAX; i++) { GetPrivateProfileString("Sound", angband_sound_name[i], "", tmp, 1024, ini_path); int num = tokenize_whitespace(tmp, SAMPLE_SOUND_MAX, zz); for (int j = 0; j < num; j++) { - /* Access the sound */ path_build(wav_path, 1024, ANGBAND_DIR_XTRA_SOUND, zz[j]); - - /* Save the sound filename, if it exists */ if (check_file(wav_path)) sound_file[i][j] = string_make(zz[j]); } @@ -2295,6 +2297,7 @@ static void process_menus(player_type *player_ptr, WORD wCmd) } else { game_in_progress = TRUE; term_flush(); + strcpy(savefile, ""); play_game(player_ptr, TRUE, FALSE); quit(NULL); } @@ -3056,7 +3059,7 @@ LRESULT PASCAL AngbandWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam p_ptr->panic_save = 1; signals_ignore_tstp(); (void)strcpy(p_ptr->died_from, _("(緊急セーブ)", "(panic save)")); - (void)save_player(p_ptr, SAVE_TYPE_NORMAL); + (void)save_player(p_ptr, SAVE_TYPE_CLOSE_GAME); quit(NULL); return 0; }