Only copy these launch arguments on the first run - by fr500

This commit is contained in:
twinaphex 2019-05-21 05:36:04 +02:00
parent 57c5b629a6
commit 154319ba3d
1 changed files with 12 additions and 6 deletions

View File

@ -1241,6 +1241,7 @@ static void retroarch_print_help(const char *arg0)
**/
static void retroarch_parse_input_and_config(int argc, char *argv[])
{
static bool first_run = false;
const char *optstring = NULL;
bool explicit_menu = false;
unsigned i;
@ -1294,6 +1295,8 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
{ NULL, 0, NULL, 0 }
};
if (!first_run)
{
/* Copy the args into a buffer so launch arguments can be reused */
for (i = 0; i < (unsigned)argc; i++)
{
@ -1303,6 +1306,9 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
string_trim_whitespace_left(launch_arguments);
string_trim_whitespace_right(launch_arguments);
first_run = true;
}
/* Handling the core type is finicky. Based on the arguments we pass in,
* we handle it differently.
* Some current cases which track desired behavior and how it is supposed to work: