Skip to content

Commit

Permalink
Common: Write ff7sound.cfg only for FF7
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Jul 21, 2023
1 parent 7455028 commit e6fedc8
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,17 +951,20 @@ void common_cleanup(struct game_obj *game_object)
{
metadataPatcher.apply();

// Write ff7sound.cfg
char ff7soundPath[260]{0};
get_userdata_path(ff7soundPath, sizeof(ff7soundPath), false);
PathAppendA(ff7soundPath, "ff7sound.cfg");
FILE *ff7sound = fopen(ff7soundPath, "wb");

if (ff7sound)
if (!ff8)
{
fwrite(&ff7_sfx_volume, sizeof(DWORD), 1, ff7sound);
fwrite(&ff7_music_volume, sizeof(DWORD), 1, ff7sound);
fclose(ff7sound);
// Write ff7sound.cfg
char ff7soundPath[260]{0};
get_userdata_path(ff7soundPath, sizeof(ff7soundPath), false);
PathAppendA(ff7soundPath, "ff7sound.cfg");
FILE *ff7sound = fopen(ff7soundPath, "wb");

if (ff7sound)
{
fwrite(&ff7_sfx_volume, sizeof(DWORD), 1, ff7sound);
fwrite(&ff7_music_volume, sizeof(DWORD), 1, ff7sound);
fclose(ff7sound);
}
}
}

Expand Down

0 comments on commit e6fedc8

Please sign in to comment.