mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-05-19 16:20:39 +00:00
Remove USB options from settings page if USB host mode is not supported
This commit is contained in:
@@ -304,6 +304,14 @@ public class StreamSettings extends Activity {
|
|||||||
category.removePreference(findPreference("checkbox_gamepad_motion_fallback"));
|
category.removePreference(findPreference("checkbox_gamepad_motion_fallback"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide USB driver options on devices without USB host support
|
||||||
|
if (!getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_USB_HOST)) {
|
||||||
|
PreferenceCategory category =
|
||||||
|
(PreferenceCategory) findPreference("category_gamepad_settings");
|
||||||
|
category.removePreference(findPreference("checkbox_usb_bind_all"));
|
||||||
|
category.removePreference(findPreference("checkbox_usb_driver"));
|
||||||
|
}
|
||||||
|
|
||||||
// Remove PiP mode on devices pre-Oreo, where the feature is not available (some low RAM devices),
|
// Remove PiP mode on devices pre-Oreo, where the feature is not available (some low RAM devices),
|
||||||
// and on Fire OS where it violates the Amazon App Store guidelines for some reason.
|
// and on Fire OS where it violates the Amazon App Store guidelines for some reason.
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
|
||||||
|
|||||||
Reference in New Issue
Block a user