Android: Fix game controller input being ignored
This commit is contained in:
parent
6716b8e8ba
commit
7775774761
|
@ -182,6 +182,8 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
|||
|
||||
mContentView = findViewById(R.id.fullscreen_content);
|
||||
mContentView.getHolder().addCallback(this);
|
||||
mContentView.setFocusable(true);
|
||||
mContentView.requestFocus();
|
||||
|
||||
// Hook up controller input.
|
||||
updateControllers();
|
||||
|
@ -254,6 +256,8 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
|
|||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
if (mContentView != null)
|
||||
mContentView.requestFocus();
|
||||
}
|
||||
|
||||
private static final int REQUEST_CODE_SETTINGS = 0;
|
||||
|
|
Loading…
Reference in New Issue