Android: Fix touchscreen controller being instantiated when disabled

This commit is contained in:
Connor McLaughlin 2020-12-14 02:13:44 +10:00
parent 4bcf8b3ce9
commit 3ed429772d
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ A "BIOS" ROM image is required to to start the emulator and to play games. You c
## Latest News ## Latest News
- 2020/12/13: Button layout for the touchscreen controller in the Android version can now be customized.
- 2020/12/10: Translation support added for Android version. Currently Brazillian Portuguese, Italian, and Dutch are available. - 2020/12/10: Translation support added for Android version. Currently Brazillian Portuguese, Italian, and Dutch are available.
- 2020/11/27: Cover support added for game list in Android version. Procedure is the same as the desktop version, except you should place cover images in `<storage>/duckstation/covers` (see [Adding Game Covers](https://github.com/stenzek/duckstation/wiki/Adding-Game-Covers)). - 2020/11/27: Cover support added for game list in Android version. Procedure is the same as the desktop version, except you should place cover images in `<storage>/duckstation/covers` (see [Adding Game Covers](https://github.com/stenzek/duckstation/wiki/Adding-Game-Covers)).
- 2020/11/27: Disc database is shipped with desktop and Android versions courtesy of redump.org. This will provide titles for games on Android, where it was not possible previously. - 2020/11/27: Disc database is shipped with desktop and Android versions courtesy of redump.org. This will provide titles for games on Android, where it was not possible previously.

View file

@ -532,7 +532,7 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
final boolean hasAnyControllers = mContentView.initControllerMapping(controllerType); final boolean hasAnyControllers = mContentView.initControllerMapping(controllerType);
if (controllerType == "none" || viewType == "none" || (hasAnyControllers && autoHideTouchscreenController)) { if (controllerType.equals("none") || viewType.equals("none") || (hasAnyControllers && autoHideTouchscreenController)) {
if (mTouchscreenController != null) { if (mTouchscreenController != null) {
activityLayout.removeView(mTouchscreenController); activityLayout.removeView(mTouchscreenController);
mTouchscreenController = null; mTouchscreenController = null;