Android: Support starting emulation activity externally
Should hopefully work for third-party launchers.
This commit is contained in:
parent
8014e66c6f
commit
0003a8fc34
|
@ -184,9 +184,16 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
Log.i("EmulationActivity", "OnCreate");
|
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();
|
enableFullscreenImmersive();
|
||||||
setContentView(R.layout.activity_emulation);
|
setContentView(R.layout.activity_emulation);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue