aboutsummaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
authoraliaspider2014-11-02 07:52:33 +0100
committeraliaspider2014-11-02 07:52:33 +0100
commit79a0fe978c6eece18d2e05320d6c86de584dbb48 (patch)
treea766b67e5ba37cd8bca19d15b3021af5cde2026a /libretro.c
parentd2c9eb147defae3d98df43730372dfce4a224cde (diff)
downloadsnes9x2005-79a0fe978c6eece18d2e05320d6c86de584dbb48.tar.gz
snes9x2005-79a0fe978c6eece18d2e05320d6c86de584dbb48.tar.bz2
snes9x2005-79a0fe978c6eece18d2e05320d6c86de584dbb48.zip
cleanups.
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/libretro.c b/libretro.c
index b145231..2257bc5 100644
--- a/libretro.c
+++ b/libretro.c
@@ -156,21 +156,6 @@ void S9xInitDisplay(void)
GFX.Delta = (GFX.SubScreen - GFX.Screen) >> 1;
}
-void S9xExit()
-{
- // if(Settings.SPC7110)
- // (*CleanUp7110)();
-
- // S9xDeinitDisplay ();
- // Memory.SaveSRAM (S9xGetFilename (".srm"));
- // // S9xSaveCheatFile (S9xGetFilename (".chb")); // cheat binary file
- // // Do this when loading a cheat file!
- // Memory.Deinit ();
- // S9xDeinitAPU ();
-
- // exit(0);
-}
-
const char* S9xBasename(const char* f)
{
const char* p;
@@ -298,7 +283,7 @@ void init_sfc_setting(void)
void S9xAutoSaveSRAM()
{
- SaveSRAM(S9xGetFilename(".srm"));
+ SaveSRAM(S9xGetFilename("srm"));
}
void retro_init(void)
@@ -317,10 +302,10 @@ void retro_init(void)
"Frontend supports RGB565 - will use that instead of XRGB1555.\n");
init_sfc_setting();
- Init();
+ S9xInitMemory();
S9xInitAPU();
S9xInitDisplay();
- S9xGraphicsInit();
+ S9xInitGFX();
S9xInitSound(Settings.SoundPlaybackRate,
TRUE,
Settings.SoundBufferSize);
@@ -329,14 +314,22 @@ void retro_init(void)
void retro_deinit(void)
{
- S9xGraphicsDeinit();
+
+ if(Settings.SPC7110)
+ (*CleanUp7110)();
+
+ SaveSRAM (S9xGetFilename ("srm"));
+
+ S9xDeinitGFX();
S9xDeinitDisplay();
S9xDeinitAPU();
- Deinit();
+ S9xDeinitMemory();
#ifdef PERF_TEST
perf_cb.perf_log();
#endif
+
+
}
uint32 S9xReadJoypad(int port)
@@ -728,7 +721,7 @@ bool retro_load_game(const struct retro_game_info* game)
Settings.FrameTime = (Settings.PAL ? Settings.FrameTimePAL :
Settings.FrameTimeNTSC);
- LoadSRAM(S9xGetFilename(".srm"));
+ LoadSRAM(S9xGetFilename("srm"));
struct retro_system_av_info av_info;
retro_get_system_av_info(&av_info);