mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Android: Fix possible crash touchscreen GunCon controller
This commit is contained in:
parent
430dbb32a7
commit
339a088fe9
|
@ -69,6 +69,12 @@ public class GamePropertiesActivity extends AppCompatActivity {
|
||||||
setTitle(mGameListEntry.getTitle());
|
setTitle(mGameListEntry.getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
outState.remove("android:support:fragments");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
|
|
@ -656,10 +656,9 @@ public class TouchscreenControllerView extends FrameLayout {
|
||||||
mPointerButtonCode, true);
|
mPointerButtonCode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
final int pointerId = event.getPointerId(0);
|
|
||||||
AndroidHostInterface.getInstance().setMousePosition(
|
AndroidHostInterface.getInstance().setMousePosition(
|
||||||
(int)event.getX(pointerId),
|
(int)event.getX(0),
|
||||||
(int)event.getY(pointerId));
|
(int)event.getY(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue