From e98e09399240ac5b828ab48ca2da35b3324c9825 Mon Sep 17 00:00:00 2001 From: Saleh Date: Sat, 24 Oct 2026 06:42:29 +0000 Subject: [PATCH] feat(handheld): Touch screen leaves the Quick menu and starts as Touch Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + .../limelight/handheld/HandheldHomeActivity.kt | 6 +++--- app/src/main/java/com/limelight/Game.java | 16 ++++++---------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc41d4c015..87aac5fda2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/app/src/handheld/java/com/limelight/handheld/HandheldHomeActivity.kt b/app/src/handheld/java/com/limelight/handheld/HandheldHomeActivity.kt index 612866bef1..fc22ba0096 100644 --- a/app/src/handheld/java/com/limelight/handheld/HandheldHomeActivity.kt +++ b/app/src/handheld/java/com/limelight/handheld/HandheldHomeActivity.kt @@ -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) } diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index f5a3b7aa3a..1dd1fea500 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -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) { @@ -1592,8 +1591,6 @@ public void openQuickMenu() { java.util.List 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) @@ -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; } @@ -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; }