Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- **Touch screen (handheld):** the in-game Quick menu no longer has Touch screen (Off, Mouse, Touch). It's set in Settings, Handheld, Touch screen, and now starts as **Touch** (the pointer goes where you tap) unless you picked something else there. Off still moves the PC's pointer out of the picture.
- **Identity transfer on release builds (TV):** a release-built MoonCast TV (1.0-beta2, for one) answered with an empty `identityKey`, so a phone or iPad could never send it its identity and a TV with no pairing of its own couldn't play PC games from it. R8 had removed BouncyCastle's X25519 classes, which the provider only loads by name; a keep rule brings them back. Debug builds were never affected.
- **Store icon:** `ic_launcher-web.png` (the 512 px icon stores and some tools pick up) was still Moonlight's wheel, left from the fork. It's now the MoonCast moon on #1A1630, the same picture the launcher icon shows. Nothing on the device changes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1500,9 +1500,9 @@ class HandheldHomeActivity : Activity() {
appToggle(list, "hh_rotate", "Screen turns with the device", "Portrait when you hold it upright", true) { applyRotation() }
action(list, "set:devapps", "Apps on this ${deviceShort()}", "Pick Android apps to show next to your games (emulators, Steam Link…)",
com.limelight.home.DeviceApps.pinned(this).size.let { if (it == 0) "None" else "$it" }) { pickDeviceApps() }
// PC games: what a finger on the picture does when a game starts (the Quick menu changes it for that game)
choice(list, stream, com.limelight.Game.TOUCH_DEFAULT_PREF, "Touch screen", "In PC games. Mouse is a trackpad, Touch clicks where you tap. The Quick menu changes it while you play",
listOf("Off" to "off", "Mouse" to "mouse", "Touch" to "touch"), "off")
// PC games: what a finger on the picture does
choice(list, stream, com.limelight.Game.TOUCH_DEFAULT_PREF, "Touch screen", "In PC games. Touch clicks where you tap, Mouse is a trackpad, Off ignores the screen",
listOf("Touch" to "touch", "Mouse" to "mouse", "Off" to "off"), "touch")
appToggle(list, "hh_dim_on_tv", "Dim the screen on a TV", "While this ${deviceShort()} is the controller for a TV", true)
toggle(list, "checkbox_ultra_low_latency", "Ultra low latency", "Experimental. This device: ${chipName()}", false)
}
Expand Down
16 changes: 6 additions & 10 deletions app/src/main/java/com/limelight/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,7 @@ public void notifyCrash(Exception e) {
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
inputManager.registerInputDeviceListener(keyboardTranslator, null);

// Touch screen starts as Settings, Handheld, Touch screen say (Off unless changed there); the Quick menu
// switches it for this stream
// Touch screen as Settings, Handheld, Touch screen say (Touch unless changed there)
setTouchMode(defaultTouchMode());

if (prefConfig.onscreenController) {
Expand Down Expand Up @@ -1592,8 +1591,6 @@ public void openQuickMenu() {
java.util.List<com.limelight.home.QuickMenu.Item> items = new java.util.ArrayList<>();
items.add(new com.limelight.home.QuickMenu.Item("⌨", "Keyboard", "On-screen", false, this::toggleKeyboard).asToggle());
items.add(new com.limelight.home.QuickMenu.Item("ⓘ", "Streaming status", prefConfig.enablePerfOverlay ? "On" : "Off", false, this::toggleStatus).asToggle());
items.add(new com.limelight.home.QuickMenu.Item("☝", "Touch screen", TOUCH_LABELS[touchMode], false,
() -> setTouchMode((touchMode + 1) % TOUCH_LABELS.length)).asToggle());
items.add(new com.limelight.home.QuickMenu.Item("✚", "Controllers", com.limelight.home.QuickMenu.pads().size() + " connected", false, this::showControllers));
items.add(new com.limelight.home.QuickMenu.Item("▤", "Task Manager", "Windows: Ctrl + Shift + Esc", false, this::openTaskManager));
// handheld only: send the game to the last MoonCast TV (it ends this stream, the game keeps running)
Expand All @@ -1616,17 +1613,16 @@ public void openQuickMenu() {
});
}

// Quick menu, Touch screen: what a finger on the picture does, for this stream only (every stream starts Off,
// so a hand on a handheld's screen can't click on the PC). Mouse is Moonlight's trackpad, Touch puts the pointer
// where the finger is. A stylus and a real mouse work in every mode.
// Touch screen (Settings, Handheld): what a finger on the picture does. Touch puts the pointer where the finger is
// (the default), Mouse is Moonlight's trackpad, Off ignores the finger. A stylus and a real mouse work in every mode.
private static final int TOUCH_OFF = 0, TOUCH_MOUSE = 1, TOUCH_DIRECT = 2;
private static final String[] TOUCH_LABELS = {"Off", "Mouse", "Touch"};
/** Settings, Handheld, Touch screen: how each stream starts ("off", "mouse" or "touch"). */
/** Settings, Handheld, Touch screen: "touch" (default), "mouse" or "off". */
public static final String TOUCH_DEFAULT_PREF = "mc_touch_default";
private int touchMode = TOUCH_OFF;

private int defaultTouchMode() {
String v = android.preference.PreferenceManager.getDefaultSharedPreferences(this).getString(TOUCH_DEFAULT_PREF, "off");
String v = android.preference.PreferenceManager.getDefaultSharedPreferences(this).getString(TOUCH_DEFAULT_PREF, "touch");
return "mouse".equals(v) ? TOUCH_MOUSE : "touch".equals(v) ? TOUCH_DIRECT : TOUCH_OFF;
}

Expand Down Expand Up @@ -2332,7 +2328,7 @@ else if (event.getActionMasked() == MotionEvent.ACTION_UP || event.getActionMask
return true;
}

// Touch screen Off (the Quick menu's default): a finger on the picture does nothing on the PC
// Touch screen Off (Settings, Handheld): a finger on the picture does nothing on the PC
if (touchMode == TOUCH_OFF) {
return true;
}
Expand Down