From 812d78839db4eb8c8639064ff830a5340d5fb11c Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 19 May 2013 20:40:48 -0400 Subject: [PATCH] (GX) add hack for bad Salamander behavior --- frontend/platform/platform_gx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/platform/platform_gx.c b/frontend/platform/platform_gx.c index 3d2c8910b6..d9b4887610 100644 --- a/frontend/platform/platform_gx.c +++ b/frontend/platform/platform_gx.c @@ -343,6 +343,11 @@ static int system_process_args(int argc, char *argv[]) { int ret = 0; + // a big hack: sometimes salamander doesn't save the new core it loads on first boot, + // so we make sure g_settings.libretro is set here + if (!g_settings.libretro[0] && strrchr(argv[0], '/')) + strlcpy(g_settings.libretro, strrchr(argv[0], '/') + 1, sizeof(g_settings.libretro)); + if (argc > 2 && argv[1] != NULL && argv[2] != NULL) { snprintf(g_extern.fullpath, sizeof(g_extern.fullpath),