mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-01 23:35:28 +00:00
Prefer Shield capture provider over Android N
This commit is contained in:
parent
2dcf5486da
commit
87a62666ac
@ -8,14 +8,17 @@ import com.limelight.binding.input.evdev.EvdevListener;
|
|||||||
|
|
||||||
public class InputCaptureManager {
|
public class InputCaptureManager {
|
||||||
public static InputCaptureProvider getInputCaptureProvider(Activity activity, EvdevListener rootListener) {
|
public static InputCaptureProvider getInputCaptureProvider(Activity activity, EvdevListener rootListener) {
|
||||||
if (AndroidCaptureProvider.isCaptureProviderSupported()) {
|
// Shield capture is preferred because it can capture when the cursor is over
|
||||||
LimeLog.info("Using Android N+ native mouse capture");
|
// the system UI. Android N native capture can only capture over views owned
|
||||||
return new AndroidCaptureProvider(activity);
|
// by the application.
|
||||||
}
|
if (ShieldCaptureProvider.isCaptureProviderSupported()) {
|
||||||
else if (ShieldCaptureProvider.isCaptureProviderSupported()) {
|
|
||||||
LimeLog.info("Using NVIDIA mouse capture extension");
|
LimeLog.info("Using NVIDIA mouse capture extension");
|
||||||
return new ShieldCaptureProvider(activity);
|
return new ShieldCaptureProvider(activity);
|
||||||
}
|
}
|
||||||
|
else if (AndroidCaptureProvider.isCaptureProviderSupported()) {
|
||||||
|
LimeLog.info("Using Android N+ native mouse capture");
|
||||||
|
return new AndroidCaptureProvider(activity);
|
||||||
|
}
|
||||||
else if (EvdevCaptureProvider.isCaptureProviderSupported()) {
|
else if (EvdevCaptureProvider.isCaptureProviderSupported()) {
|
||||||
LimeLog.info("Using Evdev mouse capture");
|
LimeLog.info("Using Evdev mouse capture");
|
||||||
return new EvdevCaptureProvider(activity, rootListener);
|
return new EvdevCaptureProvider(activity, rootListener);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user