Android: Support starting emulation activity externally

Should hopefully work for third-party launchers.
This commit is contained in:
Connor McLaughlin 2020-11-07 22:07:50 +10:00
parent 74942443d3
commit c18278e664
1 changed files with 7 additions and 0 deletions

View File

@ -184,9 +184,16 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
Log.i("EmulationActivity", "OnCreate");
// we might be coming from a third-party launcher if the host interface isn't setup
if (!AndroidHostInterface.hasInstance() && !AndroidHostInterface.createInstance(this)) {
finish();
return;
}
enableFullscreenImmersive();
setContentView(R.layout.activity_emulation);