diff --git a/app/src/main/java/com/limelight/preferences/PreferenceConfiguration.java b/app/src/main/java/com/limelight/preferences/PreferenceConfiguration.java
index 649e4ab5..2fcb255e 100644
--- a/app/src/main/java/com/limelight/preferences/PreferenceConfiguration.java
+++ b/app/src/main/java/com/limelight/preferences/PreferenceConfiguration.java
@@ -21,7 +21,7 @@ public class PreferenceConfiguration {
private static final String ENABLE_51_SURROUND_PREF_STRING = "checkbox_51_surround";
private static final String USB_DRIVER_PREF_SRING = "checkbox_usb_driver";
private static final String VIDEO_FORMAT_PREF_STRING = "video_format";
- private static final String ONSCREEN_CONTROLLER_PREF_STRING = "checkbox_onscreen_controller";
+ private static final String ONSCREEN_CONTROLLER_PREF_STRING = "checkbox_show_onscreen_controls";
private static final int BITRATE_DEFAULT_720_30 = 5;
private static final int BITRATE_DEFAULT_720_60 = 10;
diff --git a/app/src/main/java/com/limelight/preferences/StreamSettings.java b/app/src/main/java/com/limelight/preferences/StreamSettings.java
index fa9a7e3c..5184d824 100644
--- a/app/src/main/java/com/limelight/preferences/StreamSettings.java
+++ b/app/src/main/java/com/limelight/preferences/StreamSettings.java
@@ -2,12 +2,15 @@ package com.limelight.preferences;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.os.Bundle;
import android.app.Activity;
import android.preference.Preference;
+import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
+import android.preference.PreferenceScreen;
import com.limelight.PcView;
import com.limelight.R;
@@ -60,6 +63,15 @@ public class StreamSettings extends Activity {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
+ PreferenceScreen screen = getPreferenceScreen();
+
+ // hide on-screen controls category on non touch screen devices
+ if (!getActivity().getPackageManager().
+ hasSystemFeature("android.hardware.touchscreen")) {
+ PreferenceCategory category =
+ (PreferenceCategory) findPreference("category_onscreen_controls");
+ screen.removePreference(category);
+ }
// Add a listener to the FPS and resolution preference
// so the bitrate can be auto-adjusted
diff --git a/app/src/main/res/layout/activity_virtual_controller_settings.xml b/app/src/main/res/layout/activity_virtual_controller_settings.xml
deleted file mode 100644
index a8c09048..00000000
--- a/app/src/main/res/layout/activity_virtual_controller_settings.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e908b3c7..20ba3eff 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -106,6 +106,10 @@
Xbox One controller driver
Enables a built-in USB driver for devices without native Xbox One controller support.
+ On-screen controls Settings
+ Show on-screen controls
+ Show virtual controller overlay on touchscreen
+
UI Settings
Language
Language to use for Moonlight
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index d0db77d3..0df12813 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -50,11 +50,14 @@
android:title="@string/title_checkbox_xb1_driver"
android:summary="@string/summary_checkbox_xb1_driver"
android:defaultValue="true" />
-
+
+
+