Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b0f485b41 | |||
| 2be2c95212 | |||
| e7aeeb8bd5 | |||
| 73df93f86a | |||
| 9cd4d5e2aa | |||
| c3b81554f4 | |||
| 6f79c52fc5 | |||
| 29bc3e022b | |||
| 7d03203d83 | |||
| 11dde835d1 | |||
| 52c47c288c | |||
| 63072aa8e1 | |||
| 4cca3ac922 | |||
| 604bc1ec11 | |||
| 5d7fbf3195 | |||
| 8c56e6f0d4 | |||
| 2069be7932 | |||
| 9c1c2991a9 | |||
| 81dabf2713 | |||
| 27520cb77e | |||
| f555d3dae0 | |||
| 70f1a2cacb | |||
| 7f15aaa2e5 | |||
| e5726205c4 | |||
| 07fabc0663 | |||
| 800f97ae85 | |||
| 3ee5b284e1 | |||
| c0389f0da9 | |||
| a7a4d7ded5 | |||
| 87cd974b79 | |||
| 7faaac31ff | |||
| 7386eb2a78 | |||
| 49a1524f4f | |||
| c957b8b06b | |||
| a3a6e14d80 |
+2
-2
@@ -7,8 +7,8 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
|
||||
versionName "8.11"
|
||||
versionCode = 216
|
||||
versionName "9.2"
|
||||
versionCode = 222
|
||||
}
|
||||
|
||||
flavorDimensions "root"
|
||||
|
||||
@@ -86,8 +86,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
OnSystemUiVisibilityChangeListener, GameGestures, StreamView.InputCallbacks,
|
||||
PerfOverlayListener
|
||||
{
|
||||
private int lastMouseX = Integer.MIN_VALUE;
|
||||
private int lastMouseY = Integer.MIN_VALUE;
|
||||
private int lastButtonState = 0;
|
||||
|
||||
// Only 2 touches are supported
|
||||
@@ -97,6 +95,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
private static final int REFERENCE_HORIZ_RES = 1280;
|
||||
private static final int REFERENCE_VERT_RES = 720;
|
||||
|
||||
private static final int STYLUS_DEAD_ZONE_DELAY = 250;
|
||||
private static final int STYLUS_DEAD_ZONE_RADIUS = 50;
|
||||
|
||||
private static final int THREE_FINGER_TAP_THRESHOLD = 300;
|
||||
|
||||
private ControllerHandler controllerHandler;
|
||||
@@ -118,6 +119,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
private boolean grabbedInput = true;
|
||||
private boolean grabComboDown = false;
|
||||
private StreamView streamView;
|
||||
private long stylusDownTime = 0;
|
||||
private float stylusDownX, stylusDownY;
|
||||
|
||||
private boolean isHidingOverlays;
|
||||
private TextView notificationOverlayView;
|
||||
@@ -228,7 +231,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
streamView.setOnCapturedPointerListener(new View.OnCapturedPointerListener() {
|
||||
@Override
|
||||
public boolean onCapturedPointer(View view, MotionEvent motionEvent) {
|
||||
return handleMotionEvent(motionEvent);
|
||||
return handleMotionEvent(view, motionEvent);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -454,9 +457,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
.setEnableHdr(willStreamHdr)
|
||||
.setAttachedGamepadMask(gamepadMask)
|
||||
.setClientRefreshRateX100((int)(displayRefreshRate * 100))
|
||||
.setAudioConfiguration(prefConfig.enable51Surround ?
|
||||
MoonBridge.AUDIO_CONFIGURATION_51_SURROUND :
|
||||
MoonBridge.AUDIO_CONFIGURATION_STEREO)
|
||||
.setAudioConfiguration(prefConfig.audioConfiguration)
|
||||
.build();
|
||||
|
||||
// Initialize the connection
|
||||
@@ -1143,7 +1144,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
// Returns true if the event was consumed
|
||||
private boolean handleMotionEvent(MotionEvent event) {
|
||||
// NB: View is only present if called from a view callback
|
||||
private boolean handleMotionEvent(View view, MotionEvent event) {
|
||||
// Pass through keyboard input if we're not grabbing
|
||||
if (!grabbedInput) {
|
||||
return false;
|
||||
@@ -1157,11 +1159,13 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
else if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0 ||
|
||||
event.getSource() == InputDevice.SOURCE_MOUSE_RELATIVE)
|
||||
{
|
||||
// This case is for mice
|
||||
// This case is for mice and non-finger touch devices
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE ||
|
||||
event.getSource() == InputDevice.SOURCE_MOUSE_RELATIVE ||
|
||||
(event.getPointerCount() >= 1 &&
|
||||
event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE))
|
||||
(event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE ||
|
||||
event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS ||
|
||||
event.getToolType(0) == MotionEvent.TOOL_TYPE_ERASER)))
|
||||
{
|
||||
int changedButtons = event.getButtonState() ^ lastButtonState;
|
||||
|
||||
@@ -1177,13 +1181,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
byte vScrollClicks = (byte) event.getAxisValue(MotionEvent.AXIS_VSCROLL);
|
||||
conn.sendMouseScroll(vScrollClicks);
|
||||
}
|
||||
else if (event.getActionMasked() == MotionEvent.ACTION_HOVER_ENTER ||
|
||||
event.getActionMasked() == MotionEvent.ACTION_HOVER_EXIT) {
|
||||
// On some devices (Galaxy S8 without Oreo pointer capture), we can
|
||||
// get spurious ACTION_HOVER_ENTER events when right clicking with
|
||||
// incorrect X and Y coordinates. Just eat this event without processing it.
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((changedButtons & MotionEvent.BUTTON_PRIMARY) != 0) {
|
||||
if ((event.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0) {
|
||||
@@ -1194,8 +1191,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
if ((changedButtons & MotionEvent.BUTTON_SECONDARY) != 0) {
|
||||
if ((event.getButtonState() & MotionEvent.BUTTON_SECONDARY) != 0) {
|
||||
// Mouse secondary or stylus primary is right click (stylus down is left click)
|
||||
if ((changedButtons & (MotionEvent.BUTTON_SECONDARY | MotionEvent.BUTTON_STYLUS_PRIMARY)) != 0) {
|
||||
if ((event.getButtonState() & (MotionEvent.BUTTON_SECONDARY | MotionEvent.BUTTON_STYLUS_PRIMARY)) != 0) {
|
||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_RIGHT);
|
||||
}
|
||||
else {
|
||||
@@ -1203,8 +1201,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
if ((changedButtons & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||
if ((event.getButtonState() & MotionEvent.BUTTON_TERTIARY) != 0) {
|
||||
// Mouse tertiary or stylus secondary is middle click
|
||||
if ((changedButtons & (MotionEvent.BUTTON_TERTIARY | MotionEvent.BUTTON_STYLUS_SECONDARY)) != 0) {
|
||||
if ((event.getButtonState() & (MotionEvent.BUTTON_TERTIARY | MotionEvent.BUTTON_STYLUS_SECONDARY)) != 0) {
|
||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_MIDDLE);
|
||||
}
|
||||
else {
|
||||
@@ -1232,31 +1231,60 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
}
|
||||
|
||||
// Handle stylus presses
|
||||
if (event.getPointerCount() == 1 && event.getActionIndex() == 0) {
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
if (event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS) {
|
||||
stylusDownTime = SystemClock.uptimeMillis();
|
||||
stylusDownX = event.getX(0);
|
||||
stylusDownY = event.getY(0);
|
||||
|
||||
// Stylus is left click
|
||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_LEFT);
|
||||
} else if (event.getToolType(0) == MotionEvent.TOOL_TYPE_ERASER) {
|
||||
stylusDownTime = SystemClock.uptimeMillis();
|
||||
stylusDownX = event.getX(0);
|
||||
stylusDownY = event.getY(0);
|
||||
|
||||
// Eraser is right click
|
||||
conn.sendMouseButtonDown(MouseButtonPacket.BUTTON_RIGHT);
|
||||
}
|
||||
}
|
||||
else if (event.getActionMasked() == MotionEvent.ACTION_UP || event.getActionMasked() == MotionEvent.ACTION_CANCEL) {
|
||||
if (event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS) {
|
||||
// It looks odd to set these on ACTION_UP, but it makes sense.
|
||||
// The last "down" position is actually when we come up.
|
||||
stylusDownTime = SystemClock.uptimeMillis();
|
||||
stylusDownX = event.getX(0);
|
||||
stylusDownY = event.getY(0);
|
||||
|
||||
// Stylus is left click
|
||||
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_LEFT);
|
||||
} else if (event.getToolType(0) == MotionEvent.TOOL_TYPE_ERASER) {
|
||||
stylusDownTime = SystemClock.uptimeMillis();
|
||||
stylusDownX = event.getX(0);
|
||||
stylusDownY = event.getY(0);
|
||||
|
||||
// Eraser is right click
|
||||
conn.sendMouseButtonUp(MouseButtonPacket.BUTTON_RIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get relative axis values if we can
|
||||
if (inputCaptureProvider.eventHasRelativeMouseAxes(event)) {
|
||||
// Send the deltas straight from the motion event
|
||||
conn.sendMouseMove((short) inputCaptureProvider.getRelativeAxisX(event),
|
||||
(short) inputCaptureProvider.getRelativeAxisY(event));
|
||||
|
||||
// We have to also update the position Android thinks the cursor is at
|
||||
// in order to avoid jumping when we stop moving or click.
|
||||
lastMouseX = (int)event.getX();
|
||||
lastMouseY = (int)event.getY();
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// We get a normal (non-relative) MotionEvent when starting pointer capture to synchronize the
|
||||
// location of the cursor with our app. We don't want this, so we must discard this event.
|
||||
lastMouseX = (int)event.getX();
|
||||
lastMouseY = (int)event.getY();
|
||||
}
|
||||
else {
|
||||
// Don't process the history. We just want the current position now.
|
||||
updateMousePosition((int)event.getX(), (int)event.getY());
|
||||
else if (view != null) {
|
||||
// Otherwise send absolute position
|
||||
updateMousePosition(view, event);
|
||||
}
|
||||
|
||||
lastButtonState = event.getButtonState();
|
||||
}
|
||||
// This case is for touch-based input devices
|
||||
// This case is for fingers
|
||||
else
|
||||
{
|
||||
if (virtualController != null &&
|
||||
@@ -1359,48 +1387,51 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
return handleMotionEvent(event) || super.onTouchEvent(event);
|
||||
return handleMotionEvent(null, event) || super.onTouchEvent(event);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotionEvent(MotionEvent event) {
|
||||
return handleMotionEvent(event) || super.onGenericMotionEvent(event);
|
||||
return handleMotionEvent(null, event) || super.onGenericMotionEvent(event);
|
||||
|
||||
}
|
||||
|
||||
private void updateMousePosition(int eventX, int eventY) {
|
||||
// Send a mouse move if we already have a mouse location
|
||||
// and the mouse coordinates change
|
||||
if (lastMouseX != Integer.MIN_VALUE &&
|
||||
lastMouseY != Integer.MIN_VALUE &&
|
||||
!(lastMouseX == eventX && lastMouseY == eventY))
|
||||
private void updateMousePosition(View view, MotionEvent event) {
|
||||
// X and Y are already relative to the provided view object
|
||||
float eventX = event.getX(0);
|
||||
float eventY = event.getY(0);
|
||||
|
||||
if (event.getPointerCount() == 1 && event.getActionIndex() == 0 &&
|
||||
(event.getToolType(0) == MotionEvent.TOOL_TYPE_ERASER) ||
|
||||
event.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS)
|
||||
{
|
||||
int deltaX = eventX - lastMouseX;
|
||||
int deltaY = eventY - lastMouseY;
|
||||
|
||||
// Scale the deltas if the device resolution is different
|
||||
// than the stream resolution
|
||||
deltaX = (int)Math.round((double)deltaX * (REFERENCE_HORIZ_RES / (double)streamView.getWidth()));
|
||||
deltaY = (int)Math.round((double)deltaY * (REFERENCE_VERT_RES / (double)streamView.getHeight()));
|
||||
|
||||
conn.sendMouseMove((short)deltaX, (short)deltaY);
|
||||
if (SystemClock.uptimeMillis() - stylusDownTime <= STYLUS_DEAD_ZONE_DELAY &&
|
||||
Math.sqrt(Math.pow(eventX - stylusDownX, 2) + Math.pow(eventY - stylusDownY, 2)) <= STYLUS_DEAD_ZONE_RADIUS) {
|
||||
// Ignore small inputs shortly after the stylus has been pressed. This ensures users can reliably double click.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Update pointer location for delta calculation next time
|
||||
lastMouseX = eventX;
|
||||
lastMouseY = eventY;
|
||||
// We may get values slightly outside our view region on ACTION_HOVER_ENTER and ACTION_HOVER_EXIT.
|
||||
// Normalize these to the view size. We can't just drop them because we won't always get an event
|
||||
// right at the boundary of the view, so dropping them would result in our cursor never really
|
||||
// reaching the sides of the screen.
|
||||
eventX = Math.min(Math.max(eventX, 0), view.getWidth());
|
||||
eventY = Math.min(Math.max(eventY, 0), view.getHeight());
|
||||
|
||||
conn.sendMousePosition((short)eventX, (short)eventY, (short)view.getWidth(), (short)view.getHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
return handleMotionEvent(event);
|
||||
public boolean onGenericMotion(View view, MotionEvent event) {
|
||||
return handleMotionEvent(view, event);
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
return handleMotionEvent(event);
|
||||
public boolean onTouch(View view, MotionEvent event) {
|
||||
return handleMotionEvent(view, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,25 +64,46 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int setup(int audioConfiguration, int sampleRate, int samplesPerFrame) {
|
||||
public int setup(MoonBridge.AudioConfiguration audioConfiguration, int sampleRate, int samplesPerFrame) {
|
||||
int channelConfig;
|
||||
int bytesPerFrame;
|
||||
|
||||
switch (audioConfiguration)
|
||||
switch (audioConfiguration.channelCount)
|
||||
{
|
||||
case MoonBridge.AUDIO_CONFIGURATION_STEREO:
|
||||
case 2:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
|
||||
bytesPerFrame = 2 * samplesPerFrame * 2;
|
||||
break;
|
||||
case MoonBridge.AUDIO_CONFIGURATION_51_SURROUND:
|
||||
case 4:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_QUAD;
|
||||
break;
|
||||
case 6:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
bytesPerFrame = 6 * samplesPerFrame * 2;
|
||||
break;
|
||||
case 8:
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// AudioFormat.CHANNEL_OUT_7POINT1_SURROUND isn't available until Android 6.0,
|
||||
// yet the CHANNEL_OUT_SIDE_LEFT and CHANNEL_OUT_SIDE_RIGHT constants were added
|
||||
// in 5.0, so just hardcode the constant so we can work on Lollipop.
|
||||
channelConfig = 0x000018fc; // AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
|
||||
}
|
||||
else {
|
||||
// On KitKat and lower, creation of the AudioTrack will fail if we specify
|
||||
// CHANNEL_OUT_SIDE_LEFT or CHANNEL_OUT_SIDE_RIGHT. That leaves us with
|
||||
// the old CHANNEL_OUT_7POINT1 which uses left-of-center and right-of-center
|
||||
// speakers instead of side-left and side-right. This non-standard layout
|
||||
// is probably not what the user wants, but we don't really have a choice.
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LimeLog.severe("Decoder returned unhandled channel count");
|
||||
return -1;
|
||||
}
|
||||
|
||||
LimeLog.info("Audio channel config: "+String.format("0x%X", channelConfig));
|
||||
|
||||
bytesPerFrame = audioConfiguration.channelCount * samplesPerFrame * 2;
|
||||
|
||||
// We're not supposed to request less than the minimum
|
||||
// buffer size for our buffer, but it appears that we can
|
||||
// do this on many devices and it lowers audio latency.
|
||||
|
||||
@@ -332,6 +332,9 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
context.device = device;
|
||||
context.external = true;
|
||||
|
||||
context.vendorId = device.getVendorId();
|
||||
context.productId = device.getProductId();
|
||||
|
||||
context.leftStickDeadzoneRadius = (float) stickDeadzone;
|
||||
context.rightStickDeadzoneRadius = (float) stickDeadzone;
|
||||
context.triggerDeadzone = 0.13f;
|
||||
@@ -445,7 +448,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
String devName = dev.getName();
|
||||
|
||||
LimeLog.info("Creating controller context for device: "+devName);
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
LimeLog.info("Vendor ID: "+dev.getVendorId());
|
||||
LimeLog.info("Product ID: "+dev.getProductId());
|
||||
}
|
||||
@@ -455,6 +458,11 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
context.id = dev.getId();
|
||||
context.external = isExternal(dev);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
context.vendorId = dev.getVendorId();
|
||||
context.productId = dev.getProductId();
|
||||
}
|
||||
|
||||
if (dev.getVibrator().hasVibrator()) {
|
||||
context.vibrator = dev.getVibrator();
|
||||
}
|
||||
@@ -496,7 +504,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
InputDevice.MotionRange rxRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RX);
|
||||
InputDevice.MotionRange ryRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RY);
|
||||
if (rxRange != null && ryRange != null && devName != null) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (dev.getVendorId() == 0x054c) { // Sony
|
||||
if (dev.hasKeys(KeyEvent.KEYCODE_BUTTON_C)[0]) {
|
||||
LimeLog.info("Detected non-standard DualShock 4 mapping");
|
||||
@@ -591,7 +599,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
// The ADT-1 controller needs a similar fixup to the ASUS Gamepad
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
// The device name provided is just "Gamepad" which is pretty useless, so we
|
||||
// use VID/PID instead
|
||||
if (dev.getVendorId() == 0x18d1 && dev.getProductId() == 0x2c40) {
|
||||
@@ -610,7 +618,7 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
if (devName.contains("ASUS Gamepad")) {
|
||||
// We can only do this check on KitKat or higher, but it doesn't matter since ATV
|
||||
// is Android 5.0 anyway
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
boolean[] hasStartKey = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_START, KeyEvent.KEYCODE_MENU, 0);
|
||||
if (!hasStartKey[0] && !hasStartKey[1]) {
|
||||
context.backIsStart = true;
|
||||
@@ -907,6 +915,23 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
return KeyEvent.KEYCODE_BUTTON_MODE;
|
||||
}
|
||||
}
|
||||
else if (context.vendorId == 0x0b05 && // ASUS
|
||||
(context.productId == 0x7900 || // Kunai - USB
|
||||
context.productId == 0x7902)) // Kunai - Bluetooth
|
||||
{
|
||||
// ROG Kunai has special M1-M4 buttons that are accessible via the
|
||||
// joycon-style detachable controllers that we should map to Start
|
||||
// and Select.
|
||||
switch (event.getScanCode()) {
|
||||
case 264:
|
||||
case 266:
|
||||
return KeyEvent.KEYCODE_BUTTON_START;
|
||||
|
||||
case 265:
|
||||
case 267:
|
||||
return KeyEvent.KEYCODE_BUTTON_SELECT;
|
||||
}
|
||||
}
|
||||
|
||||
if (context.hatXAxis == -1 &&
|
||||
context.hatYAxis == -1 &&
|
||||
@@ -1597,6 +1622,9 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
public int id;
|
||||
public boolean external;
|
||||
|
||||
public int vendorId;
|
||||
public int productId;
|
||||
|
||||
public float leftStickDeadzoneRadius;
|
||||
public float rightStickDeadzoneRadius;
|
||||
public float triggerDeadzone;
|
||||
|
||||
+8
-8
@@ -1,17 +1,22 @@
|
||||
package com.limelight.binding.input.capture;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.view.InputDevice;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
public class AndroidNativePointerCaptureProvider extends InputCaptureProvider {
|
||||
|
||||
// We extend AndroidPointerIconCaptureProvider because we want to also get the
|
||||
// pointer icon hiding behavior over our stream view just in case pointer capture
|
||||
// is unavailable on this system (ex: DeX, ChromeOS)
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
public class AndroidNativePointerCaptureProvider extends AndroidPointerIconCaptureProvider {
|
||||
private View targetView;
|
||||
|
||||
public AndroidNativePointerCaptureProvider(View targetView) {
|
||||
public AndroidNativePointerCaptureProvider(Activity activity, View targetView) {
|
||||
super(activity, targetView);
|
||||
this.targetView = targetView;
|
||||
}
|
||||
|
||||
@@ -31,11 +36,6 @@ public class AndroidNativePointerCaptureProvider extends InputCaptureProvider {
|
||||
targetView.releasePointerCapture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCapturingActive() {
|
||||
return targetView.hasPointerCapture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean eventHasRelativeMouseAxes(MotionEvent event) {
|
||||
return event.getSource() == InputDevice.SOURCE_MOUSE_RELATIVE;
|
||||
|
||||
+5
-30
@@ -7,55 +7,30 @@ import android.os.Build;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.PointerIcon;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.N)
|
||||
public class AndroidPointerIconCaptureProvider extends InputCaptureProvider {
|
||||
private ViewGroup rootViewGroup;
|
||||
private View targetView;
|
||||
private Context context;
|
||||
|
||||
public AndroidPointerIconCaptureProvider(Activity activity) {
|
||||
public AndroidPointerIconCaptureProvider(Activity activity, View targetView) {
|
||||
this.context = activity;
|
||||
this.rootViewGroup = (ViewGroup) activity.getWindow().getDecorView();
|
||||
this.targetView = targetView;
|
||||
}
|
||||
|
||||
public static boolean isCaptureProviderSupported() {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
|
||||
}
|
||||
|
||||
private void setPointerIconOnAllViews(PointerIcon icon) {
|
||||
for (int i = 0; i < rootViewGroup.getChildCount(); i++) {
|
||||
View view = rootViewGroup.getChildAt(i);
|
||||
view.setPointerIcon(icon);
|
||||
}
|
||||
rootViewGroup.setPointerIcon(icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableCapture() {
|
||||
super.enableCapture();
|
||||
setPointerIconOnAllViews(PointerIcon.getSystemIcon(context, PointerIcon.TYPE_NULL));
|
||||
targetView.setPointerIcon(PointerIcon.getSystemIcon(context, PointerIcon.TYPE_NULL));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCapture() {
|
||||
super.disableCapture();
|
||||
setPointerIconOnAllViews(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean eventHasRelativeMouseAxes(MotionEvent event) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X) != 0 ||
|
||||
event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRelativeAxisX(MotionEvent event) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRelativeAxisY(MotionEvent event) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
targetView.setPointerIcon(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class InputCaptureManager {
|
||||
public static InputCaptureProvider getInputCaptureProvider(Activity activity, EvdevListener rootListener) {
|
||||
if (AndroidNativePointerCaptureProvider.isCaptureProviderSupported()) {
|
||||
LimeLog.info("Using Android O+ native mouse capture");
|
||||
return new AndroidNativePointerCaptureProvider(activity.findViewById(R.id.surfaceView));
|
||||
return new AndroidNativePointerCaptureProvider(activity, activity.findViewById(R.id.surfaceView));
|
||||
}
|
||||
// LineageOS implemented broken NVIDIA capture extensions, so avoid using them on root builds.
|
||||
// See https://github.com/LineageOS/android_frameworks_base/commit/d304f478a023430f4712dbdc3ee69d9ad02cebd3
|
||||
@@ -28,7 +28,7 @@ public class InputCaptureManager {
|
||||
// Android N's native capture can't capture over system UI elements
|
||||
// so we want to only use it if there's no other option.
|
||||
LimeLog.info("Using Android N+ pointer hiding");
|
||||
return new AndroidPointerIconCaptureProvider(activity);
|
||||
return new AndroidPointerIconCaptureProvider(activity, activity.findViewById(R.id.surfaceView));
|
||||
}
|
||||
else {
|
||||
LimeLog.info("Mouse capture not available");
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.limelight.binding.input.driver;
|
||||
public abstract class AbstractController {
|
||||
|
||||
private final int deviceId;
|
||||
private final int vendorId;
|
||||
private final int productId;
|
||||
|
||||
private UsbDriverListener listener;
|
||||
|
||||
@@ -15,6 +17,14 @@ public abstract class AbstractController {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public int getVendorId() {
|
||||
return vendorId;
|
||||
}
|
||||
|
||||
public int getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
protected void setButtonFlag(int buttonFlag, int data) {
|
||||
if (data != 0) {
|
||||
buttonFlags |= buttonFlag;
|
||||
@@ -32,9 +42,11 @@ public abstract class AbstractController {
|
||||
public abstract boolean start();
|
||||
public abstract void stop();
|
||||
|
||||
public AbstractController(int deviceId, UsbDriverListener listener) {
|
||||
public AbstractController(int deviceId, UsbDriverListener listener, int vendorId, int productId) {
|
||||
this.deviceId = deviceId;
|
||||
this.listener = listener;
|
||||
this.vendorId = vendorId;
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public abstract void rumble(short lowFreqMotor, short highFreqMotor);
|
||||
|
||||
@@ -22,7 +22,7 @@ public abstract class AbstractXboxController extends AbstractController {
|
||||
protected UsbEndpoint inEndpt, outEndpt;
|
||||
|
||||
public AbstractXboxController(UsbDevice device, UsbDeviceConnection connection, int deviceId, UsbDriverListener listener) {
|
||||
super(deviceId, listener);
|
||||
super(deviceId, listener, device.getVendorId(), device.getProductId());
|
||||
this.device = device;
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
@@ -234,6 +234,10 @@ public class NvConnection {
|
||||
return;
|
||||
}
|
||||
context.connListener.stageComplete(appName);
|
||||
} catch (GfeHttpResponseException e) {
|
||||
e.printStackTrace();
|
||||
context.connListener.displayMessage(e.getMessage());
|
||||
context.connListener.stageFailed(appName, e.getErrorCode());
|
||||
} catch (XmlPullParserException | IOException e) {
|
||||
e.printStackTrace();
|
||||
context.connListener.displayMessage(e.getMessage());
|
||||
@@ -263,7 +267,7 @@ public class NvConnection {
|
||||
context.negotiatedWidth, context.negotiatedHeight,
|
||||
context.streamConfig.getRefreshRate(), context.streamConfig.getBitrate(),
|
||||
context.streamConfig.getMaxPacketSize(),
|
||||
context.streamConfig.getRemote(), context.streamConfig.getAudioConfiguration(),
|
||||
context.streamConfig.getRemote(), context.streamConfig.getAudioConfiguration().toInt(),
|
||||
context.streamConfig.getHevcSupported(),
|
||||
context.negotiatedHdr,
|
||||
context.streamConfig.getHevcBitratePercentageMultiplier(),
|
||||
@@ -287,6 +291,13 @@ public class NvConnection {
|
||||
MoonBridge.sendMouseMove(deltaX, deltaY);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendMousePosition(short x, short y, short referenceWidth, short referenceHeight)
|
||||
{
|
||||
if (!isMonkey) {
|
||||
MoonBridge.sendMousePosition(x, y, referenceWidth, referenceHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendMouseButtonDown(final byte mouseButton)
|
||||
{
|
||||
|
||||
@@ -9,12 +9,6 @@ public class StreamConfiguration {
|
||||
public static final int STREAM_CFG_LOCAL = 0;
|
||||
public static final int STREAM_CFG_REMOTE = 1;
|
||||
public static final int STREAM_CFG_AUTO = 2;
|
||||
|
||||
private static final int CHANNEL_COUNT_STEREO = 2;
|
||||
private static final int CHANNEL_COUNT_5_1 = 6;
|
||||
|
||||
private static final int CHANNEL_MASK_STEREO = 0x3;
|
||||
private static final int CHANNEL_MASK_5_1 = 0xFC;
|
||||
|
||||
private NvApp app;
|
||||
private int width, height;
|
||||
@@ -27,9 +21,7 @@ public class StreamConfiguration {
|
||||
private boolean playLocalAudio;
|
||||
private int maxPacketSize;
|
||||
private int remote;
|
||||
private int audioChannelMask;
|
||||
private int audioChannelCount;
|
||||
private int audioConfiguration;
|
||||
private MoonBridge.AudioConfiguration audioConfiguration;
|
||||
private boolean supportsHevc;
|
||||
private int hevcBitratePercentageMultiplier;
|
||||
private boolean enableHdr;
|
||||
@@ -119,21 +111,8 @@ public class StreamConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioConfiguration(int audioConfig) {
|
||||
if (audioConfig == MoonBridge.AUDIO_CONFIGURATION_STEREO) {
|
||||
config.audioChannelCount = CHANNEL_COUNT_STEREO;
|
||||
config.audioChannelMask = CHANNEL_MASK_STEREO;
|
||||
}
|
||||
else if (audioConfig == MoonBridge.AUDIO_CONFIGURATION_51_SURROUND) {
|
||||
config.audioChannelCount = CHANNEL_COUNT_5_1;
|
||||
config.audioChannelMask = CHANNEL_MASK_5_1;
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Invalid audio configuration");
|
||||
}
|
||||
|
||||
public StreamConfiguration.Builder setAudioConfiguration(MoonBridge.AudioConfiguration audioConfig) {
|
||||
config.audioConfiguration = audioConfig;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -159,8 +138,7 @@ public class StreamConfiguration {
|
||||
this.remote = STREAM_CFG_AUTO;
|
||||
this.sops = true;
|
||||
this.enableAdaptiveResolution = false;
|
||||
this.audioChannelCount = CHANNEL_COUNT_STEREO;
|
||||
this.audioChannelMask = CHANNEL_MASK_STEREO;
|
||||
this.audioConfiguration = MoonBridge.AUDIO_CONFIGURATION_STEREO;
|
||||
this.supportsHevc = false;
|
||||
this.enableHdr = false;
|
||||
this.attachedGamepadMask = 0;
|
||||
@@ -209,16 +187,8 @@ public class StreamConfiguration {
|
||||
public int getRemote() {
|
||||
return remote;
|
||||
}
|
||||
|
||||
public int getAudioChannelCount() {
|
||||
return audioChannelCount;
|
||||
}
|
||||
|
||||
public int getAudioChannelMask() {
|
||||
return audioChannelMask;
|
||||
}
|
||||
|
||||
public int getAudioConfiguration() {
|
||||
public MoonBridge.AudioConfiguration getAudioConfiguration() {
|
||||
return audioConfiguration;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.limelight.nvstream.av.audio;
|
||||
|
||||
import com.limelight.nvstream.jni.MoonBridge;
|
||||
|
||||
public interface AudioRenderer {
|
||||
int setup(int audioConfiguration, int sampleRate, int samplesPerFrame);
|
||||
int setup(MoonBridge.AudioConfiguration audioConfiguration, int sampleRate, int samplesPerFrame);
|
||||
|
||||
void start();
|
||||
|
||||
|
||||
@@ -186,9 +186,20 @@ public class NvHTTP {
|
||||
}
|
||||
|
||||
private static void verifyResponseStatus(XmlPullParser xpp) throws GfeHttpResponseException {
|
||||
int statusCode = Integer.parseInt(xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_code"));
|
||||
if (statusCode != 200) {
|
||||
throw new GfeHttpResponseException(statusCode, xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_message"));
|
||||
String statusCodeText = xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_code");
|
||||
if (statusCodeText == null) {
|
||||
throw new GfeHttpResponseException(418, "Status code is missing");
|
||||
}
|
||||
try {
|
||||
int statusCode = Integer.parseInt(statusCodeText);
|
||||
if (statusCode != 200) {
|
||||
throw new GfeHttpResponseException(statusCode, xpp.getAttributeValue(XmlPullParser.NO_NAMESPACE, "status_message"));
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
// It seems like GFE 3.20.3.63 is returning garbage for status_code in rare cases.
|
||||
// Surface this in a more friendly way rather than crashing.
|
||||
throw new GfeHttpResponseException(418, "Status code is not a number: "+statusCodeText);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +342,7 @@ public class NvHTTP {
|
||||
throw new FileNotFoundException(url);
|
||||
}
|
||||
else {
|
||||
throw new IOException("HTTP request failed: "+response.code());
|
||||
throw new GfeHttpResponseException(response.code(), response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,11 +632,6 @@ public class NvHTTP {
|
||||
}
|
||||
|
||||
public boolean launchApp(ConnectionContext context, int appId, boolean enableHdr) throws IOException, XmlPullParserException {
|
||||
// Using an FPS value over 60 causes SOPS to default to 720p60,
|
||||
// so force it to 60 when starting. This won't impact our ability
|
||||
// to get > 60 FPS while actually streaming though.
|
||||
int fps = context.streamConfig.getLaunchRefreshRate() > 60 ? 60 : context.streamConfig.getLaunchRefreshRate();
|
||||
|
||||
// Using an unsupported resolution (not 720p, 1080p, or 4K) causes
|
||||
// GFE to force SOPS to 720p60. This is fine for < 720p resolutions like
|
||||
// 360p or 480p, but it is not ideal for 1440p and other resolutions.
|
||||
@@ -639,16 +645,26 @@ public class NvHTTP {
|
||||
enableSops = false;
|
||||
}
|
||||
|
||||
// Using SOPS with FPS values over 60 causes GFE to fall back
|
||||
// to 720p60. On previous GFE versions, we could avoid this by
|
||||
// forcing the FPS value to 60 when launching the stream, but
|
||||
// now on GFE 3.20.3 that seems to trigger some sort of
|
||||
// frame rate limiter that locks the game to 60 FPS.
|
||||
if (context.streamConfig.getLaunchRefreshRate() > 60) {
|
||||
LimeLog.info("Disabling SOPS due to high frame rate: "+context.streamConfig.getLaunchRefreshRate());
|
||||
enableSops = false;
|
||||
}
|
||||
|
||||
String xmlStr = openHttpConnectionToString(baseUrlHttps +
|
||||
"/launch?" + buildUniqueIdUuidString() +
|
||||
"&appid=" + appId +
|
||||
"&mode=" + context.negotiatedWidth + "x" + context.negotiatedHeight + "x" + fps +
|
||||
"&mode=" + context.negotiatedWidth + "x" + context.negotiatedHeight + "x" + context.streamConfig.getLaunchRefreshRate() +
|
||||
"&additionalStates=1&sops=" + (enableSops ? 1 : 0) +
|
||||
"&rikey="+bytesToHex(context.riKey.getEncoded()) +
|
||||
"&rikeyid="+context.riKeyId +
|
||||
(!enableHdr ? "" : "&hdrMode=1&clientHdrCapVersion=0&clientHdrCapSupportedFlagsInUint32=0&clientHdrCapMetaDataId=NV_STATIC_METADATA_TYPE_1&clientHdrCapDisplayData=0x0x0x0x0x0x0x0x0x0x0") +
|
||||
"&localAudioPlayMode=" + (context.streamConfig.getPlayLocalAudio() ? 1 : 0) +
|
||||
"&surroundAudioInfo=" + ((context.streamConfig.getAudioChannelMask() << 16) + context.streamConfig.getAudioChannelCount()) +
|
||||
"&surroundAudioInfo=" + context.streamConfig.getAudioConfiguration().getSurroundAudioInfo() +
|
||||
(context.streamConfig.getAttachedGamepadMask() != 0 ? "&remoteControllersBitmap=" + context.streamConfig.getAttachedGamepadMask() : "") +
|
||||
(context.streamConfig.getAttachedGamepadMask() != 0 ? "&gcmap=" + context.streamConfig.getAttachedGamepadMask() : ""),
|
||||
false);
|
||||
@@ -660,7 +676,7 @@ public class NvHTTP {
|
||||
String xmlStr = openHttpConnectionToString(baseUrlHttps + "/resume?" + buildUniqueIdUuidString() +
|
||||
"&rikey="+bytesToHex(context.riKey.getEncoded()) +
|
||||
"&rikeyid="+context.riKeyId +
|
||||
"&surroundAudioInfo=" + ((context.streamConfig.getAudioChannelMask() << 16) + context.streamConfig.getAudioChannelCount()),
|
||||
"&surroundAudioInfo=" + context.streamConfig.getAudioConfiguration().getSurroundAudioInfo(),
|
||||
false);
|
||||
String resume = getXmlString(xmlStr, "resume");
|
||||
return Integer.parseInt(resume) != 0;
|
||||
|
||||
@@ -7,8 +7,9 @@ import com.limelight.nvstream.av.video.VideoDecoderRenderer;
|
||||
public class MoonBridge {
|
||||
/* See documentation in Limelight.h for information about these functions and constants */
|
||||
|
||||
public static final int AUDIO_CONFIGURATION_STEREO = 0;
|
||||
public static final int AUDIO_CONFIGURATION_51_SURROUND = 1;
|
||||
public static final AudioConfiguration AUDIO_CONFIGURATION_STEREO = new AudioConfiguration(2, 0x3);
|
||||
public static final AudioConfiguration AUDIO_CONFIGURATION_51_SURROUND = new AudioConfiguration(6, 0x3F);
|
||||
public static final AudioConfiguration AUDIO_CONFIGURATION_71_SURROUND = new AudioConfiguration(8, 0x63F);
|
||||
|
||||
public static final int VIDEO_FORMAT_H264 = 0x0001;
|
||||
public static final int VIDEO_FORMAT_H265 = 0x0100;
|
||||
@@ -45,6 +46,57 @@ public class MoonBridge {
|
||||
return slices << 24;
|
||||
}
|
||||
|
||||
public static class AudioConfiguration {
|
||||
public final int channelCount;
|
||||
public final int channelMask;
|
||||
|
||||
public AudioConfiguration(int channelCount, int channelMask) {
|
||||
this.channelCount = channelCount;
|
||||
this.channelMask = channelMask;
|
||||
}
|
||||
|
||||
// Creates an AudioConfiguration from the integer value returned by moonlight-common-c
|
||||
// See CHANNEL_COUNT_FROM_AUDIO_CONFIGURATION() and CHANNEL_MASK_FROM_AUDIO_CONFIGURATION()
|
||||
// in Limelight.h
|
||||
private AudioConfiguration(int audioConfiguration) {
|
||||
// Check the magic byte before decoding to make sure we got something that's actually
|
||||
// a MAKE_AUDIO_CONFIGURATION()-based value and not something else like an older version
|
||||
// hardcoded AUDIO_CONFIGURATION value from an earlier version of moonlight-common-c.
|
||||
if ((audioConfiguration & 0xFF) != 0xCA) {
|
||||
throw new IllegalArgumentException("Audio configuration has invalid magic byte!");
|
||||
}
|
||||
|
||||
this.channelCount = (audioConfiguration >> 8) & 0xFF;
|
||||
this.channelMask = (audioConfiguration >> 16) & 0xFFFF;
|
||||
}
|
||||
|
||||
// See SURROUNDAUDIOINFO_FROM_AUDIO_CONFIGURATION() in Limelight.h
|
||||
public int getSurroundAudioInfo() {
|
||||
return channelMask << 16 | channelCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof AudioConfiguration) {
|
||||
AudioConfiguration that = (AudioConfiguration)obj;
|
||||
return this.toInt() == that.toInt();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toInt();
|
||||
}
|
||||
|
||||
// Returns the integer value expected by moonlight-common-c
|
||||
// See MAKE_AUDIO_CONFIGURATION() in Limelight.h
|
||||
public int toInt() {
|
||||
return ((channelMask) << 16) | (channelCount << 8) | 0xCA;
|
||||
}
|
||||
}
|
||||
|
||||
public static int bridgeDrSetup(int videoFormat, int width, int height, int redrawRate) {
|
||||
if (videoRenderer != null) {
|
||||
return videoRenderer.setup(videoFormat, width, height, redrawRate);
|
||||
@@ -86,7 +138,7 @@ public class MoonBridge {
|
||||
|
||||
public static int bridgeArInit(int audioConfiguration, int sampleRate, int samplesPerFrame) {
|
||||
if (audioRenderer != null) {
|
||||
return audioRenderer.setup(audioConfiguration, sampleRate, samplesPerFrame);
|
||||
return audioRenderer.setup(new AudioConfiguration(audioConfiguration), sampleRate, samplesPerFrame);
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
@@ -187,6 +239,8 @@ public class MoonBridge {
|
||||
|
||||
public static native void sendMouseMove(short deltaX, short deltaY);
|
||||
|
||||
public static native void sendMousePosition(short x, short y, short referenceWidth, short referenceHeight);
|
||||
|
||||
public static native void sendMouseButton(byte buttonEvent, byte mouseButton);
|
||||
|
||||
public static native void sendMultiControllerInput(short controllerNumber,
|
||||
|
||||
@@ -6,9 +6,11 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.limelight.nvstream.jni.MoonBridge;
|
||||
|
||||
public class PreferenceConfiguration {
|
||||
private static final String LEGACY_RES_FPS_PREF_STRING = "list_resolution_fps";
|
||||
|
||||
private static final String LEGACY_ENABLE_51_SURROUND_PREF_STRING = "checkbox_51_surround";
|
||||
|
||||
static final String RESOLUTION_PREF_STRING = "list_resolution";
|
||||
static final String FPS_PREF_STRING = "list_fps";
|
||||
@@ -24,7 +26,7 @@ public class PreferenceConfiguration {
|
||||
private static final String LIST_MODE_PREF_STRING = "checkbox_list_mode";
|
||||
private static final String SMALL_ICONS_PREF_STRING = "checkbox_small_icon_mode";
|
||||
private static final String MULTI_CONTROLLER_PREF_STRING = "checkbox_multi_controller";
|
||||
private static final String ENABLE_51_SURROUND_PREF_STRING = "checkbox_51_surround";
|
||||
static final String AUDIO_CONFIG_PREF_STRING = "list_audio_config";
|
||||
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_show_onscreen_controls";
|
||||
@@ -51,7 +53,6 @@ public class PreferenceConfiguration {
|
||||
public static final String DEFAULT_LANGUAGE = "default";
|
||||
private static final boolean DEFAULT_LIST_MODE = false;
|
||||
private static final boolean DEFAULT_MULTI_CONTROLLER = true;
|
||||
private static final boolean DEFAULT_ENABLE_51_SURROUND = false;
|
||||
private static final boolean DEFAULT_USB_DRIVER = true;
|
||||
private static final String DEFAULT_VIDEO_FORMAT = "auto";
|
||||
private static final boolean ONSCREEN_CONTROLLER_DEFAULT = false;
|
||||
@@ -66,6 +67,7 @@ public class PreferenceConfiguration {
|
||||
private static final boolean DEFAULT_UNLOCK_FPS = false;
|
||||
private static final boolean DEFAULT_VIBRATE_OSC = true;
|
||||
private static final boolean DEFAULT_VIBRATE_FALLBACK = false;
|
||||
private static final String DEFAULT_AUDIO_CONFIG = "2"; // Stereo
|
||||
|
||||
public static final int FORCE_H265_ON = -1;
|
||||
public static final int AUTOSELECT_H265 = 0;
|
||||
@@ -78,7 +80,7 @@ public class PreferenceConfiguration {
|
||||
public int oscOpacity;
|
||||
public boolean stretchVideo, enableSops, playHostAudio, disableWarnings;
|
||||
public String language;
|
||||
public boolean listMode, smallIconMode, multiController, enable51Surround, usbDriver;
|
||||
public boolean listMode, smallIconMode, multiController, usbDriver;
|
||||
public boolean onscreenController;
|
||||
public boolean onlyL3R3;
|
||||
public boolean disableFrameDrop;
|
||||
@@ -91,6 +93,7 @@ public class PreferenceConfiguration {
|
||||
public boolean unlockFps;
|
||||
public boolean vibrateOsc;
|
||||
public boolean vibrateFallbackToDevice;
|
||||
public MoonBridge.AudioConfiguration audioConfiguration;
|
||||
|
||||
private static int getHeightFromResolutionString(String resString) {
|
||||
if (resString.equalsIgnoreCase("360p")) {
|
||||
@@ -247,6 +250,15 @@ public class PreferenceConfiguration {
|
||||
PreferenceConfiguration config = new PreferenceConfiguration();
|
||||
|
||||
// Migrate legacy preferences to the new locations
|
||||
if (prefs.contains(LEGACY_ENABLE_51_SURROUND_PREF_STRING)) {
|
||||
if (prefs.getBoolean(LEGACY_ENABLE_51_SURROUND_PREF_STRING, false)) {
|
||||
prefs.edit()
|
||||
.remove(LEGACY_ENABLE_51_SURROUND_PREF_STRING)
|
||||
.putString(AUDIO_CONFIG_PREF_STRING, "51")
|
||||
.apply();
|
||||
}
|
||||
}
|
||||
|
||||
String str = prefs.getString(LEGACY_RES_FPS_PREF_STRING, null);
|
||||
if (str != null) {
|
||||
if (str.equals("360p30")) {
|
||||
@@ -316,6 +328,17 @@ public class PreferenceConfiguration {
|
||||
config.bitrate = getDefaultBitrate(context);
|
||||
}
|
||||
|
||||
String audioConfig = prefs.getString(AUDIO_CONFIG_PREF_STRING, DEFAULT_AUDIO_CONFIG);
|
||||
if (audioConfig.equals("71")) {
|
||||
config.audioConfiguration = MoonBridge.AUDIO_CONFIGURATION_71_SURROUND;
|
||||
}
|
||||
else if (audioConfig.equals("51")) {
|
||||
config.audioConfiguration = MoonBridge.AUDIO_CONFIGURATION_51_SURROUND;
|
||||
}
|
||||
else /* if (audioConfig.equals("2")) */ {
|
||||
config.audioConfiguration = MoonBridge.AUDIO_CONFIGURATION_STEREO;
|
||||
}
|
||||
|
||||
config.videoFormat = getVideoFormatValue(context);
|
||||
|
||||
config.deadzonePercentage = prefs.getInt(DEADZONE_PREF_STRING, DEFAULT_DEADZONE);
|
||||
@@ -332,7 +355,6 @@ public class PreferenceConfiguration {
|
||||
config.listMode = prefs.getBoolean(LIST_MODE_PREF_STRING, DEFAULT_LIST_MODE);
|
||||
config.smallIconMode = prefs.getBoolean(SMALL_ICONS_PREF_STRING, getDefaultSmallMode(context));
|
||||
config.multiController = prefs.getBoolean(MULTI_CONTROLLER_PREF_STRING, DEFAULT_MULTI_CONTROLLER);
|
||||
config.enable51Surround = prefs.getBoolean(ENABLE_51_SURROUND_PREF_STRING, DEFAULT_ENABLE_51_SURROUND);
|
||||
config.usbDriver = prefs.getBoolean(USB_DRIVER_PREF_SRING, DEFAULT_USB_DRIVER);
|
||||
config.onscreenController = prefs.getBoolean(ONSCREEN_CONTROLLER_PREF_STRING, ONSCREEN_CONTROLLER_DEFAULT);
|
||||
config.onlyL3R3 = prefs.getBoolean(ONLY_L3_R3_PREF_STRING, ONLY_L3_R3_DEFAULT);
|
||||
|
||||
@@ -302,6 +302,18 @@ public class StreamSettings extends Activity {
|
||||
// Never remove 30 FPS or 60 FPS
|
||||
}
|
||||
|
||||
// Android L introduces proper 7.1 surround sound support. Remove the 7.1 option
|
||||
// for earlier versions of Android to prevent AudioTrack initialization issues.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
LimeLog.info("Excluding 7.1 surround sound option based on OS");
|
||||
removeValue(PreferenceConfiguration.AUDIO_CONFIG_PREF_STRING, "71", new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setValue(PreferenceConfiguration.AUDIO_CONFIG_PREF_STRING, "51");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Android L introduces the drop duplicate behavior of releaseOutputBuffer()
|
||||
// that the unlock FPS option relies on to not massively increase latency.
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
|
||||
@@ -243,7 +243,7 @@ void BridgeArCleanup() {
|
||||
void BridgeArDecodeAndPlaySample(char* sampleData, int sampleLength) {
|
||||
JNIEnv* env = GetThreadEnv();
|
||||
|
||||
jshort* decodedData = (*env)->GetShortArrayElements(env, DecodedAudioBuffer, 0);
|
||||
jshort* decodedData = (*env)->GetPrimitiveArrayCritical(env, DecodedAudioBuffer, NULL);
|
||||
|
||||
int decodeLen = opus_multistream_decode(Decoder,
|
||||
(const unsigned char*)sampleData,
|
||||
@@ -252,8 +252,8 @@ void BridgeArDecodeAndPlaySample(char* sampleData, int sampleLength) {
|
||||
OpusConfig.samplesPerFrame,
|
||||
0);
|
||||
if (decodeLen > 0) {
|
||||
// We must release the array elements first to ensure the data is copied before the callback
|
||||
(*env)->ReleaseShortArrayElements(env, DecodedAudioBuffer, decodedData, 0);
|
||||
// We must release the array elements before making further JNI calls
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, DecodedAudioBuffer, decodedData, 0);
|
||||
|
||||
(*env)->CallStaticVoidMethod(env, GlobalBridgeClass, BridgeArPlaySampleMethod, DecodedAudioBuffer);
|
||||
if ((*env)->ExceptionCheck(env)) {
|
||||
@@ -263,7 +263,7 @@ void BridgeArDecodeAndPlaySample(char* sampleData, int sampleLength) {
|
||||
}
|
||||
else {
|
||||
// We can abort here to avoid the copy back since no data was modified
|
||||
(*env)->ReleaseShortArrayElements(env, DecodedAudioBuffer, decodedData, JNI_ABORT);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, DecodedAudioBuffer, decodedData, JNI_ABORT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,10 @@ void BridgeClConnectionTerminated(int errorCode) {
|
||||
void BridgeClRumble(unsigned short controllerNumber, unsigned short lowFreqMotor, unsigned short highFreqMotor) {
|
||||
JNIEnv* env = GetThreadEnv();
|
||||
|
||||
(*env)->CallStaticVoidMethod(env, GlobalBridgeClass, BridgeClRumbleMethod, controllerNumber, lowFreqMotor, highFreqMotor);
|
||||
// The seemingly redundant short casts are required in order to convert the unsigned short to a signed short.
|
||||
// If we leave it as an unsigned short, CheckJNI will fail when the value exceeds 32767. The cast itself is
|
||||
// fine because the Java code treats the value as unsigned even though it's stored in a signed type.
|
||||
(*env)->CallStaticVoidMethod(env, GlobalBridgeClass, BridgeClRumbleMethod, controllerNumber, (short)lowFreqMotor, (short)highFreqMotor);
|
||||
if ((*env)->ExceptionCheck(env)) {
|
||||
// We will crash here
|
||||
(*JVM)->DetachCurrentThread(JVM);
|
||||
|
||||
Submodule app/src/main/jni/moonlight-core/moonlight-common-c updated: c1b8aa266f...247b1fe0e3
@@ -10,6 +10,12 @@ Java_com_limelight_nvstream_jni_MoonBridge_sendMouseMove(JNIEnv *env, jclass cla
|
||||
LiSendMouseMoveEvent(deltaX, deltaY);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_limelight_nvstream_jni_MoonBridge_sendMousePosition(JNIEnv *env, jclass clazz,
|
||||
jshort x, jshort y, jshort referenceWidth, jshort referenceHeight) {
|
||||
LiSendMousePositionEvent(x, y, referenceWidth, referenceHeight);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_limelight_nvstream_jni_MoonBridge_sendMouseButton(JNIEnv *env, jclass clazz, jbyte buttonEvent, jbyte mouseButton) {
|
||||
LiSendMouseButtonEvent(buttonEvent, mouseButton);
|
||||
|
||||
@@ -131,8 +131,6 @@
|
||||
<string name="summary_checkbox_enable_pip">Stream auch während des Multitaskings anzeigen (ohne Steuerung)</string>
|
||||
|
||||
<string name="category_audio_settings">Audio Einstellungen</string>
|
||||
<string name="title_checkbox_51_surround">5.1 Surround Sound aktivieren</string>
|
||||
<string name="summary_checkbox_51_surround">Deaktivieren wenn die Audiowiedergabe fehlerhaft ist. Setzt GFE 2.7 oder neuer voraus.</string>
|
||||
|
||||
<string name="category_input_settings">Eingabe Einstellungen</string>
|
||||
<string name="title_checkbox_multi_controller">Automatische GamePad-Erkennung</string>
|
||||
|
||||
@@ -94,8 +94,6 @@
|
||||
<string name="summary_checkbox_disable_warnings">Desactivar mensajes de advertencia en pantalla durante la transmisión</string>
|
||||
|
||||
<string name="category_audio_settings">Configuración de audio</string>
|
||||
<string name="title_checkbox_51_surround">Activar sonido 5.1 surround</string>
|
||||
<string name="summary_checkbox_51_surround">Desmarcar si experimentas problemas de audio. Requiere GFE 2.7 o superior.</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">Soporte para múltiples mandos</string>
|
||||
<string name="summary_checkbox_multi_controller">Si no está marcado, todos los mandos aparecen como uno solo</string>
|
||||
|
||||
@@ -1,11 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="fps_names">
|
||||
<item>30 IPS</item>
|
||||
<item>60 IPS</item>
|
||||
<item>90 IPS</item>
|
||||
<item>120 IPS</item>
|
||||
</string-array>
|
||||
<string-array name="audio_config_names">
|
||||
<item>Stéréo</item>
|
||||
<item>Son surround 5.1</item>
|
||||
<item>Son surround 7.1</item>
|
||||
</string-array>
|
||||
<string-array name="decoder_names">
|
||||
<item>Sélection automatique du décodeur</item>
|
||||
<item>Contraindre le décodage logiciel</item>
|
||||
<item>Contraindre le décodage matériel</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="video_format_names">
|
||||
<item>Utiliser H.265 uniquement s\'il est stable</item>
|
||||
<item>Utilisez toujours H.265 (mais il peut planter)</item>
|
||||
|
||||
@@ -132,8 +132,8 @@
|
||||
<string name="summary_checkbox_enable_pip">Permet de visualiser le flux (sans le contrôleur) tout en multitâche</string>
|
||||
|
||||
<string name="category_audio_settings">Paramètres audio</string>
|
||||
<string name="title_checkbox_51_surround">Activer son surround 5.1</string>
|
||||
<string name="summary_checkbox_51_surround">Décochez si vous rencontrez des problèmes audio. Nécessite GFE 2.7 ou supérieur.</string>
|
||||
<string name="title_audio_config_list">Configuration son surround</string>
|
||||
<string name="summary_audio_config_list">Activer le son surround 5.1 ou 7.1 pour les systèmes home cinéma</string>
|
||||
|
||||
<string name="category_input_settings">Paramètres d\'entrée</string>
|
||||
<string name="title_checkbox_multi_controller">Prise en charge de plusieurs contrôleurs</string>
|
||||
@@ -163,6 +163,10 @@
|
||||
<string name="dialog_title_reset_osc">Réinitialiser la mise en page</string>
|
||||
<string name="dialog_text_reset_osc">Êtes-vous sûr de vouloir supprimer la disposition des commandes à l\'écran que vous avez sauvegardée?</string>
|
||||
<string name="toast_reset_osc_success">Les contrôles à l\'écran sont réinitialisés</string>
|
||||
<string name="title_osc_opacity">Modifier l\'opacité des contrôles à l\'écran</string>
|
||||
<string name="summary_osc_opacity">Rendre les contrôles à l\'écran plus/moins transparents</string>
|
||||
<string name="dialog_title_osc_opacity">Modifiez l\'opacité</string>
|
||||
<string name="suffix_osc_opacity">%</string>
|
||||
|
||||
<string name="category_ui_settings">Paramètres de l\'interface utilisateur</string>
|
||||
<string name="title_language_list">Langue</string>
|
||||
@@ -187,6 +191,5 @@
|
||||
<string name="summary_enable_hdr">Diffuser du HDR lorsque le jeu et le processeur graphique du PC le prennent en charge. HDR nécessite un GPU série GTX 1000 ou une version ultérieure.</string>
|
||||
<string name="title_enable_perf_overlay">Activer la superposition de performance</string>
|
||||
<string name="summary_enable_perf_overlay">Afficher une superposition à l\'écran avec des informations de performance en temps réel pendant la lecture en continu</string>
|
||||
<string name="suffix_osc_opacity">%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -113,8 +113,6 @@
|
||||
<string name="summary_checkbox_enable_pip">Permette di osservare (ma non di controllare) la stream in multitasking</string>
|
||||
|
||||
<string name="category_audio_settings">Impostazioni audio</string>
|
||||
<string name="title_checkbox_51_surround">Abilita l\'audio 5.1 surround</string>
|
||||
<string name="summary_checkbox_51_surround">Se riscontri problemi, disabilitalo. Richiede GFE 2.7 o versioni sucessive.</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">Supporto a più controller</string>
|
||||
<string name="summary_checkbox_multi_controller">Quando disabilitato, tutti i controller appaiono come uno solo</string>
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
<string name="summary_checkbox_disable_warnings">ストリーミング中に画面に警告メッセージを表示しない</string>
|
||||
|
||||
<string name="category_audio_settings">音声</string>
|
||||
<string name="title_checkbox_51_surround">5.1chサラウンド</string>
|
||||
<string name="summary_checkbox_51_surround">音声に問題が生じる場合はチェックを外してください。バージョン2.7以降のGFEが必要です</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">複数のゲームコントローラ</string>
|
||||
<string name="summary_checkbox_multi_controller">チェックを外すと、全てのゲームコントローラが単一の物として認識されます</string>
|
||||
|
||||
@@ -105,8 +105,6 @@
|
||||
<string name="summary_checkbox_disable_warnings">화면 상의 연결 경고 메세지를 스트리밍 중에 비활성화합니다.</string>
|
||||
|
||||
<string name="category_audio_settings">오디오 설정</string>
|
||||
<string name="title_checkbox_51_surround">5.1 서라운드 사운드 활성화</string>
|
||||
<string name="summary_checkbox_51_surround">오디오 문제가 발생한다면 체크를 해제하세요. GFE 2.7이나 그 이상 버전이 필요합니다.</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">다중 컨트롤러 지원</string>
|
||||
<string name="summary_checkbox_multi_controller">이 옵션을 선택하지 않으면 모든 컨트롤러가 하나로 표시됩니다</string>
|
||||
|
||||
@@ -94,8 +94,6 @@
|
||||
<string name="summary_checkbox_disable_warnings">Verberg on-screen verbindingswaarschuwingen tijdens het streamen</string>
|
||||
|
||||
<string name="category_audio_settings">Geluidsinstellingen</string>
|
||||
<string name="title_checkbox_51_surround">Gebruik 5.1 surround sound</string>
|
||||
<string name="summary_checkbox_51_surround">Gebruik dit niet als er problemen zijn met de audio. Vereist GFE 2.7 of hoger.</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">Multi-gamepad support</string>
|
||||
<string name="summary_checkbox_multi_controller">Wanneer uitgevinkt, alle controllers verschijnen als één.</string>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="audio_config_names">
|
||||
<item>Stereo</item>
|
||||
<item>Sunet Surround 5.1</item>
|
||||
<item>Sunet Surround 7.1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="decoder_names">
|
||||
<item>Auto-selectează decodorul</item>
|
||||
<item>Forțează decodarea Software</item>
|
||||
<item>Forțează decodarea Hardware</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="video_format_names">
|
||||
<item>Folosește H.265 doar dacă e stabil</item>
|
||||
<item>Folosește H.265 mereu (se poate bloca)</item>
|
||||
<item>Nu folosi H.265</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Shortcut strings -->
|
||||
<string name="scut_deleted_pc">PC șters</string>
|
||||
<string name="scut_not_paired">PC neîmperecheat</string>
|
||||
<string name="scut_pc_not_found">PC negăsit</string>
|
||||
<string name="scut_invalid_uuid">PC-ul este invalid</string>
|
||||
<string name="scut_invalid_app_id">Aplicația este invalidă</string>
|
||||
|
||||
<!-- Help strings -->
|
||||
<string name="help_loading_title">Ajutor</string>
|
||||
<string name="help_loading_msg">Se încarcă pagina de ajutor…</string>
|
||||
|
||||
<!-- PC view menu entries -->
|
||||
<string name="pcview_menu_app_list">Vezi lista de jocuri</string>
|
||||
<string name="pcview_menu_pair_pc">Împerechează PC-ul</string>
|
||||
<string name="pcview_menu_unpair_pc">Desperechează</string>
|
||||
<string name="pcview_menu_send_wol">Trimite o cerere Wake-On-LAN</string>
|
||||
<string name="pcview_menu_delete_pc">Șterge PC</string>
|
||||
<string name="pcview_menu_details">Vezi detalii</string>
|
||||
|
||||
<!-- Pair messages -->
|
||||
<string name="pairing">Se împerechează…</string>
|
||||
<string name="pair_pc_offline">PC-ul nu este accesibil</string>
|
||||
<string name="pair_pc_ingame">PC-ul rulează un joc acum. Trebuie să închizi jocul pentru a-l putea împerechea.</string>
|
||||
<string name="pair_pairing_title">Se împerechează</string>
|
||||
<string name="pair_pairing_msg">Te rugăm să introduci urmatorul PIN în PC-ul pe care îl împerechezi:</string>
|
||||
<string name="pair_incorrect_pin">PIN-ul este greșit</string>
|
||||
<string name="pair_fail">Împerecherea a eșuat</string>
|
||||
<string name="pair_already_in_progress">Împerecherea este deja în curs</string>
|
||||
|
||||
<!-- WOL messages -->
|
||||
<string name="wol_pc_online">PC-ul este accesibil</string>
|
||||
<string name="wol_no_mac">Nu s-a putut porni PC-ul deoarece GFE nu a comunicat o adresa MAC</string>
|
||||
<string name="wol_waking_pc">Se pornește PC-ul…</string>
|
||||
<string name="wol_waking_msg">Poate dura puțin până PC-ul pornește. Dacă nu pornește, verifică dacă este configurat corect pentru Wake-On-LAN.</string>
|
||||
<string name="wol_fail">Nu s-au putut trimite pachetele Wake-On-LAN</string>
|
||||
|
||||
<!-- Unpair messages -->
|
||||
<string name="unpairing">Desperecherechere…</string>
|
||||
<string name="unpair_success">Desperecherechere efectuată cu succes</string>
|
||||
<string name="unpair_fail">Desperecherea a eșuat</string>
|
||||
<string name="unpair_error">Dispozitivul nu este împerecheat</string>
|
||||
|
||||
<!-- Errors -->
|
||||
<string name="error_pc_offline">PC-ul este inaccesibil</string>
|
||||
<string name="error_manager_not_running">Serviciul ComputerManager nu este pornit. Te rugăm să aștepți câteva secunde sau să repornești aplicația.</string>
|
||||
<string name="error_unknown_host">Nu am putut identifica hostul</string>
|
||||
<string name="error_404">GFE a returnat un cod de eroare HTTP 404. Asigură-te ca PC-ul are o placa video suportată.
|
||||
Este posibil sa apară această eroare daca folosești o alta aplicație de remote desktop. Încearcă să repornești PC-ul sau să reinstalezi GFE.
|
||||
</string>
|
||||
<string name="title_decoding_error">Decodorul video s-a închis în mod neașteptat</string>
|
||||
<string name="message_decoding_error">Moonlight s-a închis în mod neașteptat datorită unei incompatibilități cu decodorul video al acestui dispozitiv. Asigură-te ca folosești ultima versiune de GFE. Dacă problema persistă, ajustează setările de streaming.</string>
|
||||
<string name="title_decoding_reset">Resetează setările video</string>
|
||||
<string name="message_decoding_reset">Decodorul video al acestui dispozitiv continuă să se blocheze folosind setările video curente. Au fost resetate cele implicite.</string>
|
||||
<string name="error_usb_prohibited">Accesul USB este interzis de către administratorul dispozitivului. Verifică setarile Knox sau MDM.</string>
|
||||
<string name="unable_to_pin_shortcut">Launcher-ul tău curent nu permite crearea de scurtături fixate.</string>
|
||||
<string name="video_decoder_init_failed">Inițializarea decodorului video a eșuat. Este posibil ca acest dispozitiv să nu suporte rezoluția sau rata cadrelor selectată.</string>
|
||||
|
||||
<!-- Start application messages -->
|
||||
<string name="conn_establishing_title">Se stabilește conexiunea</string>
|
||||
<string name="conn_establishing_msg">Se pornește conexiunea</string>
|
||||
<string name="conn_metered">Atenție: Conexiunea ta curentă este contorizată!</string>
|
||||
<string name="conn_client_latency">Latența medie a decodării cadrelor:</string>
|
||||
<string name="conn_client_latency_hw">latența decodorului hardware:</string>
|
||||
<string name="conn_hardware_latency">Latența medie a decodării cadrelor (hardware):</string>
|
||||
<string name="conn_starting">Se pornește</string>
|
||||
<string name="conn_error_title">Eroare la conectare</string>
|
||||
<string name="conn_error_msg">Pornirea a eșuat</string>
|
||||
<string name="conn_terminated_title">Conexiunea închisă</string>
|
||||
<string name="conn_terminated_msg">Conexiunea a fost terminată</string>
|
||||
|
||||
<!-- General strings -->
|
||||
<string name="ip_hint">Adresa IP a PC-ului cu GFE</string>
|
||||
<string name="searching_pc">Se caută PC-uri cu GameStream activat…\n\n
|
||||
Asigură-te ca GameStream este activat în setările Geforce Experience SHIELD.</string>
|
||||
<string name="yes">Da</string>
|
||||
<string name="no">Nu</string>
|
||||
<string name="lost_connection">S-a pierdut conexiunea catre PC</string>
|
||||
<string name="title_details">Detalii</string>
|
||||
<string name="help">Ajutor</string>
|
||||
<string name="delete_pc_msg">Sigur dorești să ștergi acest PC?</string>
|
||||
<string name="slow_connection_msg">Conexiune inceată catre PC\nRedu rata de biți</string>
|
||||
<string name="poor_connection_msg">Conexiune slabă catre PC</string>
|
||||
<string name="perf_overlay_text">Dimensiunile video: %1$s\nDecodor: %2$s\nRata cadrelor estimata PC: %3$.2f FPS\nRata cadrelor primite din rețea: %4$.2f FPS\nRata de afisare a cadrelor: %5$.2f FPS\nCadre pierdute de rețea: %6$.2f%%\nTimpul mediu de primire: %7$.2f ms\nTimpul mediu de decodare: %8$.2f ms</string>
|
||||
|
||||
<!-- AppList activity -->
|
||||
<string name="applist_connect_msg">Se conectează la PC…</string>
|
||||
<string name="applist_menu_resume">Continuă Sesiunea</string>
|
||||
<string name="applist_menu_quit">Închide Sesiunea</string>
|
||||
<string name="applist_menu_quit_and_start">Închide Jocul Curent si Pornește</string>
|
||||
<string name="applist_menu_cancel">Anulează</string>
|
||||
<string name="applist_menu_details">Vezi detalii</string>
|
||||
<string name="applist_menu_scut">Creează o scurtătură</string>
|
||||
<string name="applist_menu_tv_channel">Adaugă la canal</string>
|
||||
<string name="applist_refresh_title">Lista de aplicații</string>
|
||||
<string name="applist_refresh_msg">Reîmprospătare aplicații…</string>
|
||||
<string name="applist_refresh_error_title">Eroare</string>
|
||||
<string name="applist_refresh_error_msg">Nu s-a putut obține lista de aplicații</string>
|
||||
<string name="applist_quit_app">Închidere în curs</string>
|
||||
<string name="applist_quit_success">Închis cu succes</string>
|
||||
<string name="applist_quit_fail">Nu s-a putut închide lista</string>
|
||||
<string name="applist_quit_confirmation">Sigur dorești să închizi aplicația curentă? Toate datele nesalvate vor fi pierdute.</string>
|
||||
<string name="applist_details_id">ID-ul aplicației:</string>
|
||||
|
||||
<!-- Add computer manually activity -->
|
||||
<string name="title_add_pc">Adaugă PC manual</string>
|
||||
<string name="msg_add_pc">Conectare în curs…</string>
|
||||
<string name="addpc_fail">Nu s-a putut efectua conectarea la adresa introdusă. Asigurăte ca porturile nu sunt blocate in firewall.</string>
|
||||
<string name="addpc_success">PC adăugat cu succes</string>
|
||||
<string name="addpc_unknown_host">Nu am putut identifica adresa PC-ului. Asigură-te că ai introdus-o corect.</string>
|
||||
<string name="addpc_enter_ip">Trebuie să introduci o adresa IP</string>
|
||||
<string name="addpc_wrong_sitelocal">Adresa introdusă nu pare corectă. Pentru conectare prin Internet, este nevoie de adresa publică a routerului.</string>
|
||||
|
||||
<!-- Preferences -->
|
||||
<string name="category_basic_settings">Setări de bază</string>
|
||||
<string name="title_resolution_list">Rezolutia video</string>
|
||||
<string name="summary_resolution_list">Crește-o pentru a îmbunătăți claritatea imaginii. Descrește-o pentru dispozitive neperformante sau conexiune slabă.</string>
|
||||
<string name="title_fps_list">Rata cadrelor</string>
|
||||
<string name="summary_fps_list">Crește-o pentru a îmbunătăți fluiditatea imaginilor. Descrește-o pentru dispozitive neperformante sau conexiune slabă.</string>
|
||||
<string name="title_seekbar_bitrate">Rata de biți</string>
|
||||
<string name="summary_seekbar_bitrate">Crește-o pentru a îmbunătăți calitatea imaginilor. Descrește-o pentru dispozitive neperformante sau conexiune slabă.</string>
|
||||
<string name="suffix_seekbar_bitrate">Kbps</string>
|
||||
<string name="title_unlock_fps">Deblochează toate ratele de cadre posibile</string>
|
||||
<string name="summary_unlock_fps">Fluxul video de rate mai mari poate reduce latența folosind dispozitive performante, dar poate introduce erori daca nu sunt suportate.</string>
|
||||
<string name="title_checkbox_stretch_video">Întindeți video pe ecranul complet</string>
|
||||
<string name="title_checkbox_disable_warnings">Dezactivează mesajele de avertizare</string>
|
||||
<string name="summary_checkbox_disable_warnings">Dezactivează mesajele de avertizare privind rețeaua în timpul conexiunii</string>
|
||||
<string name="title_checkbox_enable_pip">Activează modul Picture-In-Picture</string>
|
||||
<string name="summary_checkbox_enable_pip">Permite vizualizarea (dar nu și controlul) când efectuezi multitasking</string>
|
||||
|
||||
<string name="category_audio_settings">Setări Audio</string>
|
||||
<string name="title_audio_config_list">Configurarea sunetului surround</string>
|
||||
<string name="summary_audio_config_list">Activeaza sunetul 5.1 sau 7.1 pentru sisteme home-theater</string>
|
||||
|
||||
<string name="category_input_settings">Setări de control</string>
|
||||
<string name="title_checkbox_multi_controller">Detectează automat prezența controllerelor.</string>
|
||||
<string name="summary_checkbox_multi_controller">Dezactivarea acestei opțiuni implică prezența constantă a unui controller</string>
|
||||
<string name="title_checkbox_vibrate_fallback">Simuleaza efectul de vibratie</string>
|
||||
<string name="summary_checkbox_vibrate_fallback">Dacă controllerul nu suportă vibrații, va vibra dispozitivul în schimb.</string>
|
||||
<string name="title_seekbar_deadzone">Zona moartă a stickului analogic</string>
|
||||
<string name="suffix_seekbar_deadzone">%</string>
|
||||
<string name="title_checkbox_xb1_driver">Driver pentru controllerele de Xbox 360/One</string>
|
||||
<string name="summary_checkbox_xb1_driver">Activează un driver USB pentru dispozitivele fără suport nativ pentru controllere Xbox</string>
|
||||
<string name="title_checkbox_usb_bind_all">Inlocuiește driverul implicit pentru controllere</string>
|
||||
<string name="summary_checkbox_usb_bind_all">Forțează driverul USB Moonlight să preia toate controllerele Xbox suportate</string>
|
||||
<string name="title_checkbox_mouse_emulation">Simulează mouse cu controllerul</string>
|
||||
<string name="summary_checkbox_mouse_emulation">Apăsarea lungă pe butonul Start schimba modul de operare a controllerului în modul mouse.</string>
|
||||
<string name="title_checkbox_mouse_nav_buttons">Activează butoanele de înainte și înapoi ale mousului</string>
|
||||
<string name="summary_checkbox_mouse_nav_buttons">Această opțiune poate afecta click dreapta pentru unele dispozitive problematice.</string>
|
||||
|
||||
<string name="category_on_screen_controls_settings">Setări ale controalelor pe ecran</string>
|
||||
<string name="title_checkbox_show_onscreen_controls">Afișează controale pe ecran</string>
|
||||
<string name="summary_checkbox_show_onscreen_controls">Afișează un controller virtual pe ecran</string>
|
||||
<string name="title_checkbox_vibrate_osc">Activează vibrațiile</string>
|
||||
<string name="summary_checkbox_vibrate_osc">Dispozitivul va vibra asemănător unui controller</string>
|
||||
<string name="title_only_l3r3">Afișează doar L3 si R3</string>
|
||||
<string name="summary_only_l3r3">Ascunde toate butoanele în afară de L3 and R3</string>
|
||||
<string name="title_reset_osc">Șterge schema salvată a controalelor</string>
|
||||
<string name="summary_reset_osc">Resetează toate controalele de pe ecran la poziția și dimensiunea implicită</string>
|
||||
<string name="dialog_title_reset_osc">Resetarea schemei de controale</string>
|
||||
<string name="dialog_text_reset_osc">Sigur dorești să ștergi schema salvată a controalelor de pe ecran?</string>
|
||||
<string name="toast_reset_osc_success">Controalele de pe ecran au fost resetate la setarile implicite</string>
|
||||
<string name="title_osc_opacity">Modifică opacitatea controalelor de pe ecran</string>
|
||||
<string name="summary_osc_opacity">Ajustează gradul de transparență al controalelor de pe ecran</string>
|
||||
<string name="dialog_title_osc_opacity">Modifică opacitatea</string>
|
||||
<string name="suffix_osc_opacity">%</string>
|
||||
|
||||
<string name="category_ui_settings">Setari UI</string>
|
||||
<string name="title_language_list">Limba (Language)</string>
|
||||
<string name="summary_language_list">Limba folosită de către Moonlight</string>
|
||||
<string name="title_checkbox_list_mode">Folosește liste în loc de grile</string>
|
||||
<string name="summary_checkbox_list_mode">Aplicațiile și PC-urile vor fi afișate in liste in loc de grile</string>
|
||||
<string name="title_checkbox_small_icon_mode">Folosește iconițe mici</string>
|
||||
<string name="summary_checkbox_small_icon_mode">Iconițele folosite în grile vor fi mici pentru a încăpea mai multe odata</string>
|
||||
|
||||
<string name="category_host_settings">Setările PC-ului gazdă</string>
|
||||
<string name="title_checkbox_enable_sops">Optimizarea setărilor de joc</string>
|
||||
<string name="summary_checkbox_enable_sops">Permite GFE să modifice setările jocurilor pentru experiența optimă</string>
|
||||
<string name="title_checkbox_host_audio">Redă audio si pe PC</string>
|
||||
<string name="summary_checkbox_host_audio">Sunetul se va auzi atat pe acest dispozitiv cât și pe PC</string>
|
||||
|
||||
<string name="category_advanced_settings">Setări avansate</string>
|
||||
<string name="title_disable_frame_drop">Nu pierde cadre intenționat</string>
|
||||
<string name="summary_disable_frame_drop">Poate să reducă micro-stuttering pe anumite device-uri, dar s-ar putea să crească latența</string>
|
||||
<string name="title_video_format">Modifica setările H.265</string>
|
||||
<string name="summary_video_format">H.265 funcționează cu o conexiune mai slaba, dar necesită un dispozitiv recent, performant</string>
|
||||
<string name="title_enable_hdr">Activează HDR (Experimental)</string>
|
||||
<string name="summary_enable_hdr">Folosește HDR daca aplicația si placa video suportă. Necesită o placa video seria GTX 1000 sau mai nouă.</string>
|
||||
<string name="title_enable_perf_overlay">Activează statisticile de performanță</string>
|
||||
<string name="summary_enable_perf_overlay">Afișează în timp real statisticile de performanță ale conexiunii.</string>
|
||||
|
||||
</resources>
|
||||
@@ -96,8 +96,6 @@
|
||||
<string name="summary_checkbox_disable_warnings">Выключить экранные предупреждения о соединении во время трансляции</string>
|
||||
|
||||
<string name="category_audio_settings">Аудио Настройки</string>
|
||||
<string name="title_checkbox_51_surround">Включить объёмный звук 5.1</string>
|
||||
<string name="summary_checkbox_51_surround">Отключите, если появляются аудио проблемы. Требуется GFE 2.7 или выше.</string>
|
||||
|
||||
<string name="title_checkbox_multi_controller">Поддержка нескольких контроллеров</string>
|
||||
<string name="summary_checkbox_multi_controller">Когда отключена, все контроллеры определяются как один</string>
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<string-array name="decoder_names">
|
||||
<string-array name="decoder_names">
|
||||
<item>自动选择解码器</item>
|
||||
<item>强制软解</item>
|
||||
<item>强制硬解</item>
|
||||
</string-array>
|
||||
</string-array>
|
||||
|
||||
<string-array name="video_format_names">
|
||||
<string-array name="video_format_names">
|
||||
<item>如果稳定才使用H.265</item>
|
||||
<item>强制使用H.265(不稳定)</item>
|
||||
<item>不使用H.265</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="audio_config_names">
|
||||
<item>立体声</item>
|
||||
<item>5.1环绕声</item>
|
||||
<item>7.1环绕声</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -134,8 +134,8 @@
|
||||
<string name="summary_checkbox_enable_pip">允许多任务时观看串流画面(但不操作)</string>
|
||||
|
||||
<string name="category_audio_settings"> 音频设置 </string>
|
||||
<string name="title_checkbox_51_surround"> 启用 5.1 环绕音效 </string>
|
||||
<string name="summary_checkbox_51_surround"> 如果你的声音听起来有问题请禁用。 \n 需要GFE 2.7或更高版本 </string>
|
||||
<string name="title_audio_config_list"> 环绕声设置 </string>
|
||||
<string name="summary_audio_config_list"> 为家庭影院系统启用5.1或7.1环绕声 </string>
|
||||
|
||||
<string name="category_input_settings">输入设置</string>
|
||||
<string name="title_checkbox_multi_controller"> 自动检测手柄 </string>
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<string-array name="decoder_names">
|
||||
<string-array name="decoder_names">
|
||||
<item>自動選擇解碼器</item>
|
||||
<item>強制軟解</item>
|
||||
<item>強制硬解</item>
|
||||
</string-array>
|
||||
</string-array>
|
||||
|
||||
<string-array name="video_format_names">
|
||||
<string-array name="video_format_names">
|
||||
<item>如果穩定才使用H.265</item>
|
||||
<item>強制使用H.265(不穩定)</item>
|
||||
<item>不使用H.265</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="audio_config_names">
|
||||
<item>身歷聲</item>
|
||||
<item>5.1環繞聲</item>
|
||||
<item>7.1環繞聲</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -134,8 +134,8 @@
|
||||
<string name="summary_checkbox_enable_pip">允許多工時觀看串流畫面(但不操作)</string>
|
||||
|
||||
<string name="category_audio_settings"> 音訊設置 </string>
|
||||
<string name="title_checkbox_51_surround"> 啟用 5.1 環繞音效 </string>
|
||||
<string name="summary_checkbox_51_surround"> 如果你的聲音聽起來有問題請禁用。 \n 需要GFE 2.7或更高版本 </string>
|
||||
<string name="title_audio_config_list"> 環繞聲設置 </string>
|
||||
<string name="summary_audio_config_list"> 為家庭劇院系統啟用5.1或7.1環繞聲 </string>
|
||||
|
||||
<string name="category_input_settings">輸入設置</string>
|
||||
<string name="title_checkbox_multi_controller"> 自動檢測手柄 </string>
|
||||
|
||||
@@ -30,6 +30,17 @@
|
||||
<item>120</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="audio_config_names">
|
||||
<item>Stereo</item>
|
||||
<item>5.1 Surround Sound</item>
|
||||
<item>7.1 Surround Sound</item>
|
||||
</string-array>
|
||||
<string-array name="audio_config_values" translatable="false">
|
||||
<item>2</item>
|
||||
<item>51</item>
|
||||
<item>71</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="language_names" translatable="false">
|
||||
<item>Default</item>
|
||||
<item>English</item>
|
||||
@@ -43,6 +54,7 @@
|
||||
<item>Español</item>
|
||||
<item>Français</item>
|
||||
<item>Deutsch</item>
|
||||
<item>Română</item>
|
||||
</string-array>
|
||||
<string-array name="language_values" translatable="false">
|
||||
<item>default</item>
|
||||
@@ -57,6 +69,7 @@
|
||||
<item>es</item>
|
||||
<item>fr</item>
|
||||
<item>de</item>
|
||||
<item>ro</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="decoder_names">
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
<string name="summary_checkbox_enable_pip">Allows the stream to be viewed (but not controlled) while multitasking</string>
|
||||
|
||||
<string name="category_audio_settings">Audio Settings</string>
|
||||
<string name="title_checkbox_51_surround">Enable 5.1 surround sound</string>
|
||||
<string name="summary_checkbox_51_surround">Uncheck if you experience audio issues. Requires GFE 2.7 or higher.</string>
|
||||
<string name="title_audio_config_list">Surround sound configuration</string>
|
||||
<string name="summary_audio_config_list">Enable 5.1 or 7.1 surround sound for home-theater systems</string>
|
||||
|
||||
<string name="category_input_settings">Input Settings</string>
|
||||
<string name="title_checkbox_multi_controller">Automatic gamepad presence detection</string>
|
||||
|
||||
@@ -43,11 +43,13 @@
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/category_audio_settings">
|
||||
<CheckBoxPreference
|
||||
android:key="checkbox_51_surround"
|
||||
android:title="@string/title_checkbox_51_surround"
|
||||
android:summary="@string/summary_checkbox_51_surround"
|
||||
android:defaultValue="false" />
|
||||
<ListPreference
|
||||
android:key="list_audio_config"
|
||||
android:title="@string/title_audio_config_list"
|
||||
android:summary="@string/summary_audio_config_list"
|
||||
android:entries="@array/audio_config_names"
|
||||
android:entryValues="@array/audio_config_values"
|
||||
android:defaultValue="2" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/category_input_settings">
|
||||
<!--com.limelight.preferences.SeekBarPreference
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.1'
|
||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
- Improved performance during periods of packet loss
|
||||
- Improved prioritization of control data sent back to the PC
|
||||
@@ -0,0 +1,2 @@
|
||||
- Added 7.1 surround sound support
|
||||
- Fixed a crash on some devices during a high intensity rumble event
|
||||
@@ -0,0 +1,4 @@
|
||||
- Improved support for GFE 3.20.3.63
|
||||
- Audio performance optimization
|
||||
- Added Romanian translation
|
||||
- Updated Simplified Chinese and Traditional Chinese translations
|
||||
@@ -0,0 +1,5 @@
|
||||
- Improved stylus support including direct mouse control
|
||||
- Improved mouse support for ChromeOS and Samsung DeX
|
||||
- Improved mouse support for devices running Android 7.0 and earlier
|
||||
- Improved mapping for Start and Select on the ROG Kunai
|
||||
- Fixed a crash when GeForce Experience returns an invalid status code value
|
||||
@@ -6,8 +6,9 @@ Streaming performance may vary based on your client device and network setup. HD
|
||||
* Open-source and completely free (no ads, IAPs, or "Pro")
|
||||
* Streams games purchased from any store
|
||||
* Works on your home network or over the Internet/LTE
|
||||
* Up to 4K 120 FPS HDR streaming with 5.1 surround sound
|
||||
* Keyboard and mouse support (with Android 8.0 or rooted device)
|
||||
* Up to 4K 120 FPS HDR streaming with 7.1 surround sound
|
||||
* Keyboard and mouse support (best with Android 8.0 or later)
|
||||
* Stylus/S-Pen support
|
||||
* Supports PS3, PS4, Xbox 360, Xbox One, and Android gamepads
|
||||
* Force feedback support
|
||||
* Local co-op with up to 4 connected controllers
|
||||
|
||||
Reference in New Issue
Block a user