menu: add config save/load
[pcsx_rearmed.git] / frontend / main.c
index 372fdf1..36b6a6a 100644 (file)
@@ -185,21 +185,7 @@ int main(int argc, char *argv[])
        strcpy(Config.Cdr, "builtin_cdr");
        strcpy(Config.Pad1, "builtin_pad");
        strcpy(Config.Pad2, "builtin_pad");
-
-       // try to load config
-       // if the config file doesn't exist
-       if (LoadConfig() == -1) {
-               // Uh oh, no config file found, use some defaults
-               Config.PsxAuto = 1;
-
-               // create & load default memcards if they don't exist
-               CreateMemcard("card1.mcd", Config.Mcd1);
-               CreateMemcard("card2.mcd", Config.Mcd2);
-
-               LoadMcds(Config.Mcd1, Config.Mcd2);
-
-               SaveConfig();
-       }
+       Config.PsxAuto = 1;
 
        snprintf(Config.PatchesDir, sizeof(Config.PatchesDir), "." PATCHES_DIR);
 /*
@@ -297,6 +283,9 @@ void StartGui() {
 
 void SysReset() {
        EmuReset();
+
+       // hmh core forgets this
+       CDR_stop();
 }
 
 void SysClose() {
@@ -317,7 +306,9 @@ void UpdateMenuSlots() {
 }
 
 void OnFile_Exit() {
-        printf("OnFile_Exit\n");
+       printf("OnFile_Exit\n");
+       plat_finish();
+       SysClose();
        exit(0);
 }