Skip to content
Permalink
Browse files

Merge pull request #7754 from JosJuice/android-selectedgames

Android: Use SelectedGames instead of SelectedGame in StartupHandler
  • Loading branch information...
JosJuice committed Jan 30, 2019
2 parents 4166c55 + 3639607 commit 06241fa40952fa9ff3462e1a068fcf4111aa24d0
@@ -26,18 +26,26 @@ public static void HandleInit(FragmentActivity parent)
// Ask the user if he wants to enable analytics if we haven't yet.
Analytics.checkAnalyticsInit(parent);

String start_file = "";
String[] start_files = null;
Bundle extras = parent.getIntent().getExtras();
if (extras != null)
{
start_file = extras.getString("AutoStartFile");
start_files = extras.getStringArray("AutoStartFiles");
if (start_files == null)
{
String start_file = extras.getString("AutoStartFile");
if (!TextUtils.isEmpty(start_file))
{
start_files = new String[]{start_file};
}
}
}

if (!TextUtils.isEmpty(start_file))
if (start_files != null && start_files.length > 0)
{
// Start the emulation activity, send the ISO passed in and finish the main activity
Intent emulation_intent = new Intent(parent, EmulationActivity.class);
emulation_intent.putExtra("SelectedGame", start_file);
emulation_intent.putExtra(EmulationActivity.EXTRA_SELECTED_GAMES, start_files);
parent.startActivity(emulation_intent);
parent.finish();
}

0 comments on commit 06241fa

Please sign in to comment.
You can’t perform that action at this time.