Android: Fix possible crash touchscreen GunCon controller

This commit is contained in:
Connor McLaughlin 2021-04-18 19:52:35 +10:00
parent 430dbb32a7
commit 339a088fe9
2 changed files with 8 additions and 3 deletions

View file

@ -69,6 +69,12 @@ public class GamePropertiesActivity extends AppCompatActivity {
setTitle(mGameListEntry.getTitle());
}
@Override
protected void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.remove("android:support:fragments");
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (item.getItemId() == android.R.id.home) {

View file

@ -656,10 +656,9 @@ public class TouchscreenControllerView extends FrameLayout {
mPointerButtonCode, true);
}
final int pointerId = event.getPointerId(0);
AndroidHostInterface.getInstance().setMousePosition(
(int)event.getX(pointerId),
(int)event.getY(pointerId));
(int)event.getX(0),
(int)event.getY(0));
}
return true;