mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 06:47:45 -04:00
new cfg file system
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@390 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
c09d5a010d
commit
0ae25549b5
11 changed files with 293 additions and 253 deletions
15
psp/emu.c
15
psp/emu.c
|
@ -111,19 +111,8 @@ void emu_Deinit(void)
|
|||
SRam.changed = 0;
|
||||
}
|
||||
|
||||
if (!(currentConfig.EmuOpt & 0x20)) {
|
||||
FILE *f = fopen(PicoConfigFile, "r+b");
|
||||
if (!f) emu_WriteConfig(0);
|
||||
else {
|
||||
// if we already have config, reload it, except last ROM
|
||||
fseek(f, sizeof(currentConfig.lastRomFile), SEEK_SET);
|
||||
fread(¤tConfig.EmuOpt, 1, sizeof(currentConfig) - sizeof(currentConfig.lastRomFile), f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
fwrite(¤tConfig, 1, sizeof(currentConfig), f);
|
||||
fflush(f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
if (!(currentConfig.EmuOpt & 0x20))
|
||||
config_writelrom(PicoConfigFile);
|
||||
|
||||
PicoExit();
|
||||
sound_deinit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue