mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 23:36:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
429c32477c | ||
|
|
f5d51b2061 | ||
|
|
2ad1aaa277 | ||
|
|
3afd32dbc1 | ||
|
|
092830ed07 | ||
|
|
d118a6d3ff | ||
|
|
fe97ffdc2f |
No files matched your search
+2
-2
@@ -7,8 +7,8 @@ android {
|
|||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
|
|
||||||
versionName "9.6"
|
versionName "9.6.1"
|
||||||
versionCode = 231
|
versionCode = 233
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "root"
|
flavorDimensions "root"
|
||||||
|
|||||||
@@ -40,12 +40,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
|
|
||||||
private static final int MINIMUM_BUTTON_DOWN_TIME_MS = 25;
|
private static final int MINIMUM_BUTTON_DOWN_TIME_MS = 25;
|
||||||
|
|
||||||
private static final int EMULATING_SPECIAL = 0x1;
|
|
||||||
private static final int EMULATING_SELECT = 0x2;
|
|
||||||
|
|
||||||
private static final int EMULATED_SPECIAL_UP_DELAY_MS = 100;
|
|
||||||
private static final int EMULATED_SELECT_UP_DELAY_MS = 30;
|
|
||||||
|
|
||||||
private final Vector2d inputVector = new Vector2d();
|
private final Vector2d inputVector = new Vector2d();
|
||||||
|
|
||||||
private final SparseArray<InputDeviceContext> inputDeviceContexts = new SparseArray<>();
|
private final SparseArray<InputDeviceContext> inputDeviceContexts = new SparseArray<>();
|
||||||
@@ -1422,41 +1416,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we're emulating the select button
|
|
||||||
if ((context.emulatingButtonFlags & ControllerHandler.EMULATING_SELECT) != 0)
|
|
||||||
{
|
|
||||||
// If either start or LB is up, select comes up too
|
|
||||||
if ((context.inputMap & ControllerPacket.PLAY_FLAG) == 0 ||
|
|
||||||
(context.inputMap & ControllerPacket.LB_FLAG) == 0)
|
|
||||||
{
|
|
||||||
context.inputMap &= ~ControllerPacket.BACK_FLAG;
|
|
||||||
|
|
||||||
context.emulatingButtonFlags &= ~ControllerHandler.EMULATING_SELECT;
|
|
||||||
|
|
||||||
try {
|
|
||||||
Thread.sleep(EMULATED_SELECT_UP_DELAY_MS);
|
|
||||||
} catch (InterruptedException ignored) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if we're emulating the special button
|
|
||||||
if ((context.emulatingButtonFlags & ControllerHandler.EMULATING_SPECIAL) != 0)
|
|
||||||
{
|
|
||||||
// If either start or select and RB is up, the special button comes up too
|
|
||||||
if ((context.inputMap & ControllerPacket.PLAY_FLAG) == 0 ||
|
|
||||||
((context.inputMap & ControllerPacket.BACK_FLAG) == 0 &&
|
|
||||||
(context.inputMap & ControllerPacket.RB_FLAG) == 0))
|
|
||||||
{
|
|
||||||
context.inputMap &= ~ControllerPacket.SPECIAL_BUTTON_FLAG;
|
|
||||||
|
|
||||||
context.emulatingButtonFlags &= ~ControllerHandler.EMULATING_SPECIAL;
|
|
||||||
|
|
||||||
try {
|
|
||||||
Thread.sleep(EMULATED_SPECIAL_UP_DELAY_MS);
|
|
||||||
} catch (InterruptedException ignored) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sendControllerInputPacket(context);
|
sendControllerInputPacket(context);
|
||||||
|
|
||||||
if (context.pendingExit && context.inputMap == 0) {
|
if (context.pendingExit && context.inputMap == 0) {
|
||||||
@@ -1576,29 +1535,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
context.pendingExit = true;
|
context.pendingExit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start+LB acts like select for controllers with one button
|
|
||||||
if (context.inputMap == (ControllerPacket.PLAY_FLAG | ControllerPacket.LB_FLAG) ||
|
|
||||||
(context.inputMap == ControllerPacket.PLAY_FLAG &&
|
|
||||||
SystemClock.uptimeMillis() - context.lastLbUpTime <= MAXIMUM_BUMPER_UP_DELAY_MS))
|
|
||||||
{
|
|
||||||
context.inputMap &= ~(ControllerPacket.PLAY_FLAG | ControllerPacket.LB_FLAG);
|
|
||||||
context.inputMap |= ControllerPacket.BACK_FLAG;
|
|
||||||
|
|
||||||
context.emulatingButtonFlags |= ControllerHandler.EMULATING_SELECT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We detect select+start or start+RB as the special button combo
|
|
||||||
if (context.inputMap == (ControllerPacket.PLAY_FLAG | ControllerPacket.BACK_FLAG) ||
|
|
||||||
context.inputMap == (ControllerPacket.PLAY_FLAG | ControllerPacket.RB_FLAG) ||
|
|
||||||
(context.inputMap == ControllerPacket.PLAY_FLAG &&
|
|
||||||
SystemClock.uptimeMillis() - context.lastRbUpTime <= MAXIMUM_BUMPER_UP_DELAY_MS))
|
|
||||||
{
|
|
||||||
context.inputMap &= ~(ControllerPacket.BACK_FLAG | ControllerPacket.PLAY_FLAG | ControllerPacket.RB_FLAG);
|
|
||||||
context.inputMap |= ControllerPacket.SPECIAL_BUTTON_FLAG;
|
|
||||||
|
|
||||||
context.emulatingButtonFlags |= ControllerHandler.EMULATING_SPECIAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We don't need to send repeat key down events, but the platform
|
// We don't need to send repeat key down events, but the platform
|
||||||
// sends us events that claim to be repeats but they're from different
|
// sends us events that claim to be repeats but they're from different
|
||||||
// devices, so we just send them all and deal with some duplicates.
|
// devices, so we just send them all and deal with some duplicates.
|
||||||
@@ -1744,8 +1680,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
public boolean hasJoystickAxes;
|
public boolean hasJoystickAxes;
|
||||||
public boolean pendingExit;
|
public boolean pendingExit;
|
||||||
|
|
||||||
public int emulatingButtonFlags = 0;
|
|
||||||
|
|
||||||
// Used for OUYA bumper state tracking since they force all buttons
|
// Used for OUYA bumper state tracking since they force all buttons
|
||||||
// up when the OUYA button goes down. We watch the last time we get
|
// up when the OUYA button goes down. We watch the last time we get
|
||||||
// a bumper up and compare that to our maximum delay when we receive
|
// a bumper up and compare that to our maximum delay when we receive
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ public class AnalogStick extends VirtualControllerElement {
|
|||||||
@Override
|
@Override
|
||||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||||
// calculate new radius sizes depending
|
// calculate new radius sizes depending
|
||||||
radius_complete = getPercent(getCorrectWidth() / 2, 100);
|
radius_complete = getPercent(getCorrectWidth() / 2, 100) - 2 * getDefaultStrokeWidth();
|
||||||
radius_dead_zone = getPercent(getCorrectWidth() / 2, 30);
|
radius_dead_zone = getPercent(getCorrectWidth() / 2, 30);
|
||||||
radius_analog_stick = getPercent(getCorrectWidth() / 2, 20);
|
radius_analog_stick = getPercent(getCorrectWidth() / 2, 20);
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -167,11 +167,11 @@ public class VirtualControllerConfigurationLoader {
|
|||||||
private static final int DPAD_BASE_Y = 41;
|
private static final int DPAD_BASE_Y = 41;
|
||||||
private static final int DPAD_SIZE = 30;
|
private static final int DPAD_SIZE = 30;
|
||||||
|
|
||||||
private static final int ANALOG_L_BASE_X = 4;
|
private static final int ANALOG_L_BASE_X = 6;
|
||||||
private static final int ANALOG_L_BASE_Y = 1;
|
private static final int ANALOG_L_BASE_Y = 4;
|
||||||
private static final int ANALOG_R_BASE_X = 96;
|
private static final int ANALOG_R_BASE_X = 98;
|
||||||
private static final int ANALOG_R_BASE_Y = 42;
|
private static final int ANALOG_R_BASE_Y = 42;
|
||||||
private static final int ANALOG_SIZE = 28;
|
private static final int ANALOG_SIZE = 26;
|
||||||
|
|
||||||
private static final int L3_R3_BASE_Y = 60;
|
private static final int L3_R3_BASE_Y = 60;
|
||||||
|
|
||||||
|
|||||||
@@ -154,9 +154,11 @@ public class StreamSettings extends Activity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove PiP mode on devices pre-Oreo or 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.
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
|
||||||
!getActivity().getPackageManager().hasSystemFeature("android.software.picture_in_picture")) {
|
!getActivity().getPackageManager().hasSystemFeature("android.software.picture_in_picture") ||
|
||||||
|
getActivity().getPackageManager().hasSystemFeature("com.amazon.software.fireos")) {
|
||||||
PreferenceCategory category =
|
PreferenceCategory category =
|
||||||
(PreferenceCategory) findPreference("category_ui_settings");
|
(PreferenceCategory) findPreference("category_ui_settings");
|
||||||
category.removePreference(findPreference("checkbox_enable_pip"));
|
category.removePreference(findPreference("checkbox_enable_pip"));
|
||||||
|
|||||||
@@ -189,24 +189,10 @@
|
|||||||
<string name="summary_video_format">H.265能降低视频带宽需求,但需要较新的设备才能支持</string>
|
<string name="summary_video_format">H.265能降低视频带宽需求,但需要较新的设备才能支持</string>
|
||||||
<string name="title_enable_hdr"> 启用 HDR (实验) </string>
|
<string name="title_enable_hdr"> 启用 HDR (实验) </string>
|
||||||
<string name="summary_enable_hdr"> 当游戏和显卡支持时以HDR模式串流。 HDR需要GTX 1000系列或更高规格显卡。 </string>
|
<string name="summary_enable_hdr"> 当游戏和显卡支持时以HDR模式串流。 HDR需要GTX 1000系列或更高规格显卡。 </string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="title_enable_perf_overlay"> 启用性能信息 </string>
|
<string name="title_enable_perf_overlay"> 启用性能信息 </string>
|
||||||
<string name="summary_enable_perf_overlay"> 在串流中显示实时性能信息 </string>
|
<string name="summary_enable_perf_overlay"> 在串流中显示实时性能信息 </string>
|
||||||
|
<string name="title_enable_post_stream_toast">串流完毕显示延迟信息</string>
|
||||||
|
<string name="summary_enable_post_stream_toast">串流结束后显示延迟信息</string>
|
||||||
<string name="title_osc_opacity">更改屏幕按钮透明度</string>
|
<string name="title_osc_opacity">更改屏幕按钮透明度</string>
|
||||||
<string name="dialog_title_osc_opacity">透明度</string>
|
<string name="dialog_title_osc_opacity">透明度</string>
|
||||||
<string name="suffix_osc_opacity">%</string>
|
<string name="suffix_osc_opacity">%</string>
|
||||||
|
|||||||
@@ -189,24 +189,10 @@
|
|||||||
<string name="summary_video_format">H.265能降低視頻頻寬需求,但需要較新的設備才能支援</string>
|
<string name="summary_video_format">H.265能降低視頻頻寬需求,但需要較新的設備才能支援</string>
|
||||||
<string name="title_enable_hdr"> 啟用 HDR (實驗) </string>
|
<string name="title_enable_hdr"> 啟用 HDR (實驗) </string>
|
||||||
<string name="summary_enable_hdr"> 當遊戲和顯卡支援時以HDR模式串流。 HDR需要GTX 1000系列或更高規格顯卡。 </string>
|
<string name="summary_enable_hdr"> 當遊戲和顯卡支援時以HDR模式串流。 HDR需要GTX 1000系列或更高規格顯卡。 </string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<string name="title_enable_perf_overlay"> 啟用性能資訊 </string>
|
<string name="title_enable_perf_overlay"> 啟用性能資訊 </string>
|
||||||
<string name="summary_enable_perf_overlay"> 在串流中顯示即時性能資訊 </string>
|
<string name="summary_enable_perf_overlay"> 在串流中顯示即時性能資訊 </string>
|
||||||
|
<string name="title_enable_post_stream_toast">串流完畢顯示延遲資訊</string>
|
||||||
|
<string name="summary_enable_post_stream_toast">串流結束後顯示延遲資訊</string>
|
||||||
<string name="title_osc_opacity">更改屏幕按鈕透明度</string>
|
<string name="title_osc_opacity">更改屏幕按鈕透明度</string>
|
||||||
<string name="dialog_title_osc_opacity">透明度</string>
|
<string name="dialog_title_osc_opacity">透明度</string>
|
||||||
<string name="suffix_osc_opacity">%</string>
|
<string name="suffix_osc_opacity">%</string>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
- Removed old button emulation feature which prevented LB+Start, RB+Start, and Start+Select from working as expected
|
||||||
|
- Fixed edges of on-screen analog sticks being clipped
|
||||||
|
- Updated Simplified and Traditional Chinese translations
|
||||||
Reference in new issue
Block a user