Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdff94e72c | ||
|
|
aa1984bb94 | ||
|
|
634cb390c9 | ||
|
|
13c8edb3d5 | ||
|
|
1ec2b696b7 | ||
|
|
621fd8d43e | ||
|
|
17936530aa | ||
|
|
ae3e9509f4 | ||
|
|
6bcd431ca6 | ||
|
|
836340f3a2 | ||
|
|
1b19837fc6 | ||
|
|
c85b84a964 | ||
|
|
75a0230304 | ||
|
|
7c89c14a84 | ||
|
|
b837611efe | ||
|
|
bf434b2652 | ||
|
|
35941bb9e7 | ||
|
|
96a12465e0 | ||
|
|
88d6b70881 | ||
|
|
29823bb1bf | ||
|
|
92a7124589 | ||
|
|
bf95a40e3e | ||
|
|
1355cb3a2b | ||
|
|
51407155fc | ||
|
|
b4a953c659 | ||
|
|
5e438e9248 | ||
|
|
6b110581ac | ||
|
|
92742f37c1 | ||
|
|
ecd916d43f | ||
|
|
a7c10e3f51 | ||
|
|
1760f008ae | ||
|
|
3bb279f635 | ||
|
|
3fef1f3fa1 | ||
|
|
a4f26799ab | ||
|
|
08a6a3cba8 | ||
|
|
005fec2125 | ||
|
|
2e70b8ed73 | ||
|
|
74c0f2127a |
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 2
|
||||
outputs:
|
||||
labels: ${{ steps.runner.outputs.labels || '"ubuntu-24.04"' }}
|
||||
labels: ${{ steps.runner.outputs.labels || steps.fork.outputs.labels || '"ubuntu-24.04"' }}
|
||||
steps:
|
||||
- name: Pick the compile runner
|
||||
id: runner
|
||||
@@ -36,3 +36,25 @@ jobs:
|
||||
fi
|
||||
echo "labels=$labels" >> "$GITHUB_OUTPUT"
|
||||
echo "Compile runner: \`$labels\`" >> "$GITHUB_STEP_SUMMARY"
|
||||
- name: Pick the fork runner
|
||||
id: fork
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
labels='"ubuntu-24.04"'
|
||||
gist=https://api.github.com/gists/0c7ed7ad6d6493de84f5123689c64ae6
|
||||
body=$(curl -fsS --max-time 15 -H "Authorization: Bearer $GH_TOKEN" "$gist" 2>/dev/null || curl -fsS --max-time 15 "$gist" 2>/dev/null || echo '{}')
|
||||
IDLE_AT=$(jq -r 'select(.owner.login == "maxjivi05") | .files["idle-at"].content // "0"' <<< "$body" 2>/dev/null || echo 0)
|
||||
echo "Heartbeat: ${IDLE_AT:-none}"
|
||||
age=-1
|
||||
if [[ "${IDLE_AT:-0}" =~ ^[0-9]+$ ]] && [ "${IDLE_AT:-0}" -gt 0 ]; then
|
||||
age=$(( $(date +%s) - IDLE_AT ))
|
||||
fi
|
||||
if [ "$age" -ge 0 ] && [ "$age" -lt 180 ]; then
|
||||
labels='"droiddeck-fork"'
|
||||
fi
|
||||
echo "labels=$labels" >> "$GITHUB_OUTPUT"
|
||||
echo "Compile runner: \`$labels\`" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -10,7 +10,7 @@ DroidDeck brings the SteamOS experience to Android: Steam Gaming Mode, full Linu
|
||||
<p align="center"><b>100% open source. No ads. No telemetry. No proprietary components. No source withheld.</b></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Droid-Deck/DroidDeck/releases/download/0.6.9/DroidDeck-0.6.9.apk"><img src="https://img.shields.io/badge/Download-DroidDeck%200.6.9%20APK-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Download DroidDeck 0.6.9"></a>
|
||||
<a href="https://github.com/Droid-Deck/DroidDeck/releases/download/0.7.0/DroidDeck-0.7.0.apk"><img src="https://img.shields.io/badge/Download-DroidDeck%200.7.0%20APK-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Download DroidDeck 0.7.0"></a>
|
||||
<a href="https://discord.gg/JRGAvawjsm"><img src="https://img.shields.io/badge/Discord-Join%20us-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the DroidDeck Discord"></a>
|
||||
</p>
|
||||
|
||||
@@ -36,9 +36,9 @@ DroidDeck brings the SteamOS experience to Android: Steam Gaming Mode, full Linu
|
||||
|
||||
## Install
|
||||
|
||||
1. Android 9 or newer on Adreno 730 or newer, or any 8xx. Adreno 6xx is experimental. Mali, Xclipse, PowerVR and Adreno 710 are unsupported. No root needed.
|
||||
1. Android 9 or newer on Adreno 730 or newer, or any 8xx. Adreno 6xx, Mali, Xclipse and PowerVR are experimental. Adreno 710 is currently unsupported. No root needed.
|
||||
2. About 3 GB free for the runtime, plus 1.1 GB for the desktop and emulators.
|
||||
3. Install the [APK](https://github.com/Droid-Deck/DroidDeck/releases/download/0.6.9/DroidDeck-0.6.9.apk), install the Linux runtime, press **Play** and sign in to Steam.
|
||||
3. Install the [APK](https://github.com/Droid-Deck/DroidDeck/releases/download/0.7.0/DroidDeck-0.7.0.apk), install the Linux runtime, press **Play** and sign in to Steam.
|
||||
4. On Android 14 and newer, turn on **Disable child process restrictions** in Developer options. On Android 12 and 13, Steam's first launch shows a **Fix it for me** button that walks you through it.
|
||||
|
||||
Smart glasses setup is in the [support matrix](docs/smart-glasses-support.md). Release notes are in [docs/releases](docs/releases).
|
||||
@@ -79,7 +79,8 @@ DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. V
|
||||
- droiddeck-ntsync follows the [Linux](https://github.com/torvalds/linux) ntsync semantics in `Documentation/userspace-api/ntsync.rst` (GPL-2.0).
|
||||
- The proot fast path orders bindings like [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later).
|
||||
- DiRT 3 and DiRT Showdown keep their telemetry socket the way RoccoC's DiRTTelemetryErrorFix (MIT) does, based on the fix by Carsten Gottschling.
|
||||
- Games use [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's per render pass memory choice. The Steam client keeps `TU_DEBUG=sysmem`.
|
||||
- Zink on PowerVR keeps colour textures in colour with Icenowy Zheng's upstream [Mesa](https://gitlab.freedesktop.org/mesa/mesa) fix d55418dae7 (MIT), carried as a runtime patch.
|
||||
- Games and AppImage, Flatpak and Snap programs such as emulators use [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's per render pass memory choice. The Steam client and Chromium-based apps keep `TU_DEBUG=sysmem`.
|
||||
- Black Ops III and Dark Souls Remastered start without [umu-protonfixes](https://github.com/Open-Wine-Components/umu-protonfixes) (BSD-2-Clause), whose `311210.py` and `570940.py` fail under ARM64 Proton.
|
||||
- [ReSkate](https://github.com/Dingo-Shenanigans/ReSkate) (GPL-3.0) by Dingo Shenanigans uses the launch option from its README and D3D12 feature level 12_1.
|
||||
- The arm64 client's sign in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest).
|
||||
|
||||
+2
-2
@@ -131,8 +131,8 @@ android {
|
||||
applicationId "com.droiddeck.launcher"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 18
|
||||
versionName "0.7.0"
|
||||
versionCode 19
|
||||
versionName "0.7.1"
|
||||
buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\""
|
||||
buildConfigField "String", "SOURCE_COMMIT", "\"${sourceCommit}\""
|
||||
buildConfigField "int", "PR_NUMBER", "${prNumber}"
|
||||
|
||||
@@ -91,14 +91,6 @@
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accessibilityservice" android:resource="@xml/home_button_service" />
|
||||
</service>
|
||||
<service android:name=".session.BottomNotificationListener"
|
||||
android:label="@string/bottom_notifications_listener"
|
||||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.service.notification.NotificationListenerService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<receiver android:name=".core.ShortcutsListingReceiver" android:exported="false"
|
||||
android:process=":shortcuts_sync">
|
||||
<intent-filter>
|
||||
@@ -352,6 +344,14 @@
|
||||
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
|
||||
</intent-filter>
|
||||
</provider>
|
||||
<receiver
|
||||
android:name=".agent.AgentCallReceiver"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.DUMP">
|
||||
<intent-filter>
|
||||
<action android:name="${applicationId}.AGENT_CALL" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<provider
|
||||
android:name=".agent.AgentBridgeProvider"
|
||||
android:authorities="${applicationId}.agent"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <linux/uinput.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
@@ -208,23 +209,33 @@ struct FakeConfig {
|
||||
bool uinput_enabled;
|
||||
};
|
||||
|
||||
// The first allocation here can start the host program's own allocator, which may call a hooked
|
||||
// function (mimalloc probes NUMA nodes with access()) and land back in config(). A guarded static
|
||||
// would throw a recursive-init error there, so the fields are filled without allocating, and a
|
||||
// reentry on the initializing thread gets them while other threads wait for the fork handlers.
|
||||
static FakeConfig &config() {
|
||||
static FakeConfig *cfg = [] {
|
||||
auto *c = new FakeConfig();
|
||||
const char *dir = getenv("FAKE_EVDEV_DIR");
|
||||
c->hook_dir = dir ? dir : "/data/data/com.termux/files/home/fake-input";
|
||||
c->udev_data_dir = getenv("FAKE_UDEV_DATA_DIR");
|
||||
c->vibration_enabled =
|
||||
getenv("FAKE_EVDEV_VIBRATION") && atoi(getenv("FAKE_EVDEV_VIBRATION"));
|
||||
const char *identity = getenv("FAKE_EVDEV_IDENTITY");
|
||||
c->xbox360_identity = identity && !strcmp(identity, "xbox360");
|
||||
c->uinput_enabled = getenv("FAKE_EVDEV_UINPUT") && atoi(getenv("FAKE_EVDEV_UINPUT"));
|
||||
pthread_atfork(controller_fork_prepare, controller_fork_parent,
|
||||
controller_fork_child);
|
||||
Logger::init();
|
||||
return c;
|
||||
}();
|
||||
return *cfg;
|
||||
static FakeConfig cfg;
|
||||
static std::atomic<int> state{0};
|
||||
static __thread bool initializing __attribute__((tls_model("initial-exec")));
|
||||
if (state.load(std::memory_order_acquire) == 2 || initializing) return cfg;
|
||||
int expected = 0;
|
||||
if (!state.compare_exchange_strong(expected, 1, std::memory_order_acq_rel)) {
|
||||
while (state.load(std::memory_order_acquire) != 2) sched_yield();
|
||||
return cfg;
|
||||
}
|
||||
initializing = true;
|
||||
const char *dir = getenv("FAKE_EVDEV_DIR");
|
||||
cfg.hook_dir = dir ? dir : "/data/data/com.termux/files/home/fake-input";
|
||||
cfg.udev_data_dir = getenv("FAKE_UDEV_DATA_DIR");
|
||||
cfg.vibration_enabled = getenv("FAKE_EVDEV_VIBRATION") && atoi(getenv("FAKE_EVDEV_VIBRATION"));
|
||||
const char *identity = getenv("FAKE_EVDEV_IDENTITY");
|
||||
cfg.xbox360_identity = identity && !strcmp(identity, "xbox360");
|
||||
cfg.uinput_enabled = getenv("FAKE_EVDEV_UINPUT") && atoi(getenv("FAKE_EVDEV_UINPUT"));
|
||||
pthread_atfork(controller_fork_prepare, controller_fork_parent, controller_fork_child);
|
||||
Logger::init();
|
||||
state.store(2, std::memory_order_release);
|
||||
initializing = false;
|
||||
return cfg;
|
||||
}
|
||||
|
||||
static std::recursive_mutex &controller_mutex() {
|
||||
|
||||
@@ -213,7 +213,7 @@ static struct {
|
||||
} g_map;
|
||||
static pthread_mutex_t g_game_picture_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static float g_game_picture_rect[4];
|
||||
static int g_game_picture_top;
|
||||
static int g_game_picture_placed;
|
||||
|
||||
static int64_t g_swap_retry_at_ns;
|
||||
static int g_swap_fail_logged;
|
||||
@@ -362,7 +362,7 @@ int vkp_completion_unknown(void) { return g_dev_state == -3; }
|
||||
|
||||
void vk_present_set_scale_mode(int mode, int alignment) {
|
||||
if (mode < VKP_MODE_OFF || mode > VKP_MODE_INTEGER) mode = VKP_MODE_FIT;
|
||||
if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_PICTURE_BOTTOM) alignment = VKP_ALIGN_CENTER;
|
||||
if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_PICTURE_RIGHT) alignment = VKP_ALIGN_CENTER;
|
||||
g_mode = mode;
|
||||
g_align = alignment;
|
||||
}
|
||||
@@ -383,6 +383,8 @@ static const char *align_name(int a) {
|
||||
case VKP_ALIGN_BOTTOM: return "bottom";
|
||||
case VKP_ALIGN_PICTURE_TOP: return "picture top";
|
||||
case VKP_ALIGN_PICTURE_BOTTOM: return "picture bottom";
|
||||
case VKP_ALIGN_PICTURE_LEFT: return "picture left";
|
||||
case VKP_ALIGN_PICTURE_RIGHT: return "picture right";
|
||||
default: return "center";
|
||||
}
|
||||
}
|
||||
@@ -420,9 +422,11 @@ static void update_map(int scene_w, int scene_h) {
|
||||
}
|
||||
if (align == VKP_ALIGN_PICTURE_TOP) g_map.off_y = 0;
|
||||
else if (align == VKP_ALIGN_PICTURE_BOTTOM) g_map.off_y = H - scene_h * g_map.ky;
|
||||
else if (align == VKP_ALIGN_PICTURE_LEFT) g_map.off_x = 0;
|
||||
else if (align == VKP_ALIGN_PICTURE_RIGHT) g_map.off_x = W - scene_w * g_map.kx;
|
||||
g_map.valid = 1;
|
||||
pthread_mutex_lock(&g_game_picture_lock);
|
||||
g_game_picture_top = align == VKP_ALIGN_PICTURE_TOP || align == VKP_ALIGN_PICTURE_BOTTOM;
|
||||
g_game_picture_placed = align == VKP_ALIGN_PICTURE_TOP || align == VKP_ALIGN_PICTURE_BOTTOM || align == VKP_ALIGN_PICTURE_LEFT || align == VKP_ALIGN_PICTURE_RIGHT;
|
||||
g_game_picture_rect[0] = g_map.off_x;
|
||||
g_game_picture_rect[1] = g_map.off_y;
|
||||
g_game_picture_rect[2] = g_map.off_x + scene_w * g_map.kx;
|
||||
@@ -436,7 +440,7 @@ static void update_map(int scene_w, int scene_h) {
|
||||
|
||||
int vkp_game_picture_rect(float rect[4]) {
|
||||
pthread_mutex_lock(&g_game_picture_lock);
|
||||
int active = g_game_picture_top;
|
||||
int active = g_game_picture_placed;
|
||||
if (active) memcpy(rect, g_game_picture_rect, sizeof(g_game_picture_rect));
|
||||
pthread_mutex_unlock(&g_game_picture_lock);
|
||||
return active;
|
||||
|
||||
@@ -15,7 +15,9 @@ int vkp_quest_layer_presentation(void);
|
||||
|
||||
enum vkp_scale_mode { VKP_MODE_OFF = 0, VKP_MODE_FIT = 1, VKP_MODE_STRETCH = 2, VKP_MODE_FILL = 3,
|
||||
VKP_MODE_INTEGER = 4 };
|
||||
enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2, VKP_ALIGN_PICTURE_TOP = 3, VKP_ALIGN_PICTURE_BOTTOM = 4 };
|
||||
enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2,
|
||||
VKP_ALIGN_PICTURE_TOP = 3, VKP_ALIGN_PICTURE_BOTTOM = 4,
|
||||
VKP_ALIGN_PICTURE_LEFT = 5, VKP_ALIGN_PICTURE_RIGHT = 6 };
|
||||
void vk_present_set_scale_mode(int mode, int alignment);
|
||||
int vkp_game_picture_rect(float rect[4]);
|
||||
int vkp_output_to_scene(double ox, double oy, double *sx, double *sy);
|
||||
|
||||
@@ -121,6 +121,7 @@ import com.droiddeck.launcher.session.SessionArtifacts
|
||||
import com.droiddeck.launcher.session.SessionLogShare
|
||||
import com.droiddeck.launcher.session.SessionPhase
|
||||
import com.droiddeck.launcher.session.SessionPaths
|
||||
import com.droiddeck.launcher.session.SessionLoadingDecision
|
||||
import com.droiddeck.launcher.wayland.HdrSupport
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
@@ -172,6 +173,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val alignment = if (!active) ALIGN_CENTER else when (picturePosition) {
|
||||
"top" -> ALIGN_PICTURE_TOP
|
||||
"bottom" -> ALIGN_PICTURE_BOTTOM
|
||||
"left" -> ALIGN_PICTURE_LEFT
|
||||
"right" -> ALIGN_PICTURE_RIGHT
|
||||
else -> ALIGN_CENTER
|
||||
}
|
||||
WaylandCompositor.nativeSetScaleMode(SCALE_FIT, alignment)
|
||||
@@ -286,6 +289,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private var directHoldBehavior by mutableStateOf(com.droiddeck.launcher.input.TouchGestureConfig.MOUSE_BEHAVIOR_CLICK)
|
||||
private var relativeMouseMode by mutableIntStateOf(0)
|
||||
@Volatile private var appliedRelativeMouseMode: Int? = null
|
||||
private val agentReadyListener: () -> Unit = { relativeMouseRetries = 0; requestRelativeMouse() }
|
||||
private val appTextFocus get() = wowChat.request != null
|
||||
private val wowChat by lazy { com.droiddeck.launcher.ui.WowChat(this, ::sendWowChat, ::cancelWowChat, ::readGameField) }
|
||||
private var wowChatBottom: SecondScreenPresentation? = null
|
||||
@@ -636,6 +640,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
padBridge?.syncConnectedControllers()
|
||||
refreshControls()
|
||||
updatePointerCapture()
|
||||
requestRelativeMouse()
|
||||
updateHandCamera()
|
||||
refreshSecondScreenDisplays()
|
||||
}
|
||||
@@ -651,12 +656,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
if (::padMouse.isInitialized) padMouse.reset()
|
||||
refreshControls()
|
||||
updatePointerCapture()
|
||||
requestRelativeMouse()
|
||||
updateHandCamera()
|
||||
refreshSecondScreenDisplays()
|
||||
}
|
||||
override fun onInputDeviceChanged(deviceId: Int) {
|
||||
joyConVr?.refresh()
|
||||
refreshControls()
|
||||
requestRelativeMouse()
|
||||
refreshSecondScreenDisplays()
|
||||
}
|
||||
}
|
||||
@@ -665,6 +672,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
AgentGuest.readyListener = agentReadyListener
|
||||
if (com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isRemoving() ||
|
||||
com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isMaintaining()) {
|
||||
runtimeRemovalBlocked = true
|
||||
@@ -1960,6 +1968,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val nextRoutedTouchMode = effectiveTouchMode()
|
||||
if (routedTouchMode != nextRoutedTouchMode) gestureTouchStreamGate.reset()
|
||||
routedTouchMode = nextRoutedTouchMode
|
||||
requestRelativeMouse()
|
||||
frameGen = FrameGen.mode(this)
|
||||
fexPreset = SessionPrefs.fexPreset(this)
|
||||
suspendPolicy = SessionPrefs.suspendPolicy(this, SessionState.mode)
|
||||
@@ -2429,6 +2438,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private fun watchSession() {
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
var ticks = 0
|
||||
val loadingStartedAt = SystemClock.elapsedRealtime()
|
||||
val poll = object : Runnable {
|
||||
override fun run() {
|
||||
if (!watching) return
|
||||
@@ -2441,6 +2451,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
if (loading.visible && !loading.ended && !SessionState.running && !installingRuntime &&
|
||||
SessionLoadingDecision.shouldReturnToLauncher(
|
||||
loadingStartedAt, SystemClock.elapsedRealtime(), SessionState.running, SessionState.phase)) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
if (loading.visible && !loading.ended) {
|
||||
if (!installingRuntime) loading.update(this@SessionActivity, SessionState.logFile)
|
||||
if (ticks++ % 2 == 0) loading.tick()
|
||||
@@ -2465,8 +2481,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val hint = sessionExitHint(status)
|
||||
runOnUiThread {
|
||||
if (isFinishing || isDestroyed) return@runOnUiThread
|
||||
if (status == 0) SessionState.relaunch?.let { next ->
|
||||
SessionState.relaunch = null
|
||||
if (status == 0) SessionState.takeRelaunch()?.let { next ->
|
||||
next.putExtra(EXTRA_RETURN_HOME, intent.getBooleanExtra(EXTRA_RETURN_HOME, false))
|
||||
next.putExtra(EXTRA_LINK_TASK, intent.getIntExtra(EXTRA_LINK_TASK, -1))
|
||||
setIntent(next)
|
||||
@@ -2981,7 +2996,15 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
private fun applyRelativeMouse() {
|
||||
val mode = desiredRelativeMouseMode
|
||||
val wanted = desiredRelativeMouseMode
|
||||
val touchpadRoute = com.droiddeck.launcher.input.TouchRouter.decide(com.droiddeck.launcher.input.TouchRouter.Snapshot(
|
||||
uiBlocking = false,
|
||||
mode = routedTouchMode,
|
||||
scrollLayer = false,
|
||||
steamSession = SessionState.mode == SessionService.MODE_STEAM,
|
||||
steamDesktopUi = SessionState.steamUi == "desktop",
|
||||
)) == com.droiddeck.launcher.input.TouchRouter.Route.TOUCHPAD
|
||||
val mode = com.droiddeck.launcher.input.TouchGestureConfig.gamescopeRelativeMouse(wanted, mouseAttached(), touchpadRoute)
|
||||
if (appliedRelativeMouseMode == mode) return
|
||||
val request = org.json.JSONObject()
|
||||
.put("kind", "exec")
|
||||
@@ -2997,7 +3020,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
Log.w(TAG, "gamescope did not take relative mouse $mode: ${result.exceptionOrNull() ?: answer}")
|
||||
if (relativeMouseRetries++ < RELATIVE_MOUSE_MAX_RETRIES) uiHandler.postDelayed({ requestRelativeMouse() }, 2_000)
|
||||
}
|
||||
if (desiredRelativeMouseMode != mode) requestRelativeMouse()
|
||||
if (desiredRelativeMouseMode != wanted) requestRelativeMouse()
|
||||
}
|
||||
|
||||
private fun refreshGestureConfig() {
|
||||
@@ -3192,12 +3215,17 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
cursorVisible = false
|
||||
return
|
||||
}
|
||||
val rect = drawnRect() ?: return
|
||||
val rect = if (glassesOutputActive) pointerSurfaceRect() else drawnRect()
|
||||
val pointerRect = rect ?: return
|
||||
val position = cursorPos
|
||||
val x = if (position.x >= 0f) position.x.coerceIn(rect.left, rect.right) else rect.centerX()
|
||||
val y = if (position.y >= 0f) position.y.coerceIn(rect.top, rect.bottom) else rect.centerY()
|
||||
val x = if (position.x >= 0f) position.x.coerceIn(pointerRect.left, pointerRect.right) else pointerRect.centerX()
|
||||
val y = if (position.y >= 0f) position.y.coerceIn(pointerRect.top, pointerRect.bottom) else pointerRect.centerY()
|
||||
val out = SessionState.outputSize
|
||||
movePointer(x + dx * rect.width() / out.first, y + dy * rect.height() / out.second)
|
||||
val nextX = (x + dx * pointerRect.width() / out.first)
|
||||
.coerceIn(pointerRect.left, pointerRect.right)
|
||||
val nextY = (y + dy * pointerRect.height() / out.second)
|
||||
.coerceIn(pointerRect.top, pointerRect.bottom)
|
||||
movePointer(nextX, nextY)
|
||||
// Make frame-callback updates visible to drawing before this frame's traversal.
|
||||
androidx.compose.runtime.snapshots.Snapshot.sendApplyNotifications()
|
||||
}
|
||||
@@ -3445,50 +3473,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private fun bottomPages(): List<BottomPage> = sessionBottomPages(BottomPageActions(
|
||||
takeScreenshot = ::captureScreenshot,
|
||||
fps = { if (::hud.isInitialized) hud.liveFps else null },
|
||||
openSettings = ::openSettingsBelow,
|
||||
runningGame = { gestureGame },
|
||||
))
|
||||
|
||||
private fun openSettingsBelow(intent: android.content.Intent, done: () -> Boolean) {
|
||||
val presentation = secondScreenPresentation
|
||||
if (presentation == null) {
|
||||
if (!bottomOutputActive) return
|
||||
listOf(intent, android.content.Intent(android.provider.Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS)).any {
|
||||
runCatching { startActivity(android.content.Intent(it)) }
|
||||
.onFailure { e -> Log.w(TAG, "could not open ${it.action}", e) }
|
||||
.isSuccess
|
||||
}
|
||||
return
|
||||
}
|
||||
val options = android.app.ActivityOptions.makeBasic().setLaunchDisplayId(presentation.display.displayId)
|
||||
val opened = listOf(intent, android.content.Intent(android.provider.Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS)).any {
|
||||
runCatching { startActivity(android.content.Intent(it).addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK), options.toBundle()) }
|
||||
.onFailure { e -> Log.w(TAG, "could not open ${it.action} on display ${presentation.display.displayId}", e) }
|
||||
.isSuccess
|
||||
}
|
||||
if (!opened) return
|
||||
presentation.hide()
|
||||
var checks = 0
|
||||
fun showAgain() {
|
||||
try {
|
||||
presentation.show()
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "could not show the dashboard again", e)
|
||||
if (secondScreenPresentation === presentation) closeSecondScreen(reset = true)
|
||||
}
|
||||
}
|
||||
uiHandler.postDelayed(object : Runnable {
|
||||
override fun run() {
|
||||
if (secondScreenPresentation !== presentation || presentation.isShowing) return
|
||||
if (done()) {
|
||||
showAgain()
|
||||
return
|
||||
}
|
||||
if (++checks < SETTINGS_WATCH_CHECKS) uiHandler.postDelayed(this, SETTINGS_WATCH_MS) else showAgain()
|
||||
}
|
||||
}, SETTINGS_WATCH_MS)
|
||||
}
|
||||
|
||||
private fun captureScreenshot(onDone: (Boolean) -> Unit) {
|
||||
val source = if (glassesOutputActive) glassesScreen?.surfaceView else if (bottomOutputActive) bottomGame?.surfaceView
|
||||
else if (::surfaceView.isInitialized) surfaceView else null
|
||||
@@ -3609,7 +3596,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val width = sessionRoot.width
|
||||
val height = sessionRoot.height
|
||||
val wanted = controlsBelowWanted()
|
||||
val gameHeight = if (wanted) com.droiddeck.launcher.session.SessionDisplay.unfoldedGameHeight(width, height)
|
||||
val tabRow = unfoldedColumn?.getChildAt(0)?.height?.let {
|
||||
it - (com.droiddeck.launcher.ui.BAR_HEIGHT.value * resources.displayMetrics.density + 0.5f).toInt()
|
||||
} ?: 0
|
||||
val gameHeight = if (wanted) com.droiddeck.launcher.session.SessionDisplay.unfoldedGameHeight(width, height, tabRow)
|
||||
else FrameLayout.LayoutParams.MATCH_PARENT
|
||||
val params = surfaceView.layoutParams as FrameLayout.LayoutParams
|
||||
if (params.height != gameHeight) {
|
||||
@@ -3635,8 +3625,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
panel = OnScreenControls(this, padBridge, dock).also { it.updateLayout(primaryInputLayout) }
|
||||
val column = android.widget.LinearLayout(this).apply {
|
||||
orientation = android.widget.LinearLayout.VERTICAL
|
||||
addView(unfoldedBar(), android.widget.LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
(com.droiddeck.launcher.ui.BAR_HEIGHT.value * resources.displayMetrics.density + 0.5f).toInt()))
|
||||
addView(unfoldedBar().apply {
|
||||
addOnLayoutChangeListener { _, _, top, _, bottom, _, oldTop, _, oldBottom ->
|
||||
if (bottom - top != oldBottom - oldTop) post { applyUnfoldedControls() }
|
||||
}
|
||||
}, android.widget.LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
android.widget.LinearLayout.LayoutParams.WRAP_CONTENT))
|
||||
addView(panel, android.widget.LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, 0, 1f))
|
||||
}
|
||||
sessionRoot.addView(column, sessionRoot.indexOfChild(surfaceView) + 1)
|
||||
@@ -3847,6 +3841,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
if (next == SessionPrefs.TOUCH_OFF) cursorVisible = false
|
||||
gestureTouchStreamGate.reset()
|
||||
routedTouchMode = next
|
||||
requestRelativeMouse()
|
||||
if (directTouchCursorHidden()) cursorVisible = false
|
||||
}
|
||||
|
||||
@@ -3939,8 +3934,29 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val width = outputView().width.takeIf { it > 0 } ?: return null
|
||||
val height = outputView().height.takeIf { it > 0 } ?: return null
|
||||
topPictureMapped = CompositorHost.isStarted && WaylandCompositor.nativeGamePictureRect(gamePictureBounds)
|
||||
if (topPictureMapped) return android.graphics.RectF(
|
||||
gamePictureBounds[0], gamePictureBounds[1], gamePictureBounds[2], gamePictureBounds[3])
|
||||
if (topPictureMapped) {
|
||||
val rect = android.graphics.RectF(
|
||||
gamePictureBounds[0], gamePictureBounds[1],
|
||||
gamePictureBounds[2], gamePictureBounds[3]
|
||||
)
|
||||
|
||||
if (glassesOutputActive) {
|
||||
val mode = glassesScreen?.display?.mode ?: return null
|
||||
val outputWidth = mode.physicalWidth.takeIf { it > 0 } ?: return null
|
||||
val outputHeight = mode.physicalHeight.takeIf { it > 0 } ?: return null
|
||||
val scaleX = width.toFloat() / outputWidth
|
||||
val scaleY = height.toFloat() / outputHeight
|
||||
|
||||
return android.graphics.RectF(
|
||||
rect.left * scaleX,
|
||||
rect.top * scaleY,
|
||||
rect.right * scaleX,
|
||||
rect.bottom * scaleY
|
||||
)
|
||||
}
|
||||
|
||||
return rect
|
||||
}
|
||||
val out = SessionState.outputSize
|
||||
val scale = minOf(width / out.first.toFloat(), height / out.second.toFloat())
|
||||
val drawnW = out.first * scale
|
||||
@@ -5353,6 +5369,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
if (AgentGuest.readyListener === agentReadyListener) AgentGuest.readyListener = null
|
||||
com.droiddeck.launcher.input.HomeButtonShortcuts.detach(this)
|
||||
relativeMouseRequests.shutdownNow()
|
||||
backQamInput.cancel()
|
||||
@@ -5463,8 +5480,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private const val TEXT_FIELD_TAP_MS = 1_000L
|
||||
private const val PAUSED_FRAME_MAX_EDGE = 1920f
|
||||
private const val PAUSED_FRAME_REDRAW_MS = 150L
|
||||
private const val SETTINGS_WATCH_MS = 1_000L
|
||||
private const val SETTINGS_WATCH_CHECKS = 600
|
||||
private const val BOTTOM_RECOVERY_MS = 1_000L
|
||||
private const val BOTTOM_RECOVERY_TRIES = 3
|
||||
private const val TAG = "SessionActivity"
|
||||
@@ -5506,6 +5521,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private const val ALIGN_CENTER = 0
|
||||
private const val ALIGN_PICTURE_TOP = 3
|
||||
private const val ALIGN_PICTURE_BOTTOM = 4
|
||||
private const val ALIGN_PICTURE_LEFT = 5
|
||||
private const val ALIGN_PICTURE_RIGHT = 6
|
||||
private val RUNTIME_LINES = PackageLines(
|
||||
R.string.session_runtime_downloading, R.string.session_runtime_downloading_mb,
|
||||
R.string.session_runtime_checking, R.string.session_runtime_unpacking,
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.droiddeck.launcher.agent
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* The agent bridge for devices whose shell has no `content` command: the same calls as
|
||||
* [AgentBridgeProvider], answered in a file under the app's external files folder.
|
||||
*/
|
||||
class AgentCallReceiver : BroadcastReceiver() {
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val method = intent.getStringExtra("method") ?: return
|
||||
val id = intent.getStringExtra("id")?.takeIf { it.matches(Regex("[A-Za-z0-9_-]{1,64}")) } ?: return
|
||||
val arg = intent.getStringExtra("arg")
|
||||
val request = intent.getStringExtra(AgentBridgeProvider.EXTRA_REQUEST)
|
||||
val pending = goAsync()
|
||||
Thread({
|
||||
val json = try {
|
||||
val extras = Bundle().apply { putString(AgentBridgeProvider.EXTRA_REQUEST, request) }
|
||||
context.contentResolver.call("${context.packageName}.agent", method, arg, extras)
|
||||
?.getString(AgentBridgeProvider.RESULT_JSON) ?: """{"ok":false,"error":{"code":"NO_RESPONSE","message":"no response"}}"""
|
||||
} catch (e: Exception) {
|
||||
org.json.JSONObject().put("ok", false)
|
||||
.put("error", org.json.JSONObject().put("code", "COMMAND_FAILED").put("message", e.message ?: e.javaClass.simpleName)).toString()
|
||||
}
|
||||
try {
|
||||
val dir = File(context.getExternalFilesDir(null), "agent-calls").apply { mkdirs() }
|
||||
File(dir, "$id.json.part").writeText(json)
|
||||
File(dir, "$id.json.part").renameTo(File(dir, "$id.json"))
|
||||
} catch (e: Exception) {
|
||||
android.util.Log.w("AgentCallReceiver", "could not write the answer to $method: ${e.message}")
|
||||
} finally {
|
||||
pending.finish()
|
||||
}
|
||||
}, "agent-call-$id").start()
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ object AgentGuest {
|
||||
var keyboardDismissals by mutableIntStateOf(0)
|
||||
private set
|
||||
@Volatile private var keyboardRoute = false
|
||||
@Volatile var readyListener: (() -> Unit)? = null
|
||||
@Volatile private var routeDir: File? = null
|
||||
private const val TAG = "AgentGuest"
|
||||
private const val POLL_MS = 50L
|
||||
@@ -59,6 +60,7 @@ object AgentGuest {
|
||||
when (path) {
|
||||
"hello.json" -> readJson(File(dir, path))?.let {
|
||||
SessionEvents.record("agent.ready", mapOf("pid" to it.optInt("pid"), "focus" to it.optBoolean("focus")))
|
||||
readyListener?.invoke()
|
||||
}
|
||||
"focus.json" -> readJson(File(dir, path))?.let(::recordFocus)
|
||||
"keyboard.json" -> readJson(File(dir, path))?.let { recordKeyboard(this, it) }
|
||||
|
||||
@@ -191,6 +191,7 @@ public final class SystemVulkanDriver {
|
||||
|
||||
/** Collect abandoned stages, and obsolete versions once older guests can no longer load them. */
|
||||
public static synchronized void pruneUnused(Context context, boolean guestsStopped) throws IOException {
|
||||
if (!AddonPack.POWERVR.installed(context)) return;
|
||||
pruneUnused(runtimeDirectory(context), guestsStopped);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import kotlin.math.roundToInt
|
||||
internal class FrameStats {
|
||||
private val graph = FloatArray(GRAPH_FRAMES)
|
||||
private var graphHead = 0
|
||||
private var graphFrames = 0L
|
||||
private var lastPresentNs = 0L
|
||||
private var lastFpsUpdateNs = 0L
|
||||
private var framesSinceUpdate = 0
|
||||
@@ -38,6 +39,7 @@ internal class FrameStats {
|
||||
if (lastPresentNs != 0L) {
|
||||
graph[graphHead] = frametimeNs / 1e6f
|
||||
graphHead = (graphHead + 1) % GRAPH_FRAMES
|
||||
graphFrames++
|
||||
}
|
||||
val elapsed = timeNs - lastFpsUpdateNs
|
||||
if (elapsed >= FPS_PERIOD_NS) {
|
||||
@@ -68,6 +70,7 @@ internal class FrameStats {
|
||||
fun reset() {
|
||||
graph.fill(0f)
|
||||
graphHead = 0
|
||||
graphFrames = 0L
|
||||
lastPresentNs = 0L
|
||||
lastFpsUpdateNs = 0L
|
||||
framesSinceUpdate = 0
|
||||
@@ -86,8 +89,9 @@ internal class FrameStats {
|
||||
fun frametimeMs(): Float = 1000f / maxOf(fps, 1f)
|
||||
|
||||
@Synchronized
|
||||
fun graph(out: FloatArray) {
|
||||
fun graph(out: FloatArray): Long {
|
||||
for (i in 0 until GRAPH_FRAMES) out[i] = graph[(graphHead + i) % GRAPH_FRAMES]
|
||||
return graphFrames
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
@@ -213,6 +213,9 @@ data class TouchGestureConfig(
|
||||
return if (value == MOUSE_BEHAVIOR_CLICK) MOUSE_BEHAVIOR_CLICK else MOUSE_BEHAVIOR_HOLD
|
||||
}
|
||||
|
||||
fun gamescopeRelativeMouse(mode: Int, mouseAttached: Boolean, touchpad: Boolean): Int =
|
||||
if (mode == RELATIVE_MOUSE_AUTO && !mouseAttached && !touchpad) RELATIVE_MOUSE_OFF else mode
|
||||
|
||||
private fun normalizeRelativeMouseMode(mode: Int): Int {
|
||||
return if (mode in RELATIVE_MOUSE_AUTO..RELATIVE_MOUSE_OFF) mode else RELATIVE_MOUSE_AUTO
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.app.Notification
|
||||
import android.content.Context
|
||||
import android.service.notification.NotificationListenerService
|
||||
import android.service.notification.StatusBarNotification
|
||||
import androidx.compose.runtime.mutableStateListOf
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
|
||||
data class BottomNotification(val key: String, val app: String, val title: String, val text: String, val postedAt: Long)
|
||||
|
||||
object BottomNotifications {
|
||||
val items = mutableStateListOf<BottomNotification>()
|
||||
|
||||
fun granted(context: Context): Boolean =
|
||||
context.packageName in NotificationManagerCompat.getEnabledListenerPackages(context)
|
||||
|
||||
internal fun keep(own: String, pkg: String, ongoing: Boolean, groupSummary: Boolean, title: String, text: String): Boolean =
|
||||
pkg != own && !ongoing && !groupSummary && (title.isNotBlank() || text.isNotBlank())
|
||||
|
||||
internal fun add(list: MutableList<BottomNotification>, item: BottomNotification) {
|
||||
list.removeAll { it.key == item.key }
|
||||
list.add(0, item)
|
||||
while (list.size > MAX_ITEMS) list.removeAt(list.lastIndex)
|
||||
}
|
||||
|
||||
fun clear() = items.clear()
|
||||
|
||||
internal fun post(context: Context, sbn: StatusBarNotification) {
|
||||
val n = sbn.notification ?: return
|
||||
val extras = n.extras
|
||||
val title = extras?.getCharSequence(Notification.EXTRA_TITLE)?.toString().orEmpty()
|
||||
val text = (extras?.getCharSequence(Notification.EXTRA_BIG_TEXT) ?: extras?.getCharSequence(Notification.EXTRA_TEXT))?.toString().orEmpty()
|
||||
if (!keep(context.packageName, sbn.packageName, sbn.isOngoing, (n.flags and Notification.FLAG_GROUP_SUMMARY) != 0, title, text)) return
|
||||
val app = runCatching {
|
||||
val pm = context.packageManager
|
||||
pm.getApplicationLabel(pm.getApplicationInfo(sbn.packageName, 0)).toString()
|
||||
}.getOrDefault(sbn.packageName)
|
||||
add(items, BottomNotification(sbn.key, app, title, text, sbn.postTime))
|
||||
}
|
||||
|
||||
internal fun remove(key: String) {
|
||||
items.removeAll { it.key == key }
|
||||
}
|
||||
|
||||
private const val MAX_ITEMS = 30
|
||||
}
|
||||
|
||||
class BottomNotificationListener : NotificationListenerService() {
|
||||
override fun onListenerConnected() {
|
||||
BottomNotifications.clear()
|
||||
runCatching { activeNotifications }.getOrNull()?.sortedBy { it.postTime }?.forEach { BottomNotifications.post(this, it) }
|
||||
}
|
||||
|
||||
override fun onNotificationPosted(sbn: StatusBarNotification) = BottomNotifications.post(this, sbn)
|
||||
|
||||
override fun onNotificationRemoved(sbn: StatusBarNotification) = BottomNotifications.remove(sbn.key)
|
||||
|
||||
override fun onListenerDisconnected() = BottomNotifications.clear()
|
||||
}
|
||||
@@ -48,11 +48,19 @@ object ProtonExtras {
|
||||
|
||||
internal fun installedIn(dir: File, tool: Tool): List<String> =
|
||||
dir.listFiles()
|
||||
?.filter { it.isDirectory && it.name.startsWith(tool.prefix) && File(it, "toolmanifest.vdf").isFile }
|
||||
?.filter { it.isDirectory && it.name.startsWith(tool.prefix) && usable(it) }
|
||||
?.map { it.name }
|
||||
?.sortedWith { a, b -> compareVersions(a, b) }
|
||||
?: emptyList()
|
||||
|
||||
private fun usable(dir: File): Boolean {
|
||||
val manifest = runCatching { File(dir, "toolmanifest.vdf").readText() }.getOrNull() ?: return false
|
||||
val command = Regex("\\\"commandline\\\"\\s+\\\"/?([^\\\" ]+)").find(manifest)?.groupValues?.getOrNull(1) ?: return false
|
||||
val compat = runCatching { File(dir, "compatibilitytool.vdf").readText() }.getOrNull() ?: return false
|
||||
return Regex("\\\"from_oslist\\\"\\s+\\\"[^\\\"]*windows", RegexOption.IGNORE_CASE).containsMatchIn(compat) &&
|
||||
File(dir, command).isFile && File(dir, command).canExecute()
|
||||
}
|
||||
|
||||
private val ARCH = Regex("(?i)aarch64|arm64|x86_64|x86-64|amd64")
|
||||
private val NUMBER = Regex("\\d+")
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ object SessionDisplay {
|
||||
|
||||
const val UNFOLDED_MIN_DP = 600
|
||||
|
||||
fun unfoldedGameHeight(width: Int, height: Int): Int =
|
||||
minOf(width * 9 / 16, (height * UNFOLDED_MAX_GAME_SHARE).toInt()) and 1.inv()
|
||||
fun unfoldedGameHeight(width: Int, height: Int, tabRow: Int = 0): Int =
|
||||
(minOf(width * 9 / 16, (height * UNFOLDED_MAX_GAME_SHARE).toInt()) - tabRow.coerceAtLeast(0)).coerceAtLeast(0) and 1.inv()
|
||||
|
||||
fun unfoldedControlsWanted(
|
||||
enabled: Boolean,
|
||||
|
||||
@@ -14,6 +14,7 @@ object SessionEvents {
|
||||
SessionPaths.take()
|
||||
val dir = SessionPaths.beginOrCurrent(context, label ?: SessionPaths.label(mode, null))
|
||||
synchronized(SessionState) {
|
||||
SessionState.clearRelaunch()
|
||||
SessionState.phase = SessionPhase.PREPARING
|
||||
SessionState.mode = mode
|
||||
SessionState.sessionId = dir.name
|
||||
|
||||
@@ -40,8 +40,10 @@ object SessionFiles {
|
||||
WinComponents.publish(context)
|
||||
val files = arrayOf(
|
||||
"usr/local/bin/droiddeck-game-env" to "usr/local/bin/droiddeck-game-env",
|
||||
"usr/local/bin/droiddeck-game-gpu" to "usr/local/bin/droiddeck-game-gpu",
|
||||
"usr/local/bin/droiddeck-diagnostic-inventory" to "usr/local/bin/droiddeck-diagnostic-inventory",
|
||||
"usr/local/bin/droiddeck-wincomponents" to "usr/local/bin/droiddeck-wincomponents",
|
||||
"usr/local/bin/droiddeck-wine-pe" to "usr/local/bin/droiddeck-wine-pe",
|
||||
"usr/local/bin/droiddeck-msi-install" to "usr/local/bin/droiddeck-msi-install",
|
||||
"usr/local/bin/droiddeck-esync" to "usr/local/bin/droiddeck-esync",
|
||||
"usr/local/bin/droiddeck-steam-compat" to "usr/local/bin/droiddeck-steam-compat",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
internal object SessionLoadingDecision {
|
||||
const val TIMEOUT_MS = 10_000L
|
||||
|
||||
fun shouldReturnToLauncher(startedAt: Long, now: Long, running: Boolean, phase: SessionPhase): Boolean =
|
||||
!running && phase in setOf(SessionPhase.IDLE, SessionPhase.FAILED) && now - startedAt >= TIMEOUT_MS
|
||||
}
|
||||
@@ -558,11 +558,11 @@ object SessionPrefs {
|
||||
|
||||
fun picturePosition(context: Context): String =
|
||||
prefs(context).getString("picturePosition", "center")
|
||||
?.takeIf { it in listOf("top", "bottom", "center") } ?: "center"
|
||||
?.takeIf { it in listOf("top", "bottom", "left", "right", "center") } ?: "center"
|
||||
|
||||
fun setPicturePosition(context: Context, position: String) {
|
||||
prefs(context).edit().putString("picturePosition",
|
||||
position.takeIf { it in listOf("top", "bottom", "center") } ?: "center").apply()
|
||||
position.takeIf { it in listOf("top", "bottom", "left", "right", "center") } ?: "center").apply()
|
||||
}
|
||||
|
||||
fun returnAfterGame(context: Context): Boolean = prefs(context).getBoolean("returnAfterGame", true)
|
||||
|
||||
@@ -1697,8 +1697,8 @@ class SessionService : Service() {
|
||||
.putExtra(EXTRA_STEAM_UI, ui)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
if (url.isNotEmpty()) next.putExtra(EXTRA_STEAM_URL, url)
|
||||
SessionState.relaunch = next
|
||||
android.os.Handler(android.os.Looper.getMainLooper()).post { stopSession(0) }
|
||||
SessionState.queueRelaunch(next)
|
||||
android.os.Handler(android.os.Looper.getMainLooper()).post { stopSession(0, relaunch = true) }
|
||||
}
|
||||
}
|
||||
watcher.startWatching()
|
||||
@@ -2013,7 +2013,7 @@ class SessionService : Service() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopSession(status: Int, gen: Int? = null) {
|
||||
private fun stopSession(status: Int, gen: Int? = null, relaunch: Boolean = false) {
|
||||
if (gen != null && gen != sessionGen) {
|
||||
Log.i(TAG, "ignoring a stop from session $gen; session $sessionGen is current")
|
||||
return
|
||||
@@ -2024,6 +2024,7 @@ class SessionService : Service() {
|
||||
cancelQueuedSteamGame()
|
||||
gameExitWatchToken++
|
||||
if (!SessionState.running) return
|
||||
if (relaunch) SessionState.confirmRelaunchStop()
|
||||
SessionEvents.record("guest.exited", mapOf("status" to status))
|
||||
SessionEvents.transition(SessionPhase.STOPPING, "session.stopping", mapOf("status" to status))
|
||||
SessionState.running = false
|
||||
|
||||
@@ -73,7 +73,44 @@ object SessionState {
|
||||
@Volatile
|
||||
var steamClientArch: String? = null
|
||||
var steamVr by mutableStateOf(false)
|
||||
@Volatile
|
||||
var relaunch: android.content.Intent? = null
|
||||
@Volatile
|
||||
private var relaunchSessionId: String? = null
|
||||
@Volatile
|
||||
private var relaunchStopRequested = false
|
||||
|
||||
fun queueRelaunch(intent: android.content.Intent) {
|
||||
synchronized(this) {
|
||||
relaunch = intent
|
||||
relaunchSessionId = sessionId
|
||||
relaunchStopRequested = false
|
||||
}
|
||||
}
|
||||
|
||||
fun confirmRelaunchStop() {
|
||||
synchronized(this) {
|
||||
relaunchStopRequested = relaunch != null && relaunchSessionId == sessionId
|
||||
}
|
||||
}
|
||||
|
||||
fun takeRelaunch(): android.content.Intent? = synchronized(this) {
|
||||
val next = relaunch
|
||||
val valid = relaunchStopRequested && relaunchSessionId == sessionId
|
||||
relaunch = null
|
||||
relaunchSessionId = null
|
||||
relaunchStopRequested = false
|
||||
next.takeIf { valid }
|
||||
}
|
||||
|
||||
fun clearRelaunch() {
|
||||
synchronized(this) {
|
||||
relaunch = null
|
||||
relaunchSessionId = null
|
||||
relaunchStopRequested = false
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic var hdr = false
|
||||
|
||||
@Volatile private var deckPadValue = false
|
||||
|
||||
@@ -64,6 +64,8 @@ object GogBackend : StoreBackend {
|
||||
}, "gog-sync").start()
|
||||
}
|
||||
|
||||
override fun search(context: Context, query: String): List<CatalogItem> = GogStoreCatalog.search(query)
|
||||
|
||||
override fun loadShelves(context: Context, force: Boolean) {
|
||||
val app = context.applicationContext
|
||||
GogStoreCatalog.cachedFeatured(app)?.let { StoresState.post { StoresState.shelves[store] = it } }
|
||||
|
||||
@@ -16,6 +16,7 @@ internal object GogContent {
|
||||
|
||||
fun token(context: Context) = GogAuth.validToken(context) ?: error("Sign in to GOG and retry")
|
||||
|
||||
@JvmStatic
|
||||
fun builds(id: String, token: String): JSONObject {
|
||||
val result = json("$SYSTEM/products/$id/os/windows/builds?generation=2", token)
|
||||
if (result.optJSONArray("items")?.length() != 0) return result
|
||||
@@ -24,6 +25,36 @@ internal object GogContent {
|
||||
|
||||
fun product(id: String, token: String): JSONObject = json("https://api.gog.com/products/$id?expand=downloads", token)
|
||||
|
||||
@JvmStatic
|
||||
fun ownedProductIds(token: String): Set<String>? = runCatching {
|
||||
val body = StoreNet.get("https://embed.gog.com/user/data/games", bearer = token) ?: return@runCatching null
|
||||
JSONObject(body).optJSONArray("owned")?.strings()?.toSet() ?: emptySet()
|
||||
}.getOrNull()
|
||||
|
||||
@JvmStatic
|
||||
fun depotProducts(depot: JSONObject, baseProductId: String): List<String> =
|
||||
depot.optJSONArray("gameIDs")?.strings() ?: listOf(depot.optString("productId").ifEmpty { baseProductId })
|
||||
|
||||
@JvmStatic
|
||||
fun clientCredentials(manifest: JSONObject): Pair<String, String>? {
|
||||
val clientId = manifest.optString("clientId")
|
||||
val clientSecret = manifest.optString("clientSecret")
|
||||
return clientId.takeIf { it.isNotBlank() }?.let { id -> clientSecret.takeIf { it.isNotBlank() }?.let { id to it } }
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun tempExecutable(manifest: JSONObject): String? = manifest.optJSONArray("products")?.optJSONObject(0)
|
||||
?.optString("temp_executable")?.takeIf { it.isNotBlank() }
|
||||
|
||||
@JvmStatic
|
||||
fun installProducts(baseProductId: String, depots: JSONArray, installed: List<String>, token: String,
|
||||
ownership: (String) -> Set<String>? = { ownedProductIds(it) }): Set<String> {
|
||||
val listed = depots.objects().flatMap { depotProducts(it, baseProductId) }.distinct()
|
||||
val owned = if (listed.any { it != baseProductId } || installed.any { it != baseProductId }) ownership(token) else emptySet()
|
||||
check(installed.all { it == baseProductId || owned?.contains(it) == true }) { "Could not confirm ownership of installed GOG DLC" }
|
||||
return (listOf(baseProductId) + installed + listed.filter { it == baseProductId || owned?.contains(it) == true }).toSet()
|
||||
}
|
||||
|
||||
fun downloadFilename(url: String): String = java.net.URLDecoder.decode(URL(url).path.substringAfterLast('/').replace("+", "%2B"), "UTF-8")
|
||||
|
||||
fun resolveDownload(download: GogOfflineDownload, token: String): GogOfflineDownload = download.copy(parts = download.parts.map { part ->
|
||||
@@ -42,6 +73,7 @@ internal object GogContent {
|
||||
} finally { connection.disconnect() }
|
||||
})
|
||||
|
||||
@JvmStatic
|
||||
fun json(url: String, token: String? = null): JSONObject {
|
||||
require(URL(url).protocol == "https") { "GOG metadata requires HTTPS" }
|
||||
val connection = URL(url).openConnection() as HttpURLConnection
|
||||
@@ -61,21 +93,21 @@ internal object GogContent {
|
||||
}
|
||||
|
||||
fun snapshot(old: GogInstallRecord, build: GogBuild, token: String,
|
||||
metadata: (String, String?) -> JSONObject = ::json): GogInstallRecord {
|
||||
ownership: (String) -> Set<String>? = { ownedProductIds(it) },
|
||||
metadata: (String, String?) -> JSONObject = ::json,
|
||||
onManifest: (JSONObject) -> Unit = {}): GogInstallRecord {
|
||||
check(build.link.isNotBlank()) { "GOG build manifest is unavailable" }
|
||||
val manifest = metadata(build.link, token)
|
||||
onManifest(manifest)
|
||||
val files = JSONArray()
|
||||
val depots = if (build.generation == 1) manifest.optJSONObject("product")?.optJSONArray("depots") ?: manifest.optJSONArray("depot") else manifest.optJSONArray("depots")
|
||||
check(depots != null) { "GOG build has no depot list" }
|
||||
val resolvedLanguage = StoreLanguage.pick(StoreLanguage.codesFromDepots(depots), old.language)
|
||||
val selectedBitness = if (depots.objects().any { it.optJSONArray("osBitness")?.strings()?.contains("64") == true }) "64" else "32"
|
||||
val owned = if (old.products.any { it != old.id }) StoreNet.get("https://embed.gog.com/user/data/games", bearer = token)?.let { JSONObject(it).optJSONArray("owned")?.strings()?.toSet() } else emptySet()
|
||||
val products = old.products.filter { it == old.id || owned?.contains(it) == true }
|
||||
check(old.products.all { it == old.id || owned?.contains(it) == true }) { "Could not confirm ownership of installed GOG DLC" }
|
||||
val products = installProducts(old.id, depots, old.products, token, ownership)
|
||||
for (depot in depots.objects()) {
|
||||
if (depot.has("redist")) continue
|
||||
val ids = depot.optJSONArray("gameIDs")?.strings() ?: listOf(depot.optString("productId", old.id))
|
||||
val product = ids.firstOrNull { it in products } ?: continue
|
||||
val product = depotProducts(depot, old.id).firstOrNull { it in products } ?: continue
|
||||
val languages = depot.optJSONArray("languages")?.strings().orEmpty()
|
||||
if (!languageSelected(languages, resolvedLanguage)) continue
|
||||
val bitness = depot.optJSONArray("osBitness")?.strings().orEmpty()
|
||||
@@ -108,7 +140,7 @@ internal object GogContent {
|
||||
}
|
||||
check(files.length() > 0) { "GOG build contains no matching files" }
|
||||
return old.copy(source = "depot", generation = build.generation, build = build.id, version = build.version,
|
||||
branch = build.branch, language = resolvedLanguage, manifest = sanitize(manifest), files = files, products = products, verified = true)
|
||||
branch = build.branch, language = resolvedLanguage, manifest = sanitize(manifest), files = files, products = products.toList(), verified = true)
|
||||
}
|
||||
|
||||
fun languageSelected(list: List<String>, selected: String): Boolean = list.any { it.equals("Neutral", true) } || StoreLanguage.depotMatchesResolved(list.toTypedArray(), selected)
|
||||
|
||||
@@ -125,211 +125,22 @@ public final class GogDownloadManager {
|
||||
private static Gen2Outcome runGen2(Context ctx, GogGame game, String token, String buildsJson, File installPath, Callback cb, AtomicBoolean cancelled, String language) {
|
||||
Gen2Outcome out = new Gen2Outcome();
|
||||
try {
|
||||
cb.onProgress("Fetching manifest…", 5);
|
||||
Gen2Manifest gm = resolveGen2Manifest(buildsJson, token, cb);
|
||||
if (gm == null) { out.error = "gen2 manifest unavailable"; return out; }
|
||||
JSONObject manifest = gm.manifest;
|
||||
JSONArray depots = manifest.optJSONArray("depots");
|
||||
if (depots == null) { out.error = "no depots in manifest"; return out; }
|
||||
JSONArray products = manifest.optJSONArray("products");
|
||||
String tempExe = null;
|
||||
if (products != null && products.length() > 0) {
|
||||
tempExe = products.getJSONObject(0).optString("temp_executable", null);
|
||||
if (tempExe != null && tempExe.isEmpty()) tempExe = null;
|
||||
}
|
||||
String baseProductId = manifest.optString("baseProductId", null);
|
||||
if ((baseProductId == null || baseProductId.isEmpty()) && products != null && products.length() > 0)
|
||||
baseProductId = products.getJSONObject(0).optString("productId", null);
|
||||
if (baseProductId == null || baseProductId.isEmpty()) baseProductId = game.gameId;
|
||||
JSONArray deps = manifest.optJSONArray("dependencies");
|
||||
List<String> dependencies = new ArrayList<>();
|
||||
if (deps != null) for (int i = 0; i < deps.length(); i++) { String d = deps.optString(i, ""); if (!d.isEmpty()) dependencies.add(d); }
|
||||
if (!dependencies.isEmpty()) cb.onLog("gog: build lists dependencies " + deps);
|
||||
|
||||
cb.onProgress("Reading depot manifests…", 10);
|
||||
List<DepotFile> files = new ArrayList<>();
|
||||
List<String> depotJsons = new ArrayList<>();
|
||||
JSONArray owned = new JSONArray();
|
||||
List<JSONObject> ownedDepots = new ArrayList<>();
|
||||
for (int i = 0; i < depots.length(); i++) {
|
||||
JSONObject depot = depots.getJSONObject(i);
|
||||
String depotPid = depot.optString("productId", "");
|
||||
if (!depotPid.isEmpty() && !depotPid.equals(baseProductId)) continue;
|
||||
owned.put(depot);
|
||||
ownedDepots.add(depot);
|
||||
}
|
||||
String resolved = StoreLanguage.pick(StoreLanguage.codesFromDepots(owned), language);
|
||||
cb.onLog("gog: language " + resolved);
|
||||
for (int i = 0; i < ownedDepots.size(); i++) {
|
||||
if (cancelled.get()) return out;
|
||||
JSONObject depot = ownedDepots.get(i);
|
||||
if (!depotSelected(depot, resolved)) continue;
|
||||
String manifestHash = depot.optString("manifest");
|
||||
if (manifestHash == null || manifestHash.isEmpty()) continue;
|
||||
byte[] dmRaw = fetchBytes("https://gog-cdn-fastly.gog.com/content-system/v2/meta/" + buildCdnPath(manifestHash), null);
|
||||
if (dmRaw == null) { cb.onLog("gog: depot " + i + " meta fetch failed"); continue; }
|
||||
String dmStr = decompressBytes(dmRaw);
|
||||
if (dmStr == null) { cb.onLog("gog: depot " + i + " decompress failed"); continue; }
|
||||
parseDepotManifest(dmStr, files);
|
||||
depotJsons.add(dmStr);
|
||||
}
|
||||
if (files.isEmpty()) { out.error = "no depot files collected"; return out; }
|
||||
|
||||
cb.onProgress("Fetching CDN link…", 15);
|
||||
String secureLinkUrl = "https://content-system.gog.com/products/" + baseProductId + "/secure_link?_version=2&generation=2&path=/";
|
||||
String cdnBase = parseCdnUrl(httpGet(secureLinkUrl, token));
|
||||
if (cdnBase == null) { out.error = "secure link refused"; return out; }
|
||||
|
||||
installPath.mkdirs();
|
||||
long plannedBytes = 0;
|
||||
for (DepotFile df : files) plannedBytes += df.totalSize;
|
||||
long remainingBytes = remainingInstallBytes(files, installPath);
|
||||
if (remainingBytes > 0) {
|
||||
long usable = com.droiddeck.launcher.stores.StoreInstallRoot.availableBytes(installPath);
|
||||
if (com.droiddeck.launcher.stores.StoreInstallRoot.insufficientSpace(remainingBytes, usable)) {
|
||||
out.hardStop = true;
|
||||
out.error = "Not enough free space: need " + formatBytes(remainingBytes) + ", only " + formatBytes(usable) + " free";
|
||||
return out;
|
||||
}
|
||||
}
|
||||
Collections.sort(files, (a, b) -> Long.compare(b.totalSize, a.totalSize));
|
||||
|
||||
final int total = files.size();
|
||||
final long planned = plannedBytes;
|
||||
final AtomicInteger doneCount = new AtomicInteger(0);
|
||||
final AtomicLong totalBytes = new AtomicLong(0);
|
||||
final AtomicLong lastSpeedMs = new AtomicLong(System.currentTimeMillis());
|
||||
final AtomicLong lastSpeedB = new AtomicLong(0);
|
||||
final AtomicLong speedBps = new AtomicLong(0);
|
||||
final AtomicBoolean anyFailed = new AtomicBoolean(false);
|
||||
final AtomicReference<String> cdnBaseRef = new AtomicReference<>(cdnBase);
|
||||
final AtomicInteger cdnRefreshCount = new AtomicInteger(0);
|
||||
final int MAX_CDN_REFRESH = 5;
|
||||
cb.onSizes(planned, planned);
|
||||
cb.onBytes(0, planned, 0);
|
||||
cb.onLog("gog: " + total + " files, " + formatBytes(planned) + ", base=" + baseProductId);
|
||||
|
||||
int threads = downloadThreads();
|
||||
if (GogNative.isAvailable()) {
|
||||
runNativeEngine(ctx, GogNative.KIND_GEN2_CHUNKS, "Verified…", depotJsons, installPath, cdnBaseRef, secureLinkUrl, token,
|
||||
cdnRefreshCount, MAX_CDN_REFRESH, threads, threads, true, "gog base=" + baseProductId,
|
||||
cancelled, anyFailed, doneCount, total, planned, totalBytes, lastSpeedMs, lastSpeedB, speedBps, cb);
|
||||
} else {
|
||||
cb.onLog("gog: engine=built-in (" + threads + " threads)");
|
||||
ExecutorService pool = Executors.newFixedThreadPool(threads, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("gog-dl"));
|
||||
List<Future<Void>> futures = new ArrayList<>();
|
||||
for (DepotFile df : files) {
|
||||
futures.add(pool.submit((Callable<Void>) () -> {
|
||||
if (cancelled.get() || anyFailed.get()) return null;
|
||||
File outFile = new File(installPath, df.relativePath);
|
||||
outFile.getParentFile().mkdirs();
|
||||
if (fileVerified(outFile, df.totalSize, df.md5)) {
|
||||
int done = doneCount.incrementAndGet();
|
||||
long tb = totalBytes.addAndGet(df.totalSize);
|
||||
cb.onProgress("Verified…", 15 + (int) ((done / (float) total) * 80));
|
||||
cb.onBytes(tb, planned, speedBps.get());
|
||||
return null;
|
||||
}
|
||||
boolean ok = assembleDepotFile(df, outFile, cdnBaseRef, secureLinkUrl, token, cdnRefreshCount, MAX_CDN_REFRESH, cancelled, cb);
|
||||
if (cancelled.get()) return null;
|
||||
if (!ok) { cb.onLog("FAIL file=" + df.relativePath); anyFailed.set(true); return null; }
|
||||
int done = doneCount.incrementAndGet();
|
||||
long tb = totalBytes.addAndGet(df.totalSize);
|
||||
sampleSpeed(tb, lastSpeedMs, lastSpeedB, speedBps);
|
||||
cb.onProgress("Downloading: " + baseName(df.relativePath) + speedSuffix(speedBps.get()), 15 + (int) ((done / (float) total) * 80));
|
||||
cb.onBytes(tb, planned, speedBps.get());
|
||||
return null;
|
||||
}));
|
||||
}
|
||||
pool.shutdown();
|
||||
try {
|
||||
for (Future<Void> f : futures) f.get();
|
||||
} catch (Exception e) {
|
||||
pool.shutdownNow();
|
||||
out.error = "download pool error: " + e.getClass().getSimpleName();
|
||||
return out;
|
||||
}
|
||||
}
|
||||
if (cancelled.get()) return out;
|
||||
if (anyFailed.get()) { out.error = "one or more chunks failed to download"; return out; }
|
||||
|
||||
cb.onProgress("Finishing…", 96);
|
||||
try {
|
||||
GogMaintenance.captureDepot(game.gameId, installPath, gm.buildId, buildsJson, manifest, new JSONArray(depotJsons), resolved);
|
||||
} catch (Exception e) {
|
||||
cb.onLog("gog: maintenance inventory not recorded: " + e.getMessage());
|
||||
}
|
||||
writeFile(new File(installPath, MARKER), ("{\"gameId\":\"" + game.gameId + "\",\"buildId\":\"" + gm.buildId + "\"}").getBytes("UTF-8"));
|
||||
deleteCounted(new File(installPath, ".gog_chunks"), cb);
|
||||
String clientId = manifest.optString("clientId", null);
|
||||
if (clientId != null && !clientId.isEmpty()) GogPrefs.get(ctx).edit().putString("client_id_" + game.gameId, clientId).apply();
|
||||
String clientSecret = manifest.optString("clientSecret", null);
|
||||
if (clientSecret != null && !clientSecret.isEmpty()) GogPrefs.get(ctx).edit().putString("client_secret_" + game.gameId, clientSecret).apply();
|
||||
GameTask task = pickTask(installPath, game.gameId, tempExe, game.title);
|
||||
out.result = new Result(task == null ? "" : task.path, gm.buildId, planned);
|
||||
if (task != null) out.result.workDir = task.workDir;
|
||||
out.result.dependencies = dependencies;
|
||||
out.result.dependenciesRead = true;
|
||||
out.result.language = resolved;
|
||||
return out;
|
||||
out.result = GogMaintenance.installContent(ctx, game, installPath, new JSONObject(buildsJson), language, cb, cancelled);
|
||||
if (out.result == null && !cancelled.get()) out.error = "no usable public Windows build";
|
||||
} catch (Exception e) {
|
||||
out.error = "exception: " + e.getClass().getSimpleName() + (e.getMessage() != null ? ": " + e.getMessage() : "");
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
private static final class Gen2Manifest {
|
||||
final JSONObject manifest; final String buildId;
|
||||
Gen2Manifest(JSONObject manifest, String buildId) { this.manifest = manifest; this.buildId = buildId; }
|
||||
}
|
||||
|
||||
private static Gen2Manifest resolveGen2Manifest(String buildsJson, String token, Callback cb) {
|
||||
try {
|
||||
JSONArray items = new JSONObject(buildsJson).optJSONArray("items");
|
||||
if (items == null || items.length() == 0) { cb.onLog("gog: no gen2 builds"); return null; }
|
||||
String buildId = null, manifestUrl = null;
|
||||
for (int i = 0; i < items.length(); i++) {
|
||||
JSONObject item = items.getJSONObject(i);
|
||||
if ("windows".equals(item.optString("os")) && (item.isNull("branch") || item.optString("branch").isEmpty())) {
|
||||
buildId = item.optString("build_id");
|
||||
manifestUrl = item.optString("link");
|
||||
if (manifestUrl == null || manifestUrl.isEmpty()) manifestUrl = item.optString("meta_url");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (buildId == null || manifestUrl == null || manifestUrl.isEmpty()) { cb.onLog("gog: no windows build"); return null; }
|
||||
byte[] raw = fetchBytes(manifestUrl, token);
|
||||
if (raw == null) { cb.onLog("gog: manifest fetch failed"); return null; }
|
||||
String str = decompressBytes(raw);
|
||||
if (str == null) { cb.onLog("gog: manifest decompress failed"); return null; }
|
||||
return new Gen2Manifest(new JSONObject(str), buildId);
|
||||
} catch (Exception e) {
|
||||
cb.onLog("gog: manifest " + e.getClass().getSimpleName());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean depotSelected(JSONObject depot, String resolved) {
|
||||
JSONArray languages = depot.optJSONArray("languages");
|
||||
if (languages == null || languages.length() == 0) return true;
|
||||
String[] listed = new String[languages.length()];
|
||||
for (int i = 0; i < languages.length(); i++) listed[i] = languages.optString(i, "");
|
||||
return StoreLanguage.depotMatchesResolved(listed, resolved);
|
||||
return out;
|
||||
}
|
||||
|
||||
public static List<String> listLanguages(Context ctx, String gameId) {
|
||||
try {
|
||||
String token = GogAuth.validToken(ctx);
|
||||
String buildsUrl = "https://content-system.gog.com/products/" + gameId + "/os/windows/builds?generation=2";
|
||||
String buildsJson = httpGet(buildsUrl, null);
|
||||
if (buildsJson == null) buildsJson = httpGet(buildsUrl, token);
|
||||
if (buildsJson == null) return Collections.emptyList();
|
||||
Callback silent = new Callback() {
|
||||
@Override public void onProgress(String message, int pct) {}
|
||||
};
|
||||
Gen2Manifest gm = resolveGen2Manifest(buildsJson, token, silent);
|
||||
if (gm == null) return Collections.emptyList();
|
||||
return StoreLanguage.codesFromDepots(gm.manifest.optJSONArray("depots"));
|
||||
JSONObject builds = GogContent.builds(gameId, token);
|
||||
GogBuild build = GogBuild.Companion.select(builds, "", "");
|
||||
if (build == null || build.getGeneration() != 2) return Collections.emptyList();
|
||||
return StoreLanguage.codesFromDepots(GogContent.json(build.getLink(), token).optJSONArray("depots"));
|
||||
} catch (Exception e) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -398,7 +209,7 @@ public final class GogDownloadManager {
|
||||
int threads = downloadThreads();
|
||||
if (GogNative.isAvailable()) {
|
||||
runNativeEngine(ctx, GogNative.KIND_GEN1_RANGES, "Resuming…", Collections.singletonList(manifestStr), installPath,
|
||||
new AtomicReference<>(""), null, null, new AtomicInteger(0), 0, threads, threads, false, "gog gen1=" + game.gameId,
|
||||
threads, threads, false, "gog gen1=" + game.gameId,
|
||||
cancelled, anyFailed, done, total, planned, totalBytes, lastSpeedMs, lastSpeedB, speedBps, cb);
|
||||
} else {
|
||||
ExecutorService pool = Executors.newFixedThreadPool(threads, com.droiddeck.launcher.stores.download.DownloadQueue.workerFactory("gog-dl"));
|
||||
@@ -659,8 +470,7 @@ public final class GogDownloadManager {
|
||||
|
||||
|
||||
private static void runNativeEngine(Context ctx, int kind, String verifiedMsg, List<String> depotJsons, File installPath,
|
||||
AtomicReference<String> cdnBaseRef, String secureLinkUrl, String token,
|
||||
AtomicInteger cdnRefreshCount, int maxCdnRefresh, int maxWorkers, int processWorkers,
|
||||
int maxWorkers, int processWorkers,
|
||||
boolean sortLargestFirst, String label, AtomicBoolean cancelled, AtomicBoolean anyFailed,
|
||||
AtomicInteger doneCount, int total, long planned, AtomicLong totalBytes,
|
||||
AtomicLong lastSpeedMs, AtomicLong lastSpeedB, AtomicLong speedBps, Callback cb) {
|
||||
@@ -673,10 +483,8 @@ public final class GogDownloadManager {
|
||||
int run = 0;
|
||||
while (!cancelled.get()) {
|
||||
run++;
|
||||
final String base = cdnBaseRef.get();
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final AtomicBoolean okRef = new AtomicBoolean(false);
|
||||
final AtomicBoolean linkExpiryRef = new AtomicBoolean(false);
|
||||
final AtomicReference<String> errRef = new AtomicReference<>("");
|
||||
final long runStart = totalBytes.get();
|
||||
final AtomicLong verifiedInRun = new AtomicLong(0);
|
||||
@@ -702,12 +510,10 @@ public final class GogDownloadManager {
|
||||
@Override public void onLog(String line) { cb.onLog(line); }
|
||||
@Override public void onMaintenance(long networkBytes, long reusedBytes, long appliedBytes) {}
|
||||
@Override public void onComplete(boolean success, boolean wasCancelled, boolean linkExpiry, String error, long bytesWritten, int filesDone) {
|
||||
okRef.set(success); linkExpiryRef.set(linkExpiry); errRef.set(error == null ? "" : error); latch.countDown();
|
||||
okRef.set(success); errRef.set(error == null ? "" : error); latch.countDown();
|
||||
}
|
||||
};
|
||||
String[] bases = (base == null || base.isEmpty()) ? new String[0] : base.split("\n");
|
||||
if (run == 1) cb.onLog("gog: " + bases.length + " CDN host(s) offered");
|
||||
long handle = GogNative.start(kind, manifests, bases, installPath.getAbsolutePath(), donePaths.toArray(new String[0]), "",
|
||||
long handle = GogNative.start(kind, manifests, new String[0], installPath.getAbsolutePath(), donePaths.toArray(new String[0]), "",
|
||||
workers, process, sortLargestFirst, label + " run=" + run, listener);
|
||||
if (handle == 0L) { cb.onLog("gog: native start failed"); anyFailed.set(true); return; }
|
||||
boolean interrupted = false;
|
||||
@@ -721,85 +527,13 @@ public final class GogDownloadManager {
|
||||
}
|
||||
if (interrupted) { Thread.currentThread().interrupt(); anyFailed.set(true); return; }
|
||||
if (cancelled.get() || okRef.get()) return;
|
||||
String err = errRef.get();
|
||||
if (linkExpiryRef.get() && tryRefreshCdn(cdnBaseRef, base, secureLinkUrl, token, cdnRefreshCount, maxCdnRefresh, cb)) {
|
||||
cb.onLog("gog: secure link expired (" + err + "); refreshed, running again for the remaining files");
|
||||
continue;
|
||||
}
|
||||
cb.onLog("gog: engine failed: " + err);
|
||||
cb.onLog("gog: engine failed: " + errRef.get());
|
||||
anyFailed.set(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void parseDepotManifest(String json, List<DepotFile> out) {
|
||||
try {
|
||||
JSONObject depotObj = new JSONObject(json).optJSONObject("depot");
|
||||
if (depotObj == null) return;
|
||||
JSONArray depot = depotObj.optJSONArray("items");
|
||||
if (depot == null) return;
|
||||
for (int i = 0; i < depot.length(); i++) {
|
||||
JSONObject entry = depot.getJSONObject(i);
|
||||
String path = entry.optString("path", "").replace("\\", "/");
|
||||
if (path.startsWith("/")) path = path.substring(1);
|
||||
JSONArray chunks = entry.optJSONArray("chunks");
|
||||
if (path.isEmpty() || chunks == null || chunks.length() == 0) continue;
|
||||
DepotFile df = new DepotFile(path);
|
||||
String fileMd5 = entry.optString("md5", null);
|
||||
if (fileMd5 != null && !fileMd5.isEmpty()) df.md5 = fileMd5;
|
||||
long fileTotal = 0;
|
||||
for (int c = 0; c < chunks.length(); c++) {
|
||||
JSONObject chunk = chunks.getJSONObject(c);
|
||||
String compressedMd5 = chunk.optString("compressedMd5"), decMd5 = chunk.optString("md5");
|
||||
String hash = (compressedMd5 != null && !compressedMd5.isEmpty()) ? compressedMd5 : decMd5;
|
||||
if (hash == null || hash.isEmpty()) continue;
|
||||
long decSize = chunk.optLong("size", 0);
|
||||
df.chunks.add(new DepotFile.ChunkRef(hash, compressedMd5, decMd5, chunk.optLong("compressedSize", 0), decSize));
|
||||
fileTotal += decSize;
|
||||
}
|
||||
df.totalSize = fileTotal;
|
||||
if (!df.chunks.isEmpty()) out.add(df);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "depot manifest parse: " + e.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
static String buildCdnPath(String hash) { return hash.substring(0, 2) + "/" + hash.substring(2, 4) + "/" + hash; }
|
||||
|
||||
private static boolean assembleDepotFile(DepotFile df, File outFile, AtomicReference<String> cdnBaseRef, String secureLinkUrl, String token,
|
||||
AtomicInteger cdnRefreshCount, int maxCdnRefresh, AtomicBoolean cancelled, Callback cb) {
|
||||
File tmpFile = new File(outFile.getAbsolutePath() + ".bhtmp");
|
||||
File parent = outFile.getParentFile();
|
||||
if (parent != null) parent.mkdirs();
|
||||
tmpFile.delete();
|
||||
boolean ok = true;
|
||||
try (FileOutputStream fos = new FileOutputStream(tmpFile)) {
|
||||
for (DepotFile.ChunkRef chunk : df.chunks) {
|
||||
if (cancelled.get()) { ok = false; break; }
|
||||
byte[] inflated = fetchChunkVerified(cdnBaseRef, buildCdnPath(chunk.hash), chunk, secureLinkUrl, token, cdnRefreshCount, maxCdnRefresh, cancelled, cb);
|
||||
if (inflated == null) { ok = false; break; }
|
||||
fos.write(inflated);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ok = false;
|
||||
}
|
||||
if (!ok || cancelled.get()) { tmpFile.delete(); return false; }
|
||||
if (df.totalSize > 0 && tmpFile.length() != df.totalSize) { cb.onLog("size mismatch file=" + df.relativePath); tmpFile.delete(); return false; }
|
||||
if (df.md5 != null && !df.md5.isEmpty()) {
|
||||
String actual = md5HexFile(tmpFile);
|
||||
if (actual == null || !actual.equalsIgnoreCase(df.md5)) { cb.onLog("md5 mismatch file=" + df.relativePath); tmpFile.delete(); return false; }
|
||||
}
|
||||
if (outFile.exists()) outFile.delete();
|
||||
return tmpFile.renameTo(outFile);
|
||||
}
|
||||
|
||||
private static String parseCdnUrl(String json) {
|
||||
java.util.List<String> all = parseCdnUrls(json);
|
||||
return all.isEmpty() ? null : String.join("\n", all);
|
||||
}
|
||||
|
||||
static java.util.List<String> parseCdnUrls(String json) {
|
||||
java.util.List<String> out = new ArrayList<>();
|
||||
if (json == null) return out;
|
||||
@@ -824,18 +558,6 @@ public final class GogDownloadManager {
|
||||
return out;
|
||||
}
|
||||
|
||||
private static final AtomicInteger CDN_TURN = new AtomicInteger();
|
||||
|
||||
static String pickCdn(String set) {
|
||||
String[] all = set.split("\n");
|
||||
return all[Math.floorMod(CDN_TURN.getAndIncrement(), all.length)];
|
||||
}
|
||||
|
||||
static String firstCdn(String set) {
|
||||
int nl = set.indexOf('\n');
|
||||
return nl < 0 ? set : set.substring(0, nl);
|
||||
}
|
||||
|
||||
private static boolean downloadRange(String url, long offset, long size, File out) {
|
||||
try {
|
||||
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
|
||||
@@ -951,15 +673,6 @@ public final class GogDownloadManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static String buildChunkUrl(String base, String chunkPath) {
|
||||
int q = base.indexOf('?');
|
||||
return q >= 0 ? base.substring(0, q) + "/" + chunkPath + base.substring(q) : base + "/" + chunkPath;
|
||||
}
|
||||
|
||||
private static String md5Hex(byte[] data) {
|
||||
try { return toHex(java.security.MessageDigest.getInstance("MD5").digest(data)); } catch (Exception e) { return null; }
|
||||
}
|
||||
|
||||
private static String md5HexFile(File f) {
|
||||
try (FileInputStream fis = new FileInputStream(f)) {
|
||||
java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
|
||||
@@ -988,58 +701,6 @@ public final class GogDownloadManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void sleepBackoff(int attempt) {
|
||||
try { Thread.sleep(Math.min(1000L << Math.max(0, attempt - 1), 8000L)); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); }
|
||||
}
|
||||
|
||||
private static boolean tryRefreshCdn(AtomicReference<String> cdnBaseRef, String staleBase, String secureLinkUrl, String token,
|
||||
AtomicInteger refreshCount, int cap, Callback cb) {
|
||||
if (secureLinkUrl == null) return false;
|
||||
synchronized (cdnBaseRef) {
|
||||
String current = cdnBaseRef.get();
|
||||
if (staleBase == null || !staleBase.equals(current)) return true;
|
||||
if (refreshCount.get() >= cap) { cb.onLog("gog: CDN refresh cap reached (" + cap + ")"); return false; }
|
||||
String neu = parseCdnUrl(httpGet(secureLinkUrl, token));
|
||||
if (neu == null || neu.isEmpty()) { cb.onLog("gog: CDN refresh failed"); return false; }
|
||||
cdnBaseRef.set(neu);
|
||||
cb.onLog("gog: secure link refreshed #" + refreshCount.incrementAndGet());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] fetchChunkVerified(AtomicReference<String> cdnBaseRef, String chunkPath, DepotFile.ChunkRef chunk, String secureLinkUrl, String token,
|
||||
AtomicInteger cdnRefreshCount, int maxCdnRefresh, AtomicBoolean cancelled, Callback cb) {
|
||||
int hardFail = 0, guard = 0;
|
||||
while (guard++ < 8) {
|
||||
if (cancelled.get()) return null;
|
||||
String base = cdnBaseRef.get();
|
||||
HttpResult res = fetchBytesEx(buildChunkUrl(pickCdn(base), chunkPath), null);
|
||||
if (res.body == null) {
|
||||
int code = res.status;
|
||||
if ((code == 401 || code == 403 || code == 404 || code == 500) && tryRefreshCdn(cdnBaseRef, base, secureLinkUrl, token, cdnRefreshCount, maxCdnRefresh, cb)) continue;
|
||||
cb.onLog("chunk http fail code=" + code);
|
||||
if (++hardFail >= 3) return null;
|
||||
sleepBackoff(hardFail);
|
||||
continue;
|
||||
}
|
||||
byte[] raw = res.body;
|
||||
if (chunk.compressedSize > 0 && raw.length != chunk.compressedSize) { if (++hardFail >= 3) return null; sleepBackoff(hardFail); continue; }
|
||||
if (chunk.compressedMd5 != null && !chunk.compressedMd5.isEmpty()) {
|
||||
String actual = md5Hex(raw);
|
||||
if (actual == null || !actual.equalsIgnoreCase(chunk.compressedMd5)) { if (++hardFail >= 3) return null; sleepBackoff(hardFail); continue; }
|
||||
}
|
||||
byte[] inflated = inflateZlib(raw);
|
||||
if (inflated == null) inflated = raw;
|
||||
if (chunk.size > 0 && inflated.length != chunk.size) { if (++hardFail >= 3) return null; sleepBackoff(hardFail); continue; }
|
||||
if (chunk.md5 != null && !chunk.md5.isEmpty()) {
|
||||
String actual = md5Hex(inflated);
|
||||
if (actual == null || !actual.equalsIgnoreCase(chunk.md5)) { if (++hardFail >= 3) return null; sleepBackoff(hardFail); continue; }
|
||||
}
|
||||
return inflated;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void sampleSpeed(long totalBytes, AtomicLong lastSpeedMs, AtomicLong lastSpeedB, AtomicLong speedBps) {
|
||||
long nowMs = System.currentTimeMillis(), prevMs = lastSpeedMs.get();
|
||||
if (nowMs - prevMs >= 500 && lastSpeedMs.compareAndSet(prevMs, nowMs)) {
|
||||
@@ -1289,30 +950,6 @@ public final class GogDownloadManager {
|
||||
for (File f : files) if (f.isDirectory()) collectExeRecursive(f, out);
|
||||
}
|
||||
|
||||
static long remainingInstallBytes(List<DepotFile> files, File installPath) {
|
||||
long remaining = 0;
|
||||
for (DepotFile file : files) {
|
||||
File output = new File(installPath, file.relativePath);
|
||||
if (!fileVerified(output, file.totalSize, file.md5)) remaining += file.totalSize;
|
||||
}
|
||||
return remaining;
|
||||
}
|
||||
|
||||
static final class DepotFile {
|
||||
final String relativePath;
|
||||
final List<ChunkRef> chunks = new ArrayList<>();
|
||||
String md5;
|
||||
long totalSize;
|
||||
DepotFile(String relativePath) { this.relativePath = relativePath; }
|
||||
static final class ChunkRef {
|
||||
final String hash, compressedMd5, md5;
|
||||
final long compressedSize, size;
|
||||
ChunkRef(String hash, String compressedMd5, String md5, long compressedSize, long size) {
|
||||
this.hash = hash; this.compressedMd5 = compressedMd5; this.md5 = md5; this.compressedSize = compressedSize; this.size = size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final class Gen1File {
|
||||
final String path, url; final long offset, size;
|
||||
Gen1File(String path, String url, long offset, long size) { this.path = path; this.url = url; this.offset = offset; this.size = size; }
|
||||
@@ -1382,7 +1019,11 @@ public final class GogDownloadManager {
|
||||
String resolved = StoreLanguage.pick(StoreLanguage.codesFromDepots(depots), StoreLanguage.preferredCode());
|
||||
for (int i = 0; i < depots.length(); i++) {
|
||||
JSONObject depot = depots.getJSONObject(i);
|
||||
if (depotSelected(depot, resolved)) total += depot.optLong("size", 0);
|
||||
JSONArray languages = depot.optJSONArray("languages");
|
||||
String[] listed = new String[languages == null ? 0 : languages.length()];
|
||||
for (int j = 0; j < listed.length; j++) listed[j] = languages.optString(j, "");
|
||||
if (listed.length == 0 || StoreLanguage.depotMatchesResolved(listed, resolved))
|
||||
total += depot.optLong("size", 0);
|
||||
}
|
||||
return total > 0 ? total : -1;
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -58,16 +58,17 @@ object GogLibrary {
|
||||
val token = GogAuth.validToken(app) ?: return SyncResult.NotLoggedIn
|
||||
onStatus(app.getString(R.string.stores_sync_game_list))
|
||||
val listing = ownedListing(token)
|
||||
val account = ownedIds(token)
|
||||
val listed: List<GogGame> = listing?.games
|
||||
?: ownedIds(token)?.map { GogGame(it, "", "", "", "", "", 1, null, "", "") }
|
||||
?: account?.map { GogGame(it, "", "", "", "", "", 1, null, "", "") }
|
||||
?: return SyncResult.Failed(app.getString(R.string.stores_sync_gog_unreachable))
|
||||
val named = listing != null
|
||||
StoresState.logLine(if (named) "GOG: listing ${listed.size} games" else "GOG: listing unreadable, ${listed.size} owned ids")
|
||||
val ownedSet = listing?.owned ?: listed.mapTo(HashSet()) { it.gameId }
|
||||
val cachedList = cached(app)
|
||||
val cachedIds = cachedList.mapTo(HashSet()) { it.gameId }
|
||||
val ownedSet = ownedSet(listing?.owned ?: listed.mapTo(HashSet()) { it.gameId }, account, cachedIds)
|
||||
StoresState.logLine(if (named) "GOG: listing ${listed.size} games, ${ownedSet.size} owned ids" else "GOG: listing unreadable, ${listed.size} owned ids")
|
||||
val stale = System.currentTimeMillis() - p.getLong(LAST_SYNC_KEY, 0L) >= THROTTLE_MS
|
||||
val heavy = force || cachedList.isEmpty() || stale
|
||||
val cachedIds = cachedList.mapTo(HashSet()) { it.gameId }
|
||||
val skipped = java.util.Collections.newSetFromMap(java.util.concurrent.ConcurrentHashMap<String, Boolean>())
|
||||
skipped.addAll(p.getStringSet(SKIPPED_KEY, emptySet()).orEmpty())
|
||||
val idsToFetch = if (heavy) ownedSet.toList() else ownedSet.filter { it !in cachedIds && it !in skipped }
|
||||
@@ -133,6 +134,9 @@ object GogLibrary {
|
||||
return all.ifEmpty { null }?.let { Listing(it, owned) }
|
||||
}
|
||||
|
||||
fun ownedSet(listed: Set<String>, account: List<String>?, cached: Set<String> = emptySet()): Set<String> =
|
||||
if (account == null) listed + cached else listed + account
|
||||
|
||||
private fun ownedIds(token: String): List<String>? {
|
||||
val json = StoreNet.get(OWNED_URL, bearer = token, userAgent = GogAuth.GALAXY_UA) ?: return null
|
||||
val owned = runCatching { JSONObject(json).optJSONArray("owned") }.getOrNull() ?: return null
|
||||
|
||||
@@ -377,16 +377,24 @@ internal object GogMaintenance {
|
||||
val build = GogBuild.select(builds) ?: return null
|
||||
folder.mkdirs()
|
||||
val old = GogInstallRecord(game.gameId, "depot", language = language)
|
||||
val target = GogContent.snapshot(old, build, GogContent.token(context))
|
||||
var credentials: Pair<String, String>? = null
|
||||
val target = GogContent.snapshot(old, build, GogContent.token(context), onManifest = { manifest ->
|
||||
credentials = GogContent.clientCredentials(manifest)
|
||||
})
|
||||
GogFiles.validate(target.files, folder)
|
||||
val bytes = target.files.objects().sumOf { it.optJSONArray("chunks")?.objects()?.sumOf { c -> c.optLong("compressedSize") }?.takeIf { n -> n > 0 } ?: it.optLong("size") }
|
||||
val disk = target.files.objects().sumOf { it.optLong("size") }
|
||||
check(!StoreInstallRoot.insufficientSpace(disk, StoreInstallRoot.availableBytes(folder))) { "Not enough free space for GOG installation" }
|
||||
val remaining = GogEstimate.calculate(folder, old, target, JSONArray(), reuseChunks = GogNative.isAvailable()).required
|
||||
check(!StoreInstallRoot.insufficientSpace(remaining, StoreInstallRoot.availableBytes(folder))) { "Not enough free space for GOG installation" }
|
||||
callback.onSizes(bytes, disk)
|
||||
transfer(context, Proposal(folder, old, target, GogOperation.UPDATE, bytes, disk), null, cancelled, callback)
|
||||
if (cancelled.get()) return null
|
||||
target.write(folder)
|
||||
val task = GogDownloadManager.pickTask(folder, game.gameId, null, game.title)
|
||||
credentials?.let { (clientId, clientSecret) ->
|
||||
GogPrefs.get(context).edit().putString("client_id_${game.gameId}", clientId)
|
||||
.putString("client_secret_${game.gameId}", clientSecret).apply()
|
||||
}
|
||||
val task = GogDownloadManager.pickTask(folder, game.gameId, GogContent.tempExecutable(target.manifest), game.title)
|
||||
val result = GogDownloadManager.Result(task?.path ?: "", build.id, disk)
|
||||
result.workDir = task?.workDir
|
||||
result.language = target.language
|
||||
@@ -395,20 +403,6 @@ internal object GogMaintenance {
|
||||
return result
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun captureDepot(id: String, folder: File, build: String, buildsJson: String, manifest: JSONObject, depots: JSONArray, language: String) {
|
||||
val selected = GogBuild.select(JSONObject(buildsJson), pinned = build)
|
||||
val files = JSONArray()
|
||||
for (depot in depots.strings()) for (item in JSONObject(depot).getJSONObject("depot").getJSONArray("items").objects()) {
|
||||
val chunks = item.optJSONArray("chunks") ?: continue
|
||||
files.put(JSONObject().put("path", item.getString("path").replace('\\', '/')).put("size", chunks.objects().sumOf { it.optLong("size") })
|
||||
.put("md5", item.optString("md5")).put("chunks", chunks).put("product", id))
|
||||
}
|
||||
GogFiles.validate(files, folder)
|
||||
GogInstallRecord(id, "depot", 2, build, selected?.version.orEmpty(), selected?.branch.orEmpty(), language,
|
||||
manifest = GogContent.sanitize(manifest), files = files).write(folder)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun captureOffline(id: String, folder: File, downloads: JSONObject) {
|
||||
val selected = GogOfflineDownload.parse(downloads, "installers").firstOrNull() ?: return
|
||||
|
||||
@@ -6,8 +6,6 @@ import com.droiddeck.launcher.stores.StoresNative
|
||||
object GogNative {
|
||||
private const val TAG = "GogNative"
|
||||
|
||||
const val KIND_GEN2_CHUNKS = 0
|
||||
|
||||
const val KIND_GEN1_RANGES = 1
|
||||
|
||||
interface Listener {
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.provider.Settings
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.session.BottomNotifications
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
internal fun notificationAccessIntent(context: android.content.Context): Intent =
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
|
||||
Intent(Settings.ACTION_NOTIFICATION_LISTENER_DETAIL_SETTINGS).putExtra(
|
||||
Settings.EXTRA_NOTIFICATION_LISTENER_COMPONENT_NAME,
|
||||
android.content.ComponentName(context, com.droiddeck.launcher.session.BottomNotificationListener::class.java).flattenToString(),
|
||||
)
|
||||
} else Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS)
|
||||
|
||||
@Composable
|
||||
fun BottomNotificationsPage(openSettings: ((Intent, () -> Boolean) -> Unit)?) {
|
||||
val context = LocalContext.current
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
var granted by remember { mutableStateOf(BottomNotifications.granted(context)) }
|
||||
LaunchedEffect(Unit) {
|
||||
while (true) {
|
||||
granted = BottomNotifications.granted(context)
|
||||
delay(2_000L)
|
||||
}
|
||||
}
|
||||
if (!granted) {
|
||||
Column(Modifier.fillMaxSize().padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterVertically)) {
|
||||
Text(stringResource(R.string.bottom_notifications_why), fontSize = 15.sp, color = colors.onBackground, textAlign = TextAlign.Center)
|
||||
BottomPillButton(stringResource(R.string.bottom_notifications_allow), "bottom-notifications-allow") {
|
||||
val intent = notificationAccessIntent(context)
|
||||
if (openSettings != null) openSettings(intent) { BottomNotifications.granted(context) }
|
||||
else runCatching { context.startActivity(intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) }
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
val shown = BottomNotifications.items
|
||||
if (shown.isEmpty()) {
|
||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||
Text(stringResource(R.string.bottom_notifications_none), fontSize = 15.sp, color = colors.onSurfaceVariant)
|
||||
}
|
||||
return
|
||||
}
|
||||
val timeFormat = remember { android.text.format.DateFormat.getTimeFormat(context) }
|
||||
Column(Modifier.fillMaxSize(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(stringResource(R.string.bottom_notifications_count, shown.size), fontSize = 13.sp, color = colors.onSurfaceVariant,
|
||||
modifier = Modifier.weight(1f))
|
||||
BottomPillButton(stringResource(R.string.bottom_notifications_clear), "bottom-notifications-clear") { BottomNotifications.clear() }
|
||||
}
|
||||
LazyColumn(Modifier.weight(1f).fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
items(shown.toList(), key = { it.key }) { n ->
|
||||
Column(Modifier.fillMaxWidth().clip(RoundedCornerShape(14.dp)).background(pal.surface).padding(horizontal = 14.dp, vertical = 10.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(n.app, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f))
|
||||
Text(timeFormat.format(java.util.Date(n.postedAt)), fontSize = 12.sp, color = colors.onSurfaceVariant)
|
||||
}
|
||||
if (n.title.isNotBlank()) Text(n.title, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
if (n.text.isNotBlank()) Text(n.text, fontSize = 14.sp, color = colors.onBackground, maxLines = 4, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun BottomPillButton(label: String, tag: String, onClick: () -> Unit) {
|
||||
val pal = LocalPalette.current
|
||||
Box(
|
||||
Modifier.height(40.dp).clip(RoundedCornerShape(20.dp)).background(pal.signal.copy(alpha = 0.16f))
|
||||
.clickable(role = Role.Button, onClick = onClick).testTag(tag).padding(horizontal = 16.dp),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(label, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1)
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,31 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.Download
|
||||
import androidx.compose.material.icons.outlined.Forum
|
||||
import androidx.compose.material.icons.outlined.Speed
|
||||
import androidx.compose.material.icons.outlined.Notifications
|
||||
import androidx.compose.material.icons.outlined.PhotoLibrary
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
|
||||
class BottomPageActions(
|
||||
val takeScreenshot: ((onDone: (Boolean) -> Unit) -> Unit)? = null,
|
||||
val fps: () -> Float? = { null },
|
||||
val openSettings: ((intent: android.content.Intent, done: () -> Boolean) -> Unit)? = null,
|
||||
val runningGame: () -> String? = { null },
|
||||
)
|
||||
|
||||
@@ -20,7 +34,18 @@ internal const val BOTTOM_PAGE_TELEMETRY = "telemetry"
|
||||
fun sessionBottomPages(actions: BottomPageActions): List<BottomPage> = listOf(
|
||||
BottomPage(BOTTOM_PAGE_TELEMETRY, R.string.bottom_page_telemetry, Icons.Outlined.Speed) { BottomTelemetryPage(actions.fps, actions.runningGame) },
|
||||
BottomPage("downloads", R.string.bottom_page_downloads, Icons.Outlined.Download) { BottomDownloadsPage() },
|
||||
BottomPage("notifications", R.string.bottom_page_notifications, Icons.Outlined.Notifications) { BottomNotificationsPage(actions.openSettings) },
|
||||
BottomPage("screenshots", R.string.bottom_page_screenshots, Icons.Outlined.PhotoLibrary) { BottomScreenshotsPage(actions.takeScreenshot) },
|
||||
BottomPage("chat", R.string.bottom_page_chat, Icons.Outlined.Forum) { BottomChatPage() },
|
||||
)
|
||||
|
||||
@Composable
|
||||
internal fun BottomPillButton(label: String, tag: String, onClick: () -> Unit) {
|
||||
val pal = LocalPalette.current
|
||||
Box(
|
||||
Modifier.height(40.dp).clip(RoundedCornerShape(20.dp)).background(pal.signal.copy(alpha = 0.16f))
|
||||
.clickable(role = Role.Button, onClick = onClick).testTag(tag).padding(horizontal = 16.dp),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Text(label, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1)
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,8 @@ fun BottomTelemetryPage(fps: () -> Float?, runningGame: () -> String? = { null }
|
||||
val now = System.nanoTime()
|
||||
val live = frames.live
|
||||
val stats = frames.stats
|
||||
val graph = FloatArray(FrameStats.GRAPH_FRAMES).also { if (live) stats.graph(it) }
|
||||
val graph = FloatArray(FrameStats.GRAPH_FRAMES)
|
||||
val graphEnd = if (live) stats.graph(graph) else 0L
|
||||
val hz = (frames.refreshMilliHz + 499) / 1000
|
||||
val data = HudData(
|
||||
fps = fpsNow, avgFps = if (live) stats.averageFps() else null, lows = if (live) stats.lows(now) else FrameStats.Lows.EMPTY,
|
||||
@@ -317,6 +318,7 @@ fun BottomTelemetryPage(fps: () -> Float?, runningGame: () -> String? = { null }
|
||||
title = title, cover = cover, played = playedSeconds?.let(::playedText), clock = clock,
|
||||
fpsHistory = fpsHistory.snapshot(), cpuHistory = cpuHistory.snapshot(), gpuHistory = gpuHistory.snapshot(),
|
||||
historySeconds = maxOf(fpsHistory.spanSeconds(), cpuHistory.spanSeconds(), gpuHistory.spanSeconds()),
|
||||
graphEnd = graphEnd,
|
||||
coreGroups = coreGroups, gameCores = gameCores, fahrenheit = tempDisplay.fahrenheit,
|
||||
tempColor = { sensor, c ->
|
||||
thresholds[sensor]?.let { Color(HudMetrics.tempColor(c.toFloat(), it, tempDisplay, TEMP_PLAIN)) } ?: Color(TEMP_PLAIN)
|
||||
|
||||
@@ -224,6 +224,8 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
ChoiceRow(host, "picture-position", stringResource(R.string.display_picture_position), null,
|
||||
listOf("top" to stringResource(R.string.display_position_top),
|
||||
"bottom" to stringResource(R.string.display_position_bottom),
|
||||
"left" to stringResource(R.string.display_position_left),
|
||||
"right" to stringResource(R.string.display_position_right),
|
||||
"center" to stringResource(R.string.display_position_center)),
|
||||
position, onPick = a.onPicturePosition)
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ internal class HudData(
|
||||
val tempColor: (HudMetrics.TempSensor, Int) -> Color,
|
||||
val redC: (HudMetrics.TempSensor) -> Int?,
|
||||
val historySeconds: Int = 0,
|
||||
val graphEnd: Long = 0L,
|
||||
) {
|
||||
val frametimeMs: Float? get() = fps?.takeIf { it > 0f }?.let { 1000f / it }
|
||||
val hz: Int get() = if (refreshHz > 0) refreshHz else 60
|
||||
@@ -268,18 +269,26 @@ private fun lowsText(d: HudData, size: TextUnit, accent: Color, deep: Boolean =
|
||||
private val GRAPH_MIN_GAP = 3.dp
|
||||
|
||||
@Composable
|
||||
private fun Graph(values: List<Float>, lo: Float, hi: Float, color: Color, modifier: Modifier) {
|
||||
private fun Graph(values: List<Float>, lo: Float, hi: Float, color: Color, modifier: Modifier, end: Long = 0L) {
|
||||
Canvas(modifier) {
|
||||
if (values.size < 2 || hi <= lo) return@Canvas
|
||||
val stride = ceil(GRAPH_MIN_GAP.toPx() * (values.size - 1) / size.width).toInt().coerceAtLeast(1)
|
||||
val points = if (stride == 1) values else values.chunked(stride) { it.average().toFloat() }
|
||||
if (points.size < 2) return@Canvas
|
||||
// Buckets start at multiples of stride counted from the first sample ever drawn, so a sample keeps
|
||||
// its bucket as the window scrolls; counted from the window's start, every new frame re-paired them.
|
||||
val skip = Math.floorMod(values.size.toLong() - end, stride.toLong()).toInt()
|
||||
val path = Path()
|
||||
points.forEachIndexed { i, v ->
|
||||
val x = i / (points.size - 1f) * size.width
|
||||
val y = size.height - ((v - lo) / (hi - lo)).coerceIn(0f, 1f) * size.height
|
||||
if (i == 0) path.moveTo(x, y) else path.lineTo(x, y)
|
||||
var drawn = 0
|
||||
var start = skip
|
||||
while (start < values.size) {
|
||||
val stop = minOf(start + stride, values.size)
|
||||
var sum = 0f
|
||||
for (i in start until stop) sum += values[i]
|
||||
val x = (start + stop - 1) / 2f / (values.size - 1f) * size.width
|
||||
val y = size.height - ((sum / (stop - start) - lo) / (hi - lo)).coerceIn(0f, 1f) * size.height
|
||||
if (drawn++ == 0) path.moveTo(x, y) else path.lineTo(x, y)
|
||||
start = stop
|
||||
}
|
||||
if (drawn < 2) return@Canvas
|
||||
drawPath(path, color.copy(alpha = 0.22f), style = Stroke(width = 6.dp.toPx(), cap = StrokeCap.Round, join = StrokeJoin.Round))
|
||||
drawPath(path, color, style = Stroke(width = 2.2f.dp.toPx(), cap = StrokeCap.Round, join = StrokeJoin.Round))
|
||||
}
|
||||
@@ -287,7 +296,7 @@ private fun Graph(values: List<Float>, lo: Float, hi: Float, color: Color, modif
|
||||
|
||||
@Composable
|
||||
private fun FrameGraph(d: HudData, accent: Color, height: Dp) {
|
||||
Graph(d.graph.toList(), 0f, FrameStats.GRAPH_MAX_MS, lerp(accent, Color.White, 0.3f), Modifier.fillMaxWidth().height(height))
|
||||
Graph(d.graph.toList(), 0f, FrameStats.GRAPH_MAX_MS, lerp(accent, Color.White, 0.3f), Modifier.fillMaxWidth().height(height), d.graphEnd)
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -589,7 +598,7 @@ private fun ColumnScope.Pacing(d: HudData, accent: Color) {
|
||||
drawLine(color, Offset(0f, y), Offset(size.width, y), 1.dp.toPx(), pathEffect = dash)
|
||||
}
|
||||
}
|
||||
Graph(d.graph.toList(), 0f, FrameStats.GRAPH_MAX_MS, graphColor, Modifier.fillMaxSize())
|
||||
Graph(d.graph.toList(), 0f, FrameStats.GRAPH_MAX_MS, graphColor, Modifier.fillMaxSize(), d.graphEnd)
|
||||
for ((ms, color) in listOf(target to HudInk.dim, target * 2 to HudInk.amber)) {
|
||||
Small("%.1f ms · %d fps".format(ms, (1000f / ms).roundToInt()), 11.sp, color,
|
||||
Modifier.align(Alignment.TopEnd).offset(y = maxHeight * (1f - ms / FrameStats.GRAPH_MAX_MS) - 17.dp))
|
||||
|
||||
@@ -58,6 +58,7 @@ object Themes {
|
||||
const val RGB_SPEEDS = 10
|
||||
const val DEFAULT_RGB_SPEED = 3
|
||||
const val RGB_HUE_STEP = 3f
|
||||
const val WHITE_RED = "white_red"
|
||||
|
||||
var rgbSpeed by mutableStateOf(DEFAULT_RGB_SPEED)
|
||||
private set
|
||||
@@ -127,6 +128,13 @@ object Themes {
|
||||
primary = Color(0xFF2E86FF), primary2 = Color(0xFF2684FF), onPrimary = Color(0xFF03111F), signal = Color(0xFF2E86FF),
|
||||
good = Color(0xFF4CD37F),
|
||||
),
|
||||
Palette(
|
||||
WHITE_RED, R.string.theme_white_red, R.string.theme_white_red_detail,
|
||||
background = Color(0xFFF8F8F8), surface = Color(0xFFFFFFFF), surfaceVariant = Color(0xFFF0F0F0), line = Color(0xFFDDDDDD), line2 = Color(0xFFC8C8C8),
|
||||
onBackground = Color(0xFF191919), onSurfaceVariant = Color(0xFF555555),
|
||||
primary = Color(0xFFD62828), primary2 = Color(0xFFB71C1C), onPrimary = Color(0xFFFFFFFF), signal = Color(0xFFD62828),
|
||||
good = Color(0xFF248548),
|
||||
),
|
||||
innerGamer(0f),
|
||||
ThemeColors.palette(DEFAULT_PRIMARY, DEFAULT_SECONDARY, R.string.theme_gradient, R.string.theme_gradient_detail),
|
||||
)
|
||||
|
||||
@@ -1873,13 +1873,6 @@
|
||||
<string name="bottom_downloads_shader">جارٍ تنزيل ذاكرة المظلِّلات المؤقتة</string>
|
||||
<string name="bottom_downloads_paused">متوقف مؤقتًا</string>
|
||||
<string name="bottom_downloads_queued">بانتظار البدء</string>
|
||||
<string name="bottom_page_notifications">الإشعارات</string>
|
||||
<string name="bottom_notifications_listener">الشاشة السفلية لـ DroidDeck</string>
|
||||
<string name="bottom_notifications_why">اعرض الرسائل والإشعارات الأخرى هنا أثناء اللعب. تبقى على هذه الشاشة فقط ولا تُحفظ. يطلب Android الإذن مرة واحدة: تُفتح صفحة الوصول إلى الإشعارات على هذه الشاشة؛ فعِّل DroidDeck هناك وستعود هذه الصفحة تلقائيًا.</string>
|
||||
<string name="bottom_notifications_allow">السماح بالوصول إلى الإشعارات</string>
|
||||
<string name="bottom_notifications_none">لا توجد إشعارات.</string>
|
||||
<string name="bottom_notifications_count">الإشعارات: %1$d</string>
|
||||
<string name="bottom_notifications_clear">مسح</string>
|
||||
<string name="bottom_page_screenshots">لقطات الشاشة</string>
|
||||
<string name="stats_fps_needs_hud">يتطلب FPS تشغيل واجهة الأداء</string>
|
||||
<string name="stats_speed">السرعة</string>
|
||||
@@ -2983,6 +2976,8 @@
|
||||
<string name="display_position_top">أعلى</string>
|
||||
<string name="display_position_bottom">أسفل</string>
|
||||
<string name="display_position_center">الوسط (افتراضي)</string>
|
||||
<string name="display_position_left">يسار</string>
|
||||
<string name="display_position_right">يمين</string>
|
||||
<string name="setup_tab_storage">التخزين</string>
|
||||
<string name="storage_measuring">جارٍ قياس التخزين…</string>
|
||||
<string name="storage_measuring_hint">يستغرق القياس الأول بضع ثوانٍ.</string>
|
||||
@@ -3816,4 +3811,7 @@
|
||||
<string name="input_reset_positions">إعادة تعيين المواضع</string>
|
||||
<string name="input_show_label">إظهار التسمية</string>
|
||||
<string name="input_layout_import_failed">تعذّر استيراد هذا التخطيط</string>
|
||||
|
||||
<string name="theme_white_red">ثلج قرمزي</string>
|
||||
|
||||
</resources>
|
||||
@@ -1865,13 +1865,6 @@
|
||||
<string name="bottom_downloads_shader">Descargando caché de shaders</string>
|
||||
<string name="bottom_downloads_paused">En pausa</string>
|
||||
<string name="bottom_downloads_queued">Esperando para empezar</string>
|
||||
<string name="bottom_page_notifications">Notificaciones</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck – pantalla inferior</string>
|
||||
<string name="bottom_notifications_why">Muestra aquí los mensajes y otras notificaciones mientras juegas. Solo permanecen en esta pantalla y no se guardan. Android lo pregunta una vez: su página de acceso a notificaciones se abre en esta pantalla; activa DroidDeck ahí y esta página volverá sola.</string>
|
||||
<string name="bottom_notifications_allow">Permitir acceso a notificaciones</string>
|
||||
<string name="bottom_notifications_none">No hay notificaciones.</string>
|
||||
<string name="bottom_notifications_count">%1$d notificaciones</string>
|
||||
<string name="bottom_notifications_clear">Borrar</string>
|
||||
<string name="bottom_page_screenshots">Capturas de pantalla</string>
|
||||
<string name="stats_fps_needs_hud">Los FPS requieren el HUD activado</string>
|
||||
<string name="stats_speed">Velocidad</string>
|
||||
@@ -2835,6 +2828,8 @@
|
||||
<string name="display_position_top">Arriba</string>
|
||||
<string name="display_position_bottom">Abajo</string>
|
||||
<string name="display_position_center">Centro (predeterminado)</string>
|
||||
<string name="display_position_left">Izquierda</string>
|
||||
<string name="display_position_right">Derecha</string>
|
||||
<string name="setup_tab_storage">Almacenamiento</string>
|
||||
<string name="storage_measuring">Midiendo el almacenamiento…</string>
|
||||
<string name="storage_measuring_hint">La primera vez tarda unos segundos.</string>
|
||||
@@ -3672,4 +3667,6 @@
|
||||
<string name="input_reset_positions">Restablecer posiciones</string>
|
||||
<string name="input_show_label">Mostrar etiqueta</string>
|
||||
<string name="input_layout_import_failed">No se pudo importar esta disposición</string>
|
||||
<string name="theme_white_red">Nieve escarlata</string>
|
||||
<string name="theme_white_red_detail">Superficies blancas con acentos rojos.</string>
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Изтегляне на кеша на шейдърите</string>
|
||||
<string name="bottom_downloads_paused">На пауза</string>
|
||||
<string name="bottom_downloads_queued">Изчаква стартиране</string>
|
||||
<string name="bottom_page_notifications">Известия</string>
|
||||
<string name="bottom_notifications_listener">Долен екран на DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Показвайте тук съобщения и други известия, докато играете. Те остават само на този екран и не се запазват. Android пита веднъж: страницата за достъп до известията се отваря на този екран; включете DroidDeck там и тази страница ще се върне сама.</string>
|
||||
<string name="bottom_notifications_allow">Разрешаване на достъпа до известията</string>
|
||||
<string name="bottom_notifications_none">Няма известия.</string>
|
||||
<string name="bottom_notifications_count">Известия: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Изчисти</string>
|
||||
<string name="bottom_page_screenshots">Екранни снимки</string>
|
||||
<string name="stats_fps_needs_hud">За FPS трябва HUD да е включен</string>
|
||||
<string name="stats_speed">Скорост</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Горе</string>
|
||||
<string name="display_position_bottom">Долу</string>
|
||||
<string name="display_position_center">В средата (по подразбиране)</string>
|
||||
<string name="display_position_left">Наляво</string>
|
||||
<string name="display_position_right">Надясно</string>
|
||||
<string name="setup_tab_storage">Съхранение</string>
|
||||
<string name="storage_measuring">Измерване на съхранението…</string>
|
||||
<string name="storage_measuring_hint">Първият път отнема няколко секунди.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Нулиране на позициите</string>
|
||||
<string name="input_show_label">Показване на етикета</string>
|
||||
<string name="input_layout_import_failed">Това разположение не можа да бъде импортирано</string>
|
||||
|
||||
<string name="theme_white_red">Ален сняг</string>
|
||||
|
||||
</resources>
|
||||
@@ -1825,13 +1825,6 @@
|
||||
<string name="bottom_downloads_shader">Stahování mezipaměti shaderů</string>
|
||||
<string name="bottom_downloads_paused">Pozastaveno</string>
|
||||
<string name="bottom_downloads_queued">Čeká na spuštění</string>
|
||||
<string name="bottom_page_notifications">Oznámení</string>
|
||||
<string name="bottom_notifications_listener">Spodní obrazovka DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Zobrazujte zde zprávy a další oznámení během hraní. Zůstávají jen na této obrazovce a neukládají se. Android se zeptá jednou: na této obrazovce se otevře jeho stránka přístupu k oznámením; zapněte tam DroidDeck a tato stránka se sama vrátí.</string>
|
||||
<string name="bottom_notifications_allow">Povolit přístup k oznámením</string>
|
||||
<string name="bottom_notifications_none">Žádná oznámení.</string>
|
||||
<string name="bottom_notifications_count">Oznámení: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Vymazat</string>
|
||||
<string name="bottom_page_screenshots">Snímky obrazovky</string>
|
||||
<string name="stats_fps_needs_hud">FPS vyžaduje zapnutý HUD</string>
|
||||
<string name="stats_speed">Rychlost</string>
|
||||
@@ -2925,6 +2918,8 @@
|
||||
<string name="display_position_top">Nahoře</string>
|
||||
<string name="display_position_bottom">Dole</string>
|
||||
<string name="display_position_center">Uprostřed (výchozí)</string>
|
||||
<string name="display_position_left">Vlevo</string>
|
||||
<string name="display_position_right">Vpravo</string>
|
||||
<string name="setup_tab_storage">Úložiště</string>
|
||||
<string name="storage_measuring">Měření úložiště…</string>
|
||||
<string name="storage_measuring_hint">Poprvé to trvá pár sekund.</string>
|
||||
@@ -3738,4 +3733,7 @@
|
||||
<string name="input_reset_positions">Obnovit pozice</string>
|
||||
<string name="input_show_label">Zobrazit popisek</string>
|
||||
<string name="input_layout_import_failed">Toto rozložení nelze importovat</string>
|
||||
|
||||
<string name="theme_white_red">Šarlatový sníh</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Downloader shader-cache</string>
|
||||
<string name="bottom_downloads_paused">På pause</string>
|
||||
<string name="bottom_downloads_queued">Venter på at starte</string>
|
||||
<string name="bottom_page_notifications">Notifikationer</string>
|
||||
<string name="bottom_notifications_listener">DroidDecks nederste skærm</string>
|
||||
<string name="bottom_notifications_why">Vis beskeder og andre notifikationer her, mens du spiller. De bliver kun på denne skærm og gemmes ikke. Android spørger én gang: siden for notifikationsadgang åbnes på denne skærm; slå DroidDeck til der, så vender denne side selv tilbage.</string>
|
||||
<string name="bottom_notifications_allow">Tillad notifikationsadgang</string>
|
||||
<string name="bottom_notifications_none">Ingen notifikationer.</string>
|
||||
<string name="bottom_notifications_count">%1$d notifikationer</string>
|
||||
<string name="bottom_notifications_clear">Ryd</string>
|
||||
<string name="bottom_page_screenshots">Skærmbilleder</string>
|
||||
<string name="stats_fps_needs_hud">FPS kræver, at HUD er slået til</string>
|
||||
<string name="stats_speed">Hastighed</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Øverst</string>
|
||||
<string name="display_position_bottom">Nederst</string>
|
||||
<string name="display_position_center">Midten (standard)</string>
|
||||
<string name="display_position_left">Venstre</string>
|
||||
<string name="display_position_right">Højre</string>
|
||||
<string name="setup_tab_storage">Lager</string>
|
||||
<string name="storage_measuring">Måler lager…</string>
|
||||
<string name="storage_measuring_hint">Første gang tager et par sekunder.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Nulstil placeringer</string>
|
||||
<string name="input_show_label">Vis etiket</string>
|
||||
<string name="input_layout_import_failed">Dette layout kunne ikke importeres</string>
|
||||
|
||||
<string name="theme_white_red">Skarlagensne</string>
|
||||
|
||||
</resources>
|
||||
@@ -1769,13 +1769,6 @@
|
||||
<string name="bottom_downloads_shader">Shader-Cache wird heruntergeladen</string>
|
||||
<string name="bottom_downloads_paused">Pausiert</string>
|
||||
<string name="bottom_downloads_queued">Wartet auf Start</string>
|
||||
<string name="bottom_page_notifications">Benachrichtigungen</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck – unterer Bildschirm</string>
|
||||
<string name="bottom_notifications_why">Zeigt Nachrichten und andere Benachrichtigungen hier an, während du spielst. Sie bleiben nur auf diesem Bildschirm und werden nicht gespeichert. Android fragt einmal: Die Seite für den Benachrichtigungszugriff öffnet sich auf diesem Bildschirm; aktiviere dort DroidDeck, dann kehrt diese Seite von selbst zurück.</string>
|
||||
<string name="bottom_notifications_allow">Benachrichtigungszugriff erlauben</string>
|
||||
<string name="bottom_notifications_none">Keine Benachrichtigungen.</string>
|
||||
<string name="bottom_notifications_count">%1$d Benachrichtigungen</string>
|
||||
<string name="bottom_notifications_clear">Löschen</string>
|
||||
<string name="bottom_page_screenshots">Screenshots</string>
|
||||
<string name="stats_fps_needs_hud">FPS benötigt das aktive HUD</string>
|
||||
<string name="stats_speed">Geschwindigkeit</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Oben</string>
|
||||
<string name="display_position_bottom">Unten</string>
|
||||
<string name="display_position_center">Mitte (Standard)</string>
|
||||
<string name="display_position_left">Links</string>
|
||||
<string name="display_position_right">Rechts</string>
|
||||
<string name="setup_tab_storage">Speicher</string>
|
||||
<string name="storage_measuring">Speicher wird erfasst…</string>
|
||||
<string name="storage_measuring_hint">Die erste Erfassung dauert ein paar Sekunden.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Positionen zurücksetzen</string>
|
||||
<string name="input_show_label">Beschriftung anzeigen</string>
|
||||
<string name="input_layout_import_failed">Dieses Layout konnte nicht importiert werden</string>
|
||||
|
||||
<string name="theme_white_red">Scharlachroter Schnee</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Λήψη cache shader</string>
|
||||
<string name="bottom_downloads_paused">Σε παύση</string>
|
||||
<string name="bottom_downloads_queued">Αναμονή για έναρξη</string>
|
||||
<string name="bottom_page_notifications">Ειδοποιήσεις</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck – κάτω οθόνη</string>
|
||||
<string name="bottom_notifications_why">Εμφάνιση μηνυμάτων και άλλων ειδοποιήσεων εδώ ενώ παίζετε. Παραμένουν μόνο σε αυτή την οθόνη και δεν αποθηκεύονται. Το Android ρωτά μία φορά: η σελίδα πρόσβασης ειδοποιήσεων ανοίγει σε αυτή την οθόνη· ενεργοποιήστε εκεί το DroidDeck και αυτή η σελίδα επιστρέφει μόνη της.</string>
|
||||
<string name="bottom_notifications_allow">Αποδοχή πρόσβασης ειδοποιήσεων</string>
|
||||
<string name="bottom_notifications_none">Δεν υπάρχουν ειδοποιήσεις.</string>
|
||||
<string name="bottom_notifications_count">%1$d ειδοποιήσεις</string>
|
||||
<string name="bottom_notifications_clear">Απαλοιφή</string>
|
||||
<string name="bottom_page_screenshots">Στιγμιότυπα οθόνης</string>
|
||||
<string name="stats_fps_needs_hud">Τα FPS απαιτούν ενεργό HUD</string>
|
||||
<string name="stats_speed">Ταχύτητα</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Πάνω</string>
|
||||
<string name="display_position_bottom">Κάτω</string>
|
||||
<string name="display_position_center">Κέντρο (προεπιλογή)</string>
|
||||
<string name="display_position_left">Αριστερά</string>
|
||||
<string name="display_position_right">Δεξιά</string>
|
||||
<string name="setup_tab_storage">Αποθήκευση</string>
|
||||
<string name="storage_measuring">Μέτρηση αποθήκευσης…</string>
|
||||
<string name="storage_measuring_hint">Την πρώτη φορά παίρνει λίγα δευτερόλεπτα.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Επαναφορά θέσεων</string>
|
||||
<string name="input_show_label">Εμφάνιση ετικέτας</string>
|
||||
<string name="input_layout_import_failed">Δεν ήταν δυνατή η εισαγωγή αυτής της διάταξης</string>
|
||||
|
||||
<string name="theme_white_red">Κατακόκκινο χιόνι</string>
|
||||
|
||||
</resources>
|
||||
@@ -1801,13 +1801,6 @@
|
||||
<string name="bottom_downloads_shader">Descargando caché de shaders</string>
|
||||
<string name="bottom_downloads_paused">En pausa</string>
|
||||
<string name="bottom_downloads_queued">Esperando para empezar</string>
|
||||
<string name="bottom_page_notifications">Notificaciones</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck – pantalla inferior</string>
|
||||
<string name="bottom_notifications_why">Muestra aquí los mensajes y otras notificaciones mientras juegas. Solo permanecen en esta pantalla y no se guardan. Android lo pregunta una vez: su página de acceso a notificaciones se abre en esta pantalla; activa DroidDeck ahí y esta página volverá sola.</string>
|
||||
<string name="bottom_notifications_allow">Permitir acceso a notificaciones</string>
|
||||
<string name="bottom_notifications_none">No hay notificaciones.</string>
|
||||
<string name="bottom_notifications_count">%1$d notificaciones</string>
|
||||
<string name="bottom_notifications_clear">Borrar</string>
|
||||
<string name="bottom_page_screenshots">Capturas de pantalla</string>
|
||||
<string name="stats_fps_needs_hud">Los FPS requieren el HUD activado</string>
|
||||
<string name="stats_speed">Velocidad</string>
|
||||
@@ -2896,6 +2889,8 @@
|
||||
<string name="display_position_top">Arriba</string>
|
||||
<string name="display_position_bottom">Abajo</string>
|
||||
<string name="display_position_center">Centro (predeterminado)</string>
|
||||
<string name="display_position_left">Izquierda</string>
|
||||
<string name="display_position_right">Derecha</string>
|
||||
<string name="setup_tab_storage">Almacenamiento</string>
|
||||
<string name="storage_measuring">Midiendo el almacenamiento…</string>
|
||||
<string name="storage_measuring_hint">La primera vez tarda unos segundos.</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Restablecer posiciones</string>
|
||||
<string name="input_show_label">Mostrar etiqueta</string>
|
||||
<string name="input_layout_import_failed">No se ha podido importar esta disposición</string>
|
||||
|
||||
<string name="theme_white_red">Nieve escarlata</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Ladataan sävytinvälimuistia</string>
|
||||
<string name="bottom_downloads_paused">Keskeytetty</string>
|
||||
<string name="bottom_downloads_queued">Odottaa alkamista</string>
|
||||
<string name="bottom_page_notifications">Ilmoitukset</string>
|
||||
<string name="bottom_notifications_listener">DroidDeckin alanäyttö</string>
|
||||
<string name="bottom_notifications_why">Näytä viestit ja muut ilmoitukset täällä pelatessasi. Ne näkyvät vain tällä näytöllä, eikä niitä tallenneta. Android kysyy kerran: sen ilmoitusten käyttöoikeussivu avautuu tälle näytölle; kytke DroidDeck siellä päälle, niin tämä sivu palaa itsestään.</string>
|
||||
<string name="bottom_notifications_allow">Salli ilmoitusten käyttö</string>
|
||||
<string name="bottom_notifications_none">Ei ilmoituksia.</string>
|
||||
<string name="bottom_notifications_count">Ilmoituksia: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Tyhjennä</string>
|
||||
<string name="bottom_page_screenshots">Kuvakaappaukset</string>
|
||||
<string name="stats_fps_needs_hud">FPS vaatii HUD:n päälle</string>
|
||||
<string name="stats_speed">Nopeus</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Ylhäällä</string>
|
||||
<string name="display_position_bottom">Alhaalla</string>
|
||||
<string name="display_position_center">Keskellä (oletus)</string>
|
||||
<string name="display_position_left">Vasen</string>
|
||||
<string name="display_position_right">Oikea</string>
|
||||
<string name="setup_tab_storage">Tallennustila</string>
|
||||
<string name="storage_measuring">Mitataan tallennustilaa…</string>
|
||||
<string name="storage_measuring_hint">Ensimmäisellä kerralla kestää muutaman sekunnin.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Palauta sijainnit</string>
|
||||
<string name="input_show_label">Näytä nimi</string>
|
||||
<string name="input_layout_import_failed">Tätä asettelua ei voitu tuoda</string>
|
||||
|
||||
<string name="theme_white_red">Helakanpunainen lumi</string>
|
||||
|
||||
</resources>
|
||||
@@ -1801,13 +1801,6 @@
|
||||
<string name="bottom_downloads_shader">Téléchargement du cache de shaders</string>
|
||||
<string name="bottom_downloads_paused">En pause</string>
|
||||
<string name="bottom_downloads_queued">En attente de démarrage</string>
|
||||
<string name="bottom_page_notifications">Notifications</string>
|
||||
<string name="bottom_notifications_listener">Écran inférieur DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Affichez ici les messages et autres notifications pendant que vous jouez. Ils restent uniquement sur cet écran et ne sont pas enregistrés. Android ne le demande qu\'une fois : sa page d\'accès aux notifications s\'ouvre sur cet écran ; activez-y DroidDeck et cette page reviendra d\'elle-même.</string>
|
||||
<string name="bottom_notifications_allow">Autoriser l\'accès aux notifications</string>
|
||||
<string name="bottom_notifications_none">Aucune notification.</string>
|
||||
<string name="bottom_notifications_count">%1$d notifications</string>
|
||||
<string name="bottom_notifications_clear">Effacer</string>
|
||||
<string name="bottom_page_screenshots">Captures d\'écran</string>
|
||||
<string name="stats_fps_needs_hud">Les FPS nécessitent d\'activer le HUD</string>
|
||||
<string name="stats_speed">Vitesse</string>
|
||||
@@ -2896,6 +2889,8 @@
|
||||
<string name="display_position_top">Haut</string>
|
||||
<string name="display_position_bottom">Bas</string>
|
||||
<string name="display_position_center">Centre (par défaut)</string>
|
||||
<string name="display_position_left">Gauche</string>
|
||||
<string name="display_position_right">Droite</string>
|
||||
<string name="setup_tab_storage">Stockage</string>
|
||||
<string name="storage_measuring">Mesure du stockage…</string>
|
||||
<string name="storage_measuring_hint">Cela prend quelques secondes la première fois.</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Réinitialiser les positions</string>
|
||||
<string name="input_show_label">Afficher le libellé</string>
|
||||
<string name="input_layout_import_failed">Impossible d’importer cette disposition</string>
|
||||
|
||||
<string name="theme_white_red">Neige écarlate</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">शेडर कैश डाउनलोड हो रहा है</string>
|
||||
<string name="bottom_downloads_paused">रुका हुआ</string>
|
||||
<string name="bottom_downloads_queued">शुरू होने का इंतज़ार</string>
|
||||
<string name="bottom_page_notifications">नोटिफ़िकेशन</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck नीचे की स्क्रीन</string>
|
||||
<string name="bottom_notifications_why">खेलते समय मैसेज और अन्य नोटिफ़िकेशन यहां दिखाएं। वे सिर्फ़ इसी स्क्रीन पर रहते हैं और सेव नहीं होते। Android एक बार पूछता है: उसका नोटिफ़िकेशन ऐक्सेस पेज इसी स्क्रीन पर खुलता है; वहां DroidDeck चालू करें और यह पेज अपने-आप वापस आ जाएगा।</string>
|
||||
<string name="bottom_notifications_allow">नोटिफ़िकेशन ऐक्सेस की अनुमति दें</string>
|
||||
<string name="bottom_notifications_none">कोई नोटिफ़िकेशन नहीं।</string>
|
||||
<string name="bottom_notifications_count">%1$d नोटिफ़िकेशन</string>
|
||||
<string name="bottom_notifications_clear">साफ़ करें</string>
|
||||
<string name="bottom_page_screenshots">स्क्रीनशॉट</string>
|
||||
<string name="stats_fps_needs_hud">FPS के लिए HUD चालू होना चाहिए</string>
|
||||
<string name="stats_speed">स्पीड</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">ऊपर</string>
|
||||
<string name="display_position_bottom">नीचे</string>
|
||||
<string name="display_position_center">बीच में (डिफ़ॉल्ट)</string>
|
||||
<string name="display_position_left">बाएँ</string>
|
||||
<string name="display_position_right">दाएँ</string>
|
||||
<string name="setup_tab_storage">स्टोरेज</string>
|
||||
<string name="storage_measuring">स्टोरेज मापा जा रहा है…</string>
|
||||
<string name="storage_measuring_hint">पहली बार कुछ सेकंड लगते हैं।</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">स्थितियाँ रीसेट करें</string>
|
||||
<string name="input_show_label">लेबल दिखाएँ</string>
|
||||
<string name="input_layout_import_failed">यह लेआउट इम्पोर्ट नहीं किया जा सका</string>
|
||||
|
||||
<string name="theme_white_red">किरमिज़ी बर्फ</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Shader-gyorsítótár letöltése</string>
|
||||
<string name="bottom_downloads_paused">Szüneteltetve</string>
|
||||
<string name="bottom_downloads_queued">Indításra vár</string>
|
||||
<string name="bottom_page_notifications">Értesítések</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck alsó képernyő</string>
|
||||
<string name="bottom_notifications_why">Itt jelenítheti meg az üzeneteket és más értesítéseket játék közben. Csak ezen a képernyőn láthatók, és nem kerülnek mentésre. Az Android egyszer kérdez rá: az értesítési hozzáférés oldala ezen a képernyőn nyílik meg; kapcsolja be ott a DroidDecket, és ez az oldal magától visszatér.</string>
|
||||
<string name="bottom_notifications_allow">Értesítési hozzáférés engedélyezése</string>
|
||||
<string name="bottom_notifications_none">Nincsenek értesítések.</string>
|
||||
<string name="bottom_notifications_count">%1$d értesítés</string>
|
||||
<string name="bottom_notifications_clear">Törlés</string>
|
||||
<string name="bottom_page_screenshots">Képernyőképek</string>
|
||||
<string name="stats_fps_needs_hud">Az FPS-hez be kell kapcsolni a HUD-ot</string>
|
||||
<string name="stats_speed">Sebesség</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Fent</string>
|
||||
<string name="display_position_bottom">Lent</string>
|
||||
<string name="display_position_center">Középen (alapértelmezett)</string>
|
||||
<string name="display_position_left">Bal</string>
|
||||
<string name="display_position_right">Jobb</string>
|
||||
<string name="setup_tab_storage">Tárhely</string>
|
||||
<string name="storage_measuring">Tárhely mérése…</string>
|
||||
<string name="storage_measuring_hint">Első alkalommal pár másodpercig tart.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Pozíciók visszaállítása</string>
|
||||
<string name="input_show_label">Címke megjelenítése</string>
|
||||
<string name="input_layout_import_failed">Ez az elrendezés nem importálható</string>
|
||||
|
||||
<string name="theme_white_red">Skarlátvörös hó</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">Mengunduh cache shader</string>
|
||||
<string name="bottom_downloads_paused">Dijeda</string>
|
||||
<string name="bottom_downloads_queued">Menunggu dimulai</string>
|
||||
<string name="bottom_page_notifications">Notifikasi</string>
|
||||
<string name="bottom_notifications_listener">Layar bawah DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Tampilkan pesan dan notifikasi lain di sini saat Anda bermain. Notifikasi hanya muncul di layar ini dan tidak disimpan. Android hanya meminta sekali: halaman akses notifikasinya terbuka di layar ini; aktifkan DroidDeck di sana dan halaman ini akan kembali dengan sendirinya.</string>
|
||||
<string name="bottom_notifications_allow">Izinkan akses notifikasi</string>
|
||||
<string name="bottom_notifications_none">Tidak ada notifikasi.</string>
|
||||
<string name="bottom_notifications_count">%1$d notifikasi</string>
|
||||
<string name="bottom_notifications_clear">Hapus</string>
|
||||
<string name="bottom_page_screenshots">Tangkapan layar</string>
|
||||
<string name="stats_fps_needs_hud">FPS memerlukan HUD aktif</string>
|
||||
<string name="stats_speed">Kecepatan</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">Atas</string>
|
||||
<string name="display_position_bottom">Bawah</string>
|
||||
<string name="display_position_center">Tengah (bawaan)</string>
|
||||
<string name="display_position_left">Kiri</string>
|
||||
<string name="display_position_right">Kanan</string>
|
||||
<string name="setup_tab_storage">Penyimpanan</string>
|
||||
<string name="storage_measuring">Mengukur penyimpanan…</string>
|
||||
<string name="storage_measuring_hint">Butuh beberapa detik pada kali pertama.</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">Atur ulang posisi</string>
|
||||
<string name="input_show_label">Tampilkan label</string>
|
||||
<string name="input_layout_import_failed">Tata letak ini tidak dapat diimpor</string>
|
||||
|
||||
<string name="theme_white_red">Salju Kirmizi</string>
|
||||
|
||||
</resources>
|
||||
@@ -1793,13 +1793,6 @@
|
||||
<string name="bottom_downloads_shader">Download della cache degli shader</string>
|
||||
<string name="bottom_downloads_paused">In pausa</string>
|
||||
<string name="bottom_downloads_queued">In attesa di avvio</string>
|
||||
<string name="bottom_page_notifications">Notifiche</string>
|
||||
<string name="bottom_notifications_listener">Schermo inferiore DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Mostra qui messaggi e altre notifiche mentre giochi. Restano solo su questo schermo e non vengono salvate. Android lo chiede una sola volta: la sua pagina di accesso alle notifiche si apre su questo schermo; attiva DroidDeck lì e questa pagina torna da sola.</string>
|
||||
<string name="bottom_notifications_allow">Consenti accesso alle notifiche</string>
|
||||
<string name="bottom_notifications_none">Nessuna notifica.</string>
|
||||
<string name="bottom_notifications_count">%1$d notifiche</string>
|
||||
<string name="bottom_notifications_clear">Cancella</string>
|
||||
<string name="bottom_page_screenshots">Screenshot</string>
|
||||
<string name="stats_fps_needs_hud">Gli FPS richiedono l\'HUD attivo</string>
|
||||
<string name="stats_speed">Velocità</string>
|
||||
@@ -2896,6 +2889,8 @@
|
||||
<string name="display_position_top">In alto</string>
|
||||
<string name="display_position_bottom">In basso</string>
|
||||
<string name="display_position_center">Centro (predefinito)</string>
|
||||
<string name="display_position_left">Sinistra</string>
|
||||
<string name="display_position_right">Destra</string>
|
||||
<string name="setup_tab_storage">Archiviazione</string>
|
||||
<string name="storage_measuring">Misurazione dell\'archiviazione…</string>
|
||||
<string name="storage_measuring_hint">La prima volta richiede qualche secondo.</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Ripristina posizioni</string>
|
||||
<string name="input_show_label">Mostra etichetta</string>
|
||||
<string name="input_layout_import_failed">Impossibile importare questo layout</string>
|
||||
|
||||
<string name="theme_white_red">Neve scarlatta</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">シェーダーキャッシュをダウンロード中</string>
|
||||
<string name="bottom_downloads_paused">一時停止中</string>
|
||||
<string name="bottom_downloads_queued">開始待ち</string>
|
||||
<string name="bottom_page_notifications">通知</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck下部画面</string>
|
||||
<string name="bottom_notifications_why">プレイ中、メッセージなどの通知をここに表示します。通知はこの画面にのみ表示され、保存されません。Androidによる確認は一度だけです。この画面に通知へのアクセスのページが開くので、そこでDroidDeckをオンにすると、このページに自動的に戻ります。</string>
|
||||
<string name="bottom_notifications_allow">通知へのアクセスを許可</string>
|
||||
<string name="bottom_notifications_none">通知はありません。</string>
|
||||
<string name="bottom_notifications_count">%1$d件の通知</string>
|
||||
<string name="bottom_notifications_clear">クリア</string>
|
||||
<string name="bottom_page_screenshots">スクリーンショット</string>
|
||||
<string name="stats_fps_needs_hud">FPSの表示にはHUDをオンにする必要があります</string>
|
||||
<string name="stats_speed">速度</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">上</string>
|
||||
<string name="display_position_bottom">下</string>
|
||||
<string name="display_position_center">中央(既定)</string>
|
||||
<string name="display_position_left">左</string>
|
||||
<string name="display_position_right">右</string>
|
||||
<string name="setup_tab_storage">ストレージ</string>
|
||||
<string name="storage_measuring">ストレージを集計しています…</string>
|
||||
<string name="storage_measuring_hint">初回の集計には数秒かかります。</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">位置をリセット</string>
|
||||
<string name="input_show_label">ラベルを表示</string>
|
||||
<string name="input_layout_import_failed">このレイアウトをインポートできませんでした</string>
|
||||
|
||||
<string name="theme_white_red">緋色の雪</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">셰이더 캐시 다운로드 중</string>
|
||||
<string name="bottom_downloads_paused">일시 중지됨</string>
|
||||
<string name="bottom_downloads_queued">시작 대기 중</string>
|
||||
<string name="bottom_page_notifications">알림</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck 하단 화면</string>
|
||||
<string name="bottom_notifications_why">플레이하는 동안 메시지와 기타 알림을 여기에 표시합니다. 알림은 이 화면에만 표시되며 저장되지 않습니다. Android에서 한 번만 묻습니다. 이 화면에 알림 접근 권한 페이지가 열리면 DroidDeck을 켜세요. 그러면 이 페이지로 자동으로 돌아옵니다.</string>
|
||||
<string name="bottom_notifications_allow">알림 접근 허용</string>
|
||||
<string name="bottom_notifications_none">알림이 없습니다.</string>
|
||||
<string name="bottom_notifications_count">알림 %1$d개</string>
|
||||
<string name="bottom_notifications_clear">지우기</string>
|
||||
<string name="bottom_page_screenshots">스크린샷</string>
|
||||
<string name="stats_fps_needs_hud">FPS를 보려면 HUD를 켜야 합니다</string>
|
||||
<string name="stats_speed">속도</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">위</string>
|
||||
<string name="display_position_bottom">아래</string>
|
||||
<string name="display_position_center">가운데(기본)</string>
|
||||
<string name="display_position_left">왼쪽</string>
|
||||
<string name="display_position_right">오른쪽</string>
|
||||
<string name="setup_tab_storage">저장 공간</string>
|
||||
<string name="storage_measuring">저장 공간 계산 중…</string>
|
||||
<string name="storage_measuring_hint">처음 계산할 때는 몇 초 걸립니다.</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">위치 초기화</string>
|
||||
<string name="input_show_label">라벨 표시</string>
|
||||
<string name="input_layout_import_failed">이 레이아웃을 가져올 수 없습니다</string>
|
||||
|
||||
<string name="theme_white_red">진홍빛 눈</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">Memuat turun cache shader</string>
|
||||
<string name="bottom_downloads_paused">Dijeda</string>
|
||||
<string name="bottom_downloads_queued">Menunggu untuk bermula</string>
|
||||
<string name="bottom_page_notifications">Pemberitahuan</string>
|
||||
<string name="bottom_notifications_listener">Skrin bawah DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Paparkan mesej dan pemberitahuan lain di sini semasa anda bermain. Ia hanya kekal pada skrin ini dan tidak disimpan. Android bertanya sekali sahaja: halaman akses pemberitahuannya dibuka pada skrin ini; hidupkan DroidDeck di sana dan halaman ini akan kembali dengan sendirinya.</string>
|
||||
<string name="bottom_notifications_allow">Benarkan akses pemberitahuan</string>
|
||||
<string name="bottom_notifications_none">Tiada pemberitahuan.</string>
|
||||
<string name="bottom_notifications_count">%1$d pemberitahuan</string>
|
||||
<string name="bottom_notifications_clear">Kosongkan</string>
|
||||
<string name="bottom_page_screenshots">Tangkapan skrin</string>
|
||||
<string name="stats_fps_needs_hud">FPS memerlukan HUD dihidupkan</string>
|
||||
<string name="stats_speed">Kelajuan</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">Atas</string>
|
||||
<string name="display_position_bottom">Bawah</string>
|
||||
<string name="display_position_center">Tengah (lalai)</string>
|
||||
<string name="display_position_left">Kiri</string>
|
||||
<string name="display_position_right">Kanan</string>
|
||||
<string name="setup_tab_storage">Storan</string>
|
||||
<string name="storage_measuring">Mengukur storan…</string>
|
||||
<string name="storage_measuring_hint">Mengambil beberapa saat pada kali pertama.</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">Tetapkan semula kedudukan</string>
|
||||
<string name="input_show_label">Tunjukkan label</string>
|
||||
<string name="input_layout_import_failed">Susun atur ini tidak dapat diimport</string>
|
||||
|
||||
<string name="theme_white_red">Salji Merah Skarlet</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Laster ned shaderbuffer</string>
|
||||
<string name="bottom_downloads_paused">Pauset</string>
|
||||
<string name="bottom_downloads_queued">Venter på å starte</string>
|
||||
<string name="bottom_page_notifications">Varslinger</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck nedre skjerm</string>
|
||||
<string name="bottom_notifications_why">Vis meldinger og andre varslinger her mens du spiller. De vises bare på denne skjermen og lagres ikke. Android spør én gang: siden for varseltilgang åpnes på denne skjermen; slå på DroidDeck der, så kommer denne siden tilbake av seg selv.</string>
|
||||
<string name="bottom_notifications_allow">Tillat varseltilgang</string>
|
||||
<string name="bottom_notifications_none">Ingen varslinger.</string>
|
||||
<string name="bottom_notifications_count">%1$d varslinger</string>
|
||||
<string name="bottom_notifications_clear">Fjern</string>
|
||||
<string name="bottom_page_screenshots">Skjermbilder</string>
|
||||
<string name="stats_fps_needs_hud">FPS krever at HUD-en er på</string>
|
||||
<string name="stats_speed">Fart</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Øverst</string>
|
||||
<string name="display_position_bottom">Nederst</string>
|
||||
<string name="display_position_center">Midten (standard)</string>
|
||||
<string name="display_position_left">Venstre</string>
|
||||
<string name="display_position_right">Høyre</string>
|
||||
<string name="setup_tab_storage">Lagring</string>
|
||||
<string name="storage_measuring">Måler lagring…</string>
|
||||
<string name="storage_measuring_hint">Første gang tar noen sekunder.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Tilbakestill plasseringer</string>
|
||||
<string name="input_show_label">Vis etikett</string>
|
||||
<string name="input_layout_import_failed">Kunne ikke importere dette oppsettet</string>
|
||||
|
||||
<string name="theme_white_red">Skarlagenssnø</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Shadercache downloaden</string>
|
||||
<string name="bottom_downloads_paused">Gepauzeerd</string>
|
||||
<string name="bottom_downloads_queued">Wacht om te starten</string>
|
||||
<string name="bottom_page_notifications">Meldingen</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck onderste scherm</string>
|
||||
<string name="bottom_notifications_why">Toon berichten en andere meldingen hier terwijl je speelt. Ze blijven alleen op dit scherm en worden niet opgeslagen. Android vraagt dit één keer: de pagina voor meldingstoegang opent op dit scherm; zet DroidDeck daar aan en deze pagina komt vanzelf terug.</string>
|
||||
<string name="bottom_notifications_allow">Meldingstoegang toestaan</string>
|
||||
<string name="bottom_notifications_none">Geen meldingen.</string>
|
||||
<string name="bottom_notifications_count">%1$d meldingen</string>
|
||||
<string name="bottom_notifications_clear">Wissen</string>
|
||||
<string name="bottom_page_screenshots">Screenshots</string>
|
||||
<string name="stats_fps_needs_hud">Voor FPS moet de HUD aan staan</string>
|
||||
<string name="stats_speed">Snelheid</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Boven</string>
|
||||
<string name="display_position_bottom">Onder</string>
|
||||
<string name="display_position_center">Midden (standaard)</string>
|
||||
<string name="display_position_left">Links</string>
|
||||
<string name="display_position_right">Rechts</string>
|
||||
<string name="setup_tab_storage">Opslag</string>
|
||||
<string name="storage_measuring">Opslag meten…</string>
|
||||
<string name="storage_measuring_hint">De eerste keer duurt een paar seconden.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Posities herstellen</string>
|
||||
<string name="input_show_label">Label tonen</string>
|
||||
<string name="input_layout_import_failed">Deze indeling kan niet worden geïmporteerd</string>
|
||||
|
||||
<string name="theme_white_red">Scharlakenrode sneeuw</string>
|
||||
|
||||
</resources>
|
||||
@@ -1825,13 +1825,6 @@
|
||||
<string name="bottom_downloads_shader">Pobieranie pamięci podręcznej shaderów</string>
|
||||
<string name="bottom_downloads_paused">Wstrzymano</string>
|
||||
<string name="bottom_downloads_queued">Oczekuje na rozpoczęcie</string>
|
||||
<string name="bottom_page_notifications">Powiadomienia</string>
|
||||
<string name="bottom_notifications_listener">Dolny ekran DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Wyświetlaj tu wiadomości i inne powiadomienia podczas gry. Pozostają tylko na tym ekranie i nie są zapisywane. Android zapyta raz: na tym ekranie otworzy się jego strona dostępu do powiadomień; włącz tam DroidDeck, a ta strona wróci sama.</string>
|
||||
<string name="bottom_notifications_allow">Zezwól na dostęp do powiadomień</string>
|
||||
<string name="bottom_notifications_none">Brak powiadomień.</string>
|
||||
<string name="bottom_notifications_count">Powiadomienia: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Wyczyść</string>
|
||||
<string name="bottom_page_screenshots">Zrzuty ekranu</string>
|
||||
<string name="stats_fps_needs_hud">FPS wymaga włączonego HUD</string>
|
||||
<string name="stats_speed">Prędkość</string>
|
||||
@@ -2925,6 +2918,8 @@
|
||||
<string name="display_position_top">Góra</string>
|
||||
<string name="display_position_bottom">Dół</string>
|
||||
<string name="display_position_center">Środek (domyślnie)</string>
|
||||
<string name="display_position_left">Lewo</string>
|
||||
<string name="display_position_right">Prawo</string>
|
||||
<string name="setup_tab_storage">Pamięć</string>
|
||||
<string name="storage_measuring">Mierzenie pamięci…</string>
|
||||
<string name="storage_measuring_hint">Pierwszy raz trwa kilka sekund.</string>
|
||||
@@ -3738,4 +3733,7 @@
|
||||
<string name="input_reset_positions">Resetuj położenie</string>
|
||||
<string name="input_show_label">Pokaż etykietę</string>
|
||||
<string name="input_layout_import_failed">Nie można zaimportować tego układu</string>
|
||||
|
||||
<string name="theme_white_red">Szkarłatny śnieg</string>
|
||||
|
||||
</resources>
|
||||
@@ -1793,13 +1793,6 @@
|
||||
<string name="bottom_downloads_shader">A transferir a cache de shaders</string>
|
||||
<string name="bottom_downloads_paused">Em pausa</string>
|
||||
<string name="bottom_downloads_queued">A aguardar início</string>
|
||||
<string name="bottom_page_notifications">Notificações</string>
|
||||
<string name="bottom_notifications_listener">Ecrã inferior do DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Mostre aqui mensagens e outras notificações enquanto joga. Ficam apenas neste ecrã e não são guardadas. O Android pergunta uma vez: a página de acesso às notificações abre neste ecrã; ative lá o DroidDeck e esta página volta automaticamente.</string>
|
||||
<string name="bottom_notifications_allow">Permitir acesso às notificações</string>
|
||||
<string name="bottom_notifications_none">Sem notificações.</string>
|
||||
<string name="bottom_notifications_count">%1$d notificações</string>
|
||||
<string name="bottom_notifications_clear">Limpar</string>
|
||||
<string name="bottom_page_screenshots">Capturas de ecrã</string>
|
||||
<string name="stats_fps_needs_hud">O FPS requer o HUD ativado</string>
|
||||
<string name="stats_speed">Velocidade</string>
|
||||
@@ -2894,6 +2887,8 @@
|
||||
<string name="stores_target_free_unknown">Espaço livre desconhecido</string>
|
||||
<string name="display_picture_position">Posição da imagem</string>
|
||||
<string name="display_position_top">Topo</string>
|
||||
<string name="display_position_left">Esquerda</string>
|
||||
<string name="display_position_right">Direita</string>
|
||||
<string name="display_position_bottom">Fundo</string>
|
||||
<string name="display_position_center">Centro (predefinido)</string>
|
||||
<string name="setup_tab_storage">Armazenamento</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Repor posições</string>
|
||||
<string name="input_show_label">Mostrar etiqueta</string>
|
||||
<string name="input_layout_import_failed">Não foi possível importar este esquema</string>
|
||||
|
||||
<string name="theme_white_red">Neve Escarlate</string>
|
||||
|
||||
</resources>
|
||||
@@ -1793,13 +1793,6 @@
|
||||
<string name="bottom_downloads_shader">Baixando o cache de shaders</string>
|
||||
<string name="bottom_downloads_paused">Pausado</string>
|
||||
<string name="bottom_downloads_queued">Aguardando para começar</string>
|
||||
<string name="bottom_page_notifications">Notificações</string>
|
||||
<string name="bottom_notifications_listener">Tela inferior do DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Mostre aqui mensagens e outras notificações enquanto você joga. Elas ficam só nesta tela e não são salvas. O Android pergunta uma vez: a página de acesso a notificações dele abre nesta tela; ative o DroidDeck lá e esta página volta sozinha.</string>
|
||||
<string name="bottom_notifications_allow">Permitir acesso a notificações</string>
|
||||
<string name="bottom_notifications_none">Nenhuma notificação.</string>
|
||||
<string name="bottom_notifications_count">%1$d notificações</string>
|
||||
<string name="bottom_notifications_clear">Limpar</string>
|
||||
<string name="bottom_page_screenshots">Capturas de tela</string>
|
||||
<string name="stats_fps_needs_hud">O FPS precisa do HUD ativado</string>
|
||||
<string name="stats_speed">Velocidade</string>
|
||||
@@ -2894,6 +2887,8 @@
|
||||
<string name="stores_target_free_unknown">Espaço livre desconhecido</string>
|
||||
<string name="display_picture_position">Posição da imagem</string>
|
||||
<string name="display_position_top">Topo</string>
|
||||
<string name="display_position_left">Esquerda</string>
|
||||
<string name="display_position_right">Direita</string>
|
||||
<string name="display_position_bottom">Base</string>
|
||||
<string name="display_position_center">Centro (padrão)</string>
|
||||
<string name="setup_tab_storage">Armazenamento</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Redefinir posições</string>
|
||||
<string name="input_show_label">Mostrar rótulo</string>
|
||||
<string name="input_layout_import_failed">Não foi possível importar este layout</string>
|
||||
|
||||
<string name="theme_white_red">Neve Escarlate</string>
|
||||
|
||||
</resources>
|
||||
@@ -1801,13 +1801,6 @@
|
||||
<string name="bottom_downloads_shader">Se descarcă cache-ul de shadere</string>
|
||||
<string name="bottom_downloads_paused">Întrerupt</string>
|
||||
<string name="bottom_downloads_queued">Așteaptă să înceapă</string>
|
||||
<string name="bottom_page_notifications">Notificări</string>
|
||||
<string name="bottom_notifications_listener">Ecranul de jos DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Afișează aici mesajele și alte notificări în timp ce te joci. Rămân doar pe acest ecran și nu sunt salvate. Android întreabă o singură dată: pagina sa de acces la notificări se deschide pe acest ecran; activează DroidDeck acolo, iar această pagină revine singură.</string>
|
||||
<string name="bottom_notifications_allow">Permite accesul la notificări</string>
|
||||
<string name="bottom_notifications_none">Nicio notificare.</string>
|
||||
<string name="bottom_notifications_count">Notificări: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Șterge</string>
|
||||
<string name="bottom_page_screenshots">Capturi de ecran</string>
|
||||
<string name="stats_fps_needs_hud">FPS necesită HUD-ul activat</string>
|
||||
<string name="stats_speed">Viteză</string>
|
||||
@@ -2896,6 +2889,8 @@
|
||||
<string name="display_position_top">Sus</string>
|
||||
<string name="display_position_bottom">Jos</string>
|
||||
<string name="display_position_center">Centru (implicit)</string>
|
||||
<string name="display_position_left">Stânga</string>
|
||||
<string name="display_position_right">Dreapta</string>
|
||||
<string name="setup_tab_storage">Stocare</string>
|
||||
<string name="storage_measuring">Se măsoară stocarea…</string>
|
||||
<string name="storage_measuring_hint">Prima dată durează câteva secunde.</string>
|
||||
@@ -3699,4 +3694,7 @@
|
||||
<string name="input_reset_positions">Resetează pozițiile</string>
|
||||
<string name="input_show_label">Afișează eticheta</string>
|
||||
<string name="input_layout_import_failed">Acest aranjament nu a putut fi importat</string>
|
||||
|
||||
<string name="theme_white_red">Zăpadă stacojie</string>
|
||||
|
||||
</resources>
|
||||
@@ -1888,13 +1888,6 @@
|
||||
<string name="bottom_downloads_shader">Загрузка кэша шейдеров</string>
|
||||
<string name="bottom_downloads_paused">Приостановлено</string>
|
||||
<string name="bottom_downloads_queued">Ожидает начала</string>
|
||||
<string name="bottom_page_notifications">Уведомления</string>
|
||||
<string name="bottom_notifications_listener">Нижний экран DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Показывает сообщения и другие уведомления здесь, пока вы играете. Они отображаются только на этом экране и не сохраняются. Android спросит один раз: на этом экране откроется страница доступа к уведомлениям; включите там DroidDeck, и эта страница вернется сама.</string>
|
||||
<string name="bottom_notifications_allow">Разрешить доступ к уведомлениям</string>
|
||||
<string name="bottom_notifications_none">Нет уведомлений.</string>
|
||||
<string name="bottom_notifications_count">Уведомлений: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Очистить</string>
|
||||
<string name="bottom_page_screenshots">Скриншоты</string>
|
||||
<string name="stats_fps_needs_hud">Для FPS нужно включить HUD</string>
|
||||
<string name="stats_speed">Скорость</string>
|
||||
@@ -3008,6 +3001,8 @@
|
||||
<string name="display_position_top">Сверху</string>
|
||||
<string name="display_position_bottom">Снизу</string>
|
||||
<string name="display_position_center">По центру (по умолчанию)</string>
|
||||
<string name="display_position_left">Слева</string>
|
||||
<string name="display_position_right">Справа</string>
|
||||
<string name="setup_tab_storage">Хранилище</string>
|
||||
<string name="storage_measuring">Измерение хранилища…</string>
|
||||
<string name="storage_measuring_hint">В первый раз занимает несколько секунд.</string>
|
||||
@@ -3821,4 +3816,7 @@
|
||||
<string name="input_reset_positions">Сбросить положение</string>
|
||||
<string name="input_show_label">Показывать подпись</string>
|
||||
<string name="input_layout_import_failed">Не удалось импортировать эту раскладку</string>
|
||||
|
||||
<string name="theme_white_red">Алый снег</string>
|
||||
|
||||
</resources>
|
||||
@@ -1777,13 +1777,6 @@
|
||||
<string name="bottom_downloads_shader">Laddar ned shadercache</string>
|
||||
<string name="bottom_downloads_paused">Pausad</string>
|
||||
<string name="bottom_downloads_queued">Väntar på att starta</string>
|
||||
<string name="bottom_page_notifications">Aviseringar</string>
|
||||
<string name="bottom_notifications_listener">DroidDecks nedre skärm</string>
|
||||
<string name="bottom_notifications_why">Visa meddelanden och andra aviseringar här medan du spelar. De visas bara på den här skärmen och sparas inte. Android frågar en gång: sidan för aviseringsåtkomst öppnas på den här skärmen; slå på DroidDeck där så kommer den här sidan tillbaka av sig själv.</string>
|
||||
<string name="bottom_notifications_allow">Tillåt aviseringsåtkomst</string>
|
||||
<string name="bottom_notifications_none">Inga aviseringar.</string>
|
||||
<string name="bottom_notifications_count">%1$d aviseringar</string>
|
||||
<string name="bottom_notifications_clear">Rensa</string>
|
||||
<string name="bottom_page_screenshots">Skärmbilder</string>
|
||||
<string name="stats_fps_needs_hud">FPS kräver att HUD:en är på</string>
|
||||
<string name="stats_speed">Hastighet</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Överst</string>
|
||||
<string name="display_position_bottom">Nederst</string>
|
||||
<string name="display_position_center">Mitten (standard)</string>
|
||||
<string name="display_position_left">Vänster</string>
|
||||
<string name="display_position_right">Höger</string>
|
||||
<string name="setup_tab_storage">Lagring</string>
|
||||
<string name="storage_measuring">Mäter lagring…</string>
|
||||
<string name="storage_measuring_hint">Första gången tar några sekunder.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Återställ positioner</string>
|
||||
<string name="input_show_label">Visa etikett</string>
|
||||
<string name="input_layout_import_failed">Det gick inte att importera layouten</string>
|
||||
|
||||
<string name="theme_white_red">Scharlakansröd snö</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">กำลังดาวน์โหลดแคชเชเดอร์</string>
|
||||
<string name="bottom_downloads_paused">หยุดชั่วคราว</string>
|
||||
<string name="bottom_downloads_queued">กำลังรอเริ่ม</string>
|
||||
<string name="bottom_page_notifications">การแจ้งเตือน</string>
|
||||
<string name="bottom_notifications_listener">หน้าจอล่างของ DroidDeck</string>
|
||||
<string name="bottom_notifications_why">แสดงข้อความและการแจ้งเตือนอื่นๆ ที่นี่ขณะที่คุณเล่น การแจ้งเตือนจะแสดงบนหน้าจอนี้เท่านั้นและจะไม่ถูกบันทึก Android จะถามเพียงครั้งเดียว: หน้าการเข้าถึงการแจ้งเตือนจะเปิดขึ้นบนหน้าจอนี้ เปิด DroidDeck ที่นั่น แล้วหน้านี้จะกลับมาเอง</string>
|
||||
<string name="bottom_notifications_allow">อนุญาตการเข้าถึงการแจ้งเตือน</string>
|
||||
<string name="bottom_notifications_none">ไม่มีการแจ้งเตือน</string>
|
||||
<string name="bottom_notifications_count">การแจ้งเตือน %1$d รายการ</string>
|
||||
<string name="bottom_notifications_clear">ล้าง</string>
|
||||
<string name="bottom_page_screenshots">ภาพหน้าจอ</string>
|
||||
<string name="stats_fps_needs_hud">ต้องเปิด HUD เพื่อแสดง FPS</string>
|
||||
<string name="stats_speed">ความเร็ว</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">บน</string>
|
||||
<string name="display_position_bottom">ล่าง</string>
|
||||
<string name="display_position_center">กลาง (ค่าเริ่มต้น)</string>
|
||||
<string name="display_position_left">ซ้าย</string>
|
||||
<string name="display_position_right">ขวา</string>
|
||||
<string name="setup_tab_storage">พื้นที่จัดเก็บ</string>
|
||||
<string name="storage_measuring">กำลังวัดพื้นที่…</string>
|
||||
<string name="storage_measuring_hint">ครั้งแรกใช้เวลาสองสามวินาที</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">รีเซ็ตตำแหน่ง</string>
|
||||
<string name="input_show_label">แสดงป้ายกำกับ</string>
|
||||
<string name="input_layout_import_failed">ไม่สามารถนำเข้าการจัดวางนี้ได้</string>
|
||||
|
||||
<string name="theme_white_red">หิมะสีแดงชาด</string>
|
||||
|
||||
</resources>
|
||||
@@ -1769,13 +1769,6 @@
|
||||
<string name="bottom_downloads_shader">Gölgelendirici önbelleği indiriliyor</string>
|
||||
<string name="bottom_downloads_paused">Duraklatıldı</string>
|
||||
<string name="bottom_downloads_queued">Başlamayı bekliyor</string>
|
||||
<string name="bottom_page_notifications">Bildirimler</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck alt ekranı</string>
|
||||
<string name="bottom_notifications_why">Oynarken mesajları ve diğer bildirimleri burada görün. Yalnızca bu ekranda kalırlar ve kaydedilmezler. Android bunu bir kez sorar: bildirim erişimi sayfası bu ekranda açılır; orada DroidDeck\'i açın, bu sayfa kendiliğinden geri gelir.</string>
|
||||
<string name="bottom_notifications_allow">Bildirim erişimine izin ver</string>
|
||||
<string name="bottom_notifications_none">Bildirim yok.</string>
|
||||
<string name="bottom_notifications_count">%1$d bildirim</string>
|
||||
<string name="bottom_notifications_clear">Temizle</string>
|
||||
<string name="bottom_page_screenshots">Ekran görüntüleri</string>
|
||||
<string name="stats_fps_needs_hud">FPS için HUD açık olmalı</string>
|
||||
<string name="stats_speed">Hız</string>
|
||||
@@ -2867,6 +2860,8 @@
|
||||
<string name="display_position_top">Üst</string>
|
||||
<string name="display_position_bottom">Alt</string>
|
||||
<string name="display_position_center">Orta (varsayılan)</string>
|
||||
<string name="display_position_left">Sol</string>
|
||||
<string name="display_position_right">Sağ</string>
|
||||
<string name="setup_tab_storage">Depolama</string>
|
||||
<string name="storage_measuring">Depolama ölçülüyor…</string>
|
||||
<string name="storage_measuring_hint">İlk seferde birkaç saniye sürer.</string>
|
||||
@@ -3660,4 +3655,7 @@
|
||||
<string name="input_reset_positions">Konumları sıfırla</string>
|
||||
<string name="input_show_label">Etiketi göster</string>
|
||||
<string name="input_layout_import_failed">Bu düzen içe aktarılamadı</string>
|
||||
|
||||
<string name="theme_white_red">Kızıl Kar</string>
|
||||
|
||||
</resources>
|
||||
@@ -1825,13 +1825,6 @@
|
||||
<string name="bottom_downloads_shader">Завантаження кешу шейдерів</string>
|
||||
<string name="bottom_downloads_paused">Призупинено</string>
|
||||
<string name="bottom_downloads_queued">Очікує початку</string>
|
||||
<string name="bottom_page_notifications">Сповіщення</string>
|
||||
<string name="bottom_notifications_listener">Нижній екран DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Показуйте тут повідомлення та інші сповіщення під час гри. Вони лишаються лише на цьому екрані й не зберігаються. Android запитає один раз: сторінка доступу до сповіщень відкриється на цьому екрані; увімкніть там DroidDeck, і ця сторінка повернеться сама.</string>
|
||||
<string name="bottom_notifications_allow">Дозволити доступ до сповіщень</string>
|
||||
<string name="bottom_notifications_none">Немає сповіщень.</string>
|
||||
<string name="bottom_notifications_count">Сповіщень: %1$d</string>
|
||||
<string name="bottom_notifications_clear">Очистити</string>
|
||||
<string name="bottom_page_screenshots">Знімки екрана</string>
|
||||
<string name="stats_fps_needs_hud">Для FPS потрібно ввімкнути HUD</string>
|
||||
<string name="stats_speed">Швидкість</string>
|
||||
@@ -2925,6 +2918,8 @@
|
||||
<string name="display_position_top">Угорі</string>
|
||||
<string name="display_position_bottom">Унизу</string>
|
||||
<string name="display_position_center">По центру (типово)</string>
|
||||
<string name="display_position_left">Ліворуч</string>
|
||||
<string name="display_position_right">Праворуч</string>
|
||||
<string name="setup_tab_storage">Сховище</string>
|
||||
<string name="storage_measuring">Вимірювання сховища…</string>
|
||||
<string name="storage_measuring_hint">Уперше триває кілька секунд.</string>
|
||||
@@ -3738,4 +3733,7 @@
|
||||
<string name="input_reset_positions">Скинути розташування</string>
|
||||
<string name="input_show_label">Показувати підпис</string>
|
||||
<string name="input_layout_import_failed">Не вдалося імпортувати цю розкладку</string>
|
||||
|
||||
<string name="theme_white_red">Багряний сніг</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">Đang tải bộ nhớ đệm shader</string>
|
||||
<string name="bottom_downloads_paused">Đã tạm dừng</string>
|
||||
<string name="bottom_downloads_queued">Đang chờ bắt đầu</string>
|
||||
<string name="bottom_page_notifications">Thông báo</string>
|
||||
<string name="bottom_notifications_listener">Màn hình dưới DroidDeck</string>
|
||||
<string name="bottom_notifications_why">Hiển thị tin nhắn và các thông báo khác ở đây khi bạn chơi. Chúng chỉ ở trên màn hình này và không được lưu. Android chỉ hỏi một lần: trang quyền truy cập thông báo sẽ mở trên màn hình này; hãy bật DroidDeck ở đó và trang này sẽ tự quay lại.</string>
|
||||
<string name="bottom_notifications_allow">Cho phép truy cập thông báo</string>
|
||||
<string name="bottom_notifications_none">Không có thông báo.</string>
|
||||
<string name="bottom_notifications_count">%1$d thông báo</string>
|
||||
<string name="bottom_notifications_clear">Xóa</string>
|
||||
<string name="bottom_page_screenshots">Ảnh chụp màn hình</string>
|
||||
<string name="stats_fps_needs_hud">Cần bật HUD để xem FPS</string>
|
||||
<string name="stats_speed">Tốc độ</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">Trên</string>
|
||||
<string name="display_position_bottom">Dưới</string>
|
||||
<string name="display_position_center">Giữa (mặc định)</string>
|
||||
<string name="display_position_left">Trái</string>
|
||||
<string name="display_position_right">Phải</string>
|
||||
<string name="setup_tab_storage">Lưu trữ</string>
|
||||
<string name="storage_measuring">Đang đo dung lượng…</string>
|
||||
<string name="storage_measuring_hint">Lần đầu mất vài giây.</string>
|
||||
@@ -3630,4 +3625,7 @@
|
||||
<string name="input_reset_positions">Đặt lại vị trí</string>
|
||||
<string name="input_show_label">Hiện nhãn</string>
|
||||
<string name="input_layout_import_failed">Không thể nhập bố cục này</string>
|
||||
|
||||
<string name="theme_white_red">Tuyết đỏ thẫm</string>
|
||||
|
||||
</resources>
|
||||
@@ -1831,13 +1831,6 @@
|
||||
<string name="bottom_downloads_shader">正在下载着色器缓存</string>
|
||||
<string name="bottom_downloads_paused">已暂停</string>
|
||||
<string name="bottom_downloads_queued">等待开始</string>
|
||||
<string name="bottom_page_notifications">通知</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck 底部屏幕</string>
|
||||
<string name="bottom_notifications_why">在游戏时于此处显示消息和其他通知。通知只显示在此屏幕上,不会被保存。Android 只会询问一次:其通知使用权页面会在此屏幕上打开,在那里开启 DroidDeck 后,会自动返回此页面。</string>
|
||||
<string name="bottom_notifications_allow">允许通知使用权</string>
|
||||
<string name="bottom_notifications_none">没有通知。</string>
|
||||
<string name="bottom_notifications_count">%1$d 条通知</string>
|
||||
<string name="bottom_notifications_clear">清除</string>
|
||||
<string name="bottom_page_screenshots">截图</string>
|
||||
<string name="stats_fps_needs_hud">显示 FPS 需要开启 HUD</string>
|
||||
<string name="stats_speed">速度</string>
|
||||
@@ -2842,6 +2835,8 @@
|
||||
<string name="display_position_top">置顶</string>
|
||||
<string name="display_position_bottom">置底</string>
|
||||
<string name="display_position_center">居中(默认)</string>
|
||||
<string name="display_position_left">左侧</string>
|
||||
<string name="display_position_right">右侧</string>
|
||||
<string name="setup_tab_storage">存储</string>
|
||||
<string name="storage_measuring">正在统计存储…</string>
|
||||
<string name="storage_measuring_hint">首次统计需要几秒钟。</string>
|
||||
@@ -3634,4 +3629,7 @@
|
||||
<string name="input_reset_positions">重置位置</string>
|
||||
<string name="input_show_label">显示标签</string>
|
||||
<string name="input_layout_import_failed">无法导入此布局</string>
|
||||
|
||||
<string name="theme_white_red">猩红之雪</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">正在下載著色器快取</string>
|
||||
<string name="bottom_downloads_paused">已暫停</string>
|
||||
<string name="bottom_downloads_queued">等待開始</string>
|
||||
<string name="bottom_page_notifications">通知</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck 下方螢幕</string>
|
||||
<string name="bottom_notifications_why">在遊玩時於此處顯示訊息和其他通知。通知只會顯示在這個螢幕上,不會儲存。Android 只會詢問一次:通知存取權頁面會在這個螢幕上開啟,在那裡開啟 DroidDeck 後,就會自動回到此頁面。</string>
|
||||
<string name="bottom_notifications_allow">允許通知存取權</string>
|
||||
<string name="bottom_notifications_none">沒有通知。</string>
|
||||
<string name="bottom_notifications_count">%1$d 則通知</string>
|
||||
<string name="bottom_notifications_clear">清除</string>
|
||||
<string name="bottom_page_screenshots">螢幕截圖</string>
|
||||
<string name="stats_fps_needs_hud">顯示 FPS 需要開啟 HUD</string>
|
||||
<string name="stats_speed">速度</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">置頂</string>
|
||||
<string name="display_position_bottom">置底</string>
|
||||
<string name="display_position_center">置中(預設)</string>
|
||||
<string name="display_position_left">左側</string>
|
||||
<string name="display_position_right">右側</string>
|
||||
<string name="setup_tab_storage">儲存空間</string>
|
||||
<string name="storage_measuring">正在統計儲存空間…</string>
|
||||
<string name="storage_measuring_hint">首次統計需要幾秒鐘。</string>
|
||||
@@ -3633,4 +3628,7 @@
|
||||
<string name="input_reset_positions">重設位置</string>
|
||||
<string name="input_show_label">顯示標籤</string>
|
||||
<string name="input_layout_import_failed">無法匯入此佈局</string>
|
||||
|
||||
<string name="theme_white_red">緋紅之雪</string>
|
||||
|
||||
</resources>
|
||||
@@ -1753,13 +1753,6 @@
|
||||
<string name="bottom_downloads_shader">正在下載著色器快取</string>
|
||||
<string name="bottom_downloads_paused">已暫停</string>
|
||||
<string name="bottom_downloads_queued">等待開始</string>
|
||||
<string name="bottom_page_notifications">通知</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck 底部螢幕</string>
|
||||
<string name="bottom_notifications_why">在遊玩時於此處顯示訊息和其他通知。通知只會顯示在這個螢幕上,不會儲存。Android 只會詢問一次:通知存取權頁面會在這個螢幕上開啟,在那裡開啟 DroidDeck 後,就會自動回到此頁面。</string>
|
||||
<string name="bottom_notifications_allow">允許通知存取權</string>
|
||||
<string name="bottom_notifications_none">沒有通知。</string>
|
||||
<string name="bottom_notifications_count">%1$d 則通知</string>
|
||||
<string name="bottom_notifications_clear">清除</string>
|
||||
<string name="bottom_page_screenshots">螢幕擷取畫面</string>
|
||||
<string name="stats_fps_needs_hud">顯示 FPS 需要開啟 HUD</string>
|
||||
<string name="stats_speed">速度</string>
|
||||
@@ -2838,6 +2831,8 @@
|
||||
<string name="display_position_top">置頂</string>
|
||||
<string name="display_position_bottom">置底</string>
|
||||
<string name="display_position_center">置中(預設)</string>
|
||||
<string name="display_position_left">左側</string>
|
||||
<string name="display_position_right">右側</string>
|
||||
<string name="setup_tab_storage">儲存空間</string>
|
||||
<string name="storage_measuring">正在統計儲存空間…</string>
|
||||
<string name="storage_measuring_hint">首次統計需要幾秒鐘。</string>
|
||||
@@ -3633,4 +3628,7 @@
|
||||
<string name="input_reset_positions">重設位置</string>
|
||||
<string name="input_show_label">顯示標籤</string>
|
||||
<string name="input_layout_import_failed">無法匯入此版面配置</string>
|
||||
|
||||
<string name="theme_white_red">緋紅之雪</string>
|
||||
|
||||
</resources>
|
||||
@@ -1965,13 +1965,6 @@
|
||||
<string name="bottom_downloads_shader">Downloading shader cache</string>
|
||||
<string name="bottom_downloads_paused">Paused</string>
|
||||
<string name="bottom_downloads_queued">Waiting to start</string>
|
||||
<string name="bottom_page_notifications">Notifications</string>
|
||||
<string name="bottom_notifications_listener">DroidDeck bottom screen</string>
|
||||
<string name="bottom_notifications_why">Show messages and other notifications here while you play. They stay on this screen only and are not saved. Android asks once: its notification access page opens on this screen; turn DroidDeck on there and this page comes back by itself.</string>
|
||||
<string name="bottom_notifications_allow">Allow notification access</string>
|
||||
<string name="bottom_notifications_none">No notifications.</string>
|
||||
<string name="bottom_notifications_count">%1$d notifications</string>
|
||||
<string name="bottom_notifications_clear">Clear</string>
|
||||
<string name="bottom_page_screenshots">Screenshots</string>
|
||||
<string name="stats_fps_needs_hud">FPS needs the HUD on</string>
|
||||
<string name="stats_speed">Speed</string>
|
||||
@@ -3113,6 +3106,8 @@
|
||||
<string name="glasses_pro2_experimental">Experimental Pro 2 head tracking. Brightness, volume, and display switching are not supported yet.</string>
|
||||
<string name="display_picture_position">Picture position</string>
|
||||
<string name="display_position_top">Top</string>
|
||||
<string name="display_position_left">Left</string>
|
||||
<string name="display_position_right">Right</string>
|
||||
<string name="display_position_bottom">Bottom</string>
|
||||
<string name="display_position_center">Center (default)</string>
|
||||
<string name="glasses_6dof">6DoF virtual screen</string>
|
||||
@@ -3821,4 +3816,7 @@
|
||||
<string name="input_reset_positions">Reset positions</string>
|
||||
<string name="input_show_label">Show label</string>
|
||||
<string name="input_layout_import_failed">Could not import this layout</string>
|
||||
|
||||
<string name="theme_white_red">Scarlet Snow</string>
|
||||
<string name="theme_white_red_detail">White surfaces with red accents.</string>
|
||||
</resources>
|
||||
@@ -83,7 +83,9 @@ class ProtonMenuAutoTest {
|
||||
|
||||
private fun install(name: String): File = File(root, "root/.local/share/Steam/compatibilitytools.d/$name").apply {
|
||||
mkdirs()
|
||||
File(this, "toolmanifest.vdf").writeText("manifest")
|
||||
File(this, "toolmanifest.vdf").writeText("\"manifest\" { \"commandline\" \"/proton %verb%\" }")
|
||||
File(this, "compatibilitytool.vdf").writeText("\"from_oslist\" \"windows\"")
|
||||
File(this, "proton").apply { writeText(""); setExecutable(true) }
|
||||
}
|
||||
|
||||
private fun waitUntil(done: () -> Boolean) {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.content.Context
|
||||
import java.io.File
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [28], manifest = Config.NONE)
|
||||
class SystemVulkanPruneAbsentRuntimeTest {
|
||||
@Test fun pruningWithoutTheRuntimeDoesNotThrowAndLeavesFilesAlone() {
|
||||
val context: Context = RuntimeEnvironment.getApplication()
|
||||
val base = File(context.filesDir, "system_vulkan").apply { mkdirs() }
|
||||
val stage = File(base, ".stage-" + java.util.UUID.randomUUID()).apply { mkdir() }
|
||||
val version = File(base, "a".repeat(64)).apply { mkdir() }
|
||||
|
||||
SystemVulkanDriver.pruneUnused(context, true)
|
||||
|
||||
assertTrue(stage.exists())
|
||||
assertTrue(version.exists())
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,19 @@ class GesturePrefsTest {
|
||||
assertEquals(TouchGestureConfig.RELATIVE_MOUSE_AUTO, TouchGestureConfig.fromJson("{}").relativeMouseMode)
|
||||
}
|
||||
|
||||
@Test fun autoNeverGoesRelativeForDirectTouchWithoutAMouse() {
|
||||
val auto = TouchGestureConfig.RELATIVE_MOUSE_AUTO
|
||||
assertEquals(TouchGestureConfig.RELATIVE_MOUSE_OFF, TouchGestureConfig.gamescopeRelativeMouse(auto, mouseAttached = false, touchpad = false))
|
||||
assertEquals(auto, TouchGestureConfig.gamescopeRelativeMouse(auto, mouseAttached = true, touchpad = false))
|
||||
assertEquals(auto, TouchGestureConfig.gamescopeRelativeMouse(auto, mouseAttached = false, touchpad = true))
|
||||
}
|
||||
|
||||
@Test fun aChosenRelativeMouseModeIsSentAsIs() {
|
||||
for (mode in listOf(TouchGestureConfig.RELATIVE_MOUSE_ON, TouchGestureConfig.RELATIVE_MOUSE_OFF))
|
||||
for (mouse in listOf(false, true)) for (pad in listOf(false, true))
|
||||
assertEquals(mode, TouchGestureConfig.gamescopeRelativeMouse(mode, mouse, pad))
|
||||
}
|
||||
|
||||
@Test fun removedOptionsAreIgnoredWhenLoadingExistingSettings() {
|
||||
val old = """{"holdMouseButtonWhileTouchingEnabled":true,"holdMouseButtonWhileTouchingAction":"right_click",
|
||||
"showClickHighlight":true,"showCursorInTouchscreenMode":true,"tapAction":"key_E","longPressDelay":650}"""
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.droiddeck.launcher.input
|
||||
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class TouchRouterTest {
|
||||
@Test fun gesturesAndOffAreNotTouchpadRoutes() {
|
||||
for (mode in listOf(SessionPrefs.TOUCH_GESTURES, SessionPrefs.TOUCH_OFF)) {
|
||||
assertEquals(TouchRouter.Route.GESTURES.takeIf { mode == SessionPrefs.TOUCH_GESTURES } ?: TouchRouter.Route.OFF,
|
||||
TouchRouter.decide(TouchRouter.Snapshot(false, mode, false, false, false)))
|
||||
assertEquals(TouchRouter.Route.GESTURES.takeIf { mode == SessionPrefs.TOUCH_GESTURES } ?: TouchRouter.Route.OFF,
|
||||
TouchRouter.decide(TouchRouter.Snapshot(false, mode, false, true, true)))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun autoUsesTouchpadOnlyWhenRouterSelectsTouchpad() {
|
||||
assertEquals(TouchRouter.Route.TOUCHPAD,
|
||||
TouchRouter.decide(TouchRouter.Snapshot(false, SessionPrefs.TOUCH_AUTO, false, false, false)))
|
||||
assertEquals(TouchRouter.Route.DIRECT,
|
||||
TouchRouter.decide(TouchRouter.Snapshot(false, SessionPrefs.TOUCH_AUTO, false, true, false)))
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class BottomNotificationsTest {
|
||||
private val own = "com.droiddeck.launcher"
|
||||
|
||||
@Test fun messagesFromOtherAppsAreKept() {
|
||||
assertTrue(BottomNotifications.keep(own, "com.discord", ongoing = false, groupSummary = false, title = "Kurt", text = "ready?"))
|
||||
}
|
||||
|
||||
@Test fun ownOngoingSummaryAndEmptyNotificationsAreSkipped() {
|
||||
assertFalse(BottomNotifications.keep(own, own, ongoing = false, groupSummary = false, title = "Session", text = "running"))
|
||||
assertFalse(BottomNotifications.keep(own, "com.spotify", ongoing = true, groupSummary = false, title = "Song", text = "Artist"))
|
||||
assertFalse(BottomNotifications.keep(own, "com.discord", ongoing = false, groupSummary = true, title = "2 messages", text = ""))
|
||||
assertFalse(BottomNotifications.keep(own, "com.discord", ongoing = false, groupSummary = false, title = " ", text = ""))
|
||||
}
|
||||
|
||||
@Test fun anUpdatedNotificationMovesToTheTopOnce() {
|
||||
val list = mutableListOf(
|
||||
BottomNotification("a", "App", "one", "", 1L),
|
||||
BottomNotification("b", "App", "two", "", 2L),
|
||||
)
|
||||
BottomNotifications.add(list, BottomNotification("b", "App", "two again", "", 3L))
|
||||
assertEquals(listOf("b", "a"), list.map { it.key })
|
||||
assertEquals("two again", list.first().title)
|
||||
}
|
||||
|
||||
@Test fun theListKeepsTheNewestThirty() {
|
||||
val list = mutableListOf<BottomNotification>()
|
||||
repeat(35) { BottomNotifications.add(list, BottomNotification("k$it", "App", "t$it", "", it.toLong())) }
|
||||
assertEquals(30, list.size)
|
||||
assertEquals("k34", list.first().key)
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,8 @@ class ProtonExtrasTest {
|
||||
private fun installTool(parent: File, name: String) = File(parent, name).apply {
|
||||
mkdirs()
|
||||
File(this, "toolmanifest.vdf").writeText("\"manifest\" { \"commandline\" \"/proton %verb%\" }")
|
||||
File(this, "compatibilitytool.vdf").writeText("\"from_oslist\" \"windows\"")
|
||||
File(this, "proton").apply { writeText(""); setExecutable(true) }
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -120,6 +122,17 @@ class ProtonExtrasTest {
|
||||
assertEquals(emptyList<String>(), ProtonExtras.installedIn(File(tools, "missing"), tool("ge")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun interruptedBuildsAreNotReportedAsInstalled() {
|
||||
val tools = temp.newFolder("compatibilitytools.d")
|
||||
installTool(tools, "GE-Proton11-10")
|
||||
File(tools, "GE-Proton11-11").apply {
|
||||
mkdirs()
|
||||
File(this, "toolmanifest.vdf").writeText("\"manifest\" { \"commandline\" \"/proton %verb%\" }")
|
||||
}
|
||||
assertEquals(listOf("GE-Proton11-10"), ProtonExtras.installedIn(tools, tool("ge")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun anUpdateIsANewerReleaseThanTheNewestInstalledBuild() {
|
||||
assertEquals("DroidDeck-Proton-11-7.6", ProtonExtras.updateFor(listOf("DroidDeck-Proton 11-7.5"), "DroidDeck-Proton-11-7.6"))
|
||||
|
||||
@@ -60,6 +60,13 @@ class SessionDisplayTest {
|
||||
assertEquals(864, SessionDisplay.unfoldedGameHeight(1920, 1080))
|
||||
}
|
||||
|
||||
@Test fun aTabRowUnderTheBarComesOutOfTheGameNotTheControls() {
|
||||
assertEquals(1376, SessionDisplay.unfoldedGameHeight(2448, 1848, 0))
|
||||
assertEquals(1240, SessionDisplay.unfoldedGameHeight(2448, 1848, 136))
|
||||
assertEquals(1376, SessionDisplay.unfoldedGameHeight(2448, 1848, -20))
|
||||
assertEquals(0, SessionDisplay.unfoldedGameHeight(200, 100, 500))
|
||||
}
|
||||
|
||||
private fun unfoldedWanted(
|
||||
enabled: Boolean = true,
|
||||
controller: Boolean = false,
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Intent
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
class SessionLoadingDecisionTest {
|
||||
private var previousSessionId: String? = null
|
||||
private var previousRelaunch: Intent? = null
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
previousSessionId = SessionState.sessionId
|
||||
previousRelaunch = SessionState.relaunch
|
||||
SessionState.clearRelaunch()
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
SessionState.sessionId = previousSessionId
|
||||
SessionState.relaunch = previousRelaunch
|
||||
SessionState.clearRelaunch()
|
||||
if (previousRelaunch != null) SessionState.queueRelaunch(previousRelaunch!!)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun loadingTimesOutOnlyWhenNoSessionStarted() {
|
||||
assertEquals(false, SessionLoadingDecision.shouldReturnToLauncher(100L, 10_099L, false, SessionPhase.IDLE))
|
||||
assertEquals(true, SessionLoadingDecision.shouldReturnToLauncher(100L, 10_100L, false, SessionPhase.IDLE))
|
||||
assertEquals(false, SessionLoadingDecision.shouldReturnToLauncher(100L, 10_100L, true, SessionPhase.IDLE))
|
||||
assertEquals(false, SessionLoadingDecision.shouldReturnToLauncher(100L, 10_100L, false, SessionPhase.PREPARING))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun relaunchRequiresTheCurrentSessionToHaveRequestedTheStop() {
|
||||
SessionState.sessionId = "session-a"
|
||||
val next = Intent().apply { action = "next" }
|
||||
SessionState.queueRelaunch(next)
|
||||
assertNull(SessionState.takeRelaunch())
|
||||
SessionState.queueRelaunch(next)
|
||||
SessionState.confirmRelaunchStop()
|
||||
assertEquals(next, SessionState.takeRelaunch())
|
||||
assertNull(SessionState.takeRelaunch())
|
||||
|
||||
SessionState.queueRelaunch(next)
|
||||
SessionState.confirmRelaunchStop()
|
||||
SessionState.sessionId = "session-b"
|
||||
assertNull(SessionState.takeRelaunch())
|
||||
}
|
||||
}
|
||||
@@ -15,16 +15,12 @@ class GogCdnTest {
|
||||
{"endpoint_name":"lumen","url_format":"https://cdn.gog.com/{path}","parameters":{}}
|
||||
]}"""
|
||||
|
||||
@Test fun allHostsAreParsedInOrderAndTakenInTurn() {
|
||||
@Test fun allHostsAreParsedInOrder() {
|
||||
val all = GogDownloadManager.parseCdnUrls(answer)
|
||||
assertEquals(3, all.size)
|
||||
assertEquals("https://gog-cdn-fastly.gog.com/token=nva=1~token=t", all[0])
|
||||
assertEquals("https://gog-cdn-akamai.gog.com/s", all[1])
|
||||
assertEquals("https://cdn.gog.com", all[2])
|
||||
val set = all.joinToString("\n")
|
||||
assertEquals(all[0], GogDownloadManager.firstCdn(set))
|
||||
val picks = (0 until 6).map { GogDownloadManager.pickCdn(set) }.toSet()
|
||||
assertEquals(all.toSet(), picks)
|
||||
assertEquals(0, GogDownloadManager.parseCdnUrls("not json").size)
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,23 @@ class GogListingTest {
|
||||
assertEquals("", shadowrun.description)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun ownedGamesTheListingLeavesOutStayOwned() {
|
||||
assertEquals(setOf("1", "2", "1086370078"), GogLibrary.ownedSet(setOf("1", "2"), listOf("2", "1086370078")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun withoutTheAccountListTheListingStillCounts() {
|
||||
assertEquals(setOf("1", "2"), GogLibrary.ownedSet(setOf("1", "2"), null))
|
||||
assertEquals(setOf("3"), GogLibrary.ownedSet(emptySet(), listOf("3")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cachedGamesStayWhenTheAccountListIsUnavailable() {
|
||||
assertEquals(setOf("1", "2", "1086370078"), GogLibrary.ownedSet(setOf("1", "2"), null, setOf("1086370078")))
|
||||
assertEquals(setOf("1", "2", "3"), GogLibrary.ownedSet(setOf("1"), listOf("2", "3"), setOf("1086370078")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun moviesOtherPlatformsAndGalaxysOwnEntryAreLeftOut() {
|
||||
assertEquals(listOf("1207660413", "1207664663"), GogLibrary.parseListing(PAGE)!!.games.map { it.gameId })
|
||||
|
||||
@@ -26,6 +26,45 @@ import java.util.concurrent.atomic.AtomicBoolean
|
||||
class GogMaintenanceTest {
|
||||
@get:Rule val temporary = TemporaryFolder()
|
||||
|
||||
@Test fun ownedDlcDepotIsSelected() {
|
||||
val allowed = GogContent.installProducts("1", JSONArray("[{\"gameIDs\":[\"2\"]}]"), emptyList(), "unused") { setOf("2") }
|
||||
assertEquals(setOf("1", "2"), allowed)
|
||||
}
|
||||
|
||||
@Test fun unownedDlcDepotIsSkipped() {
|
||||
val allowed = GogContent.installProducts("1", JSONArray("[{\"productId\":\"2\"}]"), emptyList(), "unused") { emptySet() }
|
||||
assertEquals(setOf("1"), allowed)
|
||||
}
|
||||
|
||||
@Test fun ownershipFetchFailureFallsBackToBaseOnly() {
|
||||
val allowed = GogContent.installProducts("1", JSONArray("[{\"productId\":\"2\"}]"), emptyList(), "unused") { null }
|
||||
assertEquals(setOf("1"), allowed)
|
||||
}
|
||||
|
||||
@Test fun installManifestCredentialsAndTempExecutableAreExtractedBeforeSanitizing() {
|
||||
val manifest = JSONObject("""{"clientId":"client","clientSecret":"secret","products":[{"temp_executable":"bin/game.exe"}]}""")
|
||||
assertEquals("client" to "secret", GogContent.clientCredentials(manifest))
|
||||
assertEquals("bin/game.exe", GogContent.tempExecutable(GogContent.sanitize(manifest)))
|
||||
assertFalse(GogContent.sanitize(manifest).toString().contains("secret"))
|
||||
}
|
||||
|
||||
@Test fun emptyProductIdDepotUsesBaseAndDlcFilesKeepTheirProduct() {
|
||||
val build = GogBuild("1", "", 2, "", "https://example.invalid/build")
|
||||
val snapshot = GogContent.snapshot(GogInstallRecord("1", "depot"), build, "unused", ownership = { setOf("2") }, metadata = { url, _ ->
|
||||
when (url) {
|
||||
build.link -> JSONObject("{\"depots\":[{\"gameIDs\":[\"1\"],\"manifest\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},{\"gameIDs\":[\"2\"],\"manifest\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"},{\"productId\":\"\",\"manifest\":\"cccccccccccccccccccccccccccccccc\"}]}")
|
||||
"https://gog-cdn-fastly.gog.com/content-system/v2/meta/aa/aa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -> JSONObject("{\"depot\":{\"items\":[{\"path\":\"base.bin\",\"chunks\":[{\"size\":1}]}]}}")
|
||||
"https://gog-cdn-fastly.gog.com/content-system/v2/meta/bb/bb/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" -> JSONObject("{\"depot\":{\"items\":[{\"path\":\"dlc.bin\",\"chunks\":[{\"size\":1}]}]}}")
|
||||
"https://gog-cdn-fastly.gog.com/content-system/v2/meta/cc/cc/cccccccccccccccccccccccccccccccc" -> JSONObject("{\"depot\":{\"items\":[{\"path\":\"empty.bin\",\"chunks\":[{\"size\":1}]}]}}")
|
||||
else -> error("Unexpected metadata: $url")
|
||||
}
|
||||
})
|
||||
assertEquals(setOf("1", "2"), snapshot.products.toSet())
|
||||
assertEquals("1", snapshot.files.getJSONObject(0).getString("product"))
|
||||
assertEquals("2", snapshot.files.getJSONObject(1).getString("product"))
|
||||
assertEquals("1", snapshot.files.getJSONObject(2).getString("product"))
|
||||
}
|
||||
|
||||
@Test fun selectsPublicBranchAndTreatsBuildIdsAsOpaque() {
|
||||
val builds = JSONObject("""{"items":[
|
||||
{"os":"windows","branch":"beta","build_id":"99","generation":2,"link":"https://example.invalid/beta"},
|
||||
@@ -213,7 +252,7 @@ class GogMaintenanceTest {
|
||||
fun fixture(name: String) = JSONObject(javaClass.classLoader!!.getResource("gog/$name")!!.readText())
|
||||
val build = GogBuild("3301", "", 1, "", "https://example.invalid/repository.json")
|
||||
val requested = ArrayList<String>()
|
||||
val snapshot = GogContent.snapshot(GogInstallRecord("1207658940", "depot"), build, "unused") { url, _ ->
|
||||
val snapshot = GogContent.snapshot(GogInstallRecord("1207658940", "depot"), build, "unused", metadata = { url, _ ->
|
||||
requested.add(url)
|
||||
when {
|
||||
url == build.link -> fixture("rayman-gen1-repository.json")
|
||||
@@ -221,7 +260,7 @@ class GogMaintenanceTest {
|
||||
url.endsWith("ec88140c-2589-41a0-bbf3-8fc1f215fe5a.json") -> fixture("rayman-gen1-english-excerpt.json")
|
||||
else -> error("Unexpected metadata: $url")
|
||||
}
|
||||
}
|
||||
})
|
||||
assertEquals("3301", snapshot.build)
|
||||
assertEquals(1, snapshot.generation)
|
||||
assertEquals(4, snapshot.files.length())
|
||||
@@ -269,6 +308,17 @@ class GogMaintenanceTest {
|
||||
assertThrows(IllegalArgumentException::class.java) { GogFiles.inside(folder, "link/game.exe") }
|
||||
}
|
||||
|
||||
@Test fun resumedInstallSpaceCountsOnlyFilesStillMissing() {
|
||||
val folder = temporary.newFolder()
|
||||
val done = File(folder, "done.bin").apply { writeText("verified") }
|
||||
val files = JSONArray()
|
||||
.put(JSONObject().put("path", done.name).put("size", done.length()).put("md5", GogFiles.hash(done)))
|
||||
.put(JSONObject().put("path", "missing.bin").put("size", 12L).put("md5", "0".repeat(32)))
|
||||
val missingOnly = GogInstallRecord("1", "depot", files = JSONArray().put(files.getJSONObject(1)))
|
||||
fun required(target: GogInstallRecord) = GogEstimate.calculate(folder, GogInstallRecord("1", "depot"), target, JSONArray(), reuseChunks = false).required
|
||||
assertEquals(required(missingOnly), required(GogInstallRecord("1", "depot", files = files)))
|
||||
}
|
||||
|
||||
@Test fun sameSizeCorruptionFailsVerificationAndLanguageVariantsRemainDistinct() {
|
||||
val folder = temporary.newFolder()
|
||||
val file = File(folder, "game.bin").apply { writeText("original") }
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.droiddeck.launcher.stores.gog
|
||||
|
||||
import java.io.File
|
||||
import java.security.MessageDigest
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.shadows.ShadowStatFs
|
||||
import com.droiddeck.launcher.stores.StoreInstallRoot
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class GogResumeSpaceTest {
|
||||
@Test fun remainingWorkRejectsMeasuredZeroButNotUnknownSpace() {
|
||||
val root = File(RuntimeEnvironment.getApplication().filesDir, "gog-zero").apply { mkdirs() }
|
||||
ShadowStatFs.registerStats(root.path, 1024, 0, 0)
|
||||
val files = listOf(GogDownloadManager.DepotFile("missing").apply { totalSize = 4 })
|
||||
val needed = GogDownloadManager.remainingInstallBytes(files, root)
|
||||
assertEquals(4L, needed)
|
||||
assertTrue(StoreInstallRoot.insufficientSpace(needed, StoreInstallRoot.availableBytes(root)))
|
||||
assertFalse(StoreInstallRoot.insufficientSpace(needed, StoreInstallRoot.SPACE_UNKNOWN))
|
||||
}
|
||||
|
||||
@Test fun remainingSpaceExcludesVerifiedFilesButIncludesCorruptAndPartialFiles() {
|
||||
val root = File(RuntimeEnvironment.getApplication().filesDir, "gog-resume").apply { mkdirs() }
|
||||
val data = byteArrayOf(1, 2, 3, 4)
|
||||
val hash = MessageDigest.getInstance("MD5").digest(data).joinToString("") { "%02x".format(it) }
|
||||
val files = listOf("good", "corrupt", "partial", "missing").map {
|
||||
GogDownloadManager.DepotFile(it).apply { totalSize = 4; md5 = hash }
|
||||
}
|
||||
File(root, "good").writeBytes(data)
|
||||
File(root, "corrupt").writeBytes(ByteArray(4))
|
||||
File(root, "partial").writeBytes(byteArrayOf(1))
|
||||
assertEquals(12L, GogDownloadManager.remainingInstallBytes(files, root))
|
||||
for (file in files) File(root, file.relativePath).writeBytes(data)
|
||||
assertEquals(0L, GogDownloadManager.remainingInstallBytes(files, root))
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class BottomDashboardTest {
|
||||
}
|
||||
|
||||
@Test fun withNothingPickedTheStatsOpen() {
|
||||
val ids = listOf("telemetry", "downloads", "notifications", "screenshots", "chat")
|
||||
val ids = listOf("telemetry", "downloads", "screenshots", "chat")
|
||||
assertEquals("telemetry", pickBottomPage(null, ids))
|
||||
assertEquals("telemetry", pickBottomPage("gone", ids))
|
||||
assertEquals("chat", pickBottomPage("chat", ids))
|
||||
|
||||
@@ -244,6 +244,15 @@ self-extractor stops at "Path not found", so the values it installs are applied
|
||||
`witcher.exe` exits during startup. The language comes from the installed product's
|
||||
`goggame-<id>.info`, and a script's own `setRegistry` entries always win over the built-in table.
|
||||
|
||||
The script's `supportData` actions run right after: files and folders from the game folder
|
||||
(`{app}`) or its support files (`{supportDir}`, `support/<id>/`) are copied to `{userdocs}` and
|
||||
`{localappdata}` in the prefix, and `type: folder` without a source creates the folder. Mods such
|
||||
as one-click editions ship their `Plugins.txt` and INI files this way. Paths match without regard
|
||||
to case, links are copied as links, and a path outside those folders is refused. A file the
|
||||
player already has is replaced only when the action says `overwrite`. `.droiddeck-gog-support` in
|
||||
the prefix holds the actions' hash, so they run once per script revision and a player's later
|
||||
edits stay.
|
||||
|
||||
A GOG game's exe comes from its own manifest first: `goggame-<id>.info`'s play task in category
|
||||
`game` (`isPrimary` first), or a primary `launcher` task for launcher games, whose `path` stays
|
||||
inside the folder; any other `goggame-*.info` in the folder supplies the task only when the
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# DroidDeck 0.7.1
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Droid-Deck/DroidDeck/releases/download/0.7.1/DroidDeck-0.7.1.apk"><img src="https://img.shields.io/badge/Download-DroidDeck%200.7.1%20APK-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Download DroidDeck 0.7.1"></a>
|
||||
<a href="https://discord.gg/JRGAvawjsm"><img src="https://img.shields.io/badge/Discord-Join%20us-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the DroidDeck Discord"></a>
|
||||
</p>
|
||||
|
||||
**DroidDeck is 100% open source. No ads. No telemetry. No proprietary components. No source withheld.**
|
||||
|
||||
0.7.1 is a fix release for 0.7.0. Since 0.7.0, **4 people** sent **33 pull requests**, and **2 of them are first-time contributors**. It fixes Steam launches that hung at "Processing install script", the endless loading screen after quitting a game and colour on PowerVR, plus GOG DLC and a new launcher theme.
|
||||
|
||||
### Features
|
||||
|
||||
- Added the **Scarlet snow** launcher theme, DroidDeck’s first light theme. (@EnzoDLofi, [#2262](https://github.com/Droid-Deck/DroidDeck/pull/2262))
|
||||
- Added **left and right picture alignment** next to top and bottom. The controller pointer and direct touch follow the moved picture, also with glasses. (@EnzoDLofi, [#2384](https://github.com/Droid-Deck/DroidDeck/pull/2384))
|
||||
- **GOG installs the DLC you own**, and the GOG search reaches GOG’s whole catalog. (@maxjivi05, [#2348](https://github.com/Droid-Deck/DroidDeck/pull/2348), [#2296](https://github.com/Droid-Deck/DroidDeck/pull/2296))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed **Steam games stuck at “Processing install script”** or a download that never finishes, and the black screen with “Abort game” after quitting, which started in 0.7.0. (@xXJSONDeruloXx, [#2303](https://github.com/Droid-Deck/DroidDeck/pull/2303))
|
||||
- Fixed **a game launched from DroidDeck stalling at Steam’s launch screen**: DroidDeck now waits for Steam to be ready. (@maxjivi05, [#2362](https://github.com/Droid-Deck/DroidDeck/pull/2362))
|
||||
- Fixed **an endless loading screen** after a game exits back to Steam. (@maxjivi05, [#2359](https://github.com/Droid-Deck/DroidDeck/pull/2359))
|
||||
- The bottom-screen Dashboard’s **Notifications page is removed**, so DroidDeck no longer asks to read your notifications. (@xXJSONDeruloXx, [#2342](https://github.com/Droid-Deck/DroidDeck/pull/2342))
|
||||
- Fixed **grayscale Steam and games on PowerVR** (Pixel 10 Pro and Pro XL) since the Ubuntu 26.04 runtime. (@maxjivi05, [#2287](https://github.com/Droid-Deck/DroidDeck/pull/2287))
|
||||
- Fixed **games that need EasyAntiCheat** never starting: Linux-only tools such as the Proton EasyAntiCheat Runtime keep their native platform. (@maxjivi05, [#2313](https://github.com/Droid-Deck/DroidDeck/pull/2313))
|
||||
- Fixed **a Proton picked in Steam**, such as Proton Experimental, being switched back to DroidDeck-Proton, and **store apps launched before Steam opens** reporting that no Proton is installed. (@maxjivi05, [#2284](https://github.com/Droid-Deck/DroidDeck/pull/2284), [#2392](https://github.com/Droid-Deck/DroidDeck/pull/2392))
|
||||
- Fixed **games failing with `c000007b`** after an installer put an x64 system DLL into an ARM64 prefix. (@maxjivi05, [#2318](https://github.com/Droid-Deck/DroidDeck/pull/2318))
|
||||
- Fixed **emulators and other AppImage, Flatpak and Snap programs** rendering through system memory on Adreno. They get the game GPU setting, and Flatpak apps open their window instead of playing audio only. (@maxjivi05, [#2288](https://github.com/Droid-Deck/DroidDeck/pull/2288), [#2295](https://github.com/Droid-Deck/DroidDeck/pull/2295), [#2391](https://github.com/Droid-Deck/DroidDeck/pull/2391))
|
||||
- Fixed **Linux emulators that run guest code natively** hanging on launch. (@maxjivi05, [#2279](https://github.com/Droid-Deck/DroidDeck/pull/2279))
|
||||
- Fixed **Firefox tabs crashing** and the **desktop browser hanging** in the Desktop session. (@xXJSONDeruloXx, @maxjivi05, [#2360](https://github.com/Droid-Deck/DroidDeck/pull/2360), [#2304](https://github.com/Droid-Deck/DroidDeck/pull/2304))
|
||||
- Fixed **taps on pop-up dialogs** and windows away from the screen’s top-left corner doing nothing. (@maxjivi05, [#2280](https://github.com/Droid-Deck/DroidDeck/pull/2280), [#2285](https://github.com/Droid-Deck/DroidDeck/pull/2285))
|
||||
- Fixed **direct touch with Relative mouse: Auto** turning taps into small mouse movements when no mouse is connected. (@maxjivi05, [#2305](https://github.com/Droid-Deck/DroidDeck/pull/2305))
|
||||
- Fixed **the Controls below the game tabs** being cut off, which left the panel stuck on the trackpads. (@maxjivi05, [#2302](https://github.com/Droid-Deck/DroidDeck/pull/2302))
|
||||
- Fixed **GOG**: owned games missing from the library since 0.6.0 are back, and install scripts’ support files reach the prefix, so modded editions start as installed. (@maxjivi05, [#2296](https://github.com/Droid-Deck/DroidDeck/pull/2296), [#2294](https://github.com/Droid-Deck/DroidDeck/pull/2294))
|
||||
- Fixed **stutter on devices with 13 GB of RAM or less**: game memory the game reads straight back is no longer compressed again every 30 s. (@maxjivi05, [#2312](https://github.com/Droid-Deck/DroidDeck/pull/2312))
|
||||
- Fixed **the frame graph jumping around** on the bottom-screen Dashboard’s In-game stats. (@xXJSONDeruloXx, [#2345](https://github.com/Droid-Deck/DroidDeck/pull/2345))
|
||||
- Fixed smaller things: programs whose allocator calls a hooked function at startup no longer abort with the input preload, `droiddeckctl` works on shells without the `content` command such as the Retroid Pocket Duo’s, a full disk no longer crashes the app on an agent call, and ending a session without the graphics runtime pack no longer logs an error. (@xXJSONDeruloXx, @maxjivi05, [#2361](https://github.com/Droid-Deck/DroidDeck/pull/2361), [#2321](https://github.com/Droid-Deck/DroidDeck/pull/2321), [#2325](https://github.com/Droid-Deck/DroidDeck/pull/2325), [#2316](https://github.com/Droid-Deck/DroidDeck/pull/2316))
|
||||
|
||||
### Community
|
||||
|
||||
These are everyone whose code is in 0.7.1:
|
||||
|
||||
| Contributor | Pull requests |
|
||||
|---|---|
|
||||
| @maxjivi05 | 22: Steam launch readiness, PowerVR colour, GOG DLC and library, AppImage and Flatpak GPU setting, dialog taps, EasyAntiCheat and more |
|
||||
| @xXJSONDeruloXx | 8: Steam session bus, notification listener removal, Firefox in the desktop, `droiddeckctl` and more |
|
||||
| @EnzoDLofi | 2: Scarlet snow theme, left and right picture alignment |
|
||||
| @GiovanniCarbinatti | 1: README GPU support |
|
||||
|
||||
### New contributors
|
||||
|
||||
- @EnzoDLofi made their first contribution in [#2262](https://github.com/Droid-Deck/DroidDeck/pull/2262).
|
||||
- @GiovanniCarbinatti made their first contribution in [#2311](https://github.com/Droid-Deck/DroidDeck/pull/2311).
|
||||
|
||||
[Full changelog](https://github.com/Droid-Deck/DroidDeck/compare/0.7.0...0.7.1)
|
||||
+32
-1
@@ -9,6 +9,7 @@ import gzip
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
import struct
|
||||
@@ -98,6 +99,29 @@ def encode_request(request: dict) -> str:
|
||||
return encoded
|
||||
|
||||
|
||||
def receiver_call(adb: str, serial: str, method: str, arg: str | None, request: dict | None, timeout: float) -> dict:
|
||||
"""The agent bridge through a broadcast, for shells without the `content` command."""
|
||||
call_id = uuid.uuid4().hex[:16]
|
||||
remote = f"/sdcard/Android/data/{PACKAGE}/files/agent-calls/{call_id}.json"
|
||||
command = ["shell", "am", "broadcast", "-a", f"{PACKAGE}.AGENT_CALL", "-p", PACKAGE,
|
||||
"--es", "method", method, "--es", "id", call_id]
|
||||
if arg is not None:
|
||||
command += ["--es", "arg", shlex.quote(arg)]
|
||||
if request is not None:
|
||||
command += ["--es", "request", encode_request(request)]
|
||||
started = run_adb(adb, serial, *command, timeout=timeout + 30)
|
||||
if started.returncode != 0:
|
||||
raise ControlError((started.stdout + started.stderr).decode(errors="replace").strip() or "ADB broadcast failed", "ADB_FAILED")
|
||||
deadline = time.monotonic() + timeout
|
||||
while time.monotonic() < deadline:
|
||||
result = run_adb(adb, serial, "shell", f"cat {remote} 2>/dev/null && rm -f {remote}", timeout=30)
|
||||
text = result.stdout.decode(errors="replace").strip()
|
||||
if result.returncode == 0 and text:
|
||||
return json.loads(text)
|
||||
time.sleep(0.25)
|
||||
raise ControlError(f"No answer to {method} within {timeout:g} s", "TIMEOUT")
|
||||
|
||||
|
||||
def provider_call(adb: str, serial: str, method: str, arg: str | None = None, request: dict | None = None,
|
||||
timeout: float = 30) -> dict:
|
||||
command = ["shell", "content", "call", "--uri", AUTHORITY, "--method", method]
|
||||
@@ -108,6 +132,8 @@ def provider_call(adb: str, serial: str, method: str, arg: str | None = None, re
|
||||
command.extend(["--extra", f"request:s:{encoded}"])
|
||||
result = run_adb(adb, serial, *command, timeout=timeout)
|
||||
output = (result.stdout + result.stderr).decode(errors="replace")
|
||||
if "content: inaccessible or not found" in output:
|
||||
return receiver_call(adb, serial, method, arg, request, timeout)
|
||||
response = _content_result(output)
|
||||
if result.returncode != 0 and response.get("ok") is not False:
|
||||
raise ControlError(output.strip() or "ADB content call failed", "ADB_FAILED")
|
||||
@@ -237,10 +263,15 @@ def displays(adb: str, serial: str) -> list[dict]:
|
||||
device = re.search(r"mPrimaryDisplayDevice=(.+)", block)
|
||||
size = re.search(r"real (\d+) x (\d+)", block)
|
||||
name = device.group(1).strip() if device else None
|
||||
physical = devices.get(name) if name else None
|
||||
if name and not physical:
|
||||
# Some ROMs (Retroid Pocket Duo) print the device as "Built-in Screen(local:<id>)"
|
||||
inline = re.search(r"\(local:(\d+)\)$", name)
|
||||
physical = inline.group(1) if inline else None
|
||||
out.append({
|
||||
"display": logical,
|
||||
"name": name,
|
||||
"physicalId": devices.get(name) if name else None,
|
||||
"physicalId": physical,
|
||||
"size": [int(size.group(1)), int(size.group(2))] if size else None,
|
||||
})
|
||||
return out
|
||||
|
||||
@@ -327,6 +327,12 @@ each frame's motion to the X pointer itself until the game stops warping. Absolu
|
||||
motion, as a real compositor does, so XInput2 raw motion reaches games that read only that. A touch moves the
|
||||
pointer without relative motion, so tapping the screen does not turn the camera.
|
||||
|
||||
The X pointer is read in root coordinates and the seat position is local to the focused window, so the X pointer
|
||||
is moved into the focused window's coordinates before the two are compared. Without that, any window not at the
|
||||
root origin (a dialog, or a windowed program) looked like a game warping the pointer, following started, and the
|
||||
pointer was pinned to the window's corner. A touch always lands where the finger is and ends following, so taps
|
||||
work in every window.
|
||||
|
||||
## 0132 sdl, steamcompmgr: follow a game's window mode
|
||||
With `--follow-game-window-mode`, the outer window of a nested SDL gamescope follows the focused game window. A window
|
||||
asking for `_NET_WM_STATE_FULLSCREEN`, or a Steam game covering the X screen without minimise or maximise functions or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
|
||||
index 17bae3a..c468fb3 100644
|
||||
index 17bae3a..91ec0be 100644
|
||||
--- a/src/steamcompmgr.cpp
|
||||
+++ b/src/steamcompmgr.cpp
|
||||
@@ -32,6 +32,7 @@
|
||||
@@ -18,7 +18,7 @@ index 17bae3a..c468fb3 100644
|
||||
static bool relative_mouse_forced();
|
||||
|
||||
void MouseCursor::checkSuspension()
|
||||
@@ -3083,12 +3085,89 @@ static gamescope::ConVar<int> cv_relative_mouse( "relative_mouse", 0,
|
||||
@@ -3083,12 +3085,101 @@ static gamescope::ConVar<int> cv_relative_mouse( "relative_mouse", 0,
|
||||
"0 = Leave it to the game and the nested hints. 1 = Send host pointer motion as relative movement, for games that confine the cursor and warp it back to read movement. 2 = Never go relative." );
|
||||
static bool relative_mouse_forced()
|
||||
{
|
||||
@@ -34,16 +34,28 @@ index 17bae3a..c468fb3 100644
|
||||
+ static double s_flLastX = 0.0;
|
||||
+ static double s_flLastY = 0.0;
|
||||
+
|
||||
+ int nRootX = 0;
|
||||
+ int nRootY = 0;
|
||||
+ int nClientX = 0;
|
||||
+ int nClientY = 0;
|
||||
+ if ( bAllowed && pFocus->cursor )
|
||||
+ pFocus->cursor->QueryRootPosition( &nRootX, &nRootY );
|
||||
+ pFocus->cursor->QueryRootPosition( &nClientX, &nClientY );
|
||||
+ else
|
||||
+ bAllowed = false;
|
||||
+
|
||||
+ steamcompmgr_win_t *pInputWindow = pFocus->inputFocusWindow;
|
||||
+ if ( pInputWindow && pInputWindow->type == steamcompmgr_win_type_t::XWAYLAND )
|
||||
+ {
|
||||
+ nClientX -= pInputWindow->xwayland().a.x;
|
||||
+ nClientY -= pInputWindow->xwayland().a.y;
|
||||
+ }
|
||||
+
|
||||
+ wlserver_lock();
|
||||
+ const double flX = wlserver.mouse_surface_cursorx;
|
||||
+ const double flY = wlserver.mouse_surface_cursory;
|
||||
+ if ( s_bFollowClientPointer && !wlserver.bFollowClientPointer )
|
||||
+ {
|
||||
+ s_nAwayFrames = 0;
|
||||
+ s_bFollowClientPointer = false;
|
||||
+ }
|
||||
+ if ( !bAllowed )
|
||||
+ {
|
||||
+ s_nAwayFrames = 0;
|
||||
@@ -53,7 +65,7 @@ index 17bae3a..c468fb3 100644
|
||||
+ else if ( !s_bFollowClientPointer )
|
||||
+ {
|
||||
+ const bool bMoved = flX != s_flLastX || flY != s_flLastY;
|
||||
+ if ( bMoved && ( std::abs( nRootX - flX ) > 48.0 || std::abs( nRootY - flY ) > 48.0 ) )
|
||||
+ if ( bMoved && ( std::abs( nClientX - flX ) > 48.0 || std::abs( nClientY - flY ) > 48.0 ) )
|
||||
+ {
|
||||
+ const uint64_t ulNow = get_time_in_nanos();
|
||||
+ if ( ulNow - s_ulLastAway > 500'000'000ul )
|
||||
@@ -70,12 +82,12 @@ index 17bae3a..c468fb3 100644
|
||||
+ wlserver.bFollowClientPointer = true;
|
||||
+ wlserver.flFollowDX = 0.0;
|
||||
+ wlserver.flFollowDY = 0.0;
|
||||
+ wlserver_mousewarp( nRootX, nRootY, 0, true );
|
||||
+ wlserver_mousewarp( nClientX, nClientY, 0, true );
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ const bool bWarped = std::abs( nRootX - flX ) > 2.0 || std::abs( nRootY - flY ) > 2.0;
|
||||
+ const bool bWarped = std::abs( nClientX - flX ) > 2.0 || std::abs( nClientY - flY ) > 2.0;
|
||||
+ const double flDX = std::trunc( wlserver.flFollowDX );
|
||||
+ const double flDY = std::trunc( wlserver.flFollowDY );
|
||||
+ if ( bWarped )
|
||||
@@ -87,9 +99,9 @@ index 17bae3a..c468fb3 100644
|
||||
+ {
|
||||
+ wlserver.flFollowDX -= flDX;
|
||||
+ wlserver.flFollowDY -= flDY;
|
||||
+ wlserver_mousewarp( nRootX, nRootY, 0, true );
|
||||
+ wlserver_mousewarp( nClientX, nClientY, 0, true );
|
||||
+ if ( flDX != 0.0 || flDY != 0.0 )
|
||||
+ wlserver_mousewarp( nRootX + flDX, nRootY + flDY, 0, true );
|
||||
+ wlserver_mousewarp( nClientX + flDX, nClientY + flDY, 0, true );
|
||||
+ }
|
||||
+
|
||||
+ if ( s_nQuietFrames >= 60 )
|
||||
@@ -110,7 +122,7 @@ index 17bae3a..c468fb3 100644
|
||||
return true;
|
||||
|
||||
global_focus_t *pFocus = GetCurrentFocus();
|
||||
@@ -10892,9 +10971,15 @@ steamcompmgr_main(int argc, char **argv)
|
||||
@@ -10892,9 +10983,15 @@ steamcompmgr_main(int argc, char **argv)
|
||||
const int nRelativeMouse = cv_relative_mouse.Get();
|
||||
const bool bForcedRelativeMouse = nRelativeMouse == 1 && !window_is_steam( pPaintFocus->inputFocusWindow );
|
||||
|
||||
@@ -128,7 +140,7 @@ index 17bae3a..c468fb3 100644
|
||||
static bool s_bRelativeMouseMode = false;
|
||||
if ( s_bRelativeMouseMode && !bRelativeMouseMode && pPaintFocus->cursor &&
|
||||
diff --git a/src/wlserver.cpp b/src/wlserver.cpp
|
||||
index 5733871..cc75f8a 100644
|
||||
index 5733871..df23f8a 100644
|
||||
--- a/src/wlserver.cpp
|
||||
+++ b/src/wlserver.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
@@ -153,7 +165,7 @@ index 5733871..cc75f8a 100644
|
||||
if ( !wlserver_apply_constraint( &dx, &dy ) )
|
||||
{
|
||||
wlr_seat_pointer_notify_frame( wlserver.wlr.seat );
|
||||
@@ -3110,10 +3121,18 @@ void wlserver_mousemotion( double dx, double dy, uint32_t time )
|
||||
@@ -3110,10 +3121,22 @@ void wlserver_mousemotion( double dx, double dy, uint32_t time )
|
||||
wlr_seat_pointer_notify_frame( wlserver.wlr.seat );
|
||||
}
|
||||
|
||||
@@ -163,7 +175,11 @@ index 5733871..cc75f8a 100644
|
||||
assert( wlserver_is_lock_held() );
|
||||
|
||||
+ if ( !bSynthetic && wlserver.bFollowClientPointer )
|
||||
+ return;
|
||||
+ {
|
||||
+ if ( !bFromTouch )
|
||||
+ return;
|
||||
+ wlserver.bFollowClientPointer = false;
|
||||
+ }
|
||||
+
|
||||
+ const double flStepX = x - wlserver.mouse_surface_cursorx;
|
||||
+ const double flStepY = y - wlserver.mouse_surface_cursory;
|
||||
@@ -173,7 +189,7 @@ index 5733871..cc75f8a 100644
|
||||
wlserver.mouse_surface_cursorx = x;
|
||||
wlserver.mouse_surface_cursory = y;
|
||||
|
||||
@@ -3304,7 +3323,7 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time, bool
|
||||
@@ -3304,7 +3327,7 @@ void wlserver_touchmotion( double x, double y, int touch_id, uint32_t time, bool
|
||||
{
|
||||
g_bPendingTouchMovement = true;
|
||||
|
||||
@@ -182,7 +198,7 @@ index 5733871..cc75f8a 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3352,7 +3371,7 @@ void wlserver_touchdown( double x, double y, int touch_id, uint32_t time, gamesc
|
||||
@@ -3352,7 +3375,7 @@ void wlserver_touchdown( double x, double y, int touch_id, uint32_t time, gamesc
|
||||
|
||||
if ( eMode != gamescope::TouchClickModes::Trackpad )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
GAMESCOPE_REPO=Droid-Deck/DroidDeck-Components
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-p22
|
||||
GAMESCOPE_SHA256=2b7e7481df5f5f7355d224d3a0d4205557367172653dff1d7206a230b6c78b46
|
||||
GAMESCOPE_TAG=gamescope-3.16.29-p23
|
||||
GAMESCOPE_SHA256=f5f2b8f658234ad2910a1be53c238188db7e7b2a9079f8cc5fa9ea006bebbe7e
|
||||
@@ -927,6 +927,33 @@ def steam_shortcut_state(agent_dir, game_id, timeout=6):
|
||||
time.sleep(min(0.5, max(0, deadline - time.monotonic())))
|
||||
|
||||
|
||||
def steam_ready(agent_dir):
|
||||
expression = """(() => {
|
||||
const store = globalThis.appStore;
|
||||
return !!store?.m_bIsInitialized && typeof globalThis.SteamClient?.Apps?.ContinueGameAction === 'function';
|
||||
})()"""
|
||||
return cdp_eval(agent_dir, expression, await_promise=False, timeout=3).get("value") is True
|
||||
|
||||
|
||||
def steam_clear_pending_interstitial(agent_dir, app_id):
|
||||
if not isinstance(app_id, str) or not app_id.isascii() or not app_id.isdigit() or int(app_id) <= 0:
|
||||
raise AgentError("INVALID_APP_ID", "appId must be a positive decimal Steam app id")
|
||||
expression = """(async () => {
|
||||
const apps = globalThis.SteamClient?.Apps;
|
||||
if (typeof apps?.GetActiveGameActions !== 'function' || typeof apps.ContinueGameAction !== 'function') return false;
|
||||
const active = await apps.GetActiveGameActions() || [];
|
||||
for (const action of active) {
|
||||
const appid = String(action?.strAppID ?? action?.gameid ?? action?.nAppID ?? '');
|
||||
if (appid === %s && action?.strTaskName === 'ShowInterstitials') {
|
||||
apps.ContinueGameAction(action.nGameActionID, appid, 'ShowInterstitials');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
})()""" % json.dumps(app_id)
|
||||
return cdp_eval(agent_dir, expression, timeout=3).get("value") is True
|
||||
|
||||
|
||||
def game_pids(app_id):
|
||||
wanted = [("SteamAppId=%s" % app_id).encode(), ("SteamGameId=%s" % app_id).encode()]
|
||||
me = os.getpid()
|
||||
@@ -1261,6 +1288,19 @@ def main(argv):
|
||||
return 1
|
||||
print(state)
|
||||
return {"ready": 0, "missing": 4, "not-shortcut": 3}.get(state, 1)
|
||||
if argv and argv[0] == "--steam-ready":
|
||||
try:
|
||||
return 0 if steam_ready(Path(base) / "agent") else 1
|
||||
except (AgentError, OSError, ValueError):
|
||||
return 1
|
||||
if argv and argv[0] == "--steam-clear-pending-interstitial":
|
||||
if len(argv) != 2:
|
||||
print("usage: droiddeck-agent --steam-clear-pending-interstitial <appid>", file=sys.stderr)
|
||||
return 2
|
||||
try:
|
||||
return 0 if steam_clear_pending_interstitial(Path(base) / "agent", argv[1]) else 1
|
||||
except (AgentError, OSError, ValueError):
|
||||
return 1
|
||||
serve(Path(base) / "agent", focus="--no-focus" not in argv)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@ if [ -x /usr/local/bin/droiddeck-fex ]; then
|
||||
*) run=(/usr/local/bin/droiddeck-fex run --mode "$fex" --for "$APPDIR" -- "$APPDIR/AppRun") ;;
|
||||
esac
|
||||
fi
|
||||
gpu=("${BASH_SOURCE[0]%/*}/droiddeck-game-gpu")
|
||||
[ ${#flags[@]} -gt 0 ] && gpu+=(--chromium)
|
||||
run=("${gpu[@]}" -- "${run[@]}")
|
||||
echo "== appimage $ARGV0 ($APPDIR) ${flags[*]} FEX $fex Qt $qt${QT_QPA_PLATFORM:+ ($QT_QPA_PLATFORM)}"
|
||||
cd "$APPDIR" || exit 1
|
||||
started=$(mktemp "${TMPDIR:-/tmp}/droiddeck-appimage.XXXXXX")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
export FLATPAK_BWRAP=/usr/local/bin/droiddeck-bwrap
|
||||
unset MESA_LOADER_DRIVER_OVERRIDE GALLIUM_DRIVER LIBGL_KOPPER_DRI2 VK_ICD_FILENAMES VK_DRIVER_FILES
|
||||
case ":${XDG_DATA_DIRS:-}:" in
|
||||
*"/flatpak/exports/share:"*) ;;
|
||||
*) export XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share} ;;
|
||||
@@ -11,8 +12,16 @@ if [ -n "${BL_INSIDE:-}" ] || [ -n "${GAMESCOPE_WAYLAND_DISPLAY:-}" ]; then
|
||||
export XDG_SESSION_TYPE=x11
|
||||
socket=(--nosocket=wayland --socket=x11)
|
||||
fi
|
||||
app=
|
||||
for arg in "$@"; do
|
||||
case $arg in -*) ;; *) app=$arg; break ;; esac
|
||||
done
|
||||
gpu=("${BASH_SOURCE[0]%/*}/droiddeck-game-gpu")
|
||||
location=
|
||||
[ -n "$app" ] && location=$(flatpak info --show-location "$app" 2>/dev/null)
|
||||
[ -n "$location" ] && gpu+=(--for "$location/files")
|
||||
echo "== flatpak run ${socket[*]} $*"
|
||||
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ] && command -v dbus-run-session >/dev/null 2>&1; then
|
||||
exec dbus-run-session -- flatpak run "${socket[@]}" "$@"
|
||||
exec "${gpu[@]}" -- dbus-run-session -- flatpak run "${socket[@]}" "$@"
|
||||
fi
|
||||
exec flatpak run "${socket[@]}" "$@"
|
||||
exec "${gpu[@]}" -- flatpak run "${socket[@]}" "$@"
|
||||
@@ -11,6 +11,7 @@ import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
GAME_TU_DEBUG = "DROIDDECK_GAME_TU_DEBUG"
|
||||
CHROMIUM_FILES = {"chrome-sandbox", "chrome_100_percent.pak", "v8_context_snapshot.bin"}
|
||||
SYNC_KEYS = ("BL_SYNC", "BL_SYNC_FALLBACK", "BL_FSYNC_FIRST", "BL_SYNC_MIN_NOFILE", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC", "PROTON_NO_NTSYNC", "WINEESYNC")
|
||||
SEED_REDISTS = "/usr/local/bin/droiddeck-seed-redists"
|
||||
PACK_KEYS = ("WINESERVER", "BL_SYNC_PACK", "WINEESYNC", "PROTON_NO_ESYNC", "PROTON_NO_FSYNC")
|
||||
@@ -332,12 +333,12 @@ def engine_fixes(exe, args):
|
||||
return env, extra, notes
|
||||
|
||||
|
||||
def win_components(compat, app_id):
|
||||
def win_components(compat, app_id, proton=None, env=None):
|
||||
if not compat:
|
||||
return ""
|
||||
try:
|
||||
module = runpy.run_path(str(Path(__file__).resolve().parent / "droiddeck-wincomponents"))
|
||||
names, notes = module["apply"](compat.rstrip("/"), app_id)
|
||||
names, notes = module["apply"](compat.rstrip("/"), app_id, proton=proton, env=env or os.environ)
|
||||
for note in notes:
|
||||
print("droiddeck-game-env: " + note, file=sys.stderr)
|
||||
return module["overrides_value"](names)
|
||||
@@ -346,11 +347,23 @@ def win_components(compat, app_id):
|
||||
return ""
|
||||
|
||||
|
||||
def game_gpu(env):
|
||||
def chromium_app(folder):
|
||||
root = os.path.realpath(folder)
|
||||
for top, dirs, files in os.walk(root):
|
||||
if CHROMIUM_FILES.intersection(files) or CHROMIUM_FILES.intersection(dirs):
|
||||
return True
|
||||
if os.path.relpath(top, root).count(os.sep) >= 2:
|
||||
dirs[:] = []
|
||||
return False
|
||||
|
||||
|
||||
def game_gpu(env, keep=False):
|
||||
if GAME_TU_DEBUG not in env:
|
||||
return env
|
||||
result = env.copy()
|
||||
value = result.pop(GAME_TU_DEBUG)
|
||||
if keep:
|
||||
return result
|
||||
if value:
|
||||
result["TU_DEBUG"] = value
|
||||
else:
|
||||
@@ -846,6 +859,60 @@ WINE_DLL_DIRS = ("/lib/wine/i386-windows", "/lib/wine/x86_64-windows", "/lib/win
|
||||
"/lib/wine/fakedlls", "/lib64/wine", "/lib64/wine/fakedlls", "/lib64/wine/x86_64-windows")
|
||||
|
||||
|
||||
FOREIGN_SUFFIX = ".foreign-arch"
|
||||
PE = runpy.run_path(str(Path(__file__).resolve().parent / "droiddeck-wine-pe"))
|
||||
pe_machine = PE["pe_machine"]
|
||||
|
||||
|
||||
def repair_foreign_system_dlls(prefix, proton, env=None):
|
||||
dist = Path(proton).parent / "files/lib/wine"
|
||||
windows = Path(prefix) / "pfx/drive_c/windows"
|
||||
machines_by_folder = PE["proton_pe_machines"](proton, env or {})
|
||||
if machines_by_folder is None:
|
||||
return []
|
||||
repaired = []
|
||||
for folder, (libdir, machines) in machines_by_folder.items():
|
||||
builtins = dist / libdir
|
||||
try:
|
||||
builtin_names = {name.lower(): name for name in os.listdir(builtins)}
|
||||
except OSError:
|
||||
continue
|
||||
try:
|
||||
names = sorted(os.listdir(windows / folder))
|
||||
except OSError:
|
||||
continue
|
||||
for name in names:
|
||||
path = windows / folder / name
|
||||
builtin_name = builtin_names.get(name.lower())
|
||||
source = builtins / builtin_name if builtin_name else builtins / name
|
||||
if path.is_symlink() or not name.lower().endswith(".dll") or not source.is_file() or not path.is_file():
|
||||
continue
|
||||
machine = pe_machine(path)
|
||||
if machine is None or PE["machine_compatible"](path, machines, machine):
|
||||
continue
|
||||
link = windows / folder / (name + ".bl-new")
|
||||
backup = windows / folder / (name + FOREIGN_SUFFIX)
|
||||
serial = 1
|
||||
while os.path.lexists(backup):
|
||||
backup = windows / folder / (name + FOREIGN_SUFFIX + ".%d" % serial)
|
||||
serial += 1
|
||||
try:
|
||||
os.symlink(os.path.relpath(source, path.parent), link)
|
||||
os.replace(path, backup)
|
||||
try:
|
||||
os.replace(link, path)
|
||||
except OSError:
|
||||
if not os.path.lexists(path) and os.path.lexists(backup):
|
||||
os.replace(backup, path)
|
||||
raise
|
||||
except OSError:
|
||||
if link.is_symlink():
|
||||
link.unlink()
|
||||
continue
|
||||
repaired.append("%s/%s (machine 0x%x)" % (folder, name, machine))
|
||||
return repaired
|
||||
|
||||
|
||||
def is_wine_dll_link(path):
|
||||
try:
|
||||
return os.path.islink(path) and os.path.dirname(os.readlink(path)).endswith(WINE_DLL_DIRS)
|
||||
@@ -1143,6 +1210,42 @@ def main():
|
||||
env = game_gpu(os.environ.copy())
|
||||
mic_enabled = env.get("BL_MIC_ENABLED")
|
||||
debug_dir = env.get("BL_DEBUG_DIR", "")
|
||||
prefix_path = env.get("STEAM_COMPAT_DATA_PATH", "").rstrip("/")
|
||||
app_id = game_id(env)
|
||||
components = ""
|
||||
waiting = bool(app_id and len(command) > 1 and command[1] == "waitforexitandrun")
|
||||
config = {}
|
||||
launch_config = None
|
||||
launch_config_valid = True
|
||||
effective_env = env
|
||||
if waiting:
|
||||
path = Path.home() / ".config/droiddeck/game-environment.json"
|
||||
try:
|
||||
with path.open(encoding="utf-8") as source:
|
||||
config = json.load(source)
|
||||
launch_config = config
|
||||
except FileNotFoundError:
|
||||
launch_config = {"version": 1}
|
||||
except (OSError, ValueError, TypeError, AttributeError):
|
||||
launch_config_valid = False
|
||||
if launch_config_valid:
|
||||
try:
|
||||
effective_env = apply_config(env, launch_config, app_id)
|
||||
except (OSError, ValueError, TypeError, AttributeError):
|
||||
launch_config_valid = False
|
||||
if not launch_config_valid:
|
||||
print("droiddeck-game-env: invalid configuration; using inherited environment", file=sys.stderr)
|
||||
if waiting:
|
||||
components = win_components(prefix_path, app_id, command[0], effective_env)
|
||||
if prefix_path and command:
|
||||
try:
|
||||
fixed = repair_foreign_system_dlls(prefix_path, command[0], effective_env)
|
||||
except OSError as error:
|
||||
fixed = []
|
||||
print("droiddeck-game-env: prefix system DLL check skipped (%s)" % error, file=sys.stderr)
|
||||
if fixed:
|
||||
print("droiddeck-game-env: replaced foreign-architecture system DLLs with this Proton's own: %s" % ", ".join(fixed),
|
||||
file=sys.stderr)
|
||||
scripts = mark_install_scripts(command, env)
|
||||
if scripts and install_scripts_done(scripts, env):
|
||||
print("droiddeck-game-env: install scripts already run in this prefix; evaluator skipped", file=sys.stderr)
|
||||
@@ -1151,8 +1254,6 @@ def main():
|
||||
digest = scripts_digest(scripts) if scripts else None
|
||||
except OSError:
|
||||
digest = None
|
||||
app_id = game_id(env)
|
||||
waiting = bool(app_id and len(command) > 1 and command[1] == "waitforexitandrun")
|
||||
diagnostic_app_id = app_id if waiting and os.environ.get("DROIDDECK_ENHANCED_DIAGNOSTICS") == "1" else None
|
||||
dirt_prefix = None
|
||||
if app_id:
|
||||
@@ -1170,7 +1271,6 @@ def main():
|
||||
for note in notes:
|
||||
print("droiddeck-game-env: " + note, file=sys.stderr)
|
||||
command += extra
|
||||
components = win_components(env.get("STEAM_COMPAT_DATA_PATH", ""), app_id)
|
||||
if components:
|
||||
own = fixes.get("WINEDLLOVERRIDES")
|
||||
fixes["WINEDLLOVERRIDES"] = components + ";" + own if own else components
|
||||
@@ -1178,22 +1278,21 @@ def main():
|
||||
if dirt_prefix:
|
||||
own = fixes.get("WINEDLLOVERRIDES")
|
||||
fixes["WINEDLLOVERRIDES"] = own + ";ws2_32=n,b" if own else "ws2_32=n,b"
|
||||
path = Path.home() / ".config/droiddeck/game-environment.json"
|
||||
config = {}
|
||||
try:
|
||||
with path.open(encoding="utf-8") as source:
|
||||
config = json.load(source)
|
||||
if waiting:
|
||||
if waiting:
|
||||
if launch_config_valid:
|
||||
if "vblank_mode" in config.get("shared", {}):
|
||||
fixes.pop("vblank_mode", None)
|
||||
env = apply_config(env, config, app_id, fixes)
|
||||
else:
|
||||
env = apply_config(env, launch_config, app_id, fixes)
|
||||
else:
|
||||
path = Path.home() / ".config/droiddeck/game-environment.json"
|
||||
try:
|
||||
with path.open(encoding="utf-8") as source:
|
||||
config = json.load(source)
|
||||
env = apply_config(env, sync_config(config, app_id), app_id)
|
||||
except FileNotFoundError:
|
||||
if waiting:
|
||||
env = apply_config(env, {"version": 1}, app_id, fixes)
|
||||
except (OSError, ValueError, TypeError, AttributeError):
|
||||
print("droiddeck-game-env: invalid configuration; using inherited environment", file=sys.stderr)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
except (OSError, ValueError, TypeError, AttributeError):
|
||||
print("droiddeck-game-env: invalid configuration; using inherited environment", file=sys.stderr)
|
||||
if waiting:
|
||||
before_debug = env
|
||||
env = apply_game_debug_logs(env, config, debug_dir)
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/python3
|
||||
import os
|
||||
import runpy
|
||||
import sys
|
||||
|
||||
BIN_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def main(argv):
|
||||
keep = False
|
||||
folder = None
|
||||
while argv and argv[0] != "--":
|
||||
if argv[0] == "--chromium":
|
||||
keep = True
|
||||
argv = argv[1:]
|
||||
elif argv[0] == "--for" and len(argv) > 1:
|
||||
folder = argv[1]
|
||||
argv = argv[2:]
|
||||
else:
|
||||
break
|
||||
if argv and argv[0] == "--":
|
||||
argv = argv[1:]
|
||||
if not argv:
|
||||
print("usage: droiddeck-game-gpu [--chromium] [--for FOLDER] -- PROGRAM [ARGS...]", file=sys.stderr)
|
||||
return 2
|
||||
env = dict(os.environ)
|
||||
try:
|
||||
game_env = runpy.run_path(os.path.join(BIN_DIR, "droiddeck-game-env"))
|
||||
if folder and not keep:
|
||||
keep = game_env["chromium_app"](folder)
|
||||
env = game_env["game_gpu"](env, keep)
|
||||
except Exception as error:
|
||||
print("droiddeck-game-gpu: the game GPU setting was not applied (%s)" % error, file=sys.stderr)
|
||||
try:
|
||||
os.execvpe(argv[0], argv, env)
|
||||
except OSError as error:
|
||||
print("droiddeck-game-gpu: %s: %s" % (argv[0], error.strerror), file=sys.stderr)
|
||||
return 127
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
@@ -70,8 +70,19 @@ def mapping(root):
|
||||
|
||||
|
||||
def tools(root):
|
||||
c = compat()
|
||||
wrapper = os.path.join(root, "compatibilitytools.d", c["TOOL"])
|
||||
complete = os.access(os.path.join(wrapper, c["LAUNCHER"]), os.X_OK) and os.path.isfile(os.path.join(wrapper, "toolmanifest.vdf"))
|
||||
if c["TOOL"].lower() not in c["local_tools"](root) or not complete:
|
||||
depot = c["find_source"](root, runnable=True)
|
||||
if depot is not None:
|
||||
try:
|
||||
c["build_tool"](wrapper, depot)
|
||||
except OSError:
|
||||
pass
|
||||
found = {}
|
||||
for base in [os.path.join(root, "compatibilitytools.d")] + list(SYSTEM_TOOLS):
|
||||
bases = [os.path.join(root, "compatibilitytools.d")] + list(SYSTEM_TOOLS)
|
||||
for base in bases:
|
||||
try:
|
||||
entries = sorted(os.listdir(base))
|
||||
except OSError:
|
||||
|
||||
@@ -902,21 +902,21 @@ case $mode in
|
||||
bl_session_pressure() {
|
||||
bl_memory_read
|
||||
[ "$_bl_game" = 1 ] && bl_low_ram && bl_memory_critical || return 0
|
||||
local _wait=$_bl_tier_backoff _urgent=0 _before _pids _targets
|
||||
[ "$_bl_available" -ge $((_bl_headroom / 2)) ] || _urgent=1 _wait=30
|
||||
local _wait=$_bl_tier_backoff _before _pids _targets
|
||||
[ "$_bl_available" -ge $((_bl_headroom / 2)) ] || [ "$_bl_tier_pushed" -lt 0 ] || _wait=30
|
||||
[ "$_bl_tier_at" -lt 0 ] || [ $((SECONDS - _bl_tier_at)) -ge "$_wait" ] || return 0
|
||||
if [ "$_bl_tier_at" -ge 0 ] && [ "$_bl_tier_pushed" -gt 0 ]; then
|
||||
bl_tier_readback
|
||||
if [ "$_bl_tier_back" -le $((_bl_tier_pushed / 2)) ]; then
|
||||
_bl_tier_backoff=30
|
||||
elif [ "$_urgent" = 0 ]; then
|
||||
else
|
||||
_bl_tier_backoff=$((_bl_tier_backoff * 2 > 300 ? 300 : _bl_tier_backoff * 2))
|
||||
_bl_tier_at=$SECONDS _bl_tier_pushed=0
|
||||
_bl_tier_at=$SECONDS _bl_tier_pushed=-1
|
||||
step "zRAM: the game read back most of its last page-out, next try in ${_bl_tier_backoff} s"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
_bl_tier_at=$SECONDS
|
||||
_bl_tier_at=$SECONDS _bl_tier_pushed=0
|
||||
bl_zram_pick game
|
||||
bl_zram_usage "${_pids[@]}" > /dev/null
|
||||
[ "$_bl_rss" -ge $((256 * 1024)) ] || return 0
|
||||
@@ -1244,7 +1244,14 @@ case $mode in
|
||||
sleep 1
|
||||
done
|
||||
[ "${#game}" -gt 10 ] && shortcut=1
|
||||
[ -n "$shortcut" ] || sleep 4
|
||||
_bl_ready_end=$((SECONDS + 30))
|
||||
while [ "$waited" -lt 30 ] && [ "$((_bl_ready_end - SECONDS))" -gt 0 ]; do
|
||||
timeout "$((_bl_ready_end - SECONDS))" /usr/local/bin/droiddeck-agent --steam-ready >/dev/null 2>&1 && break
|
||||
[ "$((_bl_ready_end - SECONDS))" -gt 1 ] || break
|
||||
sleep 1
|
||||
waited=$((waited + 1))
|
||||
done
|
||||
waited=0
|
||||
echo "== steam: interface up; launching the requested game $game"
|
||||
_bl_hand_off
|
||||
[ -n "$shortcut" ] || return 0
|
||||
@@ -1264,7 +1271,9 @@ case $mode in
|
||||
elif _bl_starting; then
|
||||
echo "== steam: the requested game started while waiting; not launching again"
|
||||
elif [ "$(_bl_focused)" = 769 ]; then
|
||||
echo "== steam: launching the requested game again $game (overview status $status)"
|
||||
echo "== steam: clearing the pending launch interstitial for $game (overview status $status)"
|
||||
/usr/local/bin/droiddeck-agent --steam-clear-pending-interstitial "$(((game >> 32) & 0xffffffff))" >/dev/null 2>&1 && return 0
|
||||
echo "== steam: launching the requested game again $game"
|
||||
_bl_hand_off
|
||||
else
|
||||
echo "== steam: the game took focus while waiting; not launching again"
|
||||
@@ -1338,6 +1347,23 @@ case $mode in
|
||||
echo "== network: no dbus-daemon or netmanager in this runtime; the client will show no connection"
|
||||
exit 69
|
||||
fi
|
||||
# Without a session bus libdbus autolaunches one under the game; it never exits and Steam's
|
||||
# reaper waits on it, so the launch or exit never finishes.
|
||||
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
||||
_bl_bus=${XDG_RUNTIME_DIR:-/run/droiddeck}/bus
|
||||
rm -f "$_bl_bus"
|
||||
dbus-daemon --session --address="unix:path=$_bl_bus" --nofork --nopidfile &
|
||||
for _ in $(seq 1 50); do
|
||||
[ -S "$_bl_bus" ] && break
|
||||
nap 0.1
|
||||
done
|
||||
if [ -S "$_bl_bus" ]; then
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=$_bl_bus"
|
||||
echo "== session bus up at $_bl_bus"
|
||||
else
|
||||
echo "== session bus did not come up; programs may start their own"
|
||||
fi
|
||||
fi
|
||||
|
||||
_bl_compat_env=(env -u LD_LIBRARY_PATH -u STEAM_RUNTIME -u STEAM_STEAMRT_RECURSION_GUARD)
|
||||
[ "${LD_LIBRARY_PATH+x}" ] && _bl_compat_env+=("LD_LIBRARY_PATH=$LD_LIBRARY_PATH")
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/python3
|
||||
import os
|
||||
import re
|
||||
import runpy
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
import yaml
|
||||
|
||||
BIN_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
SNAP_DIR = "/snap"
|
||||
HOST_DIRS = ("/etc", "/home", "/root", "/tmp", "/run", "/var/snap", "/var/lib/snapd", "/var/tmp", "/var/log",
|
||||
"/media", "/mnt", "/snap", "/usr/src", "/lib/modules")
|
||||
@@ -59,6 +61,15 @@ def content_binds(name, meta, env):
|
||||
return out
|
||||
|
||||
|
||||
def game_gpu(env, snap):
|
||||
try:
|
||||
game_env = runpy.run_path(os.path.join(BIN_DIR, "droiddeck-game-env"))
|
||||
return game_env["game_gpu"](env, game_env["chromium_app"](snap))
|
||||
except Exception as error:
|
||||
print(f"droiddeck-snap-run: the game GPU setting was not applied ({error})", file=sys.stderr)
|
||||
return env
|
||||
|
||||
|
||||
def main(argv):
|
||||
if len(argv) < 3:
|
||||
print("usage: droiddeck-snap-run SNAP APP [ARG...]", file=sys.stderr)
|
||||
@@ -72,7 +83,7 @@ def main(argv):
|
||||
revision = os.path.basename(os.path.realpath(f"{SNAP_DIR}/{name}/current"))
|
||||
home = os.environ.get("HOME", "/root")
|
||||
snap = f"{SNAP_DIR}/{name}/{revision}"
|
||||
env = dict(os.environ)
|
||||
env = game_gpu(dict(os.environ), snap)
|
||||
for k in ("LD_PRELOAD", "LD_LIBRARY_PATH"):
|
||||
env.pop(k, None)
|
||||
env.update({
|
||||
|
||||
@@ -760,18 +760,50 @@ class Watcher:
|
||||
def __init__(self, files):
|
||||
self.files = files
|
||||
self.fd = -1
|
||||
self.libc = None
|
||||
wanted = {os.path.dirname(f) for f in files}
|
||||
self.missing = {d for d in wanted if not os.path.isdir(d)}
|
||||
self.watched = set()
|
||||
try:
|
||||
libc = ctypes.CDLL(None, use_errno=True)
|
||||
fd = libc.inotify_init1(os.O_NONBLOCK | os.O_CLOEXEC)
|
||||
dirs = sorted({os.path.dirname(f) for f in files if os.path.isdir(os.path.dirname(f))})
|
||||
dirs = sorted((wanted - self.missing) | {self.existing_parent(d) for d in self.missing} - {""})
|
||||
if fd >= 0 and dirs and all(libc.inotify_add_watch(fd, d.encode(), self.MASK) >= 0 for d in dirs):
|
||||
self.watched = set(dirs)
|
||||
self.fd = fd
|
||||
self.libc = libc
|
||||
elif fd >= 0:
|
||||
os.close(fd)
|
||||
except (OSError, AttributeError):
|
||||
self.fd = -1
|
||||
self.stamp = self.snapshot()
|
||||
|
||||
@staticmethod
|
||||
def existing_parent(path):
|
||||
while path and not os.path.isdir(path):
|
||||
parent = os.path.dirname(path)
|
||||
if parent == path:
|
||||
return ""
|
||||
path = parent
|
||||
return path
|
||||
|
||||
def watch_new_dirs(self):
|
||||
appeared = False
|
||||
progressed = True
|
||||
while progressed:
|
||||
progressed = False
|
||||
for d in sorted(self.missing):
|
||||
parent = d if os.path.isdir(d) else self.existing_parent(d)
|
||||
if not parent or parent in self.watched:
|
||||
continue
|
||||
if self.libc.inotify_add_watch(self.fd, parent.encode(), self.MASK) >= 0:
|
||||
self.watched.add(parent)
|
||||
progressed = True
|
||||
appeared = appeared or parent == d
|
||||
for d in [d for d in self.missing if d in self.watched]:
|
||||
self.missing.discard(d)
|
||||
return appeared
|
||||
|
||||
def snapshot(self):
|
||||
stamp = []
|
||||
for f in self.files:
|
||||
@@ -803,8 +835,9 @@ class Watcher:
|
||||
at += 16 + size
|
||||
except BlockingIOError:
|
||||
pass
|
||||
appeared = self.watch_new_dirs() if self.missing else False
|
||||
wanted = {os.path.basename(f) for f in self.files}
|
||||
return any(n in wanted or n.startswith("appmanifest_") for n in names)
|
||||
return appeared or any(n in wanted or n.startswith("appmanifest_") for n in names)
|
||||
|
||||
|
||||
class XMessage(ctypes.Structure):
|
||||
@@ -1078,11 +1111,13 @@ class Helper:
|
||||
wanted = COMPAT["requested_tool"](request, catalog)
|
||||
newer = isinstance(request.get("seq"), int) and request["seq"] > int(state.get("applied", 0) or 0)
|
||||
waiting = newer and wanted is not None and wanted not in self.known
|
||||
default, state = COMPAT["choose_default"](top["selected"], state, request, catalog, apply_request=not waiting,
|
||||
listed=[t["name"] for t in live])
|
||||
listed = [t["name"] for t in live]
|
||||
default, state = COMPAT["choose_default"](COMPAT["built_from"](top["selected"], catalog, listed) or top["selected"],
|
||||
state, request, catalog, apply_request=not waiting, listed=listed)
|
||||
installed = COMPAT["installed_apps"](self.steam_root)
|
||||
self.installed = installed
|
||||
picks = COMPAT["valve_picks"](self.steam_root)
|
||||
tools = COMPAT["tool_platforms"](self.steam_root)
|
||||
prior_auto = state.get("auto", {})
|
||||
if not isinstance(prior_auto, dict):
|
||||
prior_auto = {}
|
||||
@@ -1090,7 +1125,7 @@ class Helper:
|
||||
native_choices = set(prior_native if isinstance(prior_native, (list, tuple, set)) else ())
|
||||
picked = COMPAT["picked_apps"](state)
|
||||
runnable = {t["name"].lower() for t in live}
|
||||
apps = sorted(set(installed) | set(picks) | set(prior_auto) | native_choices, key=COMPAT["app_order"])
|
||||
apps = sorted(set(installed) | set(picks) | set(prior_auto) | native_choices | set(tools), key=COMPAT["app_order"])
|
||||
asked = [app for app, request in COMPAT["game_requests"]().items() if COMPAT["valid_game_request"](app, request)]
|
||||
apps = sorted(set(apps) | set(asked), key=COMPAT["app_order"])
|
||||
current = dict(page.compat("many(%s)" % json.dumps(apps)) or {})
|
||||
@@ -1104,6 +1139,7 @@ class Helper:
|
||||
if isinstance(state.get("auto"), dict):
|
||||
state["auto"] = prior_auto
|
||||
native_choices -= refused
|
||||
tools = {app: platforms for app, platforms in tools.items() if app not in refused}
|
||||
current["0"] = top["selected"]
|
||||
native = COMPAT["native_targets"](self.steam_root, apps)
|
||||
raw_mapping = COMPAT["read_config_mapping"](
|
||||
@@ -1124,13 +1160,20 @@ class Helper:
|
||||
current[app] = ""
|
||||
elif not current.get(app):
|
||||
current.pop(app, None)
|
||||
moved = COMPAT["rebuilt_picks"](current, catalog, set(prior_auto) | picked, listed)
|
||||
if moved:
|
||||
following = COMPAT["followers"](state, current)
|
||||
state["auto"] = {app: name for app, name in following.items() if app not in moved} if isinstance(following, dict) else {}
|
||||
prior_auto = {app: name for app, name in prior_auto.items() if app not in moved}
|
||||
current.update(moved)
|
||||
requests = COMPAT["settled_game_requests"](state, current, catalog)
|
||||
overrides = COMPAT["requested_games"](requests or {}, catalog, [t["name"] for t in live])
|
||||
overrides = COMPAT["requested_games"](requests or {}, catalog, listed)
|
||||
overrides = {app: tool for app, tool in overrides.items() if app not in refused}
|
||||
changes, auto = COMPAT["plan_mapping"](
|
||||
current, installed, [t["name"] for t in live], default,
|
||||
current, installed, listed, default,
|
||||
COMPAT["followers"](state, current), native, picks, overrides,
|
||||
prior_auto.keys(), native_choices)
|
||||
prior_auto.keys(), native_choices, tools)
|
||||
changes = dict(moved, **changes)
|
||||
for app, tool in sorted(changes.items(), key=lambda item: COMPAT["app_order"](item[0])):
|
||||
page.compat("set(%d, %s)" % (int(app), json.dumps(tool if tool is not None else "")))
|
||||
say("%s -> %s" % ("default" if app == "0" else "app %s" % app,
|
||||
@@ -1293,7 +1336,8 @@ def main():
|
||||
failures += 1
|
||||
time.sleep(min(2 * max(failures, 1), 10))
|
||||
os.makedirs(COMPAT["COMPAT_DIR"], exist_ok=True)
|
||||
watcher = Watcher([COMPAT["state_path"]("request.json"), COMPAT["state_path"]("games.json")] +
|
||||
watcher = Watcher([COMPAT["state_path"]("request.json"), COMPAT["state_path"]("games.json"),
|
||||
os.path.join(steam_root, "appcache", "appinfo.vdf")] +
|
||||
[os.path.join(lib, "steamapps", "libraryfolders.vdf") for lib in (steam_root, COMPAT["LIBRARY"] + "-sd")])
|
||||
steamos = os.environ.get("BL_STEAMDECK") == "1" and os.environ.get("BL_STEAM_UI") != "desktop"
|
||||
helper = Helper(steam_root, port, steamos)
|
||||
|
||||
@@ -5,6 +5,7 @@ import binascii
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
import subprocess
|
||||
@@ -352,6 +353,7 @@ def prepare_gog(sidecar, compat_data, launch_dir):
|
||||
|
||||
GOG_SCRIPTS = "goggame-*.script"
|
||||
GOG_REGISTRY_MARK = ".droiddeck-gog-registry"
|
||||
GOG_SUPPORT_MARK = ".droiddeck-gog-support"
|
||||
GOG_ROOTS = {"HKEY_LOCAL_MACHINE": "HKEY_LOCAL_MACHINE", "HKLM": "HKEY_LOCAL_MACHINE",
|
||||
"HKEY_CURRENT_USER": "HKEY_CURRENT_USER", "HKCU": "HKEY_CURRENT_USER",
|
||||
"HKEY_CLASSES_ROOT": "HKEY_CLASSES_ROOT", "HKCR": "HKEY_CLASSES_ROOT"}
|
||||
@@ -611,6 +613,120 @@ def apply_gog_registry(folder, compat_data, proton, timeout=90, installation=Non
|
||||
return "import-failed" + note
|
||||
|
||||
|
||||
def gog_support_actions(folder):
|
||||
found = []
|
||||
for script in sorted(Path(folder).glob(GOG_SCRIPTS)):
|
||||
product = script.name[len("goggame-"):-len(".script")]
|
||||
try:
|
||||
actions = json.loads(script.read_text(encoding="utf-8-sig")).get("actions")
|
||||
except (OSError, ValueError, AttributeError):
|
||||
continue
|
||||
for action in actions if isinstance(actions, list) else []:
|
||||
install = action.get("install") if isinstance(action, dict) else None
|
||||
if isinstance(install, dict) and install.get("action") == "supportData" \
|
||||
and isinstance(install.get("arguments"), dict):
|
||||
found.append((product, install["arguments"]))
|
||||
return found
|
||||
|
||||
|
||||
def gog_support_bases(folder, product, pfx):
|
||||
user = Path(pfx) / "drive_c" / "users" / "steamuser"
|
||||
support = Path(folder) / "support" / product
|
||||
return {"app": Path(folder), "supportdir": support, "support": support,
|
||||
"userdocs": user / "Documents", "localappdata": user / "AppData" / "Local"}
|
||||
|
||||
|
||||
def gog_inside(path, base):
|
||||
root = os.path.realpath(base)
|
||||
real = os.path.realpath(path)
|
||||
return real == root or real.startswith(root + os.sep)
|
||||
|
||||
|
||||
def gog_support_path(text, bases):
|
||||
match = re.fullmatch(r"\{(\w+)\}(.*)", text) if isinstance(text, str) else None
|
||||
if not match or match.group(1).lower() not in bases:
|
||||
return None
|
||||
parts = [part for part in re.split(r"[\\/]+", match.group(2)) if part]
|
||||
if any(part in (".", "..") for part in parts):
|
||||
return None
|
||||
base = bases[match.group(1).lower()]
|
||||
path = base
|
||||
for part in parts:
|
||||
exact = path / part
|
||||
if not exact.exists() and path.is_dir():
|
||||
exact = next((child for child in path.iterdir() if child.name.lower() == part.lower()), exact)
|
||||
path = exact
|
||||
if path != base and not gog_inside(path.parent, base):
|
||||
return None
|
||||
return path, base
|
||||
|
||||
|
||||
def gog_copy_file(source, target, root):
|
||||
if not gog_inside(target.parent, root):
|
||||
raise OSError("outside " + str(root))
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
if target.is_symlink():
|
||||
target.unlink()
|
||||
shutil.copy2(source, target, follow_symlinks=False)
|
||||
|
||||
|
||||
def gog_support_data(folder, compat_data, proton):
|
||||
actions = gog_support_actions(folder)
|
||||
if not actions:
|
||||
return "none"
|
||||
pfx = Path(compat_data) / "pfx" if compat_data else None
|
||||
if not pfx or not (pfx / "drive_c" / "users" / "steamuser").is_dir():
|
||||
made = create_prefix(compat_data, proton)
|
||||
if made not in ("present", "created") or not (pfx / "drive_c" / "users" / "steamuser").is_dir():
|
||||
return "no-prefix"
|
||||
stamp = hashlib.sha256(json.dumps(actions, sort_keys=True).encode("utf-8")).hexdigest()
|
||||
marker = pfx / GOG_SUPPORT_MARK
|
||||
try:
|
||||
if marker.is_file() and marker.read_text() == stamp:
|
||||
return "ready"
|
||||
except OSError:
|
||||
pass
|
||||
copied = skipped = missing = 0
|
||||
for product, arguments in actions:
|
||||
bases = gog_support_bases(folder, product, pfx)
|
||||
found = gog_support_path(arguments.get("target"), bases)
|
||||
origin = gog_support_path(arguments["source"], bases) if "source" in arguments else None
|
||||
if found is None or ("source" in arguments and origin is None):
|
||||
skipped += 1
|
||||
continue
|
||||
target, root = found
|
||||
source = origin[0] if origin else None
|
||||
try:
|
||||
if source is None:
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
elif not source.exists():
|
||||
missing += 1
|
||||
elif source.is_dir() and not source.is_symlink():
|
||||
for top, dirs, files in os.walk(source):
|
||||
for name in sorted(files + [d for d in dirs if (Path(top) / d).is_symlink()]):
|
||||
item = Path(top) / name
|
||||
destination = target / item.relative_to(source)
|
||||
if (destination.exists() or destination.is_symlink()) and not arguments.get("overwrite"):
|
||||
continue
|
||||
gog_copy_file(item, destination, root)
|
||||
copied += 1
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
elif (target.exists() or target.is_symlink()) and not arguments.get("overwrite"):
|
||||
continue
|
||||
else:
|
||||
gog_copy_file(source, target, root)
|
||||
copied += 1
|
||||
except OSError:
|
||||
skipped += 1
|
||||
note = "".join(" %s=%d" % (name, count) for name, count in (("skipped", skipped), ("missing", missing)) if count)
|
||||
if not skipped:
|
||||
try:
|
||||
marker.write_text(stamp)
|
||||
except OSError:
|
||||
pass
|
||||
return "copied=%d%s" % (copied, note)
|
||||
|
||||
|
||||
def main(argv):
|
||||
if os.environ.get("DROIDDECK_GOG_MAINTENANCE") == "1":
|
||||
return 0
|
||||
@@ -654,6 +770,7 @@ def main(argv):
|
||||
if store == "gog":
|
||||
prepare_gog(sidecar, compat_data, launch_dir)
|
||||
log("gog registry: " + apply_gog_registry(folder, compat_data, os.environ.get("BL_STORE_PROTON", "")))
|
||||
log("gog support data: " + gog_support_data(folder, compat_data, os.environ.get("BL_STORE_PROTON", "")))
|
||||
if store == "epic":
|
||||
handled = os.environ.get(EPIC_HANDLED) == "1" and (folder / EPIC_ARGS).is_file()
|
||||
if not handled:
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import runpy
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
PE = runpy.run_path(str(Path(__file__).resolve().parent / "droiddeck-wine-pe"))
|
||||
PE_MACHINES = PE["PE_MACHINES"]
|
||||
pe_machine = PE["pe_machine"]
|
||||
machine_compatible = PE["machine_compatible"]
|
||||
|
||||
STORE = Path("/opt/droiddeck/wincomponents")
|
||||
SELECTION = Path.home() / ".config/droiddeck/wincomponents.json"
|
||||
PENDING = Path.home() / ".config/droiddeck/wincomponents-pending.json"
|
||||
@@ -473,6 +479,15 @@ def save_state(compat, state):
|
||||
os.replace(temp, compat / STATE)
|
||||
|
||||
|
||||
def foreign_component(rel, path, machines):
|
||||
parts = Path(rel).parts
|
||||
folder = parts[2] if len(parts) > 2 and parts[:2] == ("drive_c", "windows") else None
|
||||
if not machines or folder not in PE_MACHINES or not rel.lower().endswith(".dll"):
|
||||
return False
|
||||
machine = pe_machine(path)
|
||||
return machine is not None and not machine_compatible(path, machines[folder][1], machine)
|
||||
|
||||
|
||||
def pending_for(app_id, pending=PENDING):
|
||||
try:
|
||||
with open(pending, encoding="utf-8") as source:
|
||||
@@ -514,7 +529,8 @@ def wait_for_pending(app_id, pending=PENDING, store=STORE, timeout=PENDING_WAIT,
|
||||
return "wincomp: %s waited %dms for %s" % (app_id, waited, ",".join(asked))
|
||||
|
||||
|
||||
def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING, wait=wait_for_pending):
|
||||
def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING, wait=wait_for_pending,
|
||||
proton=None, env=None):
|
||||
compat = Path(compat_path)
|
||||
pfx = compat / "pfx"
|
||||
waited = wait(app_id, pending, store) if wait else None
|
||||
@@ -527,6 +543,9 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING
|
||||
installed = []
|
||||
values = []
|
||||
held = set()
|
||||
skipped = set()
|
||||
placed_stems = set()
|
||||
machines = PE["proton_pe_machines"](proton, env) if proton else None
|
||||
saved_overrides = state.get("overrides") if isinstance(state.get("overrides"), dict) else {}
|
||||
saved_requires = state.get("requires") if isinstance(state.get("requires"), dict) else {}
|
||||
recorded = [c for c in state.get("components", []) if isinstance(c, str) and valid_id(c)]
|
||||
@@ -566,9 +585,17 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING
|
||||
kept_requires[cid] = list(requires)
|
||||
values += [(cid, value) for value in registry]
|
||||
for rel, src in files:
|
||||
if place(src, pfx / rel, None if rel in state["files"] else compat / BACKUP / rel):
|
||||
foreign = foreign_component(rel, src, machines)
|
||||
if foreign:
|
||||
skipped.add(Path(rel).stem.lower())
|
||||
changed = False
|
||||
else:
|
||||
changed = place(src, pfx / rel, None if rel in state["files"] else compat / BACKUP / rel)
|
||||
placed_stems.add(Path(rel).stem.lower())
|
||||
if changed:
|
||||
copied += 1
|
||||
keep[rel] = cid
|
||||
if not foreign:
|
||||
keep[rel] = cid
|
||||
removed = restored = 0
|
||||
for rel, cid in state["files"].items():
|
||||
if rel in keep:
|
||||
@@ -579,6 +606,10 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING
|
||||
path = existing(pfx / rel)
|
||||
saved = compat / BACKUP / rel
|
||||
if saved.is_file():
|
||||
if foreign_component(rel, saved, machines):
|
||||
if path is not None and not path.is_symlink():
|
||||
path.unlink()
|
||||
continue
|
||||
target = path or (pfx / rel)
|
||||
os.replace(saved, target)
|
||||
restored += 1
|
||||
@@ -590,6 +621,14 @@ def apply(compat_path, app_id, selection=SELECTION, store=STORE, pending=PENDING
|
||||
(compat / "config_info").unlink()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
def override_name(entry):
|
||||
name = entry.partition("=")[0].strip().lower()
|
||||
return name[:-4] if name.endswith(".dll") else name
|
||||
|
||||
dropped = skipped - placed_stems
|
||||
overrides = [entry for entry in overrides if override_name(entry) not in dropped]
|
||||
for cid in kept_overrides:
|
||||
kept_overrides[cid] = [entry for entry in kept_overrides[cid] if override_name(entry) not in dropped]
|
||||
compat.mkdir(parents=True, exist_ok=True)
|
||||
new_state = {"files": keep, "components": installed + sorted(held), "overrides": kept_overrides,
|
||||
"requires": kept_requires, "registry": state.get("registry", {})}
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/python3
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
PE_MACHINES = {
|
||||
"system32": ("aarch64-windows", frozenset((0xAA64, 0xA641))),
|
||||
"syswow64": ("i386-windows", frozenset((0x14C,))),
|
||||
}
|
||||
|
||||
|
||||
def pe_machine(path):
|
||||
try:
|
||||
with open(path, "rb") as image:
|
||||
head = image.read(64)
|
||||
if head[:2] != b"MZ" or len(head) < 64:
|
||||
return None
|
||||
image.seek(int.from_bytes(head[60:64], "little"))
|
||||
header = image.read(6)
|
||||
except OSError:
|
||||
return None
|
||||
if header[:4] != b"PE\0\0" or len(header) < 6:
|
||||
return None
|
||||
return int.from_bytes(header[4:6], "little")
|
||||
|
||||
|
||||
def pe_has_arm64ec_metadata(path):
|
||||
try:
|
||||
with open(path, "rb") as image:
|
||||
image.seek(60)
|
||||
raw = image.read(4)
|
||||
if len(raw) != 4:
|
||||
return False
|
||||
pe_offset = int.from_bytes(raw, "little")
|
||||
image.seek(pe_offset)
|
||||
if image.read(4) != b"PE\0\0":
|
||||
return False
|
||||
coff = image.read(20)
|
||||
if len(coff) != 20:
|
||||
return False
|
||||
section_count = int.from_bytes(coff[2:4], "little")
|
||||
if section_count > 96:
|
||||
return False
|
||||
optional_size = int.from_bytes(coff[16:18], "little")
|
||||
optional_offset = pe_offset + 24
|
||||
image.seek(optional_offset)
|
||||
optional = image.read(optional_size)
|
||||
if len(optional) != optional_size or int.from_bytes(optional[:2], "little") != 0x20B:
|
||||
return False
|
||||
directory_count = int.from_bytes(optional[108:112], "little")
|
||||
directory_offset = 112 + 10 * 8
|
||||
if directory_count <= 10 or directory_offset + 8 > len(optional):
|
||||
return False
|
||||
load_config_rva = int.from_bytes(optional[directory_offset:directory_offset + 4], "little")
|
||||
load_config_size = int.from_bytes(optional[directory_offset + 4:directory_offset + 8], "little")
|
||||
if not load_config_rva or load_config_size < 0xD0:
|
||||
return False
|
||||
section_offset = optional_offset + optional_size
|
||||
for index in range(section_count):
|
||||
image.seek(section_offset + index * 40)
|
||||
section = image.read(40)
|
||||
if len(section) != 40:
|
||||
return False
|
||||
virtual_address = int.from_bytes(section[12:16], "little")
|
||||
raw_size = int.from_bytes(section[16:20], "little")
|
||||
raw_offset = int.from_bytes(section[20:24], "little")
|
||||
relative = load_config_rva - virtual_address
|
||||
if 0 <= relative <= raw_size - 0xD0:
|
||||
image.seek(raw_offset + relative)
|
||||
load_config = image.read(0xD0)
|
||||
if len(load_config) != 0xD0 or int.from_bytes(load_config[:4], "little") < 0xD0:
|
||||
return False
|
||||
return int.from_bytes(load_config[0xC8:0xD0], "little") != 0
|
||||
except (OSError, OverflowError, ValueError):
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
def machine_compatible(path, machines, machine=None):
|
||||
machine = pe_machine(path) if machine is None else machine
|
||||
if machine == 0x8664 and pe_has_arm64ec_metadata(path):
|
||||
return 0xA641 in machines
|
||||
return machine in machines
|
||||
|
||||
|
||||
def proton_pe_machines(proton, env=None):
|
||||
dist = Path(proton).parent / "files/lib/wine"
|
||||
if (dist / "aarch64-unix").is_dir() and (env or {}).get("PROTON_USE_ARM64", "1") == "1":
|
||||
return PE_MACHINES
|
||||
if (dist / "x86_64-unix").is_dir():
|
||||
return {
|
||||
"system32": ("x86_64-windows", frozenset((0x8664,))),
|
||||
"syswow64": PE_MACHINES["syswow64"],
|
||||
}
|
||||
return None
|
||||
@@ -16,6 +16,8 @@ LEGACY_LAUNCHER = "bannerlator-proton"
|
||||
LIBRARY = "/mnt/droiddeck"
|
||||
SOURCES = ("Proton Experimental (ARM64)", "Proton 11.0 (ARM64)")
|
||||
OWN_TOOLS = ((TOOL, SOURCES), (TOOL_11, ("Proton 11.0 (ARM64)",)))
|
||||
VALVE_DEPOTS = {"proton_experimental": SOURCES[0], "proton-experimental-arm64": SOURCES[0],
|
||||
"proton_11": SOURCES[1], "proton_11-arm64": SOURCES[1]}
|
||||
FEX_TOOL = "droiddeck-fex"
|
||||
FEX_LAUNCHER = "droiddeck-fex-tool"
|
||||
FEX_FILES = ("toolmanifest.vdf", "compatibilitytool.vdf", FEX_LAUNCHER)
|
||||
@@ -732,6 +734,7 @@ def libraries(steam_root):
|
||||
|
||||
|
||||
def installed_apps(steam_root):
|
||||
entries = appinfo_entries(os.path.join(steam_root, "appcache", "appinfo.vdf"))
|
||||
apps = set()
|
||||
for library in libraries(steam_root):
|
||||
steamapps = os.path.join(library, "steamapps")
|
||||
@@ -741,7 +744,7 @@ def installed_apps(steam_root):
|
||||
continue
|
||||
for name in names:
|
||||
m = re.fullmatch(r"appmanifest_(\d+)\.acf", name)
|
||||
if m and m.group(1) not in NOT_GAMES:
|
||||
if m and m.group(1) not in NOT_GAMES and entries.get(m.group(1), {}).get("type") != "tool":
|
||||
apps.add(m.group(1))
|
||||
return sorted(apps, key=int)
|
||||
|
||||
@@ -925,6 +928,12 @@ def valve_picks(steam_root):
|
||||
return sorted(picks, key=int)
|
||||
|
||||
|
||||
def tool_platforms(steam_root):
|
||||
entries = appinfo_entries(os.path.join(steam_root, "appcache", "appinfo.vdf"))
|
||||
return {app: entry["oslist"] for app, entry in entries.items()
|
||||
if entry["type"] == "tool" and entry["oslist"] & {"linux", "windows"}}
|
||||
|
||||
|
||||
def native_targets(steam_root, apps):
|
||||
wanted = {str(app) for app in apps if str(app) not in NOT_GAMES}
|
||||
if not wanted:
|
||||
@@ -1062,10 +1071,11 @@ NATIVE_CHOICE = object()
|
||||
|
||||
|
||||
def plan_mapping(current, installed, runnable, default, auto, native=None, picks=(), overrides=None, managed=None,
|
||||
native_choices=()):
|
||||
native_choices=(), tools=None):
|
||||
tools = tools or {}
|
||||
runnable = {n.lower() for n in runnable}
|
||||
installed = set(installed)
|
||||
picks = set(picks)
|
||||
picks = set(picks) | {app for app, platforms in tools.items() if "linux" not in platforms}
|
||||
native = native or {}
|
||||
overrides = overrides or {}
|
||||
managed = set(auto) if managed is None else set(managed)
|
||||
@@ -1073,8 +1083,12 @@ def plan_mapping(current, installed, runnable, default, auto, native=None, picks
|
||||
changes, kept = {}, {}
|
||||
if current.get("0", "") != default:
|
||||
changes["0"] = default
|
||||
for app in sorted((set(current) | installed | picks | set(auto) | set(overrides) | native_choices) - {"0"}, key=app_order):
|
||||
for app in sorted((set(current) | installed | picks | set(auto) | set(overrides) | native_choices | set(tools)) - {"0"}, key=app_order):
|
||||
name = current.get(app, "")
|
||||
if app in tools and "linux" in tools[app] and "windows" not in tools[app]:
|
||||
if name and (name.lower() in runnable or "proton" in name.lower()):
|
||||
changes[app] = None
|
||||
continue
|
||||
if app in overrides:
|
||||
target = overrides[app]
|
||||
if target is DEFERRED_GAME_TOOL:
|
||||
@@ -1160,6 +1174,18 @@ def tool_catalog(steam_root, extras=None):
|
||||
return catalog
|
||||
|
||||
|
||||
def built_from(name, catalog, runnable=None):
|
||||
depot = VALVE_DEPOTS.get(name)
|
||||
tools = [t["name"] for t in catalog if depot and t["valve"] and t["dir"] == depot and
|
||||
(runnable is None or t["name"] in runnable)]
|
||||
return tools[-1] if tools else None
|
||||
|
||||
|
||||
def rebuilt_picks(current, catalog, known, runnable=None):
|
||||
picks = {app: built_from(name, catalog, runnable) for app, name in current.items() if app in known}
|
||||
return {app: tool for app, tool in picks.items() if tool}
|
||||
|
||||
|
||||
def requested_tool(request, catalog):
|
||||
name = request.get("name")
|
||||
if isinstance(name, str) and any(t["name"] == name for t in catalog):
|
||||
@@ -1513,7 +1539,8 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non
|
||||
state["owned"] = sorted(set(owned), key=app_order)
|
||||
if default is None:
|
||||
if settle:
|
||||
default, state = choose_default(current.get("0", ""), state, read_json(state_path("request.json", directory)), catalog)
|
||||
default, state = choose_default(built_from(current.get("0", ""), catalog) or current.get("0", ""), state,
|
||||
read_json(state_path("request.json", directory)), catalog)
|
||||
else:
|
||||
default = state.get("default") if state.get("default") in names else TOOL
|
||||
if settle and newest and default == TOOL and state.get("source") not in ("app", "steam"):
|
||||
@@ -1526,6 +1553,13 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non
|
||||
current.update(replacements)
|
||||
if isinstance(state.get("auto"), dict):
|
||||
state["auto"] = {app: newest if name in gone else name for app, name in state["auto"].items()}
|
||||
following = followers(state, current)
|
||||
following = following if isinstance(following, dict) else {}
|
||||
moved = rebuilt_picks(current, catalog, set(following) | picked_apps(state))
|
||||
if moved:
|
||||
state["auto"] = {app: name for app, name in following.items() if app not in moved}
|
||||
set_mappings(tokens, mapping, moved)
|
||||
current.update(moved)
|
||||
steam_root = os.path.dirname(os.path.dirname(os.path.abspath(config_path)))
|
||||
requests = settled_game_requests(state, current, catalog, not steam_running(), directory)
|
||||
overrides = requested_games(requests or {}, catalog)
|
||||
@@ -1538,7 +1572,7 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non
|
||||
current.setdefault(app, "")
|
||||
changes, auto = plan_mapping(
|
||||
current, apps, names, default, followers(state, current), native, picks,
|
||||
overrides, managed, native_choices)
|
||||
overrides, managed, native_choices, tool_platforms(steam_root))
|
||||
set_mappings(tokens, mapping, changes)
|
||||
text = serialize(tokens)
|
||||
if text != serialize(tokenize(original)):
|
||||
@@ -1565,10 +1599,11 @@ def depot_build(depot):
|
||||
return int(first[0]) if first and first[0].isdigit() else 0
|
||||
|
||||
|
||||
def find_source(steam_root, sources=SOURCES):
|
||||
def find_source(steam_root, sources=SOURCES, runnable=False):
|
||||
for name in sources:
|
||||
found = [os.path.join(root, "steamapps", "common", name) for root in libraries(steam_root)
|
||||
if os.path.isdir(os.path.join(root, "steamapps", "common", name, "files", "bin-arm64"))]
|
||||
if os.path.isdir(os.path.join(root, "steamapps", "common", name, "files", "bin-arm64"))
|
||||
and (not runnable or os.access(os.path.join(root, "steamapps", "common", name, "proton"), os.X_OK))]
|
||||
if found:
|
||||
return max(found, key=depot_build)
|
||||
return None
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
@@ -1655,6 +1656,7 @@ static void reply_attr(struct nl_reply *out, unsigned char *message, int type,
|
||||
return;
|
||||
}
|
||||
attr = (struct rtattr *) (message + offset);
|
||||
memset(attr, 0, total);
|
||||
attr->rta_type = (unsigned short) type;
|
||||
attr->rta_len = (unsigned short) RTA_LENGTH(len);
|
||||
if (len > 0) memcpy(RTA_DATA(attr), data, len);
|
||||
@@ -2155,3 +2157,29 @@ ssize_t send(int fd, const void *buffer, size_t length, int flags) {
|
||||
}
|
||||
return real(fd, buffer, length, flags);
|
||||
}
|
||||
|
||||
ssize_t write(int fd, const void *buffer, size_t length) {
|
||||
static ssize_t (*real)(int, const void *, size_t);
|
||||
ssize_t rc;
|
||||
if (bl_nl_owns(fd) && deliver(fd, buffer, length, 0, &rc)) return rc;
|
||||
if (real == NULL) real = (ssize_t (*)(int, const void *, size_t)) dlsym(RTLD_NEXT, "write");
|
||||
if (real == NULL) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
return real(fd, buffer, length);
|
||||
}
|
||||
|
||||
ssize_t writev(int fd, const struct iovec *iov, int iovcnt) {
|
||||
static ssize_t (*real)(int, const struct iovec *, int);
|
||||
if (iovcnt >= 0 && bl_nl_owns(fd)) {
|
||||
struct msghdr msg = { .msg_iov = (struct iovec *) iov, .msg_iovlen = (size_t) iovcnt };
|
||||
return sendmsg_request(fd, &msg, 0);
|
||||
}
|
||||
if (real == NULL) real = (ssize_t (*)(int, const struct iovec *, int)) dlsym(RTLD_NEXT, "writev");
|
||||
if (real == NULL) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
return real(fd, iov, iovcnt);
|
||||
}
|
||||
Loaded 100 of 126 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user