From 80d51c97abd6c379ca6c587d0e24079ac649626b Mon Sep 17 00:00:00 2001 From: Mike Harris Date: Wed, 4 Oct 2017 23:04:26 -0700 Subject: [PATCH] Add dummy View that works around a bug with the nVidia Shield. Without this View, the emulation SurfaceView acts like it has the highest Z-value, blocking any other View. This includes the menu fragments and the screenshot ImageView. --- .../ui/NVidiaShieldWorkaroundView.java | 25 +++++++++++++++++++ .../layout-television/activity_emulation.xml | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/NVidiaShieldWorkaroundView.java diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/NVidiaShieldWorkaroundView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/NVidiaShieldWorkaroundView.java new file mode 100644 index 0000000000..5d2e4a8bbe --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/NVidiaShieldWorkaroundView.java @@ -0,0 +1,25 @@ +/** + * Copyright 2013 Dolphin Emulator Project + * Licensed under GPLv2+ + * Refer to the license.txt file included. + */ + +package org.dolphinemu.dolphinemu.ui; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; + +/** + * Work around a bug with the nVidia Shield. + */ +public final class NVidiaShieldWorkaroundView extends View +{ + public NVidiaShieldWorkaroundView(Context context, AttributeSet attrs) + { + super(context, attrs); + + // Setting this seems to workaround the bug + setWillNotDraw(false); + } +} diff --git a/Source/Android/app/src/main/res/layout-television/activity_emulation.xml b/Source/Android/app/src/main/res/layout-television/activity_emulation.xml index a8cba9adb5..59e1ba02ec 100644 --- a/Source/Android/app/src/main/res/layout-television/activity_emulation.xml +++ b/Source/Android/app/src/main/res/layout-television/activity_emulation.xml @@ -11,6 +11,10 @@ android:layout_height="match_parent" android:visibility="invisible"/> + + - \ No newline at end of file +