These are needed to reset on systems without a keyboard.
[pcsx_rearmed.git] / frontend / libretro.c
index 0c0ed3e..4d56356 100644 (file)
@@ -41,9 +41,8 @@
 
 #define ISHEXDEC ((buf[cursor]>='0') && (buf[cursor]<='9')) || ((buf[cursor]>='a') && (buf[cursor]<='f')) || ((buf[cursor]>='A') && (buf[cursor]<='F'))
 
-
 //hack to prevent retroarch freezing when reseting in the menu but not while running with the hot key
-int rebootemu = 0;
+static int rebootemu = 0;
 
 static retro_video_refresh_t video_cb;
 static retro_input_poll_t input_poll_cb;
@@ -461,9 +460,9 @@ void retro_set_environment(retro_environment_t cb)
       { "pcsx_rearmed_neon_enhancement_enable", "Enhanced resolution (slow); disabled|enabled" },
       { "pcsx_rearmed_neon_enhancement_no_main", "Enhanced resolution speed hack; disabled|enabled" },
 #endif
-      { "pcsx_rearmed_duping_enable", "Frame duping; on|off" },
-      { "pcsx_rearmed_show_bios_bootlogo", "Show Bios Bootlogo; on|off" },
-      { "pcsx_rearmed_spu_reverb", "Sound: Reverb; on|off" },
+      { "pcsx_rearmed_duping_enable", "Frame duping; enabled|disabled" },
+      { "pcsx_rearmed_show_bios_bootlogo", "Show Bios Bootlogo(Breaks some games); disabled|enabled" },
+      { "pcsx_rearmed_spu_reverb", "Sound: Reverb; enabled|disabled" },
       { "pcsx_rearmed_spu_interpolation", "Sound: Interpolation; simple|gaussian|cubic|off" },
       { "pcsx_rearmed_pe2_fix", "Parasite Eve 2/Vandal Hearts 1/2 Fix; disabled|enabled" },
       { "pcsx_rearmed_inuyasha_fix", "InuYasha Sengoku Battle Fix; disabled|enabled" },
@@ -801,7 +800,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char *code)
                ret = AddCheat("", buf);
 
        if (ret != 0)
-               SysPrintf("Failed to set cheat %#u: %s\n", index, code);
+               SysPrintf("Failed to set cheat %#u\n", index);
        else if (index < NumCheats)
                Cheats[index].Enabled = enabled;
 }
@@ -933,6 +932,10 @@ static struct retro_disk_control_callback disk_control = {
 #define SLASH '/'
 #endif
 
+#ifndef PATH_MAX
+#define PATH_MAX  4096
+#endif
+
 static char base_dir[PATH_MAX];
 
 static bool read_m3u(const char *file)
@@ -1398,9 +1401,9 @@ static void update_variables(bool in_flight)
 
    if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
    {
-      if (strcmp(var.value, "off") == 0)
+      if (strcmp(var.value, "disabled") == 0)
          duping_enable = false;
-      else if (strcmp(var.value, "on") == 0)
+      else if (strcmp(var.value, "enabled") == 0)
          duping_enable = true;
    }
 
@@ -1436,9 +1439,9 @@ static void update_variables(bool in_flight)
 
    if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
    {
-      if (strcmp(var.value, "off") == 0)
+      if (strcmp(var.value, "disabled") == 0)
          spu_config.iUseReverb = false;
-      else if (strcmp(var.value, "on") == 0)
+      else if (strcmp(var.value, "enabled") == 0)
          spu_config.iUseReverb = true;
    }
 
@@ -1499,7 +1502,7 @@ static void update_variables(bool in_flight)
          var.key = "pcsx_rearmed_show_bios_bootlogo";
          if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)
          {
-            if (strcmp(var.value, "on") == 0)
+            if (strcmp(var.value, "enabled") == 0)
                rebootemu = 1;
          }
       }