mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 04:25:38 +00:00
Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffaa906cd1 | ||
|
|
d61af961c1 | ||
|
|
bc01b77752 | ||
|
|
a1b01a04a8 | ||
|
|
b44235c495 | ||
|
|
b80d5db176 | ||
|
|
d3c0d258b7 | ||
|
|
9dcdbf245a | ||
|
|
369e218afb | ||
|
|
119d24bf6b | ||
|
|
2a905510d5 | ||
|
|
da29919b5a | ||
|
|
05608ac4d4 | ||
|
|
135b84a501 | ||
|
|
e7cbba37d1 | ||
|
|
d9bb5e15b0 | ||
|
|
46cdc32cf1 | ||
|
|
387572e733 | ||
|
|
9f46c7a50b | ||
|
|
0607bb0b3a | ||
|
|
b89d87cbde | ||
|
|
06e06b9673 | ||
|
|
b896e7a3b9 | ||
|
|
c91daa9147 |
No files matched your search
@@ -57,6 +57,22 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Version bumps are isolated
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --no-tags origin main
|
||||
base=$(git merge-base origin/main HEAD)
|
||||
diff=$(git diff -U0 "$base..HEAD" -- app/build.gradle)
|
||||
grep -Eq '^[+-][[:space:]]*version(Code|Name)[[:space:]]' <<<"$diff" || exit 0
|
||||
other_files=$(git diff --name-only "$base..HEAD" | grep -v '^app/build.gradle$' || true)
|
||||
other_gradle=$(grep -E '^[+-]' <<<"$diff" | grep -Ev '^(---|\+\+\+)' | grep -Ev '^[+-][[:space:]]*version(Code|Name)[[:space:]]' || true)
|
||||
if [[ -n "$other_files" || -n "$other_gradle" ]]; then
|
||||
echo "::error::versionCode/versionName changes must be isolated in their own PR"
|
||||
echo "A version PR may only change the versionCode/versionName lines in app/build.gradle." >> "$GITHUB_STEP_SUMMARY"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Merge onto main, or say what conflicts
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
@@ -157,7 +173,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: app/src/main/assets/linuxfs
|
||||
key: preloads-${{ env.PRELOAD_CACHE_VERSION }}-${{ hashFiles('app/src/main/cpp/fakeinput_steam.cpp', 'tools/linuxfs/preload/*.c', 'tools/linuxfs/build-x86-preloads.sh', 'tools/linuxfs/fex/*', 'tools/linuxfs/clipboard/*.c', 'tools/proot/fastpath/*.c', 'tools/linuxfs/overlay/usr/local/bin/*', 'tools/linuxfs/overlay/usr/bin/**', 'tools/linuxfs/desktop/*', 'tools/gamescope/release.env', 'tools/wlroots/release.env', 'tools/linuxfs/uruntime.env', 'tools/linuxfs/licenses/*', 'tools/mangoapp/*') }}
|
||||
key: preloads-${{ env.PRELOAD_CACHE_VERSION }}-${{ hashFiles('app/src/main/cpp/fakeinput_steam.cpp', 'tools/linuxfs/preload/*.c', 'tools/linuxfs/build-x86-preloads.sh', 'tools/linuxfs/fex/*', 'tools/linuxfs/clipboard/*.c', 'tools/linuxfs/ssbs/*.c', 'tools/proot/fastpath/*.c', 'tools/linuxfs/overlay/usr/local/bin/*', 'tools/linuxfs/overlay/usr/bin/**', 'tools/linuxfs/desktop/*', 'tools/gamescope/release.env', 'tools/wlroots/release.env', 'tools/linuxfs/uruntime.env', 'tools/linuxfs/licenses/*', 'tools/mangoapp/*') }}
|
||||
|
||||
- name: Build libfakeinput.so and libblsession.so (glibc aarch64)
|
||||
if: steps.preloads.outputs.cache-hit != 'true'
|
||||
@@ -179,6 +195,10 @@ jobs:
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o "$D/libblfastpath.so" tools/proot/fastpath/fastpath.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libblfastpath.so"
|
||||
# Force-SSBS adapter, preloaded into a game's Wine only when the game asks for it.
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o "$D/libssbs.so" tools/linuxfs/ssbs/ssbs_adapter.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/libssbs.so"
|
||||
mkdir -p "$D/usr/local/bin"
|
||||
aarch64-linux-gnu-gcc -O2 -Wall -Wextra -o "$D/usr/local/bin/droiddeck-clipboard" tools/linuxfs/clipboard/clipboard.c -ldl
|
||||
aarch64-linux-gnu-strip --strip-unneeded "$D/usr/local/bin/droiddeck-clipboard"
|
||||
@@ -343,9 +363,17 @@ jobs:
|
||||
echo "::error::libfakeinput.so exports the C++ runtime"; exit 1
|
||||
fi
|
||||
SESSION=$(syms "$D/libblsession.so")
|
||||
for sym in socket bind getsockname setsockopt statfs statvfs syscall shm_open shm_unlink mmap mmap64 munmap; do
|
||||
for sym in socket bind getsockname setsockopt statfs statvfs syscall shm_open shm_unlink mmap mmap64 munmap drmPrimeFDToHandle drmCloseBufferHandle; do
|
||||
grep -qx "$sym" <<<"$SESSION" || { echo "::error::libblsession.so does not export $sym"; exit 1; }
|
||||
done
|
||||
# Zink's GEM_CLOSE is caught at ioctl(); an exported drmIoctl made NMS replay old frames.
|
||||
if grep -qx drmIoctl <<<"$SESSION"; then
|
||||
echo "::error::libblsession.so exports drmIoctl"; exit 1
|
||||
fi
|
||||
SSBS=$(syms "$D/libssbs.so")
|
||||
for sym in sigaction signal bsd_signal sysv_signal; do
|
||||
grep -qx "$sym" <<<"$SSBS" || { echo "::error::libssbs.so does not export $sym"; exit 1; }
|
||||
done
|
||||
test -f "$D/usr/local/bin/droiddeck-session"
|
||||
test -f "$D/usr/local/bin/droiddeck-proton-extra"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ DroidDeck brings the SteamOS experience to Android: Valve's Steam client in Big
|
||||
|
||||
## Requirements and install
|
||||
|
||||
Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Mali, Xclipse, PowerVR, and Adreno 710 are unsupported. No root is required. Allow about 3 GB for the runtime and 1.1 GB more for the desktop and emulators. Install the APK from [Releases](https://github.com/Droid-Deck/DroidDeck/releases), install the Linux runtime, then press **Play** and sign in. Steam downloads on first launch. Install **Desktop & apps** to use the desktop and emulators. The **Store** installs Linux apps and games from Flathub (ARM64 builds) with Flatpak; with additional options to install Appimages and set up scripts.
|
||||
Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Adreno 6xx is experimental: DirectX 11 uses DXVK 2 and may run, and DirectX 12 games can still crash. Mali, Xclipse, PowerVR, and Adreno 710 are unsupported. No root is required. Allow about 3 GB for the runtime and 1.1 GB more for the desktop and emulators. Install the APK from [Releases](https://github.com/Droid-Deck/DroidDeck/releases), install the Linux runtime, then press **Play** and sign in. Steam downloads on first launch. Install **Desktop & apps** to use the desktop and emulators. The **Store** installs Linux apps and games from Flathub (ARM64 builds) with Flatpak; with additional options to install Appimages and set up scripts.
|
||||
|
||||
Before Steam launches, you must turn off **Restrict child processes** in Developer options. If this option is not available in developer settings (Android 12 and 13 devices), first launch of Steam will present a "Fix it for me" button, which will help automate the setup process.
|
||||
|
||||
|
||||
@@ -190,6 +190,8 @@ dependencies {
|
||||
// The runtime tarball is a zstd-compressed tar.
|
||||
implementation 'com.github.luben:zstd-jni:1.5.2-3@aar'
|
||||
implementation 'org.apache.commons:commons-compress:1.27.1'
|
||||
// Bannerlator's Windows components come as .tar.xz (WinComponents).
|
||||
implementation 'org.tukaani:xz:1.10'
|
||||
// The UI: every menu, dialog and overlay is Compose. The session's SurfaceView and the
|
||||
// on-screen pad are Views underneath it, which is what they are in every Compose app.
|
||||
implementation platform('androidx.compose:compose-bom:2024.02.00')
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application>
|
||||
<!-- Debug builds only. Android grants DUMP to adb shell; release APKs have no bridge. -->
|
||||
<activity
|
||||
android:name=".agent.AgentStartActivity"
|
||||
android:exported="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:noHistory="true"
|
||||
android:permission="android.permission.DUMP"
|
||||
android:theme="@style/SessionTheme" />
|
||||
<provider
|
||||
android:name=".agent.AgentBridgeProvider"
|
||||
android:authorities="${applicationId}.agent"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.DUMP"
|
||||
android:grantUriPermissions="false" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -71,6 +71,10 @@
|
||||
<action android:name="android.intent.action.CREATE_SHORTCUT" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.droiddeck.launcher.LAUNCH_GAME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Android owns the Home key. This small translucent Home handler routes the resulting
|
||||
@@ -123,6 +127,14 @@
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:theme="@style/AppTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".agent.AgentStartActivity"
|
||||
android:exported="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:noHistory="true"
|
||||
android:permission="android.permission.DUMP"
|
||||
android:theme="@style/SessionTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".SessionActivity"
|
||||
android:exported="false"
|
||||
@@ -173,5 +185,11 @@
|
||||
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
|
||||
</intent-filter>
|
||||
</provider>
|
||||
<provider
|
||||
android:name=".agent.AgentBridgeProvider"
|
||||
android:authorities="${applicationId}.agent"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.DUMP"
|
||||
android:grantUriPermissions="false" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -44,6 +44,11 @@ add_subdirectory(waylandcomp)
|
||||
add_library(sdnative SHARED sdnative/sdnative.c)
|
||||
target_link_libraries(sdnative log)
|
||||
|
||||
# The device info window's Vulkan section: the phone's own driver, asked once through the system
|
||||
# loader (opened with dlopen, so a phone without Vulkan still loads the app).
|
||||
add_library(deviceinfo SHARED deviceinfo/vkinfo.c)
|
||||
target_link_libraries(deviceinfo dl)
|
||||
|
||||
# Rebuild Termux terminal-emulator's PTY JNI helper with the app's NDK instead of carrying its
|
||||
# prebuilt libtermux.so with a redundant libstdc++.so dependency.
|
||||
add_library(termux SHARED termux/termux.c)
|
||||
@@ -0,0 +1,112 @@
|
||||
// What the phone's own Vulkan driver says about its GPU, for the app's device info window: one
|
||||
// instance on the system loader, the first physical device's properties, a few limits and the
|
||||
// extensions DXVK and VKD3D-Proton lean on. Returned as "key=value" lines; nothing is kept open.
|
||||
#include <dlfcn.h>
|
||||
#include <jni.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#define VK_NO_PROTOTYPES
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#define LINE(...) do { if (used < sizeof(out)) used += snprintf(out + used, sizeof(out) - used, __VA_ARGS__); } while (0)
|
||||
|
||||
static const char *const EXTENSIONS[] = {
|
||||
"VK_EXT_robustness2", "VK_EXT_transform_feedback", "VK_EXT_custom_border_color",
|
||||
"VK_KHR_dynamic_rendering", "VK_EXT_extended_dynamic_state3", "VK_EXT_descriptor_indexing",
|
||||
"VK_KHR_timeline_semaphore", "VK_EXT_mesh_shader", "VK_KHR_ray_query",
|
||||
};
|
||||
|
||||
static const char *type_name(VkPhysicalDeviceType type) {
|
||||
switch (type) {
|
||||
case VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU: return "integrated GPU";
|
||||
case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU: return "discrete GPU";
|
||||
case VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU: return "virtual GPU";
|
||||
case VK_PHYSICAL_DEVICE_TYPE_CPU: return "CPU";
|
||||
default: return "other";
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_droiddeck_launcher_gpu_VulkanInfo_nativeQuery(JNIEnv *env, jclass clazz) {
|
||||
static char out[4096];
|
||||
size_t used = 0;
|
||||
out[0] = 0;
|
||||
void *lib = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
|
||||
if (!lib) { LINE("error=no Vulkan loader\n"); return (*env)->NewStringUTF(env, out); }
|
||||
PFN_vkGetInstanceProcAddr gipa = (PFN_vkGetInstanceProcAddr) dlsym(lib, "vkGetInstanceProcAddr");
|
||||
PFN_vkCreateInstance create = gipa ? (PFN_vkCreateInstance) gipa(NULL, "vkCreateInstance") : NULL;
|
||||
PFN_vkEnumerateInstanceVersion instanceVersion = gipa ? (PFN_vkEnumerateInstanceVersion) gipa(NULL, "vkEnumerateInstanceVersion") : NULL;
|
||||
if (!create) { LINE("error=no vkCreateInstance\n"); dlclose(lib); return (*env)->NewStringUTF(env, out); }
|
||||
uint32_t loader = VK_API_VERSION_1_0;
|
||||
if (instanceVersion) instanceVersion(&loader);
|
||||
LINE("loader=%u.%u.%u\n", VK_API_VERSION_MAJOR(loader), VK_API_VERSION_MINOR(loader), VK_API_VERSION_PATCH(loader));
|
||||
|
||||
VkApplicationInfo app = { .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .pApplicationName = "DroidDeck device info",
|
||||
.apiVersion = loader >= VK_API_VERSION_1_1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0 };
|
||||
VkInstanceCreateInfo info = { .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, .pApplicationInfo = &app };
|
||||
VkInstance instance = VK_NULL_HANDLE;
|
||||
if (create(&info, NULL, &instance) != VK_SUCCESS) { LINE("error=vkCreateInstance failed\n"); dlclose(lib); return (*env)->NewStringUTF(env, out); }
|
||||
|
||||
#define GET(name) PFN_##name name = (PFN_##name) gipa(instance, #name)
|
||||
GET(vkDestroyInstance); GET(vkEnumeratePhysicalDevices); GET(vkGetPhysicalDeviceProperties);
|
||||
GET(vkGetPhysicalDeviceProperties2); GET(vkGetPhysicalDeviceMemoryProperties);
|
||||
GET(vkEnumerateDeviceExtensionProperties); GET(vkGetPhysicalDeviceFeatures);
|
||||
uint32_t count = 1;
|
||||
VkPhysicalDevice device = VK_NULL_HANDLE;
|
||||
VkResult listed = vkEnumeratePhysicalDevices ? vkEnumeratePhysicalDevices(instance, &count, &device) : VK_ERROR_INITIALIZATION_FAILED;
|
||||
if ((listed != VK_SUCCESS && listed != VK_INCOMPLETE) || count == 0 || !device || !vkGetPhysicalDeviceProperties) {
|
||||
LINE("error=no Vulkan device\n");
|
||||
} else {
|
||||
VkPhysicalDeviceProperties p;
|
||||
vkGetPhysicalDeviceProperties(device, &p);
|
||||
LINE("device=%s\n", p.deviceName);
|
||||
LINE("type=%s\n", type_name(p.deviceType));
|
||||
LINE("api=%u.%u.%u\n", VK_API_VERSION_MAJOR(p.apiVersion), VK_API_VERSION_MINOR(p.apiVersion), VK_API_VERSION_PATCH(p.apiVersion));
|
||||
// Qualcomm packs its driver version as 10.10.12 bits, the same layout as VK_MAKE_VERSION.
|
||||
LINE("driver_version=%u.%u.%u\n", p.driverVersion >> 22, (p.driverVersion >> 12) & 0x3ff, p.driverVersion & 0xfff);
|
||||
LINE("vendor_id=0x%04x\ndevice_id=0x%08x\n", p.vendorID, p.deviceID);
|
||||
LINE("max_image_2d=%u\n", p.limits.maxImageDimension2D);
|
||||
|
||||
// Driver name and build string (Vulkan 1.2 or VK_KHR_driver_properties).
|
||||
uint32_t extCount = 0;
|
||||
if (vkEnumerateDeviceExtensionProperties) vkEnumerateDeviceExtensionProperties(device, NULL, &extCount, NULL);
|
||||
static VkExtensionProperties exts[512];
|
||||
if (extCount > 512) extCount = 512;
|
||||
if (extCount && vkEnumerateDeviceExtensionProperties) vkEnumerateDeviceExtensionProperties(device, NULL, &extCount, exts);
|
||||
int driverProps = p.apiVersion >= VK_API_VERSION_1_2;
|
||||
for (uint32_t i = 0; i < extCount; i++)
|
||||
if (!strcmp(exts[i].extensionName, "VK_KHR_driver_properties")) driverProps = 1;
|
||||
if (driverProps && vkGetPhysicalDeviceProperties2) {
|
||||
VkPhysicalDeviceDriverProperties driver = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES };
|
||||
VkPhysicalDeviceProperties2 p2 = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &driver };
|
||||
vkGetPhysicalDeviceProperties2(device, &p2);
|
||||
LINE("driver_name=%s\n", driver.driverName);
|
||||
LINE("driver_info=%s\n", driver.driverInfo);
|
||||
LINE("conformance=%u.%u.%u.%u\n", driver.conformanceVersion.major, driver.conformanceVersion.minor,
|
||||
driver.conformanceVersion.subminor, driver.conformanceVersion.patch);
|
||||
}
|
||||
LINE("extension_count=%u\n", extCount);
|
||||
for (size_t e = 0; e < sizeof(EXTENSIONS) / sizeof(*EXTENSIONS); e++) {
|
||||
int has = 0;
|
||||
for (uint32_t i = 0; i < extCount && !has; i++) has = !strcmp(exts[i].extensionName, EXTENSIONS[e]);
|
||||
LINE("ext.%s=%s\n", EXTENSIONS[e], has ? "yes" : "no");
|
||||
}
|
||||
if (vkGetPhysicalDeviceFeatures) {
|
||||
VkPhysicalDeviceFeatures f;
|
||||
vkGetPhysicalDeviceFeatures(device, &f);
|
||||
LINE("geometry_shader=%s\ntessellation_shader=%s\ntexture_bc=%s\n",
|
||||
f.geometryShader ? "yes" : "no", f.tessellationShader ? "yes" : "no", f.textureCompressionBC ? "yes" : "no");
|
||||
}
|
||||
if (vkGetPhysicalDeviceMemoryProperties) {
|
||||
VkPhysicalDeviceMemoryProperties m;
|
||||
vkGetPhysicalDeviceMemoryProperties(device, &m);
|
||||
VkDeviceSize largest = 0;
|
||||
for (uint32_t i = 0; i < m.memoryHeapCount; i++)
|
||||
if ((m.memoryHeaps[i].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) && m.memoryHeaps[i].size > largest) largest = m.memoryHeaps[i].size;
|
||||
LINE("device_heap_mb=%llu\n", (unsigned long long) (largest >> 20));
|
||||
}
|
||||
}
|
||||
if (vkDestroyInstance) vkDestroyInstance(instance, NULL);
|
||||
dlclose(lib);
|
||||
return (*env)->NewStringUTF(env, out);
|
||||
}
|
||||
@@ -65,6 +65,9 @@ import com.droiddeck.launcher.ui.FrontEndState
|
||||
import com.droiddeck.launcher.ui.FrontEndActions
|
||||
import com.droiddeck.launcher.frontend.CoverArt
|
||||
import com.droiddeck.launcher.frontend.Library
|
||||
import com.droiddeck.launcher.frontend.GameFiles
|
||||
import com.droiddeck.launcher.frontend.GameFileSync
|
||||
import com.droiddeck.launcher.frontend.GameLaunchIntent
|
||||
import com.droiddeck.launcher.ui.DroidDeckTheme
|
||||
import com.droiddeck.launcher.ui.RomsDialog
|
||||
import com.droiddeck.launcher.files.InAppFilePicker
|
||||
@@ -152,7 +155,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var showPhantomGate by mutableStateOf(false)
|
||||
private var directAudio by mutableStateOf(false)
|
||||
private var clientDirectAudio by mutableStateOf(false)
|
||||
private var forceFullscreen by mutableStateOf(true)
|
||||
private var forceFullscreen by mutableStateOf(false)
|
||||
private var stretch16x9 by mutableStateOf(false)
|
||||
private var launcherFullscreen by mutableStateOf(true)
|
||||
private var animationsEnabled by mutableStateOf(true)
|
||||
@@ -308,9 +311,11 @@ class MainActivity : ComponentActivity() {
|
||||
private var settingsMode by mutableStateOf<String?>(null)
|
||||
private var resolution by mutableStateOf(com.droiddeck.launcher.session.SessionDisplay.DEFAULT_RESOLUTION)
|
||||
private var fexPreset by mutableStateOf("")
|
||||
private var forceSsbs by mutableStateOf(false)
|
||||
private var steamChannel by mutableStateOf("steamdeck_publicbeta")
|
||||
private var runSteamAtStartup by mutableStateOf(false)
|
||||
private var theme by mutableStateOf("graphite")
|
||||
private var appScale by mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE)
|
||||
private var hdrOn by mutableStateOf(false)
|
||||
private var fpsLimit by mutableStateOf(0)
|
||||
private var upscaler by mutableStateOf(0)
|
||||
@@ -398,10 +403,15 @@ class MainActivity : ComponentActivity() {
|
||||
private fun pickGameExport(game: Library.SteamGame?) {
|
||||
onSavePicked = { folder ->
|
||||
saveAction(getString(R.string.game_frontend_files)) {
|
||||
if (game != null) com.droiddeck.launcher.frontend.GameFiles.export(folder, game)
|
||||
else com.droiddeck.launcher.frontend.GameFileSync.enable(this, folder)
|
||||
ui.post { gameSyncFolder = com.droiddeck.launcher.frontend.GameFileSync.folder(this) }
|
||||
getString(R.string.game_file_exported, folder.path)
|
||||
val saved = if (game != null) GameFiles.export(folder, game)
|
||||
else {
|
||||
GameFileSync.enable(this, folder)
|
||||
folder
|
||||
}
|
||||
ui.post {
|
||||
gameSyncFolder = GameFileSync.folder(this)
|
||||
}
|
||||
getString(R.string.game_file_exported, saved.path)
|
||||
}
|
||||
}
|
||||
pickSaveDir.launch(InAppFilePicker.buildDirIntent(this, getString(R.string.game_file_folder), gameSyncFolder))
|
||||
@@ -415,10 +425,10 @@ class MainActivity : ComponentActivity() {
|
||||
shortcutLibraryScanning = true
|
||||
} else shortcutLibraryScanning = false
|
||||
pendingGameLink = null
|
||||
if (request.action == Intent.ACTION_VIEW) {
|
||||
if (GameLaunchIntent.accepts(request.action)) {
|
||||
val copy = Intent(request)
|
||||
Thread({
|
||||
val id = com.droiddeck.launcher.frontend.GameFiles.readIntent(this, copy)
|
||||
val id = GameLaunchIntent.read(this, copy)
|
||||
ui.post {
|
||||
if (intent === request && !isDestroyed) {
|
||||
pendingGameLink = id
|
||||
@@ -431,7 +441,7 @@ class MainActivity : ComponentActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun launchGame(game: Library.SteamGame): Boolean {
|
||||
private fun launchGame(game: Library.SteamGame, returnHome: Boolean = false): Boolean {
|
||||
if (protons.protonBusyId != null || ProtonExtras.installInProgress || pkgStage != null) {
|
||||
android.widget.Toast.makeText(this, "Wait for the install to finish before launching a game", android.widget.Toast.LENGTH_SHORT).show()
|
||||
return false
|
||||
@@ -446,10 +456,12 @@ class MainActivity : ComponentActivity() {
|
||||
return false
|
||||
}
|
||||
startActivity(Intent(this, SessionActivity::class.java).setAction(SessionService.ACTION_RESUME)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP))
|
||||
return true
|
||||
}
|
||||
return startSession(Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionActivity.EXTRA_RETURN_HOME, returnHome)
|
||||
.putExtra(SessionService.EXTRA_STEAM_URL,
|
||||
com.droiddeck.launcher.frontend.GameLaunchLink.steamUrl(game.gameIdString)), steamSession = true)
|
||||
}
|
||||
@@ -461,10 +473,14 @@ class MainActivity : ComponentActivity() {
|
||||
if (game == null) {
|
||||
pendingGameLink = null
|
||||
intent.data = null
|
||||
intent.action = Intent.ACTION_MAIN
|
||||
intent.removeExtra(GameLaunchIntent.EXTRA_APP_ID)
|
||||
android.widget.Toast.makeText(this, R.string.game_link_missing, android.widget.Toast.LENGTH_LONG).show()
|
||||
} else if (launchGame(game)) {
|
||||
} else if (launchGame(game, returnHome = true)) {
|
||||
pendingGameLink = null
|
||||
intent.data = null
|
||||
intent.action = Intent.ACTION_MAIN
|
||||
intent.removeExtra(GameLaunchIntent.EXTRA_APP_ID)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,10 +492,11 @@ class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
readGameIntent(intent)
|
||||
gameSyncFolder = com.droiddeck.launcher.frontend.GameFileSync.folder(this)
|
||||
gameSyncFolder = GameFileSync.folder(this)
|
||||
displayManager = getSystemService(DISPLAY_SERVICE) as DisplayManager
|
||||
refreshPhantomStatus()
|
||||
theme = SessionPrefs.theme(this)
|
||||
appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this)
|
||||
// Last start's game list, so the Steam wall is up on the first frame; refresh() replaces it.
|
||||
steamGames = if (shortcutPicker) emptyList() else com.droiddeck.launcher.frontend.LibraryCache.load(this)
|
||||
backActionsInverted = SessionPrefs.backActionsInverted(this)
|
||||
@@ -489,7 +506,7 @@ class MainActivity : ComponentActivity() {
|
||||
applyLauncherFullscreen()
|
||||
updates.start()
|
||||
setContent {
|
||||
DroidDeckTheme(theme) {
|
||||
DroidDeckTheme(theme, appScale = appScale) {
|
||||
com.droiddeck.launcher.ui.FocusGlideHost(androidx.compose.ui.Modifier.fillMaxSize()) {
|
||||
val sm = settingsMode
|
||||
val page: (@Composable () -> Unit)? = when {
|
||||
@@ -516,6 +533,7 @@ class MainActivity : ComponentActivity() {
|
||||
lossless = lossless,
|
||||
pageKey = sm?.let { "settings:$it" } ?: if (showPerformance) "performance" else if (showProtons) "protons" else if (showComponents) "components" else if (showMapping) "controller-mapping" else null,
|
||||
theme = theme,
|
||||
appScale = appScale,
|
||||
isHomeApp = homeAppSelected,
|
||||
homeScreenEnabled = homeScreenEnabled,
|
||||
defaultHomeLabel = defaultHomeLabel,
|
||||
@@ -553,7 +571,7 @@ class MainActivity : ComponentActivity() {
|
||||
onSyncGameFiles = { pickGameExport(null) },
|
||||
onStopGameFileSync = {
|
||||
Thread({
|
||||
com.droiddeck.launcher.frontend.GameFileSync.disable(this)
|
||||
GameFileSync.disable(this)
|
||||
ui.post { gameSyncFolder = null }
|
||||
}, "game-file-stop-sync").start()
|
||||
},
|
||||
@@ -645,6 +663,10 @@ class MainActivity : ComponentActivity() {
|
||||
},
|
||||
onPageBack = { settingsMode = null; showPerformance = false; showProtons = false; showComponents = false; showMapping = false },
|
||||
onTheme = { id -> SessionPrefs.setTheme(this, id); theme = id },
|
||||
onAppScale = { percent ->
|
||||
com.droiddeck.launcher.core.AppUiPrefs.setScale(this, percent)
|
||||
appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this)
|
||||
},
|
||||
onLauncherFullscreen = { on ->
|
||||
SessionPrefs.setLauncherFullscreen(this, on)
|
||||
launcherFullscreen = on
|
||||
@@ -1138,6 +1160,7 @@ class MainActivity : ComponentActivity() {
|
||||
storageOptions = storageOptions,
|
||||
storageDiagnostics = mode == SessionService.MODE_STEAM && storageDiagnostics,
|
||||
fexPreset = if (mode == SessionService.MODE_STEAM) fexPreset else null,
|
||||
forceSsbs = forceSsbs,
|
||||
syncBackend = if (mode == SessionService.MODE_STEAM) SessionPrefs.syncBackendOf(fastSync, fsyncFirst, syncFallback) else null,
|
||||
steamChannel = if (mode == SessionService.MODE_STEAM) steamChannel else null,
|
||||
steamDeckMode = mode == SessionService.MODE_STEAM && steamDeckMode,
|
||||
@@ -1211,6 +1234,7 @@ class MainActivity : ComponentActivity() {
|
||||
storageDiagnostics = on
|
||||
},
|
||||
onFexPreset = { id -> SessionPrefs.setFexPreset(this, id); fexPreset = id },
|
||||
onForceSsbs = { on -> SessionPrefs.setForceSsbs(this, on); forceSsbs = on },
|
||||
onSyncBackend = { id ->
|
||||
SessionPrefs.setSyncBackend(this, id)
|
||||
fastSync = SessionPrefs.fastSync(this)
|
||||
@@ -1332,6 +1356,7 @@ class MainActivity : ComponentActivity() {
|
||||
showMapping = false
|
||||
resolution = SessionPrefs.resolutionChoice(this, mode, com.droiddeck.launcher.session.SessionDisplay.panelSize(this))
|
||||
fexPreset = SessionPrefs.fexPreset(this)
|
||||
forceSsbs = SessionPrefs.forceSsbs(this)
|
||||
fastSync = SessionPrefs.fastSync(this)
|
||||
fsyncFirst = SessionPrefs.fsyncFirst(this)
|
||||
syncFallback = SessionPrefs.syncFallback(this)
|
||||
|
||||
@@ -1145,6 +1145,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
// the request landed in this instance's onNewIntent and went with its finish().
|
||||
SessionState.relaunch?.let { next ->
|
||||
SessionState.relaunch = null
|
||||
next.putExtra(EXTRA_RETURN_HOME, intent.getBooleanExtra(EXTRA_RETURN_HOME, false))
|
||||
setIntent(next)
|
||||
recreate()
|
||||
return@runOnUiThread
|
||||
@@ -1906,6 +1907,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
recreate()
|
||||
return
|
||||
}
|
||||
// Home/notification resumes must retain the external frontend's return destination.
|
||||
if (this.intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) intent.putExtra(EXTRA_RETURN_HOME, true)
|
||||
setIntent(intent)
|
||||
if (intent.action == SessionService.ACTION_HOME_GUIDE) {
|
||||
handleHomeGuideIntent(intent)
|
||||
@@ -2046,6 +2049,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
* off, it just closes.
|
||||
*/
|
||||
override fun finish() {
|
||||
if (isFinishing) return
|
||||
if (!quitFlooded && !closeAtOnce && com.droiddeck.launcher.ui.Motion.scale != 0f &&
|
||||
lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) {
|
||||
if (!leaving) {
|
||||
@@ -2056,6 +2060,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
return
|
||||
}
|
||||
super.finish()
|
||||
if (!closeAtOnce && intent.getBooleanExtra(EXTRA_RETURN_HOME, false)) {
|
||||
com.droiddeck.launcher.ui.QuitFlood.take()
|
||||
com.droiddeck.launcher.ui.LaunchOrigin.flooding = null
|
||||
startActivity(Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
|
||||
}
|
||||
if (quitFlooded) overridePendingTransition(0, 0)
|
||||
else overridePendingTransition(R.anim.session_hold, R.anim.session_sink)
|
||||
}
|
||||
@@ -2071,6 +2081,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val EXTRA_RETURN_HOME = "returnHome"
|
||||
/** How long the leaving flood may take before the session closes without it. */
|
||||
private const val LEAVE_TIMEOUT_MS = 1_500L
|
||||
private const val TAG = "SessionActivity"
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,19 @@
|
||||
package com.droiddeck.launcher.core
|
||||
|
||||
import android.content.Context
|
||||
|
||||
object AppUiPrefs {
|
||||
const val DEFAULT_SCALE = 100
|
||||
val scales = listOf(75, 85, 100, 115, 125, 150)
|
||||
|
||||
internal fun normalizeScale(percent: Int): Int = percent.takeIf { it in scales } ?: DEFAULT_SCALE
|
||||
|
||||
fun scale(context: Context): Int = normalizeScale(
|
||||
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).getInt("scale", DEFAULT_SCALE),
|
||||
)
|
||||
|
||||
fun setScale(context: Context, percent: Int) {
|
||||
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit()
|
||||
.putInt("scale", normalizeScale(percent)).apply()
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ object GameEnvironment {
|
||||
fun validValue(value: String) = '\u0000' !in value && value.length <= 8192
|
||||
fun validScope(scope: String) = scope.isEmpty() || (Regex("[1-9][0-9]*").matches(scope) && scope.toLongOrNull()?.let { it in 1..4294967295L } == true)
|
||||
|
||||
fun defaults(preset: String): Map<String, String?> = linkedMapOf<String, String?>(
|
||||
fun defaults(preset: String, forceSsbs: Boolean = false): Map<String, String?> = linkedMapOf<String, String?>(
|
||||
"MESA_SHADER_CACHE_DISABLE" to "false",
|
||||
"VKD3D_FEATURE_LEVEL" to "12_2",
|
||||
"VKD3D_SHADER_MODEL" to "6_9",
|
||||
@@ -37,8 +37,12 @@ object GameEnvironment {
|
||||
"DOTNET_EnableWriteXorExecute" to "0",
|
||||
).apply {
|
||||
FexPreset.env(preset).forEach { put(it.substringBefore('='), it.substringAfter('=')) }
|
||||
// Steam settings' Force SSBS: droiddeck-game-env preloads libssbs.so into the game's Wine.
|
||||
if (forceSsbs) put(FORCE_SSBS, "1")
|
||||
}
|
||||
|
||||
fun effective(config: Config, preset: String, scope: String): Map<String, String?> =
|
||||
defaults(preset) + config.shared + if (scope.isEmpty()) emptyMap() else config.games[scope].orEmpty()
|
||||
const val FORCE_SSBS = "DROIDDECK_FORCE_SSBS"
|
||||
|
||||
fun effective(config: Config, preset: String, scope: String, forceSsbs: Boolean = false): Map<String, String?> =
|
||||
defaults(preset, forceSsbs) + config.shared + if (scope.isEmpty()) emptyMap() else config.games[scope].orEmpty()
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class FileManagerActivity : ComponentActivity() {
|
||||
}
|
||||
val initialDir = intent.getStringExtra(EXTRA_START_DIR)?.let(::File)
|
||||
setContent {
|
||||
DroidDeckTheme {
|
||||
DroidDeckTheme(appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this)) {
|
||||
Surface(modifier = Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) {
|
||||
FileManagerScreen(initialDir = initialDir)
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class FilePickerActivity : ComponentActivity() {
|
||||
?.let { File(it) }?.takeIf { it.isDirectory }
|
||||
|
||||
setContent {
|
||||
DroidDeckTheme {
|
||||
DroidDeckTheme(appScale = com.droiddeck.launcher.core.AppUiPrefs.scale(this)) {
|
||||
Surface(modifier = Modifier.fillMaxSize().systemBarsPadding(), color = MaterialTheme.colorScheme.background) {
|
||||
FileManagerScreen(
|
||||
pickMode = true,
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import java.io.File
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* Best-effort detection of the Windows redistributables a game bundles, by scanning its install
|
||||
* folder for the redist installers Steam/Epic/GOG ship (`_CommonRedist/`, `_Redist/`,
|
||||
* `Redistributables/`, loose `vcredist_x64.exe`, …) and mapping them to entries in our component
|
||||
* catalog (WinComponents, Bannerlator's components.json `name` keys). The result drives the
|
||||
* Recommended part of a game's Windows components; the user still switches each one on.
|
||||
* Bannerlator's detector, unchanged but for this note and its package.
|
||||
*
|
||||
* Wine-aware: keeps the redists that actually matter under Wine/DXVK (VC++ runtimes, .NET, PhysX,
|
||||
* OpenAL, XACT, XNA, GFWL) and SKIPS the ones DXVK/VKD3D already provide (DX12 Agility SDK) or that
|
||||
* aren't our components (anti-cheat, Rockstar/Social-Club/launcher setups). Never throws; returns an
|
||||
* empty list on anything unexpected. Pure filesystem — no network, no Android deps (unit-testable).
|
||||
*/
|
||||
object DependencyDetector {
|
||||
|
||||
/** How a recommendation was found — drives the UI's "recommended vs optional" split. */
|
||||
enum class Kind {
|
||||
/** The game bundles the redist installer (in _CommonRedist etc.) — meant to be installed. */
|
||||
BUNDLED,
|
||||
/** A runtime DLL the game ships loose — usually already works from the game folder; install
|
||||
* only if the game misbehaves. */
|
||||
SHIPPED,
|
||||
/** Steam installs it with the game from Steamworks Shared ([SteamRedists]). */
|
||||
STEAM,
|
||||
}
|
||||
|
||||
/** A recommended component: the catalog [componentName] to install, a display [label], the on-disk
|
||||
* redist that triggered it ([reason]), and [kind] (bundled installer vs shipped DLL). */
|
||||
data class Recommendation(val componentName: String, val label: String, val reason: String, val kind: Kind = Kind.BUNDLED)
|
||||
|
||||
private const val MAX_DEPTH = 5
|
||||
private const val MAX_ENTRIES = 8000 // cost guard against giant game trees
|
||||
|
||||
/** A loose VC++ installer with no year in its path — resolved to "latest" only if no specific
|
||||
* vcredistYYYY was found anywhere (else it's just a duplicate of the versioned one). */
|
||||
private const val VCREDIST_LOOSE = "__vcredist_loose"
|
||||
|
||||
/** Directory names that are redist containers worth descending into. */
|
||||
private val REDIST_DIR_RE = Regex(
|
||||
"""(?i)^(_?commonredist|_?redist(ributables)?|__?installer|vcredist|vc_redist|directx|direct_x|physx|openal|dotnet(fx)?|\.net|xna|xact|redist|support)$"""
|
||||
)
|
||||
|
||||
/** Skip whole subtrees that are never our components. */
|
||||
private val SKIP_DIR_RE = Regex("""(?i)^(d3d12.*|.*agility.*|dxvk|vkd3d|battleye|easyanticheat|eac|anticheat)$""")
|
||||
|
||||
private val YEAR_TO_VCREDIST = mapOf(
|
||||
"2005" to "vcredist2005", "2008" to "vcredist2008", "2010" to "vcredist2010",
|
||||
"2012" to "vcredist2012", "2013" to "vcredist2013", "2015" to "vcredist2015",
|
||||
"2017" to "vcredist2015", "2019" to "vcredist2019", "2022" to "vcredist2022",
|
||||
)
|
||||
|
||||
private val LABELS = mapOf(
|
||||
"vcredist2005" to "Visual C++ 2005", "vcredist2008" to "Visual C++ 2008",
|
||||
"vcredist2010" to "Visual C++ 2010", "vcredist2012" to "Visual C++ 2012",
|
||||
"vcredist2013" to "Visual C++ 2013", "vcredist2015" to "Visual C++ 2015-2017",
|
||||
"vcredist2019" to "Visual C++ 2019", "vcredist2022" to "Visual C++ 2015-2022",
|
||||
"physx" to "NVIDIA PhysX", "oalinst" to "OpenAL", "xact" to "DirectX XACT audio",
|
||||
"xact_x64" to "DirectX XACT audio (x64)", "xna40" to "XNA Framework 4.0",
|
||||
"xna31" to "XNA Framework 3.1", "d3dx9" to "DirectX 9 (d3dx9)", "d3dx11" to "DirectX 11 (d3dx11)",
|
||||
"XLiveRedist" to "Games for Windows Live", "dotnet40" to ".NET Framework 4.0",
|
||||
"dotnet45" to ".NET Framework 4.5", "dotnet452" to ".NET Framework 4.5.2",
|
||||
"dotnet46" to ".NET Framework 4.6", "dotnet472" to ".NET Framework 4.7.2",
|
||||
"dotnet48" to ".NET Framework 4.8", "dotnet35" to ".NET Framework 3.5",
|
||||
"dotnetcoredesktop6" to ".NET Desktop 6", "dotnetcoredesktop7" to ".NET Desktop 7",
|
||||
"dotnetcoredesktop8" to ".NET Desktop 8",
|
||||
)
|
||||
|
||||
/** Preferred install order (runtimes others may depend on first). */
|
||||
private val INSTALL_ORDER = listOf(
|
||||
"vcredist2005", "vcredist2008", "vcredist2010", "vcredist2012", "vcredist2013",
|
||||
"vcredist2015", "vcredist2019", "vcredist2022",
|
||||
"dotnet35", "dotnet40", "dotnet45", "dotnet452", "dotnet46", "dotnet472", "dotnet48",
|
||||
"dotnetcoredesktop6", "dotnetcoredesktop7", "dotnetcoredesktop8",
|
||||
"d3dx9", "d3dx11", "xact", "xact_x64", "xna31", "xna40", "physx", "oalinst", "XLiveRedist",
|
||||
)
|
||||
|
||||
/**
|
||||
* Detect from the .exe the user picked, resolving the game root first: walk up from the exe's
|
||||
* folder (bounded) to the nearest ancestor that holds a redist container (`_CommonRedist`, …) at
|
||||
* its top level, and scan from there — so a nested exe (`…/Game/bin/x.exe`) still finds a root-level
|
||||
* `_CommonRedist`, without over-reaching into a shared `steamapps/common` (which has no redist
|
||||
* container of its own). Falls back to scanning the exe's own folder.
|
||||
*/
|
||||
fun detectForExe(exeFile: File): List<Recommendation> {
|
||||
val start = exeFile.absoluteFile.parentFile ?: return emptyList()
|
||||
var d: File? = start
|
||||
var depth = 0
|
||||
while (d != null && depth < 4) {
|
||||
val hasRedistContainer = try {
|
||||
d.listFiles()?.any { it.isDirectory && REDIST_DIR_RE.matches(it.name.lowercase(Locale.US)) } == true
|
||||
} catch (_: Throwable) { false }
|
||||
if (hasRedistContainer) return detect(d)
|
||||
d = d.parentFile
|
||||
depth++
|
||||
}
|
||||
return detect(start)
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan [gameDir] and return the recommended components, de-duplicated (first reason wins), in a
|
||||
* stable install-friendly order. Empty when nothing is detected or [gameDir] isn't a directory.
|
||||
*/
|
||||
fun detect(gameDir: File): List<Recommendation> {
|
||||
if (!gameDir.isDirectory) return emptyList()
|
||||
val hits = LinkedHashMap<String, Recommendation>() // componentName -> first recommendation
|
||||
var visited = 0
|
||||
|
||||
fun consider(f: File, isDir: Boolean, insideRedist: Boolean) {
|
||||
val name = f.name.lowercase(Locale.US)
|
||||
val path = f.path.replace('\\', '/').lowercase(Locale.US)
|
||||
// Bundled = in a redist container or an installer (exe/msi/cab); shipped = a loose runtime DLL.
|
||||
val kind = if (insideRedist || isDir || name.endsWith(".exe") || name.endsWith(".msi") || name.endsWith(".cab"))
|
||||
Kind.BUNDLED else Kind.SHIPPED
|
||||
for (comp in classify(path, name, isDir)) {
|
||||
val existing = hits[comp]
|
||||
if (existing == null) {
|
||||
hits[comp] = Recommendation(comp, LABELS[comp] ?: comp, relativeReason(gameDir, f), kind)
|
||||
} else if (existing.kind == Kind.SHIPPED && kind == Kind.BUNDLED) {
|
||||
hits[comp] = existing.copy(kind = Kind.BUNDLED) // a bundled installer outranks a shipped DLL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun walk(dir: File, depth: Int, insideRedist: Boolean) {
|
||||
if (depth > MAX_DEPTH || visited > MAX_ENTRIES) return
|
||||
val entries = dir.listFiles() ?: return
|
||||
for (f in entries) {
|
||||
if (visited++ > MAX_ENTRIES) return
|
||||
val lower = f.name.lowercase(Locale.US)
|
||||
if (f.isDirectory) {
|
||||
if (SKIP_DIR_RE.matches(lower)) continue
|
||||
val isRedistDir = insideRedist || REDIST_DIR_RE.matches(lower)
|
||||
if (isRedistDir) consider(f, isDir = true, insideRedist = true)
|
||||
// Aggressive coverage: descend redist containers fully, and otherwise sweep the game
|
||||
// tree a few levels deep so runtime libraries the game ships (in bin/, etc.) are seen.
|
||||
if (isRedistDir || depth < 3) walk(f, depth + 1, isRedistDir)
|
||||
} else {
|
||||
// Classify installers + runtime libraries (.dll/.exe/.msi) anywhere in the scanned
|
||||
// tree; other files are ignored. Recommendations are advisory, so cast a wide net.
|
||||
val ext = lower.substringAfterLast('.', "")
|
||||
if (insideRedist || ext == "dll" || ext == "exe" || ext == "msi") consider(f, isDir = false, insideRedist = insideRedist)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return try {
|
||||
walk(gameDir, 0, false)
|
||||
resolveLooseVcredist(hits)
|
||||
hits.values.sortedBy { INSTALL_ORDER.indexOf(it.componentName).let { i -> if (i < 0) 999 else i } }
|
||||
} catch (_: Throwable) {
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
/** A loose VC++ installer resolves to the latest 14.x only if no specific vcredistYYYY was found. */
|
||||
private fun resolveLooseVcredist(hits: LinkedHashMap<String, Recommendation>) {
|
||||
val loose = hits.remove(VCREDIST_LOOSE) ?: return
|
||||
val hasSpecific = hits.keys.any { it in YEAR_TO_VCREDIST.values }
|
||||
if (!hasSpecific) hits["vcredist2022"] = loose.copy(componentName = "vcredist2022", label = LABELS["vcredist2022"]!!)
|
||||
}
|
||||
|
||||
private fun relativeReason(gameDir: File, f: File): String {
|
||||
val g = gameDir.path.replace('\\', '/')
|
||||
val p = f.path.replace('\\', '/')
|
||||
return if (p.startsWith("$g/")) p.substring(g.length + 1) else f.name
|
||||
}
|
||||
|
||||
/**
|
||||
* Map a redist file/dir (its full lowercased [path], leaf [name], and whether it [isDir]) to
|
||||
* catalog component name(s). Empty for things we deliberately skip.
|
||||
*/
|
||||
private fun classify(path: String, name: String, isDir: Boolean): List<String> {
|
||||
// Hard skips first — DX12 is provided by DXVK/VKD3D; these aren't our components.
|
||||
if (path.contains("d3d12") || path.contains("agility") ||
|
||||
path.contains("battleye") || path.contains("anticheat") || path.contains("easyanticheat") ||
|
||||
name.contains("socialclub") || name.contains("social-club") ||
|
||||
name.contains("rockstar") || name == "setup.exe"
|
||||
) return emptyList()
|
||||
|
||||
// Visual C++ runtimes — most important. Year comes from the path context.
|
||||
if (path.contains("vcredist") || path.contains("vc_redist") || name.startsWith("vcredist") || name.startsWith("vc_redist")) {
|
||||
val year = YEAR_TO_VCREDIST.keys.firstOrNull { path.contains(it) }
|
||||
return when {
|
||||
year != null -> listOf(YEAR_TO_VCREDIST.getValue(year))
|
||||
isDir -> emptyList() // bare "vcredist" container — wait for the year subfolder / installer
|
||||
else -> listOf(VCREDIST_LOOSE) // loose installer, no year → resolved post-walk
|
||||
}
|
||||
}
|
||||
// VC++ runtime DLL the game ships (msvcp140.dll → 2015-2022, msvcp120.dll → 2013, …).
|
||||
VCRUNTIME_DLL.entries.firstOrNull { name.startsWith(it.key) }?.let { return listOf(it.value) }
|
||||
if (path.contains("openal") || name.startsWith("oalinst") || name == "openal32.dll" || name == "wrap_oal.dll") return listOf("oalinst")
|
||||
if (path.contains("physx") || name.startsWith("physx")) return listOf("physx")
|
||||
if (path.contains("xact") || name.startsWith("xactengine") || name.startsWith("x3daudio")) return listOf("xact", "xact_x64")
|
||||
// Games for Windows Live — the redist folder, OR a GFWL library the game ships (xlive.dll,
|
||||
// Codemasters' dbxLive32/64, gfwl*): GFWL titles need XLiveRedist to run even when they don't
|
||||
// bundle the redist itself.
|
||||
if (path.contains("xliveredist") || name.contains("xlive") || name.startsWith("gfwl") || name.startsWith("dbxlive")) {
|
||||
return listOf("XLiveRedist")
|
||||
}
|
||||
if (path.contains("xna")) return listOf(if (path.contains("3.1") || path.contains("3_1") || path.contains("v31")) "xna31" else "xna40")
|
||||
// .NET — Framework and Core/Desktop runtimes.
|
||||
if (path.contains("dotnet") || path.contains(".net") || name.startsWith("ndp") || name.startsWith("dotnetfx") || name.contains("windowsdesktop-runtime")) {
|
||||
val comp = dotnetComponent("$path $name")
|
||||
return when {
|
||||
comp != null -> listOf(comp)
|
||||
isDir -> emptyList() // bare ".NET" container — wait for the versioned installer
|
||||
else -> listOf("dotnet48") // unlabeled .NET Framework installer file → sensible default
|
||||
}
|
||||
}
|
||||
// DirectX 11 helper DLLs the game ships (d3dx11_43.dll).
|
||||
if (D3DX11_RE.matches(name)) return listOf("d3dx11")
|
||||
// DirectX 9 helper DLLs / d3dcompiler / June-2010 DX redist (DXVK provides core d3d9 but NOT
|
||||
// these helper DLLs).
|
||||
if (name.startsWith("dxsetup") || name.startsWith("dxwebsetup") ||
|
||||
D3DX9_RE.matches(name) || D3DCOMPILER_RE.matches(name) ||
|
||||
(path.contains("directx") && name.endsWith(".exe"))
|
||||
) return listOf("d3dx9")
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
/** Runtime DLL prefix → the VC++ redistributable that provides it (checked with startsWith). */
|
||||
private val VCRUNTIME_DLL = linkedMapOf(
|
||||
"vcruntime140" to "vcredist2022", "msvcp140" to "vcredist2022", "msvcr140" to "vcredist2022", "concrt140" to "vcredist2022",
|
||||
"msvcp120" to "vcredist2013", "msvcr120" to "vcredist2013",
|
||||
"msvcp110" to "vcredist2012", "msvcr110" to "vcredist2012",
|
||||
"msvcp100" to "vcredist2010", "msvcr100" to "vcredist2010",
|
||||
"msvcp90" to "vcredist2008", "msvcr90" to "vcredist2008",
|
||||
"msvcp80" to "vcredist2005", "msvcr80" to "vcredist2005",
|
||||
)
|
||||
private val D3DX9_RE = Regex("""d3dx9_\d+\.dll""")
|
||||
private val D3DX11_RE = Regex("""d3dx11_\d+\.dll""")
|
||||
private val D3DCOMPILER_RE = Regex("""d3dcompiler_\d+\.dll""")
|
||||
|
||||
/** Resolve a .NET component from installer/path text, or null when no version is discernible. */
|
||||
private fun dotnetComponent(s: String): String? = when {
|
||||
s.contains("desktop-runtime-8") || Regex("""\b8\.\d""").containsMatchIn(s) -> "dotnetcoredesktop8"
|
||||
s.contains("desktop-runtime-7") || Regex("""\b7\.\d""").containsMatchIn(s) -> "dotnetcoredesktop7"
|
||||
s.contains("desktop-runtime-6") || Regex("""\b6\.\d""").containsMatchIn(s) -> "dotnetcoredesktop6"
|
||||
s.contains("ndp48") || s.contains("fx48") || s.contains("4.8") -> "dotnet48"
|
||||
s.contains("ndp472") || s.contains("4.7.2") -> "dotnet472"
|
||||
s.contains("ndp46") || s.contains("4.6") -> "dotnet46"
|
||||
s.contains("ndp452") || s.contains("4.5.2") -> "dotnet452"
|
||||
s.contains("dotnetfx45") || s.contains("ndp45") || s.contains("4.5") -> "dotnet45"
|
||||
s.contains("dotnetfx40") || s.contains("ndp40") || s.contains("4.0") -> "dotnet40"
|
||||
s.contains("dotnetfx35") || s.contains("3.5") -> "dotnet35"
|
||||
else -> null // no version signal (e.g. a bare "DotNet" container dir)
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import java.io.InputStream
|
||||
|
||||
/** Small, portable launch files for frontends that scan ROM folders. No guest paths or commands. */
|
||||
object GameFiles {
|
||||
const val EXTENSION = "droiddeck"
|
||||
const val EXTENSION = "steam"
|
||||
private const val MAX_BYTES = 128
|
||||
private const val INVENTORY = ".droiddeck-sync.json"
|
||||
private const val FORMAT = "droiddeck-game-files-v1"
|
||||
@@ -46,35 +46,49 @@ object GameFiles {
|
||||
}
|
||||
if (count > MAX_BYTES) return null
|
||||
val text = String(bytes, 0, count, Charsets.UTF_8).trim()
|
||||
return GameLaunchLink.parse(text) ?: text.takeIf(GameLaunchLink::validId)
|
||||
return text.takeIf(GameLaunchLink::validId)
|
||||
}
|
||||
|
||||
fun filename(game: Library.SteamGame): String {
|
||||
fun filename(game: Library.SteamGame, disambiguate: Boolean = false): String {
|
||||
val sanitized = game.name.replace(Regex("[\\p{Cntrl}\\\\/:*?\"<>|]"), "_")
|
||||
.trim().trim('.').ifBlank { "Game" }
|
||||
val points = sanitized.codePoints().limit(40).toArray()
|
||||
val title = String(points, 0, points.size)
|
||||
return "$title (${game.gameIdString}).$EXTENSION"
|
||||
val suffix = if (disambiguate) " (${game.gameIdString})" else ""
|
||||
return "$title$suffix.$EXTENSION"
|
||||
}
|
||||
|
||||
private fun contents(id: String) = GameLaunchLink.uri(id) + "\n"
|
||||
private fun contents(id: String): String {
|
||||
require(GameLaunchLink.validId(id))
|
||||
return id
|
||||
}
|
||||
|
||||
@Synchronized fun export(folder: File, game: Library.SteamGame): File {
|
||||
@Synchronized fun export(folder: File, game: Library.SteamGame): File =
|
||||
exportNamed(folder, game, filename(game))
|
||||
|
||||
private fun exportNamed(folder: File, game: Library.SteamGame, name: String): File {
|
||||
require(folder.isDirectory) { "Folder is unavailable" }
|
||||
val target = child(folder, filename(game))
|
||||
val text = contents(game.gameIdString)
|
||||
val target = exportTarget(folder, game, name)
|
||||
require(!target.exists() || matches(target, text)) { "A different file already uses ${target.name}" }
|
||||
if (!target.exists()) write(target, text)
|
||||
exportArt(folder, game)
|
||||
return target
|
||||
}
|
||||
|
||||
private fun exportTarget(folder: File, game: Library.SteamGame, name: String): File {
|
||||
val target = child(folder, name)
|
||||
return if (target.exists() && !matches(target, contents(game.gameIdString))) {
|
||||
child(folder, filename(game, disambiguate = true))
|
||||
} else target
|
||||
}
|
||||
|
||||
/** Cocoon matches icons in its data folder's images directory. Never replace custom art. */
|
||||
private fun exportArt(folder: File, game: Library.SteamGame) {
|
||||
val art = listOfNotNull(game.icon, game.art).firstOrNull {
|
||||
it.isFile && it.extension.lowercase() in listOf("jpg", "jpeg", "png", "webp")
|
||||
} ?: return
|
||||
val title = filename(game).substringBeforeLast(" (${game.gameIdString})")
|
||||
val title = filename(game).substringBeforeLast(".")
|
||||
.replace(Regex("\\[[^]]*]|\\([^)]*\\)"), "")
|
||||
.replace(Regex("[^a-zA-Z0-9\\s]"), "").trim()
|
||||
.replace(Regex("\\s+"), "-").lowercase(java.util.Locale.ROOT).take(50).trimEnd('-')
|
||||
@@ -95,12 +109,20 @@ object GameFiles {
|
||||
record.getJSONObject("games")
|
||||
} else JSONObject()
|
||||
val next = JSONObject()
|
||||
val exports = games.distinctBy { it.gameId }.map { game ->
|
||||
val target = child(folder, filename(game))
|
||||
val unique = games.distinctBy { it.gameId }
|
||||
val names = unique.groupingBy { filename(it).lowercase(java.util.Locale.ROOT) }.eachCount()
|
||||
val exports = unique.map { game ->
|
||||
val name = filename(game, disambiguate = names.getValue(filename(game).lowercase(java.util.Locale.ROOT)) > 1)
|
||||
val preferred = child(folder, name)
|
||||
val target = if (inventoryOwns(folder, previous, preferred, game.gameIdString)) preferred
|
||||
else exportTarget(folder, game, name)
|
||||
val text = contents(game.gameIdString)
|
||||
val existed = target.exists()
|
||||
// Keep an edited export without letting it block the rest of the library sync.
|
||||
val file = if (previous.optString(target.name) == game.gameIdString && target.exists() &&
|
||||
!matches(target, contents(game.gameIdString))) target else export(folder, game)
|
||||
next.put(file.name, game.gameIdString)
|
||||
val owned = inventoryOwns(folder, previous, target, game.gameIdString)
|
||||
val file = if (owned && target.exists() &&
|
||||
!matches(target, text)) target else exportNamed(folder, game, target.name)
|
||||
if (!existed || owned) next.put(file.name, game.gameIdString)
|
||||
file
|
||||
}
|
||||
// Write new exports before pruning; a failed write must not remove old launch files.
|
||||
@@ -119,6 +141,16 @@ object GameFiles {
|
||||
if (previous.toString() != next.toString()) write(inventory, JSONObject().put("format", FORMAT).put("games", next).toString())
|
||||
}
|
||||
|
||||
private fun inventoryOwns(folder: File, record: JSONObject, file: File, id: String): Boolean {
|
||||
if (record.optString(file.name) == id) return true
|
||||
if (!file.exists()) return false
|
||||
return record.keys().asSequence().any { name ->
|
||||
record.optString(name) == id && child(folder, name).let { old ->
|
||||
old.exists() && java.nio.file.Files.isSameFile(old.toPath(), file.toPath())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun child(folder: File, name: String): File {
|
||||
require(name.isNotEmpty() && '/' !in name && '\\' !in name && name != "." && name != "..")
|
||||
val file = File(folder, name)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
||||
object GameLaunchIntent {
|
||||
const val ACTION = "com.droiddeck.launcher.LAUNCH_GAME"
|
||||
const val EXTRA_APP_ID = "app_id"
|
||||
const val EXTRA_GAME_SOURCE = "game_source"
|
||||
private const val GAMENATIVE_ACTION = "app.gamenative.LAUNCH_GAME"
|
||||
|
||||
fun accepts(action: String?): Boolean = action == Intent.ACTION_VIEW || action == ACTION || action == GAMENATIVE_ACTION
|
||||
|
||||
fun read(context: Context, intent: Intent): String? = when (intent.action) {
|
||||
Intent.ACTION_VIEW -> GameFiles.readIntent(context, intent)
|
||||
ACTION, GAMENATIVE_ACTION -> readId(intent)
|
||||
else -> null
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
internal fun readId(intent: Intent): String? = runCatching {
|
||||
if (intent.action != ACTION && intent.action != GAMENATIVE_ACTION) return null
|
||||
val source = intent.extras?.get(EXTRA_GAME_SOURCE)
|
||||
if (source != null && (source !is String || !source.equals("STEAM", ignoreCase = true))) return null
|
||||
val id = when (val value = intent.extras?.get(EXTRA_APP_ID)) {
|
||||
is Int -> value.takeIf { it > 0 }?.toString()
|
||||
is String -> value.takeIf(GameLaunchLink::validId)
|
||||
else -> null
|
||||
}
|
||||
id
|
||||
}.getOrNull()
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* Which catalog components a game's prefix already has from elsewhere - a real installer, the game,
|
||||
* the user - so the list can say so instead of recommending them again. Bannerlator's detector,
|
||||
* on DroidDeck's compatdata/<id>: only markers absent from a fresh Proton prefix count (OpenAL32,
|
||||
* Mono, PhysX, Games for Windows Live); msvcp140, d3dx9 and the like ship with Proton and cannot
|
||||
* tell. Files DroidDeck put there itself (droiddeck-wincomponents' state) are not counted.
|
||||
* Pure filesystem reads; never throws.
|
||||
*/
|
||||
object PrefixInstalledDetector {
|
||||
private const val STATE = ".droiddeck-wincomponents.json"
|
||||
|
||||
/** Detector names (oalinst, mono, physx, XLiveRedist) present in [compat]/pfx. */
|
||||
fun detect(compat: File?): Set<String> = try {
|
||||
val pfx = compat?.let { File(it, "pfx") }
|
||||
if (pfx == null || !pfx.isDirectory) emptySet() else {
|
||||
val ours = ours(compat)
|
||||
val out = HashSet<String>()
|
||||
val openal = listOf("system32", "syswow64").map { "drive_c/windows/$it/openal32.dll" }
|
||||
if (openal.any { it !in ours && fileIgnoringCase(pfx, it) }) out += "oalinst"
|
||||
if (File(pfx, "drive_c/windows/mono").isDirectory) out += "mono"
|
||||
if (hasPhysX(pfx)) out += "physx"
|
||||
if (registryContains(pfx, "Games for Windows")) out += "XLiveRedist"
|
||||
out
|
||||
}
|
||||
} catch (_: Throwable) {
|
||||
emptySet()
|
||||
}
|
||||
|
||||
private fun ours(compat: File): Set<String> = try {
|
||||
val files = JSONObject(File(compat, STATE).readText()).optJSONObject("files")
|
||||
files?.keys()?.asSequence()?.map { it.lowercase() }?.toSet().orEmpty()
|
||||
} catch (_: Exception) {
|
||||
emptySet()
|
||||
}
|
||||
|
||||
/** Windows names ignore case; the prefix's folder may spell them either way. */
|
||||
private fun fileIgnoringCase(pfx: File, rel: String): Boolean {
|
||||
val target = File(pfx, rel)
|
||||
return target.parentFile?.listFiles()?.any { it.isFile && it.name.equals(target.name, ignoreCase = true) } == true
|
||||
}
|
||||
|
||||
private fun hasPhysX(pfx: File): Boolean {
|
||||
for (pf in arrayOf("drive_c/Program Files", "drive_c/Program Files (x86)")) {
|
||||
val base = File(pfx, pf)
|
||||
if (File(base, "NVIDIA Corporation/PhysX").isDirectory) return true
|
||||
if (base.listFiles()?.any { it.isDirectory && it.name.contains("PhysX", ignoreCase = true) } == true) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private fun registryContains(pfx: File, needle: String): Boolean =
|
||||
arrayOf("system.reg", "user.reg").any { name ->
|
||||
val f = File(pfx, name)
|
||||
try {
|
||||
f.isFile && f.length() < 32L * 1024 * 1024 &&
|
||||
f.bufferedReader().use { r -> r.lineSequence().any { it.contains(needle, ignoreCase = true) } }
|
||||
} catch (_: Throwable) {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* What Steam itself installs alongside a game: the Steamworks Shared redistributables (app 228980)
|
||||
* listed under "SharedDepots" in the game's appmanifest. Those live in Steamworks Shared rather than
|
||||
* the game's folder, so the folder scan ([DependencyDetector]) cannot see them; this reads Steam's
|
||||
* list instead. Depots are matched to Bannerlator's catalog names; unknown ones are left out.
|
||||
*/
|
||||
object SteamRedists {
|
||||
/** Steamworks Shared depot -> (catalog component, what Steam calls it). 2015-2019 runtimes are one family. */
|
||||
val DEPOTS = linkedMapOf(
|
||||
"228981" to ("vcredist2005_dll" to "VC++ 2005"),
|
||||
"228982" to ("vcredist2008_dll" to "VC++ 2008"),
|
||||
"228983" to ("vcredist2010_dll" to "VC++ 2010"),
|
||||
"228984" to ("vcredist2012_dll" to "VC++ 2012"),
|
||||
"228985" to ("vcredist2013_dll" to "VC++ 2013"),
|
||||
"228986" to ("vcredist2015_dll" to "VC++ 2015"),
|
||||
"228987" to ("vcredist2019_dll" to "VC++ 2017"),
|
||||
"228988" to ("vcredist2019_dll" to "VC++ 2019"),
|
||||
"228989" to ("vcredist2022_dll" to "VC++ 2022"),
|
||||
"228990" to ("d3dx9" to "DirectX (June 2010)"),
|
||||
)
|
||||
private val BLOCK = Regex("\"SharedDepots\"\\s*\\{([^}]*)\\}", RegexOption.IGNORE_CASE)
|
||||
private val ENTRY = Regex("\"(\\d+)\"\\s+\"\\d+\"")
|
||||
|
||||
/** The game's appmanifest beside its install folder (steamapps/common/<dir> -> steamapps/). */
|
||||
fun manifest(gameDir: File?, appId: Int): File? {
|
||||
val steamapps = gameDir?.parentFile?.parentFile ?: return null
|
||||
return File(steamapps, "appmanifest_$appId.acf").takeIf { it.isFile }
|
||||
}
|
||||
|
||||
fun detect(gameDir: File?, appId: Int): List<DependencyDetector.Recommendation> {
|
||||
val text = try {
|
||||
manifest(gameDir, appId)?.takeIf { it.length() < 1L shl 20 }?.readText() ?: return emptyList()
|
||||
} catch (_: Exception) {
|
||||
return emptyList()
|
||||
}
|
||||
val block = BLOCK.find(text)?.groupValues?.get(1) ?: return emptyList()
|
||||
return ENTRY.findAll(block).mapNotNull { DEPOTS[it.groupValues[1]] }
|
||||
.distinctBy { it.first }
|
||||
.map { (component, label) -> DependencyDetector.Recommendation(component, label, label, DependencyDetector.Kind.STEAM) }
|
||||
.toList()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import java.io.File
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* Everything the device info window shows about the phone's chip: SoC, GPU, CPU, memory, system,
|
||||
* the phone's own Vulkan driver and the drivers DroidDeck uses. Reads files and asks Vulkan once
|
||||
* ([VulkanInfo]), so [collect] belongs off the main thread. Values the phone does not give are
|
||||
* left out rather than guessed.
|
||||
*/
|
||||
object DeviceInfo {
|
||||
class Section(val title: String, val rows: List<Pair<String, String>>)
|
||||
|
||||
fun collect(context: Context): List<Section> {
|
||||
val vk = VulkanInfo.query()
|
||||
// After Vulkan has been asked, detection can use its name too.
|
||||
val gpu = GpuInfo.detect()
|
||||
return listOf(
|
||||
chip(), gpu(gpu), cpu(), memory(context), system(), vulkan(context, vk), drivers(context, gpu),
|
||||
).filter { it.rows.isNotEmpty() }
|
||||
}
|
||||
|
||||
/** The whole window as plain text, for a bug report. */
|
||||
fun text(sections: List<Section>): String = buildString {
|
||||
append("DroidDeck device info\n")
|
||||
for (s in sections) {
|
||||
append('\n').append(s.title).append('\n')
|
||||
for ((k, v) in s.rows) append(" ").append(k).append(": ").append(v).append('\n')
|
||||
}
|
||||
}
|
||||
|
||||
private fun MutableList<Pair<String, String>>.add(key: String, value: String?) {
|
||||
if (!value.isNullOrBlank() && value != Build.UNKNOWN) add(key to value.trim())
|
||||
}
|
||||
|
||||
private fun read(path: String): String? = FileUtils.readString(File(path))?.trim()?.ifEmpty { null }
|
||||
|
||||
private fun prop(name: String): String = GpuInfo.systemProperty(name)
|
||||
|
||||
private fun chip() = Section("Chip (SoC)", buildList<Pair<String, String>> {
|
||||
val model = SocNames.model()
|
||||
val platform = prop("ro.board.platform")
|
||||
add("Name", SocNames.name(model, platform))
|
||||
add("Model", model)
|
||||
if (Build.VERSION.SDK_INT >= 31) add("Maker", Build.SOC_MANUFACTURER)
|
||||
add("Platform", platform)
|
||||
add("Hardware", Build.HARDWARE)
|
||||
add("Board", Build.BOARD)
|
||||
val id = read("/sys/devices/soc0/soc_id")
|
||||
val machine = read("/sys/devices/soc0/machine")
|
||||
add("SoC id", listOfNotNull(id, machine).joinToString(" · "))
|
||||
add("Family", read("/sys/devices/soc0/family"))
|
||||
})
|
||||
|
||||
private fun gpu(gpu: GpuInfo) = Section("GPU", buildList<Pair<String, String>> {
|
||||
add("GPU", gpu.name)
|
||||
add("Family", gpu.family.label)
|
||||
add("Model found from", when (gpu.modelSource) {
|
||||
"kernel" -> "the kernel's GPU name"
|
||||
"vulkan" -> "the Vulkan driver (the kernel's name has no model)"
|
||||
"platform" -> "the platform (the kernel's name has no model)"
|
||||
else -> "unknown"
|
||||
})
|
||||
add("Kernel name", gpu.kgslName)
|
||||
val kgsl = "/sys/class/kgsl/kgsl-3d0"
|
||||
add("Clock range", gpuRange())
|
||||
add("Load", read("$kgsl/gpu_busy_percentage")?.let { if (it.endsWith("%")) it else "$it %" })
|
||||
add("Temperature", read("$kgsl/temp")?.toLongOrNull()?.let { if (it > 1000) "${it / 1000} °C" else "$it °C" })
|
||||
add("Support", gpu.supportText)
|
||||
})
|
||||
|
||||
private fun cpu() = Section("CPU", buildList<Pair<String, String>> {
|
||||
add("Cores", Runtime.getRuntime().availableProcessors().toString())
|
||||
// Each cpufreq policy is one cluster: the cores it covers and their speed range.
|
||||
val policies = File("/sys/devices/system/cpu/cpufreq").listFiles { f -> f.name.matches(Regex("policy\\d+")) }
|
||||
?.sortedBy { it.name.removePrefix("policy").toInt() }.orEmpty()
|
||||
for (p in policies) {
|
||||
val cpus = (read("${p.path}/related_cpus") ?: read("${p.path}/affected_cpus"))?.split(Regex("\\s+"))?.filter { it.isNotEmpty() }.orEmpty()
|
||||
val min = read("${p.path}/cpuinfo_min_freq")?.toLongOrNull()
|
||||
val max = read("${p.path}/cpuinfo_max_freq")?.toLongOrNull() ?: continue
|
||||
val cores = if (cpus.size > 1) "cores ${cpus.first()}-${cpus.last()}" else "core ${cpus.firstOrNull() ?: p.name.removePrefix("policy")}"
|
||||
add("Cluster ${p.name.removePrefix("policy")}", "${cpus.size.coerceAtLeast(1)} × $cores · " +
|
||||
(if (min != null) ghz(min) + "–" else "") + ghz(max))
|
||||
}
|
||||
add("ABI", Build.SUPPORTED_ABIS.joinToString(", "))
|
||||
})
|
||||
|
||||
private fun ghz(khz: Long) = String.format(Locale.US, "%.2f GHz", khz / 1e6)
|
||||
|
||||
/** The GPU's slowest and fastest step: KGSL's list, else a devfreq GPU node (Mali and others). */
|
||||
private fun gpuRange(): String? {
|
||||
fun mhz(hz: Long) = "${hz / 1_000_000} MHz"
|
||||
val kgsl = read("/sys/class/kgsl/kgsl-3d0/gpu_available_frequencies")
|
||||
?.split(Regex("\\s+"))?.mapNotNull { it.toLongOrNull() }?.filter { it > 0 }.orEmpty()
|
||||
if (kgsl.isNotEmpty()) return "${mhz(kgsl.min())}–${mhz(kgsl.max())} (${kgsl.size} steps)"
|
||||
read("/sys/class/kgsl/kgsl-3d0/max_gpuclk")?.toLongOrNull()?.let { return "up to ${mhz(it)}" }
|
||||
val node = File("/sys/class/devfreq").listFiles()?.firstOrNull { f ->
|
||||
val n = f.name.lowercase()
|
||||
(n.contains("gpu") || n.contains("mali") || n.contains("kgsl-3d")) && listOf("bus", "bw", "memlat").none { n.contains(it) }
|
||||
} ?: return null
|
||||
val steps = read("${node.path}/available_frequencies")?.split(Regex("\\s+"))?.mapNotNull { it.toLongOrNull() }?.filter { it > 0 }.orEmpty()
|
||||
if (steps.isNotEmpty()) return "${mhz(steps.min())}–${mhz(steps.max())} (${steps.size} steps)"
|
||||
val min = read("${node.path}/min_freq")?.toLongOrNull()
|
||||
val max = read("${node.path}/max_freq")?.toLongOrNull() ?: return null
|
||||
return (if (min != null) "${mhz(min)}–" else "up to ") + mhz(max)
|
||||
}
|
||||
|
||||
private fun memory(context: Context) = Section("Memory", buildList<Pair<String, String>> {
|
||||
val am = context.getSystemService(ActivityManager::class.java) ?: return@buildList
|
||||
val mi = ActivityManager.MemoryInfo().also(am::getMemoryInfo)
|
||||
add("Total", FileUtils.sizeToString(mi.totalMem))
|
||||
add("Available now", FileUtils.sizeToString(mi.availMem))
|
||||
})
|
||||
|
||||
private fun system() = Section("System", buildList<Pair<String, String>> {
|
||||
add("Device", "${Build.MANUFACTURER} ${Build.MODEL}")
|
||||
add("Android", "${Build.VERSION.RELEASE} (API ${Build.VERSION.SDK_INT})")
|
||||
add("Security patch", Build.VERSION.SECURITY_PATCH)
|
||||
add("Kernel", System.getProperty("os.version"))
|
||||
add("Build", Build.DISPLAY)
|
||||
})
|
||||
|
||||
private fun vulkan(context: Context, vk: Map<String, String>) = Section("Vulkan (the phone's own driver)", buildList<Pair<String, String>> {
|
||||
vk["error"]?.let { add("Error", it) }
|
||||
add("Device", vk["device"])
|
||||
add("Type", vk["type"])
|
||||
add("API version", vk["api"])
|
||||
add("Loader version", vk["loader"])
|
||||
add("Driver", listOfNotNull(vk["driver_name"], vk["driver_version"]).joinToString(" "))
|
||||
// Qualcomm's build string starts with its own label ("Driver Build: 43c70540de, ...").
|
||||
add("Driver build", vk["driver_info"]?.replace(Regex("(?i)^driver build:\\s*"), ""))
|
||||
add("Conformance", vk["conformance"])
|
||||
add("Vendor / device id", listOfNotNull(vk["vendor_id"], vk["device_id"]).joinToString(" / "))
|
||||
add("Max texture size", vk["max_image_2d"])
|
||||
add("GPU memory heap", vk["device_heap_mb"]?.let { "$it MB" })
|
||||
add("Extensions", vk["extension_count"])
|
||||
val features = listOf("geometry_shader" to "Geometry shaders", "tessellation_shader" to "Tessellation", "texture_bc" to "BC textures")
|
||||
for ((key, label) in features) add(label, vk[key])
|
||||
for ((key, value) in vk) if (key.startsWith("ext.")) add(key.removePrefix("ext."), value)
|
||||
// What Android certifies the phone for.
|
||||
val pm = context.packageManager
|
||||
val hw = pm.systemAvailableFeatures.associate { it.name to it.version }
|
||||
hw[PackageManager.FEATURE_VULKAN_HARDWARE_VERSION]?.let {
|
||||
add("Android-certified version", "${it shr 22}.${(it shr 12) and 0x3ff}.${it and 0xfff}")
|
||||
}
|
||||
hw[PackageManager.FEATURE_VULKAN_HARDWARE_LEVEL]?.let { add("Android hardware level", it.toString()) }
|
||||
})
|
||||
|
||||
private fun drivers(context: Context, gpu: GpuInfo) = Section("Drivers DroidDeck uses", buildList<Pair<String, String>> {
|
||||
add("Driver mode", SessionPrefs.gpuDriverMode(context))
|
||||
val turnip = TurnipDriver(context)
|
||||
val choice = SessionPrefs.androidDriver(context).ifEmpty { turnip.autoId() }
|
||||
add("Display driver", "${turnip.displayName(choice)} ${turnip.driverVersion(choice)}".trim())
|
||||
val linux = LinuxVulkanDriverManager(context)
|
||||
val id = SessionPrefs.linuxDriver(context)
|
||||
add("Game driver", if (id.isEmpty()) "the runtime's own Turnip" else "${linux.getDriverName(id)} ${linux.getDriverVersion(id)}".trim())
|
||||
if (gpu.oneUi8Gen2) add("Note", "One UI on an 8 Gen 2: needs the OneUI Turnip build")
|
||||
})
|
||||
}
|
||||
@@ -16,10 +16,14 @@ data class GpuInfo(
|
||||
/** The three-digit Adreno model (740, 825), or 0 when KGSL does not say. */
|
||||
val model: Int,
|
||||
val family: Family,
|
||||
/** The SoC as the device reports it ("SM8550", "QCS8550"), or "" when it does not. */
|
||||
/** The SoC as a person would say it ("Snapdragon 8 Gen 2 (QCS8550)"), or "" when the phone does not say. */
|
||||
val soc: String,
|
||||
/** Samsung's One UI on an 8 Gen 2: its Turnip needs the OneUI build, or frames tear and flicker. */
|
||||
val oneUi8Gen2: Boolean,
|
||||
/** KGSL's own name for the GPU, as the kernel spells it ("Adreno740v2", "Adreno33v2"). */
|
||||
val kgslName: String = "",
|
||||
/** Where [model] came from: "kernel", "vulkan" or "platform", "" when unknown. */
|
||||
val modelSource: String = "",
|
||||
) {
|
||||
enum class Family(val label: String) {
|
||||
A8XX("Adreno 8xx"),
|
||||
@@ -56,17 +60,49 @@ data class GpuInfo(
|
||||
val adreno = File("/sys/class/kgsl/kgsl-3d0").exists() || File("/vendor/lib64/hw/vulkan.adreno.so").exists()
|
||||
val raw = listOf("/sys/class/kgsl/kgsl-3d0/gpu_model", "/sys/class/kgsl/kgsl-3d0/gpu_chipid")
|
||||
.firstNotNullOfOrNull { FileUtils.readString(File(it))?.trim()?.takeIf(String::isNotEmpty) }
|
||||
val soc = if (Build.VERSION.SDK_INT >= 31) Build.SOC_MODEL.takeIf { it.isNotBlank() && it != Build.UNKNOWN }.orEmpty() else ""
|
||||
val model = raw?.let { Regex("""(\d{3})""").find(it)?.groupValues?.get(1)?.toIntOrNull() } ?: 0
|
||||
// Where vendors put the chip's model, named when it is known: "Snapdragon 8 Gen 2 (QCS8550)".
|
||||
val soc = if (adreno) SocNames.label() else ""
|
||||
val fromKernel = raw?.let { threeDigits(it) } ?: 0
|
||||
// Some kernels name the GPU without its model (AYANEO's Pocket FIT: "Adreno33v2"). The
|
||||
// Vulkan driver's own name, when this process has asked it, then the platform's code
|
||||
// name stand in - the GPU is the same on every phone of a platform.
|
||||
val fromVulkan = if (fromKernel > 0 || !adreno) 0 else VulkanInfo.cachedOrNull()?.get("device")?.let { threeDigits(it) } ?: 0
|
||||
val fromPlatform = if (fromKernel > 0 || fromVulkan > 0 || !adreno) 0 else platformModel()
|
||||
val model = maxOf(fromKernel, fromVulkan, fromPlatform)
|
||||
val source = when {
|
||||
fromKernel > 0 -> "kernel"
|
||||
fromVulkan > 0 -> "vulkan"
|
||||
fromPlatform > 0 -> "platform"
|
||||
else -> ""
|
||||
}
|
||||
val family = familyOf(adreno, model)
|
||||
val samsung = Build.MANUFACTURER.equals("samsung", ignoreCase = true)
|
||||
return GpuInfo(
|
||||
name = if (!adreno) Build.HARDWARE.ifBlank { "this GPU" } else if (model > 0) "Adreno $model" else "Adreno",
|
||||
model = model, family = family, soc = soc,
|
||||
oneUi8Gen2 = samsung && model == 740,
|
||||
kgslName = raw.orEmpty(), modelSource = source,
|
||||
)
|
||||
}
|
||||
|
||||
private fun threeDigits(text: String): Int = Regex("""(\d{3})""").find(text)?.groupValues?.get(1)?.toIntOrNull() ?: 0
|
||||
|
||||
/** Qualcomm platform code names whose GPU is known for certain. */
|
||||
private val PLATFORMS = mapOf(
|
||||
"msmnile" to 640, "kona" to 650, "lahaina" to 660, "taro" to 730, "cape" to 730,
|
||||
"kalama" to 740, "pineapple" to 750, "sun" to 830,
|
||||
)
|
||||
|
||||
internal fun platformModel(platform: String = systemProperty("ro.board.platform")): Int =
|
||||
PLATFORMS[platform.lowercase()] ?: PLATFORMS[systemProperty("ro.vendor.qti.soc_name").lowercase()] ?: 0
|
||||
|
||||
/** android.os.SystemProperties.get, which apps may read but not call directly. */
|
||||
fun systemProperty(name: String): String = try {
|
||||
Class.forName("android.os.SystemProperties").getMethod("get", String::class.java).invoke(null, name) as? String ?: ""
|
||||
} catch (_: Exception) {
|
||||
""
|
||||
}
|
||||
|
||||
internal fun familyOf(adreno: Boolean, model: Int): Family = when {
|
||||
!adreno -> Family.NOT_ADRENO
|
||||
model == 0 -> Family.ADRENO_UNKNOWN
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.os.Build
|
||||
|
||||
/**
|
||||
* Which chip this is, as a person would say it. Handhelds often leave Android's SoC model blank
|
||||
* (the AYANEO Pocket FIT does), so the model is looked for where vendors put it, the same order
|
||||
* ClusterTune uses; then it is named from a table of models we are sure of, or from the platform
|
||||
* code name as a family ("Snapdragon 8 Gen 3 family") when the model itself is a vendor variant.
|
||||
*/
|
||||
object SocNames {
|
||||
/** Model codes whose product name is certain. */
|
||||
private val MODELS = mapOf(
|
||||
"SM8150" to "Snapdragon 855", "SM8250" to "Snapdragon 865", "SM8250-AC" to "Snapdragon 870",
|
||||
"SM8350" to "Snapdragon 888", "SM8450" to "Snapdragon 8 Gen 1", "SM8475" to "Snapdragon 8+ Gen 1",
|
||||
"SM8550" to "Snapdragon 8 Gen 2", "QCS8550" to "Snapdragon 8 Gen 2", "SM8650" to "Snapdragon 8 Gen 3",
|
||||
"SM8750" to "Snapdragon 8 Elite", "SM8850" to "Snapdragon 8 Elite Gen 5",
|
||||
"SM7325" to "Snapdragon 778G", "SM7450" to "Snapdragon 7 Gen 1", "SM7550" to "Snapdragon 7 Gen 3",
|
||||
"SM6375" to "Snapdragon 695",
|
||||
)
|
||||
|
||||
/** Platform code names: every chip of one platform shares its CPU and GPU design. */
|
||||
private val PLATFORMS = mapOf(
|
||||
"msmnile" to "Snapdragon 855/860", "kona" to "Snapdragon 865/870", "lahaina" to "Snapdragon 888",
|
||||
"taro" to "Snapdragon 8 Gen 1", "cape" to "Snapdragon 8+ Gen 1", "kalama" to "Snapdragon 8 Gen 2",
|
||||
"pineapple" to "Snapdragon 8 Gen 3", "sun" to "Snapdragon 8 Elite",
|
||||
)
|
||||
|
||||
/** The chip's model code ("QCS8550", "SG8350P"), or "" when the phone does not say. */
|
||||
fun model(prop: (String) -> String = GpuInfo::systemProperty): String {
|
||||
val sdk = if (Build.VERSION.SDK_INT >= 31) Build.SOC_MODEL.takeIf { it != Build.UNKNOWN }.orEmpty() else ""
|
||||
return listOf(prop("ro.soc.model"), prop("ro.vendor.qti.soc_model"), sdk, prop("ro.fota.platform"))
|
||||
.map { it.trim() }
|
||||
// ro.fota.platform is often a branch name ("MSM_13.0"), not a chip.
|
||||
.firstOrNull { it.isNotEmpty() && !Regex("(?i)^msm_\\d").containsMatchIn(it) }.orEmpty()
|
||||
}
|
||||
|
||||
/** "Snapdragon 8 Gen 2", "Snapdragon 8 Gen 3 family", or null when neither the model nor the platform is known. */
|
||||
fun name(model: String, platform: String = GpuInfo.systemProperty("ro.board.platform")): String? =
|
||||
MODELS[model.uppercase()] ?: PLATFORMS[platform.lowercase()]?.let { "$it family" }
|
||||
|
||||
/** For the GPU card: "Snapdragon 8 Gen 2 (QCS8550)", the bare model, or "". */
|
||||
fun label(model: String = model(), platform: String = GpuInfo.systemProperty("ro.board.platform")): String {
|
||||
val name = name(model, platform)
|
||||
return when {
|
||||
name != null && model.isNotEmpty() -> "$name ($model)"
|
||||
name != null -> name
|
||||
else -> model
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import android.util.Log
|
||||
|
||||
/**
|
||||
* The phone's own Vulkan driver, as it describes itself (native/deviceinfo): device name, API and
|
||||
* driver versions, a few limits and the extensions DXVK/VKD3D lean on. Asked once per process and
|
||||
* kept; the first [query] creates a Vulkan instance, so it belongs off the main thread.
|
||||
*/
|
||||
object VulkanInfo {
|
||||
@Volatile private var cached: Map<String, String>? = null
|
||||
|
||||
@JvmStatic private external fun nativeQuery(): String
|
||||
|
||||
/** Blocking on first use. Empty-ish map with an "error" key when Vulkan cannot be asked. */
|
||||
@Synchronized
|
||||
fun query(): Map<String, String> {
|
||||
cached?.let { return it }
|
||||
val text = try {
|
||||
System.loadLibrary("deviceinfo")
|
||||
nativeQuery()
|
||||
} catch (t: Throwable) {
|
||||
Log.w("VulkanInfo", "query failed", t)
|
||||
"error=" + (t.message ?: t.javaClass.simpleName)
|
||||
}
|
||||
val map = text.lineSequence().mapNotNull { line ->
|
||||
val eq = line.indexOf('=')
|
||||
if (eq <= 0) null else line.substring(0, eq) to line.substring(eq + 1)
|
||||
}.toMap(LinkedHashMap())
|
||||
cached = map
|
||||
return map
|
||||
}
|
||||
|
||||
/** What [query] found, if it has run in this process; never blocks. */
|
||||
fun cachedOrNull(): Map<String, String>? = cached
|
||||
}
|
||||
@@ -300,7 +300,10 @@ object BwrapSpawner {
|
||||
// session has Xwayland) it stays on X11, which works. GTK and Qt go by their own settings.
|
||||
if (env.containsKey("DISPLAY")) env["XDG_SESSION_TYPE"] = "x11"
|
||||
for (name in listOf("MOZ_DISABLE_CONTENT_SANDBOX", "MOZ_DISABLE_GMP_SANDBOX", "MOZ_DISABLE_RDD_SANDBOX",
|
||||
"MOZ_DISABLE_SOCKET_PROCESS_SANDBOX", "MOZ_DISABLE_UTILITY_SANDBOX")) {
|
||||
"MOZ_DISABLE_SOCKET_PROCESS_SANDBOX", "MOZ_DISABLE_UTILITY_SANDBOX",
|
||||
// Android 16 refuses the size seal Firefox puts on a tab's shared
|
||||
// memory, and the tab then dies on every page (droiddeck-desktop).
|
||||
"MOZ_SHM_NO_SEALS")) {
|
||||
env.putIfAbsent(name, "1")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlin.math.abs
|
||||
* The client reads `/sys/class/power_supply/BAT<n>/...` - a laptop's or a Deck's naming and files
|
||||
* (`energy_now`, `power_now`, `time_to_empty_now`, a `uevent` of `POWER_SUPPLY_*` lines). Android
|
||||
* names its supply `battery` and lays it out differently, and on many phones an app may not read
|
||||
* it at all, so the client showed no battery. This writes a `BAT0` (and a `BAT1`, the Deck's name)
|
||||
* it at all, so the client showed no battery. This writes one `BAT1` (the Deck's name)
|
||||
* from Android's own battery API - the same on every device - into a directory the session binds
|
||||
* over `/sys/class/power_supply`, refreshed every few seconds while the session runs.
|
||||
*
|
||||
@@ -31,6 +31,8 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart
|
||||
private var thread: Thread? = null
|
||||
|
||||
override fun start() {
|
||||
// Older builds exported the same aggregate battery twice; MangoHud counts both supplies.
|
||||
File(dir, "BAT0").deleteRecursively()
|
||||
running = true
|
||||
write()
|
||||
thread = Thread({
|
||||
@@ -39,7 +41,7 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart
|
||||
if (running) write()
|
||||
}
|
||||
}, "battery-sysfs").apply { isDaemon = true; start() }
|
||||
Log.i(TAG, "battery: BAT0/BAT1 written to ${dir.path} every ${PERIOD_MS / 1000} s")
|
||||
Log.i(TAG, "battery: BAT1 written to ${dir.path} every ${PERIOD_MS / 1000} s")
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
@@ -87,7 +89,7 @@ class BatteryComponent(val dir: File, private val vpowerDir: File) : SessionPart
|
||||
pct <= 15 -> "Low"
|
||||
else -> "Normal"
|
||||
}
|
||||
for (name in listOf("BAT0", "BAT1")) {
|
||||
for (name in listOf("BAT1")) {
|
||||
val bat = File(dir, name).apply { mkdirs() }
|
||||
val attrs = linkedMapOf(
|
||||
"type" to "Battery",
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import com.github.luben.zstd.ZstdInputStream
|
||||
import com.github.luben.zstd.ZstdOutputStream
|
||||
@@ -660,6 +661,107 @@ object ComponentsManager {
|
||||
return Catalog(items, o.optLong("fetchedAt"))
|
||||
}
|
||||
|
||||
/**
|
||||
* A package Proton does not ship, required on the GPUs listed here. An empty [models] set
|
||||
* means every model in [families]. A row the user already chose in Components is left alone;
|
||||
* a Steam update that puts the Proton's own files back is replaced on the next session.
|
||||
*/
|
||||
internal data class ForcedPackage(
|
||||
val families: Set<GpuInfo.Family>,
|
||||
val comp: String,
|
||||
val file: String,
|
||||
val release: String,
|
||||
val models: Set<Int> = emptySet(),
|
||||
) {
|
||||
fun matches(gpu: GpuInfo) = gpu.family in families && (models.isEmpty() || gpu.model in models)
|
||||
}
|
||||
|
||||
internal val FORCED_PACKAGES = listOf(
|
||||
// DXVK 3 refuses to start unless the device exposes storageBuffer8BitAccess. Turnip on
|
||||
// Adreno 6xx does not. 2.7.1 is the last DXVK 2 package on the Dxvk-Linux tag.
|
||||
ForcedPackage(setOf(GpuInfo.Family.A6XX), "dxvk", "dxvk-2.7.1-linux.wcp", "Dxvk-Linux"),
|
||||
)
|
||||
|
||||
/**
|
||||
* True when this Proton should receive the forced package. No active swap means the Proton's
|
||||
* own copy. A record for a different Proton build means a Steam update put that copy back,
|
||||
* whichever package was recorded. A record for this build is a Components choice and stays.
|
||||
*/
|
||||
internal fun forcedPackageWanted(activeFile: String?, protonVersionMatches: Boolean): Boolean =
|
||||
activeFile.isNullOrEmpty() || !protonVersionMatches
|
||||
|
||||
/** The catalog row for this file and release, or null. */
|
||||
internal fun catalogMatch(items: List<CatalogItem>, file: String, release: String): CatalogItem? =
|
||||
items.firstOrNull { it.file == file && it.release == release }
|
||||
|
||||
/**
|
||||
* Install every [FORCED_PACKAGES] row this GPU matches into each Proton that
|
||||
* [forcedPackageWanted] selects. Returns a line for the log, or null when this GPU or these
|
||||
* Protons need nothing. A failed fetch throws and the session logs it without stopping.
|
||||
*/
|
||||
fun ensureForcedPackages(context: Context): String? = ensureForcedPackages(
|
||||
context, GpuInfo.detect(),
|
||||
{ file, release -> catalogItem(context, file, release) },
|
||||
{ download(context, it) {} },
|
||||
{ id, file -> swap(context, id, file) },
|
||||
)
|
||||
|
||||
internal fun ensureForcedPackages(
|
||||
context: Context,
|
||||
gpu: GpuInfo,
|
||||
lookup: (file: String, release: String) -> CatalogItem?,
|
||||
fetch: (CatalogItem) -> Unit,
|
||||
apply: (protonId: String, file: String) -> String,
|
||||
): String? {
|
||||
val rules = FORCED_PACKAGES.filter { it.matches(gpu) }
|
||||
if (rules.isEmpty()) return null
|
||||
val installed = protons(context)
|
||||
val lines = mutableListOf<String>()
|
||||
for (rule in rules) {
|
||||
val state = loadState(context)
|
||||
val targets = installed.filter { p ->
|
||||
val active = state.optJSONObject("active")?.optJSONObject(p.id)?.optJSONObject(rule.comp)
|
||||
forcedPackageWanted(active?.optString("file"), active?.optString("protonVersion") == p.version)
|
||||
}
|
||||
if (targets.isEmpty()) continue
|
||||
val missing = missingPackage(context, rule, lookup, fetch)
|
||||
if (missing != null) {
|
||||
lines.add(missing)
|
||||
continue
|
||||
}
|
||||
lines.add(targets.joinToString("; ") { apply(it.id, rule.file) })
|
||||
}
|
||||
return lines.joinToString("; ").ifEmpty { null }
|
||||
}
|
||||
|
||||
/** Null when [rule]'s package is stored and readable. Otherwise the log line, after a fetch. */
|
||||
private fun missingPackage(
|
||||
context: Context,
|
||||
rule: ForcedPackage,
|
||||
lookup: (file: String, release: String) -> CatalogItem?,
|
||||
fetch: (CatalogItem) -> Unit,
|
||||
): String? {
|
||||
val wcp = File(packagesDir(context), safeName(rule.file))
|
||||
if (wcp.isFile && runCatching { packageInfo(wcp) }.isSuccess) return null
|
||||
wcp.delete()
|
||||
val item = lookup(rule.file, rule.release)
|
||||
?: return "${rule.file} is not in the Nightlies listing; ${LABEL.getValue(rule.comp)} stays on the Proton's copy"
|
||||
fetch(item)
|
||||
return null
|
||||
}
|
||||
|
||||
/** The cached Nightlies row for this file, fetching the listing when the cache does not have it. */
|
||||
internal fun catalogItem(context: Context, file: String, release: String): CatalogItem? =
|
||||
resolveCatalogItem(file, release, { catalog(context, false).items }, { catalog(context, true).items })
|
||||
|
||||
/** [cached] when it has the row, otherwise [refresh]. [refresh] is not called on a hit. */
|
||||
internal fun resolveCatalogItem(
|
||||
file: String,
|
||||
release: String,
|
||||
cached: () -> List<CatalogItem>,
|
||||
refresh: () -> List<CatalogItem>,
|
||||
): CatalogItem? = catalogMatch(cached(), file, release) ?: catalogMatch(refresh(), file, release)
|
||||
|
||||
/** Downloads a catalog item into storage, verifying the release's sha256 and the package type. */
|
||||
fun download(context: Context, item: CatalogItem, progress: (Int) -> Unit): Package {
|
||||
require(item.url.startsWith("https://github.com/$NIGHTLIES/releases/download/")) { "Downloads come only from the Nightlies releases" }
|
||||
|
||||
@@ -59,7 +59,7 @@ object GameEnvironmentStore {
|
||||
|
||||
@Synchronized
|
||||
fun publish(context: Context, config: GameEnvironment.Config = read(context)) {
|
||||
val resolved = config.copy(shared = GameEnvironment.defaults(SessionPrefs.fexPreset(context)) + config.shared)
|
||||
val resolved = config.copy(shared = GameEnvironment.defaults(SessionPrefs.fexPreset(context), SessionPrefs.forceSsbs(context)) + config.shared)
|
||||
val json = encode(resolved)
|
||||
// The Display page's texture filtering, as DXVK options the launcher appends to
|
||||
// DXVK_CONFIG after the profiles - a user's own DXVK_CONFIG entry keeps its options.
|
||||
|
||||
@@ -28,14 +28,17 @@ object SessionFiles {
|
||||
*/
|
||||
fun stage(context: Context, root: File) {
|
||||
GameEnvironmentStore.publish(context)
|
||||
WinComponents.publish(context)
|
||||
val files = arrayOf(
|
||||
"usr/local/bin/droiddeck-game-env" to "usr/local/bin/droiddeck-game-env",
|
||||
"usr/local/bin/droiddeck-wincomponents" to "usr/local/bin/droiddeck-wincomponents",
|
||||
"usr/local/bin/droiddeck-esync" to "usr/local/bin/droiddeck-esync",
|
||||
"usr/local/bin/droiddeck-steam-compat" to "usr/local/bin/droiddeck-steam-compat",
|
||||
"usr/local/bin/droiddeck-fex" to "usr/local/bin/droiddeck-fex",
|
||||
"libblsession.so" to "usr/local/lib/libblsession.so",
|
||||
"libfakeinput.so" to "usr/local/lib/libfakeinput.so",
|
||||
"libblfastpath.so" to "usr/local/lib/libblfastpath.so",
|
||||
"libssbs.so" to "usr/local/lib/libssbs.so",
|
||||
"usr/local/bin/droiddeck-session" to "usr/local/bin/droiddeck-session",
|
||||
"usr/local/bin/steam-compatibility" to "usr/local/bin/steam-compatibility",
|
||||
"usr/local/bin/droiddeck-clipboard" to "usr/local/bin/droiddeck-clipboard",
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.json.JSONObject
|
||||
/** The in-session switches: the HUD and how the on-screen controls decide to appear. */
|
||||
object SessionPrefs {
|
||||
const val SUSPEND_AUTO = "auto"
|
||||
const val SUSPEND_NATIVE = "native"
|
||||
const val SUSPEND_MANUAL = "manual"
|
||||
const val SUSPEND_NEVER = "never"
|
||||
|
||||
@@ -168,9 +169,12 @@ object SessionPrefs {
|
||||
* Steam only: gamescope makes every game window the size of the screen. A game that resizes
|
||||
* its own window when it loses focus (FlatOut) otherwise comes back smaller, drawn in a
|
||||
* corner; a game that sets its own resolution and never looks at its window again (Quake 3)
|
||||
* instead draws small in the bottom-left of the stretched one. On unless turned off.
|
||||
* instead draws small in the bottom-left of the stretched one. A game whose resolution differs
|
||||
* from the screen's (DiRT 3 at 1280x720) fights it: it rebuilds its swapchain on every forced
|
||||
* resize and the picture flickers between its own size and the screen's, often from the first
|
||||
* menu, before the player can reach its resolution setting. Off unless turned on.
|
||||
*/
|
||||
fun forceFullscreen(context: Context): Boolean = prefs(context).getBoolean("forceFullscreen", true)
|
||||
fun forceFullscreen(context: Context): Boolean = prefs(context).getBoolean("forceFullscreen", false)
|
||||
|
||||
fun setForceFullscreen(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("forceFullscreen", on).apply()
|
||||
@@ -539,6 +543,22 @@ object SessionPrefs {
|
||||
|
||||
private const val DEFAULT_FEX_PRESET = "PERFORMANCE_TSO"
|
||||
|
||||
/**
|
||||
* Force SSBS for Proton games: Wine resumes threads from a Windows CONTEXT that never carries
|
||||
* PSTATE.SSBS, so they run with speculative store bypass disabled; libssbs.so keeps it set
|
||||
* (on DiRT 3 / GE-Proton: from ~99% of a game's threads running without it to none). The
|
||||
* speed-up is reported on Oryon cores (Snapdragon 8 Elite) and was not measurable on an
|
||||
* 8 Gen 3, so it is off unless turned on. A game's own environment can still say
|
||||
* DROIDDECK_FORCE_SSBS=0.
|
||||
*/
|
||||
fun forceSsbs(context: Context): Boolean = prefs(context).getBoolean("forceSsbs", false)
|
||||
|
||||
fun setForceSsbs(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("forceSsbs", on).apply()
|
||||
runCatching { GameEnvironmentStore.publish(context) }
|
||||
.onFailure { android.util.Log.e("GameEnvironment", "Could not update game environment", it) }
|
||||
}
|
||||
|
||||
fun setFexPreset(context: Context, id: String) {
|
||||
prefs(context).edit().putString("fexPreset", id).apply()
|
||||
runCatching { GameEnvironmentStore.publish(context) }
|
||||
@@ -757,11 +777,14 @@ object SessionPrefs {
|
||||
|
||||
fun suspendPolicy(context: Context, mode: String): String =
|
||||
prefs(context).getString("suspendPolicy.${prefMode(mode)}", SUSPEND_MANUAL)
|
||||
?.takeIf { it == SUSPEND_AUTO || it == SUSPEND_MANUAL || it == SUSPEND_NEVER }
|
||||
?.takeIf { it in setOf(SUSPEND_AUTO, SUSPEND_NATIVE, SUSPEND_MANUAL, SUSPEND_NEVER) }
|
||||
// Direct games share Steam's settings but have no Steam client to prepare.
|
||||
?.let { if (it == SUSPEND_NATIVE && mode != SessionService.MODE_STEAM) SUSPEND_AUTO else it }
|
||||
?: SUSPEND_MANUAL
|
||||
|
||||
fun setSuspendPolicy(context: Context, mode: String, policy: String) {
|
||||
val normalized = policy.takeIf { it == SUSPEND_AUTO || it == SUSPEND_MANUAL || it == SUSPEND_NEVER }
|
||||
val normalized = policy.takeIf { it in setOf(SUSPEND_AUTO, SUSPEND_MANUAL, SUSPEND_NEVER) ||
|
||||
(it == SUSPEND_NATIVE && mode == SessionService.MODE_STEAM) }
|
||||
?: SUSPEND_MANUAL
|
||||
prefs(context).edit().putString("suspendPolicy.${prefMode(mode)}", normalized).apply()
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import java.util.UUID
|
||||
|
||||
/**
|
||||
* Owns the running session: the proot tree, the audio daemon, the network link and the locks that
|
||||
@@ -77,6 +78,10 @@ class SessionService : Service() {
|
||||
private var manualPauseRequested = false
|
||||
/** An explicit Steam sleep request is independent of the background policy. */
|
||||
private var steamSleepToken: String? = null
|
||||
private var nativeSleepToken: String? = null
|
||||
private var nativeSleepReady = false
|
||||
private var nativeSleepFallback = false
|
||||
private var nativeSleepTimeout: Runnable? = null
|
||||
private var suspendOperationPending = false
|
||||
private var pipTask = false
|
||||
private var suspendAttemptFailed = false
|
||||
@@ -195,6 +200,7 @@ class SessionService : Service() {
|
||||
screenOn = (getSystemService(Context.POWER_SERVICE) as? PowerManager)?.isInteractive ?: true
|
||||
manualPauseRequested = false
|
||||
steamSleepToken = null
|
||||
completeNativeSleep()
|
||||
suspendOperationPending = false
|
||||
suspendAttemptFailed = false
|
||||
suspendController = null
|
||||
@@ -303,6 +309,14 @@ class SessionService : Service() {
|
||||
// The desktop's Steam launchers start the client there (droiddeck-steam-launch), through the
|
||||
// same set-up as a Steam session: it gets what the client and its games are started with.
|
||||
val steamHere = SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP
|
||||
// Some GPUs need a component Proton does not ship. Apply those before the guest, so the
|
||||
// next game launch copies them into the prefix. A download failure is logged and the
|
||||
// session still starts; the next session tries again.
|
||||
if (steamHere) {
|
||||
runCatching { ComponentsManager.ensureForcedPackages(this) }
|
||||
.onSuccess { if (it != null) Log.i(TAG, it) }
|
||||
.onFailure { Log.w(TAG, "forced components", it) }
|
||||
}
|
||||
addClientEnvironment(guest, steamHere)
|
||||
// Where the fast path's description of proot's view goes, once the binds are known.
|
||||
val fastPathAt = guest.size
|
||||
@@ -992,6 +1006,8 @@ class SessionService : Service() {
|
||||
activityVisible = true
|
||||
screenOn = (getSystemService(Context.POWER_SERVICE) as? PowerManager)?.isInteractive ?: screenOn
|
||||
manualPauseRequested = false
|
||||
if (steamSleepToken == null && (nativeSleepToken == null || nativeSleepFallback)) requestSteamWake()
|
||||
completeNativeSleep()
|
||||
completeSteamSleep()
|
||||
suspendAttemptFailed = false
|
||||
updateSuspendPolicy()
|
||||
@@ -1070,11 +1086,28 @@ class SessionService : Service() {
|
||||
|
||||
private fun watchLaunchRequests(dir: File) {
|
||||
launchWatcher?.stopWatching()
|
||||
listOf("steam-sleep", "steam-sleep-state", "steam-sleep-ready").forEach { File(dir, it).delete() }
|
||||
listOf("steam-sleep", "steam-sleep-state", "steam-sleep-ready", "steam-wake", "steam-wake.tmp",
|
||||
"steam-native-sleep", "steam-native-sleep.tmp", "steam-native-ready", "steam-native-ready.tmp"
|
||||
).forEach { File(dir, it).delete() }
|
||||
val gen = sessionGen
|
||||
@Suppress("DEPRECATION")
|
||||
val watcher = object : android.os.FileObserver(dir.path, CLOSE_WRITE or MOVED_TO) {
|
||||
override fun onEvent(event: Int, path: String?) {
|
||||
if (path == "steam-native-ready") {
|
||||
val request = File(dir, path)
|
||||
val token = runCatching { request.readText().trim() }.getOrNull() ?: return
|
||||
request.delete()
|
||||
mainHandler.post {
|
||||
if (gen != sessionGen || !SessionState.running || token != nativeSleepToken) return@post
|
||||
nativeSleepReady = true
|
||||
nativeSleepTimeout?.let { mainHandler.removeCallbacks(it) }
|
||||
nativeSleepTimeout = null
|
||||
writeSteamSleepState(token, "paused")
|
||||
SessionEvents.record("steam.native_sleep_prepared")
|
||||
updateSuspendPolicy()
|
||||
}
|
||||
return
|
||||
}
|
||||
if (path == "steam-sleep") {
|
||||
val request = File(dir, path)
|
||||
val token = runCatching { request.readText().trim() }.getOrNull() ?: return
|
||||
@@ -1142,18 +1175,27 @@ class SessionService : Service() {
|
||||
if (suspendPolicy == SessionPrefs.SUSPEND_MANUAL && (!activityVisible || !screenOn)) {
|
||||
manualPauseRequested = true
|
||||
}
|
||||
val controller = suspendController ?: return
|
||||
val hidden = !activityVisible || !screenOn
|
||||
if (suspendPolicy != SessionPrefs.SUSPEND_NATIVE || !hidden) {
|
||||
completeNativeSleep()
|
||||
} else if (nativeSleepToken == null && steamSleepToken == null &&
|
||||
!SessionState.suspended && !suspendAttemptFailed) {
|
||||
prepareNativeSleep()
|
||||
}
|
||||
val shouldSuspend = steamSleepToken != null || when (suspendPolicy) {
|
||||
SessionPrefs.SUSPEND_AUTO -> !activityVisible || !screenOn
|
||||
SessionPrefs.SUSPEND_NATIVE -> hidden && nativeSleepReady
|
||||
SessionPrefs.SUSPEND_MANUAL -> manualPauseRequested
|
||||
else -> false
|
||||
}
|
||||
val controller = suspendController ?: return
|
||||
if (suspendOperationPending || suspendAttemptFailed || shouldSuspend == SessionState.suspended) return
|
||||
val gen = sessionGen
|
||||
suspendOperationPending = true
|
||||
SessionEvents.record(if (shouldSuspend) "session.suspend_requested" else "session.resume_requested", mapOf(
|
||||
"policy" to suspendPolicy, "activityVisible" to activityVisible,
|
||||
"screenOn" to screenOn, "steamSleep" to (steamSleepToken != null),
|
||||
"nativeSleep" to (nativeSleepToken != null),
|
||||
))
|
||||
if (shouldSuspend) {
|
||||
controller.freeze { success ->
|
||||
@@ -1166,6 +1208,7 @@ class SessionService : Service() {
|
||||
releaseLocks()
|
||||
refreshNotification()
|
||||
} else {
|
||||
completeNativeSleep()
|
||||
completeSteamSleep()
|
||||
suspendAttemptFailed = true
|
||||
Log.w(TAG, "could not confirm that the session stopped")
|
||||
@@ -1211,7 +1254,63 @@ class SessionService : Service() {
|
||||
}
|
||||
|
||||
private fun resumeSteamSleepOnReturn() {
|
||||
if (suspendPolicy == SessionPrefs.SUSPEND_AUTO && activityVisible && screenOn) completeSteamSleep()
|
||||
if (suspendPolicy in setOf(SessionPrefs.SUSPEND_AUTO, SessionPrefs.SUSPEND_NATIVE) && activityVisible && screenOn) {
|
||||
if (steamSleepToken == null && (nativeSleepToken == null || nativeSleepFallback)) requestSteamWake()
|
||||
completeNativeSleep()
|
||||
completeSteamSleep()
|
||||
}
|
||||
}
|
||||
|
||||
/** Let Steam prepare before freezing; retain the wake lock until that freeze completes. */
|
||||
private fun prepareNativeSleep() {
|
||||
val token = UUID.randomUUID().toString().replace("-", "")
|
||||
nativeSleepToken = token
|
||||
nativeSleepReady = false
|
||||
nativeSleepFallback = false
|
||||
val dir = LinuxRuntime.sessionRoot(this)
|
||||
runCatching {
|
||||
val staged = File(dir, "steam-native-sleep.tmp")
|
||||
staged.writeText("$token\n")
|
||||
check(staged.renameTo(File(dir, "steam-native-sleep")))
|
||||
}.onFailure { Log.w(TAG, "could not request Native sleep; using timed pause", it) }
|
||||
SessionEvents.record("steam.native_sleep_requested")
|
||||
val gen = sessionGen
|
||||
val timeout = Runnable {
|
||||
if (gen != sessionGen || !SessionState.running || nativeSleepToken != token) return@Runnable
|
||||
nativeSleepTimeout = null
|
||||
nativeSleepReady = true
|
||||
nativeSleepFallback = true
|
||||
writeSteamSleepState(token, "paused")
|
||||
SessionEvents.record("steam.native_sleep_timeout")
|
||||
updateSuspendPolicy()
|
||||
}
|
||||
nativeSleepTimeout = timeout
|
||||
// A missing or stalled guest helper must not keep the device awake indefinitely.
|
||||
mainHandler.postDelayed(timeout, 4000L)
|
||||
}
|
||||
|
||||
private fun completeNativeSleep() {
|
||||
nativeSleepTimeout?.let { mainHandler.removeCallbacks(it) }
|
||||
nativeSleepTimeout = null
|
||||
val token = nativeSleepToken ?: return
|
||||
writeSteamSleepState(token, "awake")
|
||||
val dir = LinuxRuntime.sessionRoot(this)
|
||||
File(dir, "steam-native-sleep").delete()
|
||||
File(dir, "steam-native-ready").delete()
|
||||
nativeSleepToken = null
|
||||
nativeSleepReady = false
|
||||
nativeSleepFallback = false
|
||||
}
|
||||
|
||||
/** Resume must also recover a Steam sleep whose request never reached Android. */
|
||||
private fun requestSteamWake() {
|
||||
if (!SessionState.running || SessionState.mode != MODE_STEAM) return
|
||||
val dir = LinuxRuntime.sessionRoot(this)
|
||||
runCatching {
|
||||
val staged = File(dir, "steam-wake.tmp")
|
||||
staged.writeText("wake\n")
|
||||
check(staged.renameTo(File(dir, "steam-wake")))
|
||||
}.onFailure { Log.w(TAG, "could not request Steam wake", it) }
|
||||
}
|
||||
|
||||
private fun finishSessionStop(status: Int, stoppedGen: Int) {
|
||||
@@ -1266,6 +1365,7 @@ class SessionService : Service() {
|
||||
|
||||
private fun stopSession(status: Int) {
|
||||
cancelQueuedSteamGame()
|
||||
completeNativeSleep()
|
||||
synchronized(stopLock) {
|
||||
if (!SessionState.running) return
|
||||
SessionState.running = false
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
/**
|
||||
* What to call a catalog component on screen. Bannerlator's catalog keys (vcredist2010_dll,
|
||||
* oalinst_dll, d3dcompiler_47...) have no display name, and some descriptions do not fit the entry,
|
||||
* so names come from here: families by pattern, the rest from a table, the key itself otherwise.
|
||||
* The "_dll" twin of an installer (the direct DLL copy) shares the installer's name.
|
||||
*/
|
||||
object WinComponentNames {
|
||||
private val TABLE = mapOf(
|
||||
"oalinst" to "OpenAL", "XLiveRedist" to "Games for Windows Live", "gfw" to "Games for Windows Live",
|
||||
"physx" to "NVIDIA PhysX", "xact" to "DirectX XACT audio", "xact_x64" to "DirectX XACT audio (64-bit)",
|
||||
"xinput" to "XInput", "xna31" to "XNA Framework 3.1", "xna40" to "XNA Framework 4.0",
|
||||
"d3dx9" to "DirectX 9 (d3dx9)", "d3dx11" to "DirectX 11 (d3dx11)",
|
||||
"directmusic" to "DirectMusic", "directplay" to "DirectPlay", "directshow" to "DirectShow",
|
||||
"dsound" to "DirectSound", "dx8vb" to "DirectX 8 for Visual Basic", "mediafoundation" to "Media Foundation",
|
||||
"quartz" to "DirectShow (quartz)", "amstream" to "DirectShow streams (amstream)", "devenum" to "DirectShow devices (devenum)",
|
||||
"cnc-ddraw" to "cnc-ddraw (DirectDraw)", "gdiplus" to "GDI+", "gecko" to "Wine Gecko", "mono" to "Wine Mono",
|
||||
"vcredist6" to "Visual C++ 6", "vcredist6sp6" to "Visual C++ 6 SP6",
|
||||
"vcredist2015" to "Visual C++ 2015", "vcredist2019" to "Visual C++ 2015-2019", "vcredist2022" to "Visual C++ 2015-2022",
|
||||
"vbrun6" to "Visual Basic 6 runtime", "mfc40" to "MFC 4.0", "mfc42" to "MFC 4.2",
|
||||
"dotnetcore3" to ".NET Core 3", "dotnetcoredesktop3" to ".NET Desktop 3", "dotnetcoredesktop6" to ".NET Desktop 6",
|
||||
"dotnetcoredesktop7" to ".NET Desktop 7", "dotnetcoredesktop8" to ".NET Desktop 8", "dotnet50" to ".NET 5",
|
||||
"webview2" to "Microsoft WebView2", "powershell" to "PowerShell", "powershell_core" to "PowerShell Core",
|
||||
"K-Lite" to "K-Lite Codec Pack", "VulkanRT" to "Vulkan Runtime", "ffdshow" to "ffdshow codecs",
|
||||
"lavfilters702" to "LAV Filters 0.70.2", "lavfilters741" to "LAV Filters 0.74.1", "quicktime72" to "QuickTime 7.2",
|
||||
"cjkfonts" to "CJK fonts", "jet40" to "Jet 4.0 database", "mdac28" to "MDAC 2.8", "wsh57" to "Windows Script Host 5.7",
|
||||
"riched20" to "RichEdit 2.0", "msftedit" to "RichEdit 4.1 (msftedit)", "sqlite3" to "SQLite 3",
|
||||
"win7" to "Windows 7 mode", "winXP" to "Windows XP mode", "gmdls" to "General MIDI sounds (gm.dls)",
|
||||
)
|
||||
private val VCREDIST = Regex("vcredist(\\d{4})")
|
||||
private val DOTNET = Regex("dotnet(\\d)(\\d)(\\d?)(sp\\d)?")
|
||||
private val D3DCOMPILER = Regex("d3dcompiler_(\\d+)")
|
||||
private val MSXML = Regex("msxml(\\d)")
|
||||
private val MONO = Regex("mono-([\\d.]+)")
|
||||
private val XAUDIO = Regex("xaudio([\\d.]+)")
|
||||
|
||||
fun of(id: String): String {
|
||||
val base = id.removeSuffix("_dll")
|
||||
TABLE[base]?.let { return it }
|
||||
VCREDIST.matchEntire(base)?.let { return "Visual C++ " + it.groupValues[1] }
|
||||
DOTNET.matchEntire(base)?.let { m ->
|
||||
val (major, minor, patch, sp) = m.destructured
|
||||
return ".NET Framework $major.$minor" + (if (patch.isNotEmpty()) ".$patch" else "") +
|
||||
(if (sp.isNotEmpty()) " " + sp.uppercase() else "")
|
||||
}
|
||||
D3DCOMPILER.matchEntire(base)?.let { return "D3DCompiler " + it.groupValues[1] }
|
||||
MSXML.matchEntire(base)?.let { return "MSXML " + it.groupValues[1] }
|
||||
MONO.matchEntire(base)?.let { return "Wine Mono " + it.groupValues[1] }
|
||||
XAUDIO.matchEntire(base)?.let { return "XAudio " + it.groupValues[1] }
|
||||
if (base.startsWith("dm") || base == "dswave" || base == "dsdmo") return "DirectMusic ($base)"
|
||||
return id
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AtomicFile
|
||||
import android.util.Log
|
||||
import com.droiddeck.launcher.core.ArchivePaths
|
||||
import com.droiddeck.launcher.core.Downloader
|
||||
import com.droiddeck.launcher.core.FileUtils
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
|
||||
import org.apache.commons.compress.compressors.xz.XZCompressorInputStream
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.BufferedInputStream
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
import java.security.MessageDigest
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
/**
|
||||
* Windows components (OpenAL, d3dx9, XAudio, VC++ DLLs...) for a game's Proton prefix, picked per
|
||||
* game, from Bannerlator's catalog (components.json on winlator-contents, Bottles' manifest format).
|
||||
*
|
||||
* Installing one runs its steps once, into the runtime: the archives it names are downloaded and
|
||||
* its DLLs copied to /opt/droiddeck/wincomponents/<name>/{system32,syswow64}, with component.json
|
||||
* holding its DLL overrides and the components it bundles. The picks go to the runtime as
|
||||
* ~/.config/droiddeck/wincomponents.json, and droiddeck-wincomponents copies the picked components
|
||||
* into the game's prefix at every launch (see that script for why every launch).
|
||||
*
|
||||
* Only components made of file copies and overrides install this way. One that runs a Windows
|
||||
* installer (install_exe/install_msi), unpacks a cabinet or edits the prefix's registry is listed
|
||||
* with the reason it cannot be installed yet.
|
||||
*/
|
||||
object WinComponents {
|
||||
private const val TAG = "WinComponents"
|
||||
const val CATALOG_URL = "https://raw.githubusercontent.com/The412Banner/winlator-contents/main/components.json"
|
||||
private const val SELECTION = "wincomponents.json"
|
||||
private const val GUEST_SELECTION = "root/.config/droiddeck/wincomponents.json"
|
||||
private const val STORE = "opt/droiddeck/wincomponents"
|
||||
private val ID = Regex("[A-Za-z0-9][A-Za-z0-9._-]{0,63}")
|
||||
// register_dll is left out on purpose: the DLLs it names are ones Wine ships and has registered
|
||||
// at the same path, so the native file at that path is the one the registration loads.
|
||||
private val FILE_STEPS = setOf("download_archive", "archive_extract", "copy_dll", "copy_file", "override_dll", "register_dll")
|
||||
private val INSTALLER_STEPS = setOf("install_exe", "install_msi")
|
||||
|
||||
fun validId(id: String): Boolean = ID.matches(id) && ".." !in id
|
||||
|
||||
class Step(val action: String, val json: JSONObject) {
|
||||
fun str(key: String): String = json.optString(key, "")
|
||||
}
|
||||
|
||||
class Component(
|
||||
val name: String, val description: String, val provider: String, val status: String,
|
||||
val dependencies: List<String>, val steps: List<Step>,
|
||||
)
|
||||
|
||||
enum class Support { READY, NEEDS_INSTALLER, UNSUPPORTED }
|
||||
|
||||
fun fetch(): List<Component>? {
|
||||
val body = Downloader.downloadString(CATALOG_URL) ?: return null
|
||||
return try {
|
||||
val arr = JSONObject(body).getJSONArray("components")
|
||||
(0 until arr.length()).mapNotNull { i ->
|
||||
val o = arr.getJSONObject(i)
|
||||
val name = o.optString("name")
|
||||
if (!validId(name)) return@mapNotNull null
|
||||
val steps = o.optJSONArray("steps") ?: JSONArray()
|
||||
val deps = o.optJSONArray("dependencies") ?: JSONArray()
|
||||
Component(
|
||||
name, o.optString("description"), o.optString("provider"), o.optString("status"),
|
||||
(0 until deps.length()).map { deps.getString(it) }.filter { validId(it) },
|
||||
(0 until steps.length()).map { steps.getJSONObject(it).let { s -> Step(s.optString("action"), s) } },
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "catalog: $e"); null
|
||||
}
|
||||
}
|
||||
|
||||
/** Whether [c] can be installed here, its bundled components included. */
|
||||
fun support(c: Component, all: Map<String, Component>, depth: Int = 0): Support {
|
||||
if (c.status != "ready" || depth > 8) return Support.UNSUPPORTED
|
||||
val own = when {
|
||||
c.steps.any { it.action in INSTALLER_STEPS } -> Support.NEEDS_INSTALLER
|
||||
c.steps.all { it.action in FILE_STEPS && fileStepOk(it) } -> Support.READY
|
||||
else -> Support.UNSUPPORTED
|
||||
}
|
||||
if (own != Support.READY) return own
|
||||
return c.dependencies.map { all[it]?.let { d -> support(d, all, depth + 1) } ?: Support.UNSUPPORTED }
|
||||
.maxOrNull() ?: Support.READY
|
||||
}
|
||||
|
||||
private fun fileStepOk(step: Step): Boolean = when (step.action) {
|
||||
"download_archive", "archive_extract" -> step.str("url").let { url ->
|
||||
!url.startsWith("http") || url.startsWith("https://github.com/") &&
|
||||
url.substringBefore('?').let { it.endsWith(".tar.xz") || it.endsWith(".zip") }
|
||||
}
|
||||
"copy_dll", "copy_file" -> ".." !in step.str("dest")
|
||||
else -> true
|
||||
}
|
||||
|
||||
/** The installed version of a component, or null. */
|
||||
fun installed(context: Context, id: String): String? = runCatching {
|
||||
JSONObject(File(LinuxRuntime.rootDir(context), "$STORE/$id/component.json").readText()).optString("version", "?")
|
||||
}.getOrNull()
|
||||
|
||||
/** Every component in the runtime, by id. */
|
||||
fun installedIds(context: Context): List<String> =
|
||||
File(LinuxRuntime.rootDir(context), STORE).listFiles { f -> f.isDirectory && validId(f.name) }
|
||||
.orEmpty().map { it.name }.filter { installed(context, it) != null }.sorted()
|
||||
|
||||
/**
|
||||
* Installs [c] and the components it bundles that are not installed yet. [onProgress] gets a
|
||||
* line for the step and 0..100 (or -1). Returns null on success, else a message.
|
||||
*/
|
||||
fun install(context: Context, c: Component, all: Map<String, Component>, onProgress: (String, Int) -> Unit): String? {
|
||||
if (support(c, all) != Support.READY) return "${c.name} cannot be installed here yet"
|
||||
val order = ArrayList<Component>()
|
||||
fun visit(x: Component, depth: Int) {
|
||||
if (depth > 8 || order.any { it.name == x.name }) return
|
||||
x.dependencies.mapNotNull { all[it] }.forEach { visit(it, depth + 1) }
|
||||
if (x.name == c.name || installed(context, x.name) == null) order.add(x)
|
||||
}
|
||||
visit(c, 0)
|
||||
// One download per archive however many components copy out of it (DirectMusic's eleven
|
||||
// parts all come from dxnt, 100 MB).
|
||||
val work = File(context.cacheDir, "wincomponents").apply { FileUtils.delete(this); mkdirs() }
|
||||
val archives = HashMap<String, File>()
|
||||
return try {
|
||||
for (x in order) {
|
||||
onProgress(x.name, -1)
|
||||
installOne(context, x, work, archives, onProgress)?.let { return "${x.name}: $it" }
|
||||
}
|
||||
null
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "install ${c.name}", e)
|
||||
e.message ?: "Install failed"
|
||||
} finally {
|
||||
FileUtils.delete(work)
|
||||
}
|
||||
}
|
||||
|
||||
private fun installOne(context: Context, c: Component, work: File, archives: HashMap<String, File>, onProgress: (String, Int) -> Unit): String? {
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
if (!root.isDirectory) return "The Linux runtime is not installed"
|
||||
val staging = File(root, "$STORE/.${c.name}.new").apply { FileUtils.delete(this); mkdirs() }
|
||||
val overrides = ArrayList<String>()
|
||||
var source: File? = null
|
||||
for (step in c.steps) when (step.action) {
|
||||
"download_archive", "archive_extract" -> {
|
||||
val url = step.str("url")
|
||||
if (!url.startsWith("http")) continue
|
||||
source = archives[url] ?: run {
|
||||
val name = url.substringBefore('?').substringAfterLast('/')
|
||||
val file = File(work, "${archives.size}-$name")
|
||||
val ok = Downloader.downloadFile(url, file, false) { f -> onProgress("${c.name}: $name", if (f < 0) -1 else Math.round(f * 100f)) }
|
||||
if (!ok) return "download failed: $name"
|
||||
step.str("file_checksum").takeIf { it.length == 32 }?.let { md5 ->
|
||||
if (!digest(file, "MD5").equals(md5, ignoreCase = true)) return "checksum mismatch: $name"
|
||||
}
|
||||
onProgress("${c.name}: unpacking $name", -1)
|
||||
val dir = File(work, "${archives.size}-x").apply { mkdirs() }
|
||||
if (!extract(file, dir)) return "could not unpack $name"
|
||||
file.delete()
|
||||
dir.also { archives[url] = it }
|
||||
}
|
||||
}
|
||||
"copy_dll", "copy_file" -> {
|
||||
val from = source ?: return "a copy step before any archive"
|
||||
val dest = step.str("dest")
|
||||
val (arch, base) = when (dest.substringBefore('/').lowercase()) {
|
||||
"win64", "system32" -> "win64" to "system32"
|
||||
"win32", "syswow64" -> "win32" to "syswow64"
|
||||
else -> null to "system32"
|
||||
}
|
||||
val sub = dest.substringAfter('/', "")
|
||||
copyMatching(from, step.str("file_name"), File(staging, if (sub.isEmpty()) base else "$base/$sub"), arch)
|
||||
}
|
||||
"override_dll" -> {
|
||||
fun add(dll: String, type: String) {
|
||||
if (dll.isEmpty()) return
|
||||
overrides += when (type.ifEmpty { "native,builtin" }) {
|
||||
"native,builtin" -> dll
|
||||
"native" -> "$dll=n"
|
||||
"builtin" -> "$dll=b"
|
||||
"builtin,native" -> "$dll=b,n"
|
||||
else -> dll
|
||||
}
|
||||
}
|
||||
add(step.str("dll"), step.str("type"))
|
||||
step.json.optJSONArray("bundle")?.let { b ->
|
||||
for (i in 0 until b.length()) b.getJSONObject(i).let { add(it.optString("value"), it.optString("data")) }
|
||||
}
|
||||
}
|
||||
"register_dll" -> Unit
|
||||
else -> return "unsupported step ${step.action}"
|
||||
}
|
||||
val version = Regex("""\b(\d+\.\d+(\.\d+)*)\b""").find(c.description)?.value ?: "catalog"
|
||||
FileUtils.writeString(File(staging, "component.json"), JSONObject()
|
||||
.put("id", c.name).put("version", version)
|
||||
.put("overrides", JSONArray(overrides.distinct()))
|
||||
.put("requires", JSONArray(c.dependencies)).toString(1))
|
||||
val target = File(root, "$STORE/${c.name}")
|
||||
FileUtils.delete(target)
|
||||
if (!staging.renameTo(target)) return "could not place the files"
|
||||
return null
|
||||
}
|
||||
|
||||
private fun digest(file: File, algorithm: String): String {
|
||||
val md = MessageDigest.getInstance(algorithm)
|
||||
FileInputStream(file).use { input ->
|
||||
val buffer = ByteArray(1 shl 16)
|
||||
while (true) { val n = input.read(buffer); if (n < 0) break; md.update(buffer, 0, n) }
|
||||
}
|
||||
return md.digest().joinToString("") { "%02x".format(it) }
|
||||
}
|
||||
|
||||
private fun extract(archive: File, dest: File): Boolean = try {
|
||||
if (archive.name.endsWith(".zip", ignoreCase = true)) ZipInputStream(BufferedInputStream(FileInputStream(archive))).use { zip ->
|
||||
var entry = zip.nextEntry
|
||||
while (entry != null) {
|
||||
val out = ArchivePaths.inside(dest, entry.name)
|
||||
if (out != null && !entry.isDirectory) {
|
||||
out.parentFile?.mkdirs()
|
||||
FileOutputStream(out).use { FileUtils.copy(zip, it) }
|
||||
}
|
||||
entry = zip.nextEntry
|
||||
}
|
||||
} else TarArchiveInputStream(XZCompressorInputStream(BufferedInputStream(FileInputStream(archive), 1 shl 16))).use { tar ->
|
||||
var entry = tar.nextEntry
|
||||
while (entry != null) {
|
||||
val out = ArchivePaths.inside(dest, entry.name)
|
||||
if (out != null && entry.isFile) {
|
||||
out.parentFile?.mkdirs()
|
||||
FileOutputStream(out).use { FileUtils.copy(tar, it) }
|
||||
}
|
||||
entry = tar.nextEntry
|
||||
}
|
||||
}
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "extract ${archive.name}", e); false
|
||||
}
|
||||
|
||||
/**
|
||||
* Bannerlator's rule: the manifest's own temp paths are Bottles', so the files are found by name
|
||||
* anywhere in the unpacked tree, preferring the ones under the matching win32/win64 folder.
|
||||
*/
|
||||
private fun copyMatching(srcRoot: File, pattern: String, dest: File, arch: String?) {
|
||||
if (pattern.isEmpty()) return
|
||||
val rx = Regex("^" + pattern.split("*").joinToString(".*") { Regex.escape(it) } + "$", RegexOption.IGNORE_CASE)
|
||||
var matches = srcRoot.walkTopDown().filter { it.isFile && rx.matches(it.name) }.toList()
|
||||
if (arch != null) {
|
||||
val inArch = matches.filter { it.path.contains("/$arch/", true) }
|
||||
val other = if (arch == "win64") "win32" else "win64"
|
||||
matches = inArch.ifEmpty { matches.filterNot { it.path.contains("/$other/", true) } }
|
||||
}
|
||||
dest.mkdirs()
|
||||
matches.forEach { f -> f.copyTo(File(dest, f.name.lowercase()), overwrite = true) }
|
||||
}
|
||||
|
||||
/** Removes a component from the runtime and from every game's picks. */
|
||||
@Synchronized
|
||||
fun uninstall(context: Context, id: String) {
|
||||
require(validId(id))
|
||||
FileUtils.delete(File(LinuxRuntime.rootDir(context), "$STORE/$id"))
|
||||
save(context, read(context).mapValues { (_, ids) -> ids - id }.filterValues { it.isNotEmpty() })
|
||||
}
|
||||
|
||||
/** Each game's picks, by the appid its prefix is named after. */
|
||||
@Synchronized
|
||||
fun read(context: Context): Map<String, List<String>> = try {
|
||||
val json = JSONObject(AtomicFile(File(context.filesDir, SELECTION)).readFully().toString(Charsets.UTF_8))
|
||||
val games = json.optJSONObject("games") ?: JSONObject()
|
||||
games.keys().asSequence().associateWith { app ->
|
||||
val ids = games.getJSONArray(app)
|
||||
(0 until ids.length()).map { ids.getString(it) }.filter { validId(it) }
|
||||
}
|
||||
} catch (_: java.io.FileNotFoundException) {
|
||||
emptyMap()
|
||||
}
|
||||
|
||||
fun picks(context: Context, appKey: String): List<String> = read(context)[appKey].orEmpty()
|
||||
|
||||
@Synchronized
|
||||
fun setPicks(context: Context, appKey: String, ids: List<String>) {
|
||||
require(ids.all { validId(it) })
|
||||
val all = read(context).toMutableMap()
|
||||
if (ids.isEmpty()) all.remove(appKey) else all[appKey] = ids.distinct()
|
||||
save(context, all)
|
||||
}
|
||||
|
||||
private fun save(context: Context, games: Map<String, List<String>>) {
|
||||
val text = JSONObject().put("version", 1).put("games", JSONObject().apply {
|
||||
games.forEach { (app, ids) -> put(app, JSONArray(ids)) }
|
||||
}).toString()
|
||||
write(File(context.filesDir, SELECTION), text)
|
||||
publish(context, text)
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the picks where the launch script reads them; SessionFiles calls this at every session
|
||||
* start too, so a runtime reinstalled since keeps them. An empty selection still writes a file,
|
||||
* which is how a component turned off for every game is taken out of their prefixes.
|
||||
*/
|
||||
@Synchronized
|
||||
fun publish(context: Context, text: String? = null) {
|
||||
val body = text ?: runCatching { AtomicFile(File(context.filesDir, SELECTION)).readFully().toString(Charsets.UTF_8) }.getOrNull() ?: return
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
if (root.isDirectory) write(File(root, GUEST_SELECTION), body)
|
||||
}
|
||||
|
||||
private fun write(file: File, text: String) {
|
||||
check(file.parentFile!!.isDirectory || file.parentFile!!.mkdirs())
|
||||
val atomic = AtomicFile(file)
|
||||
val output = atomic.startWrite()
|
||||
try {
|
||||
output.write(text.toByteArray(Charsets.UTF_8))
|
||||
atomic.finishWrite(output)
|
||||
} catch (error: Exception) {
|
||||
atomic.failWrite(output)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.ui.unit.Density
|
||||
import com.droiddeck.launcher.core.AppUiPrefs
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
internal fun scaledAppDensity(base: Density, percent: Int): Density {
|
||||
val scale = AppUiPrefs.normalizeScale(percent) / 100f
|
||||
return if (scale == 1f) base else Density(base.density * scale, base.fontScale)
|
||||
}
|
||||
|
||||
/** Responsive layouts and popup height limits must see the same dp space as the scaled UI. */
|
||||
internal fun scaledAppConfiguration(base: Configuration, percent: Int): Configuration {
|
||||
val scale = AppUiPrefs.normalizeScale(percent) / 100f
|
||||
if (scale == 1f) return base
|
||||
return Configuration(base).apply {
|
||||
if (densityDpi > 0) densityDpi = (densityDpi * scale).roundToInt()
|
||||
if (screenWidthDp > 0) screenWidthDp = (screenWidthDp / scale).roundToInt()
|
||||
if (screenHeightDp > 0) screenHeightDp = (screenHeightDp / scale).roundToInt()
|
||||
if (smallestScreenWidthDp > 0) smallestScreenWidthDp = (smallestScreenWidthDp / scale).roundToInt()
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, o
|
||||
}
|
||||
}
|
||||
Rise(1) { SectionTitle(stringResource(R.string.games_launch_settings), null) }
|
||||
Rise(2) { LaunchSettings(s, a, host) }
|
||||
Rise(2) { LaunchSettings(s, a, host, current) }
|
||||
Rise(3) { GameFileFolderActions(s, a) }
|
||||
}
|
||||
return
|
||||
@@ -109,7 +109,7 @@ internal fun GamesPage(s: FrontEndState, a: FrontEndActions, selected: String, o
|
||||
GameActions(current, s, a)
|
||||
}
|
||||
SectionTitle(stringResource(R.string.games_launch_settings), null)
|
||||
LaunchSettings(s, a, host)
|
||||
LaunchSettings(s, a, host, current)
|
||||
GameFileFolderActions(s, a)
|
||||
}
|
||||
}
|
||||
@@ -284,7 +284,7 @@ private fun GameRow(g: Library.SteamGame, selected: Boolean, onSelect: () -> Uni
|
||||
}
|
||||
}
|
||||
|
||||
/** A page's title, with room at its right for a status chip. */
|
||||
/** A page's title, with room at its right for controls or status. */
|
||||
@Composable
|
||||
internal fun PageHeader(title: String, trailing: @Composable RowScope.() -> Unit = {}) {
|
||||
Row(
|
||||
|
||||
@@ -101,6 +101,7 @@ class FrontEndState(
|
||||
val gameSyncFolder: String? = null,
|
||||
val pageKey: String? = null,
|
||||
val theme: String = Themes.GRAPHITE,
|
||||
val appScale: Int = com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE,
|
||||
val isHomeApp: Boolean = false,
|
||||
val homeScreenEnabled: Boolean = false,
|
||||
val defaultHomeLabel: String? = null,
|
||||
@@ -168,6 +169,7 @@ class FrontEndActions(
|
||||
val onOffline: () -> Unit,
|
||||
val onPageBack: () -> Unit = {},
|
||||
val onTheme: (String) -> Unit = {},
|
||||
val onAppScale: (Int) -> Unit = {},
|
||||
val onLauncherFullscreen: (Boolean) -> Unit = {},
|
||||
val onAnimationsEnabled: (Boolean) -> Unit = {},
|
||||
val onStoreEnabled: (Boolean) -> Unit = {},
|
||||
|
||||
@@ -162,8 +162,6 @@ internal fun SetupPanel(
|
||||
val limitBlocks = PhantomProcessLimit.blocksSteam(s.phantomProcessStatus)
|
||||
val signedIn = s.offlineAccount != null
|
||||
var showLimitDetails by rememberSaveable { mutableStateOf(false) }
|
||||
val checks = 4
|
||||
val readyCount = listOf(gpuOk, s.ready && !s.busy, !limitBlocks, signedIn).count { it }
|
||||
// Four tabs instead of one long scroll; LB and RB turn them from anywhere on the page. Build
|
||||
// and credits are on the Updates page.
|
||||
val tabs = listOf(stringResource(R.string.setup_tab_overview), stringResource(R.string.setup_tab_controller), stringResource(R.string.setup_tab_session), stringResource(R.string.setup_tab_launcher))
|
||||
@@ -187,9 +185,8 @@ internal fun SetupPanel(
|
||||
),
|
||||
) {
|
||||
PageHeader(stringResource(R.string.setup_title)) {
|
||||
Chip(if (readyCount == checks) stringResource(R.string.setup_all_set) else stringResource(R.string.setup_n_ready, readyCount, checks), ok = readyCount == checks)
|
||||
TabStrip(tabs, tab, pick, Modifier.weight(1f), tabFocus)
|
||||
}
|
||||
TabStrip(tabs, tab, pick, Modifier.padding(bottom = 4.dp), tabFocus)
|
||||
Column(modifier = Modifier.weight(1f).fillMaxWidth().verticalScroll(rememberScrollState()).padding(bottom = 24.dp)) {
|
||||
when (tab) {
|
||||
0 -> {
|
||||
@@ -314,6 +311,15 @@ internal fun SetupPanel(
|
||||
}
|
||||
3 -> {
|
||||
SettingsGroup(stringResource(R.string.setup_launcher)) {
|
||||
ChoiceRow(
|
||||
host, "app-scale", stringResource(R.string.setup_app_scale), stringResource(R.string.setup_app_scale_hint),
|
||||
com.droiddeck.launcher.core.AppUiPrefs.scales.map { percent ->
|
||||
percent to stringResource(
|
||||
if (percent == com.droiddeck.launcher.core.AppUiPrefs.DEFAULT_SCALE) R.string.setup_app_scale_default
|
||||
else R.string.ctrl_percent, percent,
|
||||
)
|
||||
}, s.appScale, onPick = a.onAppScale,
|
||||
)
|
||||
SettingsRow(stringResource(R.string.setup_theme), stringResource(R.string.setup_theme_hint)) {
|
||||
Box {
|
||||
ValueChip(Themes.byId(s.theme).label, host.open == "theme") { host.open = if (host.open == "theme") null else "theme" }
|
||||
@@ -415,10 +421,20 @@ private fun FrameGenMenu(s: FrontEndState, a: FrontEndActions, host: MenuHost) {
|
||||
* app-wide settings - each card opens the same page or menu Setup does.
|
||||
*/
|
||||
@Composable
|
||||
internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost) {
|
||||
internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost, game: com.droiddeck.launcher.frontend.Library.SteamGame? = null) {
|
||||
// Three across, two on a narrow page; each row's cards share one height.
|
||||
val columns = if (LocalNarrowPane.current) 2 else 3
|
||||
val controller = a.controller
|
||||
val context = androidx.compose.ui.platform.LocalContext.current
|
||||
val inputMode = androidx.compose.ui.platform.LocalInputModeManager.current
|
||||
// The game's prefix is compatdata/<id>, as droiddeck-game-env reads it: a Steam title's appid, an
|
||||
// added game's shortcut appid (unsigned). Recommended scans the game's own folder either way.
|
||||
val wincompKey = game?.let {
|
||||
if (it.library == com.droiddeck.launcher.frontend.Library.ADDED) Integer.toUnsignedString(it.appId)
|
||||
else it.appId.takeIf { id -> id > 0 }?.toString()
|
||||
}
|
||||
var wincompOpen by remember(wincompKey) { mutableStateOf<Boolean?>(null) }
|
||||
val wincompPicks = remember(wincompKey, wincompOpen) { wincompKey?.let { com.droiddeck.launcher.session.WinComponents.picks(context, it) }.orEmpty() }
|
||||
val cards = buildList<@Composable (Modifier) -> Unit> {
|
||||
add { m -> SettingCard(stringResource(R.string.setup_card_components), stringResource(R.string.setup_card_components_hint), "card:components", m) { a.onComponents(true) } }
|
||||
add { m ->
|
||||
@@ -430,7 +446,19 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
|
||||
}
|
||||
}
|
||||
if (controller != null) add { m -> SettingCard(stringResource(R.string.setup_card_controls), stringResource(R.string.setup_card_controls_hint), "card:controls", m, controller.onMapping) }
|
||||
if (wincompKey != null) add { m ->
|
||||
SettingCard(
|
||||
stringResource(R.string.wincomp_title),
|
||||
if (wincompPicks.isEmpty()) stringResource(R.string.wincomp_card_none) else wincompPicks.joinToString(", ") { com.droiddeck.launcher.session.WinComponentNames.of(it) },
|
||||
"card:wincomp", m,
|
||||
) { wincompOpen = inputMode.inputMode == androidx.compose.ui.input.InputMode.Keyboard }
|
||||
}
|
||||
}
|
||||
val opened = wincompOpen
|
||||
if (opened != null && wincompKey != null && game != null) WinComponentsDialog(
|
||||
wincompKey, game.name, game.gameFiles, opened, compat = game.protonPrefix,
|
||||
steamAppId = game.appId.takeIf { game.library != com.droiddeck.launcher.frontend.Library.ADDED },
|
||||
) { wincompOpen = null }
|
||||
Column(verticalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth().padding(bottom = 16.dp)) {
|
||||
for (row in cards.chunked(columns)) {
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier.fillMaxWidth().height(IntrinsicSize.Min)) {
|
||||
|
||||
@@ -70,7 +70,7 @@ fun GameEnvironmentRow(modifier: Modifier = Modifier, showHint: Boolean = true)
|
||||
/** With a pad driving, focus [target] once the dialog is laid out, and keep the dialog in pad mode. */
|
||||
@OptIn(androidx.compose.ui.ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
private fun PadFocus(byPad: Boolean, target: FocusRequester) {
|
||||
internal fun PadFocus(byPad: Boolean, target: FocusRequester) {
|
||||
val inputMode = LocalInputModeManager.current
|
||||
LaunchedEffect(Unit) {
|
||||
if (!byPad) return@LaunchedEffect
|
||||
@@ -95,6 +95,7 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) {
|
||||
var error by remember { mutableStateOf(false) }
|
||||
var editing by remember { mutableStateOf<Pair<String, String>?>(null) }
|
||||
val preset = SessionPrefs.fexPreset(context)
|
||||
val forceSsbs = SessionPrefs.forceSsbs(context)
|
||||
val firstFocus = remember { FocusRequester() }
|
||||
var editByPad by remember { mutableStateOf(false) }
|
||||
val dialogInput = LocalInputModeManager.current
|
||||
@@ -159,7 +160,7 @@ private fun GameEnvironmentEditor(byPad: Boolean, onClose: () -> Unit) {
|
||||
if (current == null && !error) Small(stringResource(R.string.game_env_loading))
|
||||
if (current != null) {
|
||||
val own = current.entries(scope)
|
||||
val entries = GameEnvironment.effective(current, preset, scope).toSortedMap()
|
||||
val entries = GameEnvironment.effective(current, preset, scope, forceSsbs).toSortedMap()
|
||||
if (entries.isEmpty()) Small(stringResource(R.string.game_env_empty))
|
||||
else Panel {
|
||||
entries.entries.forEachIndexed { i, (name, value) ->
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import com.droiddeck.launcher.R
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.focusable
|
||||
import androidx.compose.material.icons.outlined.ExpandLess
|
||||
import androidx.compose.material.icons.outlined.ExpandMore
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.platform.LocalClipboardManager
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import com.droiddeck.launcher.gpu.DeviceInfo
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
@@ -180,29 +191,104 @@ private fun DriverDropdown(rows: List<DriverRow>, selected: String, fallback: St
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This GPU and how far it is supported. A tap (or A) opens the card onto everything about the chip -
|
||||
* SoC, GPU, CPU, memory, system, the phone's own Vulkan driver, the drivers in use - gathered once,
|
||||
* off the main thread, with a button that copies it for a bug report.
|
||||
*/
|
||||
@Composable
|
||||
private fun DeviceCard(s: GpuDriversState) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val context = LocalContext.current
|
||||
val clipboard = LocalClipboardManager.current
|
||||
val tint = when {
|
||||
s.unsupported -> pal.error
|
||||
s.supported -> pal.good
|
||||
else -> AttentionAmber
|
||||
}
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp),
|
||||
modifier = Modifier.fillMaxWidth().clip(Shape14).background(colors.surface).border(1.dp, pal.line, Shape14).padding(14.dp),
|
||||
var open by rememberSaveable { mutableStateOf(false) }
|
||||
var details by remember { mutableStateOf<List<DeviceInfo.Section>?>(null) }
|
||||
var copied by remember { mutableStateOf(false) }
|
||||
LaunchedEffect(open) {
|
||||
if (open && details == null) details = withContext(Dispatchers.IO) { DeviceInfo.collect(context) }
|
||||
}
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
val toggle = { open = !open; copied = false }
|
||||
Column(
|
||||
Modifier.fillMaxWidth().clip(Shape14).background(colors.surface)
|
||||
.background(if (hot) pal.signal.copy(alpha = 0.10f) else Color.Transparent)
|
||||
.glideBorder(hot, Shape14, pal.signal, pal.line),
|
||||
) {
|
||||
Box(contentAlignment = Alignment.Center, modifier = Modifier.size(44.dp).clip(Shape12).background(tint.copy(alpha = 0.14f))) {
|
||||
Icon(Icons.Outlined.Memory, contentDescription = null, tint = tint, modifier = Modifier.size(24.dp))
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp),
|
||||
modifier = Modifier.fillMaxWidth().paneItem("gpu-device")
|
||||
.hoverable(src).clickable(interactionSource = src, indication = null, role = Role.Button, onClick = toggle)
|
||||
.controllerConfirm(onClick = toggle)
|
||||
.padding(14.dp),
|
||||
) {
|
||||
Box(contentAlignment = Alignment.Center, modifier = Modifier.size(44.dp).clip(Shape12).background(tint.copy(alpha = 0.14f))) {
|
||||
Icon(Icons.Outlined.Memory, contentDescription = null, tint = tint, modifier = Modifier.size(24.dp))
|
||||
}
|
||||
Column(Modifier.weight(1f)) {
|
||||
Text(s.gpuName, fontSize = 18.sp, fontWeight = FontWeight.Bold, color = colors.onBackground)
|
||||
Text(listOf(s.soc, s.gpuFamily).filter { it.isNotEmpty() }.joinToString(" · "), fontSize = 13.sp, color = colors.onSurfaceVariant)
|
||||
}
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
Box(Modifier.size(7.dp).clip(CircleShape).background(tint))
|
||||
Text(s.supportText, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = tint, maxLines = 2)
|
||||
}
|
||||
Icon(
|
||||
if (open) Icons.Outlined.ExpandLess else Icons.Outlined.ExpandMore,
|
||||
contentDescription = stringResource(if (open) R.string.device_info_hide else R.string.device_info_show),
|
||||
tint = colors.onSurfaceVariant, modifier = Modifier.size(24.dp),
|
||||
)
|
||||
}
|
||||
Column(Modifier.weight(1f)) {
|
||||
Text(s.gpuName, fontSize = 18.sp, fontWeight = FontWeight.Bold, color = colors.onBackground)
|
||||
Text(listOf(s.soc, s.gpuFamily).filter { it.isNotEmpty() }.joinToString(" · "), fontSize = 13.sp, color = colors.onSurfaceVariant)
|
||||
AnimatedVisibility(open) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(12.dp), modifier = Modifier.fillMaxWidth().padding(start = 14.dp, end = 14.dp, bottom = 14.dp)) {
|
||||
HorizontalDivider(color = pal.line)
|
||||
val sections = details
|
||||
if (sections == null) {
|
||||
Text(stringResource(R.string.device_info_loading), fontSize = 13.sp, color = colors.onSurfaceVariant)
|
||||
LinearProgressIndicator(Modifier.fillMaxWidth())
|
||||
} else {
|
||||
for (section in sections) DeviceInfoSection(section)
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(
|
||||
stringResource(if (copied) R.string.device_info_copied else R.string.device_info_copy_hint),
|
||||
fontSize = 12.sp, color = colors.onSurfaceVariant, modifier = Modifier.weight(1f),
|
||||
)
|
||||
SecondaryButton(stringResource(R.string.device_info_copy), compact = true) {
|
||||
clipboard.setText(AnnotatedString(DeviceInfo.text(sections)))
|
||||
copied = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
Box(Modifier.size(7.dp).clip(CircleShape).background(tint))
|
||||
Text(s.supportText, fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = tint, maxLines = 2)
|
||||
}
|
||||
}
|
||||
|
||||
/** One part of the device details: its title, then label/value rows. Focusable, so the d-pad walks the list. */
|
||||
@Composable
|
||||
private fun DeviceInfoSection(section: DeviceInfo.Section) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
val pal = LocalPalette.current
|
||||
val src = remember { MutableInteractionSource() }
|
||||
val hot = rememberHot(src)
|
||||
Column(
|
||||
verticalArrangement = Arrangement.spacedBy(3.dp),
|
||||
modifier = Modifier.fillMaxWidth().clip(Shape12)
|
||||
.glideBorder(hot, Shape12, pal.signal)
|
||||
.focusable(interactionSource = src).padding(horizontal = 8.dp, vertical = 6.dp),
|
||||
) {
|
||||
Text(section.title.uppercase(), fontSize = 11.5.sp, fontWeight = FontWeight.Bold, letterSpacing = 1.2.sp, color = colors.onSurfaceVariant)
|
||||
for ((label, value) in section.rows) {
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
Text(label, fontSize = 13.sp, color = colors.onSurfaceVariant, modifier = Modifier.width(190.dp))
|
||||
Text(value, fontSize = 13.sp, fontWeight = FontWeight.Medium, color = colors.onBackground, modifier = Modifier.weight(1f))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ class ModeSettings(
|
||||
/** Steam only: record allocation and sampled storage timings in the next session's Share logs. */
|
||||
val storageDiagnostics: Boolean = false,
|
||||
val fexPreset: String? = null,
|
||||
/** Steam only: Force SSBS for Proton games (SessionPrefs.forceSsbs). */
|
||||
val forceSsbs: Boolean = false,
|
||||
/** Steam only: SessionPrefs.SYNC_* chosen for Proton games; null outside Steam. */
|
||||
val syncBackend: String? = null,
|
||||
/** Steam only: forces game windows fullscreen (null = not a Steam page). */
|
||||
@@ -131,6 +133,7 @@ class ModeSettingsActions(
|
||||
val onPickGameStorageFolder: () -> Unit = {},
|
||||
val onStorageDiagnostics: (Boolean) -> Unit = {},
|
||||
val onFexPreset: (String) -> Unit = {},
|
||||
val onForceSsbs: (Boolean) -> Unit = {},
|
||||
val onSyncBackend: (String) -> Unit = {},
|
||||
val onForceFullscreen: (Boolean) -> Unit = {},
|
||||
val onStretch16x9: (Boolean) -> Unit = {},
|
||||
@@ -155,7 +158,7 @@ class ModeSettingsActions(
|
||||
val onDismiss: () -> Unit,
|
||||
)
|
||||
|
||||
private enum class SteamSettingsTab(val label: Int) {
|
||||
private enum class ModeSettingsTab(val label: Int) {
|
||||
DISPLAY(R.string.drawer_page_display),
|
||||
CONTROLS(R.string.drawer_page_controls),
|
||||
GAMES(R.string.game_settings_title),
|
||||
@@ -171,34 +174,36 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
var confirmDeckyRemoval by remember { mutableStateOf(false) }
|
||||
var explainWifiDiscovery by remember { mutableStateOf(false) }
|
||||
var tabIndex by androidx.compose.runtime.saveable.rememberSaveable(s.mode) { mutableStateOf(0) }
|
||||
val tabs = SteamSettingsTab.entries
|
||||
val tabs = if (steam) ModeSettingsTab.entries else listOf(
|
||||
ModeSettingsTab.DISPLAY, ModeSettingsTab.CONTROLS, ModeSettingsTab.SESSION,
|
||||
)
|
||||
val tab = tabs[tabIndex]
|
||||
val scrolls = tabs.map { androidx.compose.foundation.rememberScrollState() }
|
||||
val tabFocus = remember { tabs.map { androidx.compose.ui.focus.FocusRequester() } }
|
||||
val tabFocus = remember(s.mode) { tabs.map { androidx.compose.ui.focus.FocusRequester() } }
|
||||
val firstChip = remember { androidx.compose.ui.focus.FocusRequester() }
|
||||
fun selectTab(index: Int) { host.open = null; tabIndex = index }
|
||||
androidx.compose.runtime.LaunchedEffect(steam, tabIndex) {
|
||||
androidx.compose.runtime.withFrameNanos { }
|
||||
runCatching {
|
||||
if (!steam || tab == SteamSettingsTab.DISPLAY) firstChip.requestFocus()
|
||||
if (tab == ModeSettingsTab.DISPLAY) firstChip.requestFocus()
|
||||
else tabFocus[tabIndex].requestFocus()
|
||||
}
|
||||
}
|
||||
SettingsPage(
|
||||
host,
|
||||
title = if (steam) stringResource(R.string.mode_steam_title) else stringResource(R.string.mode_desktop_title),
|
||||
title = null,
|
||||
onBack = a.onDismiss,
|
||||
scroll = scrolls[tabIndex],
|
||||
modifier = if (steam) Modifier.bumpers(
|
||||
modifier = Modifier.bumpers(
|
||||
onPrevious = { selectTab((tabIndex + tabs.size - 1) % tabs.size) },
|
||||
onNext = { selectTab((tabIndex + 1) % tabs.size) },
|
||||
) else Modifier,
|
||||
header = if (steam) ({
|
||||
),
|
||||
header = {
|
||||
TabStrip(tabs.map { stringResource(it.label) }, tabIndex, ::selectTab,
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 12.dp), focusRequesters = tabFocus)
|
||||
}) else null,
|
||||
modifier = Modifier.fillMaxWidth(), focusRequesters = tabFocus)
|
||||
},
|
||||
) {
|
||||
if (!steam || tab == SteamSettingsTab.DISPLAY) {
|
||||
if (tab == ModeSettingsTab.DISPLAY) {
|
||||
val displaySize = com.droiddeck.launcher.session.SessionDisplay.resolveChoice(s.panelSize, s.resolution)
|
||||
SettingsGroup(stringResource(R.string.display_session)) {
|
||||
ResolutionRow(host, s.resolution, s.panelSize, a.onResolution,
|
||||
@@ -241,7 +246,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!steam || tab == SteamSettingsTab.CONTROLS) {
|
||||
if (tab == ModeSettingsTab.CONTROLS) {
|
||||
SettingsGroup(if (steam) stringResource(R.string.mode_touch_controls) else stringResource(R.string.mode_touch)) {
|
||||
ChoiceRow(
|
||||
host, "touch", stringResource(R.string.mode_touch), null,
|
||||
@@ -277,7 +282,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (!steam || tab == SteamSettingsTab.SESSION) {
|
||||
if (tab == ModeSettingsTab.SESSION) {
|
||||
SettingsGroup(stringResource(R.string.mode_session)) {
|
||||
ChoiceRow(
|
||||
host, "suspend", stringResource(R.string.mode_suspend),
|
||||
@@ -286,9 +291,9 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
SessionPrefs.SUSPEND_AUTO to stringResource(R.string.common_auto),
|
||||
SessionPrefs.SUSPEND_MANUAL to stringResource(R.string.mode_suspend_manual),
|
||||
SessionPrefs.SUSPEND_NEVER to stringResource(R.string.common_never),
|
||||
),
|
||||
) + if (steam) listOf(SessionPrefs.SUSPEND_NATIVE to stringResource(R.string.mode_suspend_native)) else emptyList(),
|
||||
s.suspendPolicy,
|
||||
note = stringResource(R.string.mode_suspend_note),
|
||||
note = stringResource(if (steam) R.string.mode_suspend_steam_note else R.string.mode_suspend_note),
|
||||
onPick = a.onSuspendPolicy,
|
||||
)
|
||||
}
|
||||
@@ -304,7 +309,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.STEAM) SettingsGroup(stringResource(R.string.mode_decky)) {
|
||||
if (steam && tab == ModeSettingsTab.STEAM) SettingsGroup(stringResource(R.string.mode_decky)) {
|
||||
val updateAvailable = s.deckyInstalled != null && s.deckyLatestRelease != null &&
|
||||
s.deckyInstalled != s.deckyLatestRelease.tag
|
||||
val status = when {
|
||||
@@ -363,7 +368,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.STEAM && s.steamChannel != null) SettingsGroup(stringResource(R.string.mode_client)) {
|
||||
if (steam && tab == ModeSettingsTab.STEAM && s.steamChannel != null) SettingsGroup(stringResource(R.string.mode_client)) {
|
||||
ToggleRow(
|
||||
host, "steamdeck", stringResource(R.string.mode_deck_mode),
|
||||
stringResource(R.string.mode_deck_mode_hint),
|
||||
@@ -389,7 +394,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
SecondaryButton(stringResource(R.string.mode_steam_repair_button), enabled = !s.steamRepairQueued, onClick = a.onSteamRepair)
|
||||
}
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.STEAM && s.wifiDiscovery != null) SettingsGroup(stringResource(R.string.mode_network)) {
|
||||
if (steam && tab == ModeSettingsTab.STEAM && s.wifiDiscovery != null) SettingsGroup(stringResource(R.string.mode_network)) {
|
||||
val hint = when {
|
||||
s.wifiDiscovery && !s.wifiDiscoveryLocation -> stringResource(R.string.mode_wifi_location_off)
|
||||
!s.wifiDiscoveryPermission && s.wifiDiscoveryAsked -> stringResource(R.string.mode_wifi_permission_denied)
|
||||
@@ -408,11 +413,11 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((!steam || tab == SteamSettingsTab.GAMES) && s.forceFullscreen != null) SettingsGroup(stringResource(R.string.display_window_compatibility)) {
|
||||
if ((tab == ModeSettingsTab.GAMES || (!steam && tab == ModeSettingsTab.DISPLAY)) && s.forceFullscreen != null) SettingsGroup(stringResource(R.string.display_window_compatibility)) {
|
||||
ToggleRow(host, "fill", stringResource(R.string.display_force_fullscreen),
|
||||
stringResource(R.string.display_force_fullscreen_hint), s.forceFullscreen, onChange = a.onForceFullscreen)
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.GAMES && s.addedGamesDirs != null) SettingsGroup(stringResource(R.string.mode_added_games)) {
|
||||
if (steam && tab == ModeSettingsTab.GAMES && s.addedGamesDirs != null) SettingsGroup(stringResource(R.string.mode_added_games)) {
|
||||
for (dir in s.addedGamesDirs) {
|
||||
val n = s.addedGames.count { it.folderPath.startsWith("$dir/") }
|
||||
ActionRow(
|
||||
@@ -430,14 +435,16 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
stringResource(R.string.mode_added_art_hint),
|
||||
s.addedGamesArt, onChange = a.onAddedGamesArt,
|
||||
)
|
||||
for (g in s.addedGames) ChoiceRow(
|
||||
host, "added:" + g.folderPath, g.folderName, if (s.addedGamesDirs.size > 1) stringResource(R.string.mode_added_launches_in, g.exeName, g.folderPath.substringBeforeLast('/').substringAfterLast('/')) else stringResource(R.string.mode_added_launches, g.exeName),
|
||||
g.candidates + ("__pick__" to stringResource(R.string.mode_added_choose)), g.exePath,
|
||||
note = stringResource(R.string.mode_added_exe_note),
|
||||
onPick = { path -> if (path == "__pick__") a.onPickAddedGameExe(g.folderPath) else a.onAddedGameExe(g.folderPath, path) },
|
||||
)
|
||||
for (g in s.addedGames) {
|
||||
ChoiceRow(
|
||||
host, "added:" + g.folderPath, g.folderName, if (s.addedGamesDirs.size > 1) stringResource(R.string.mode_added_launches_in, g.exeName, g.folderPath.substringBeforeLast('/').substringAfterLast('/')) else stringResource(R.string.mode_added_launches, g.exeName),
|
||||
g.candidates + ("__pick__" to stringResource(R.string.mode_added_choose)), g.exePath,
|
||||
note = stringResource(R.string.mode_added_exe_note),
|
||||
onPick = { path -> if (path == "__pick__") a.onPickAddedGameExe(g.folderPath) else a.onAddedGameExe(g.folderPath, path) },
|
||||
)
|
||||
}
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.GAMES && s.fexPreset != null) SettingsGroup(stringResource(R.string.game_settings_title)) {
|
||||
if (steam && tab == ModeSettingsTab.GAMES && s.fexPreset != null) SettingsGroup(stringResource(R.string.game_settings_title)) {
|
||||
if (s.syncBackend != null) SettingsRow(
|
||||
stringResource(R.string.sync_backend_title),
|
||||
stringResource(R.string.sync_backend_hint),
|
||||
@@ -457,10 +464,11 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
FexPreset.all.map { it.id to stringResource(it.label) }, s.fexPreset,
|
||||
note = stringResource(FexPreset.byId(s.fexPreset).detail), onPick = a.onFexPreset,
|
||||
)
|
||||
ToggleRow(host, "ssbs", stringResource(R.string.force_ssbs_title), stringResource(R.string.force_ssbs_hint), s.forceSsbs, onChange = a.onForceSsbs)
|
||||
GameEnvironmentRow()
|
||||
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.AUDIO && s.directAudio != null && s.mic != null) SettingsGroup(stringResource(R.string.mode_audio)) {
|
||||
if (steam && tab == ModeSettingsTab.AUDIO && s.directAudio != null && s.mic != null) SettingsGroup(stringResource(R.string.mode_audio)) {
|
||||
ToggleRow(host, "da", stringResource(R.string.mode_directaudio), stringResource(R.string.mode_directaudio_hint), s.directAudio, onChange = a.onDirectAudio)
|
||||
ChoiceRow(
|
||||
host, "clientAudio", stringResource(R.string.mode_client_audio), stringResource(R.string.mode_client_audio_hint),
|
||||
@@ -469,7 +477,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
)
|
||||
ToggleRow(host, "mic", stringResource(R.string.mode_mic), stringResource(R.string.mode_mic_hint), s.mic, onChange = a.onMic)
|
||||
}
|
||||
if (steam && tab == SteamSettingsTab.GAMES && s.gameStorage != null) SettingsGroup(stringResource(R.string.mode_storage)) {
|
||||
if (steam && tab == ModeSettingsTab.GAMES && s.gameStorage != null) SettingsGroup(stringResource(R.string.mode_storage)) {
|
||||
val custom = s.gameStorage.isNotEmpty() && s.gameStorage != "off" && s.storageOptions.none { it.second == s.gameStorage }
|
||||
val options = buildList {
|
||||
add("" to (if (s.storageOptions.isEmpty()) stringResource(R.string.mode_storage_auto_none) else stringResource(R.string.mode_storage_auto)))
|
||||
@@ -505,7 +513,7 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
onChange = a.onStorageDiagnostics,
|
||||
)
|
||||
}
|
||||
if (!steam && s.renderer != null) SettingsGroup(stringResource(R.string.mode_renderer)) {
|
||||
if (!steam && tab == ModeSettingsTab.DISPLAY && s.renderer != null) SettingsGroup(stringResource(R.string.mode_renderer)) {
|
||||
ChoiceRow(
|
||||
host, "renderer", stringResource(R.string.mode_desktop_renderer), stringResource(R.string.mode_renderer_hint),
|
||||
listOf("vulkan" to stringResource(R.string.mode_renderer_vulkan), "gles2" to stringResource(R.string.mode_renderer_gles2), "pixman" to stringResource(R.string.mode_renderer_pixman)), s.renderer,
|
||||
|
||||
@@ -308,7 +308,7 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
|
||||
}
|
||||
}
|
||||
if (open || veil > 0.01f) Box(
|
||||
modifier = Modifier.fillMaxSize().graphicsLayer { alpha = veil }.background(Color(0x8A000000))
|
||||
modifier = Modifier.fillMaxSize()
|
||||
.clickable(interactionSource = remember { MutableInteractionSource() }, indication = null) { host.open = null; a.onClose() },
|
||||
)
|
||||
androidx.compose.foundation.layout.BoxWithConstraints(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.CenterEnd) {
|
||||
@@ -507,9 +507,9 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
|
||||
SessionPrefs.SUSPEND_AUTO to stringResource(R.string.common_auto),
|
||||
SessionPrefs.SUSPEND_MANUAL to stringResource(R.string.mode_suspend_manual),
|
||||
SessionPrefs.SUSPEND_NEVER to stringResource(R.string.common_never),
|
||||
),
|
||||
) + if (a.steam) listOf(SessionPrefs.SUSPEND_NATIVE to stringResource(R.string.mode_suspend_native)) else emptyList(),
|
||||
a.suspendPolicy,
|
||||
note = stringResource(R.string.mode_suspend_note),
|
||||
note = stringResource(if (a.steam) R.string.mode_suspend_steam_note else R.string.mode_suspend_note),
|
||||
chipModifier = focus.track(page, "suspend"),
|
||||
onPick = a.onSuspendPolicy,
|
||||
)
|
||||
|
||||
@@ -598,7 +598,7 @@ fun ActionRow(label: String, hint: String?, button: String, onClick: () -> Unit)
|
||||
@Composable
|
||||
fun SettingsPage(
|
||||
host: MenuHost,
|
||||
title: String,
|
||||
title: String?,
|
||||
onBack: () -> Unit,
|
||||
eyebrow: String? = null,
|
||||
lede: String? = null,
|
||||
@@ -608,7 +608,7 @@ fun SettingsPage(
|
||||
scroll: androidx.compose.foundation.ScrollState? = null,
|
||||
scrollContent: Boolean = true,
|
||||
compactLayout: Boolean = false,
|
||||
/** Controls that remain below the title while the settings scroll, such as a tab strip. */
|
||||
/** Fixed controls below the title, or beside Back when the title is omitted. */
|
||||
header: (@Composable () -> Unit)? = null,
|
||||
modifier: Modifier = Modifier,
|
||||
content: @Composable ColumnScope.() -> Unit,
|
||||
@@ -624,7 +624,18 @@ fun SettingsPage(
|
||||
),
|
||||
verticalArrangement = Arrangement.spacedBy(if (compactLayout) 2.dp else 0.dp),
|
||||
) {
|
||||
if (narrow) {
|
||||
if (title == null) {
|
||||
Rise(0) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
BackLink(stringResource(R.string.mode_back), compact = true, onClick = onBack)
|
||||
if (header != null) Box(Modifier.weight(1f)) { header() }
|
||||
}
|
||||
}
|
||||
} else if (narrow) {
|
||||
// Back and the title share one line: a 4:3 screen has no height to spare.
|
||||
Rise(0) {
|
||||
Row(
|
||||
@@ -683,7 +694,7 @@ fun SettingsPage(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (header != null) header()
|
||||
if (header != null && title != null) header()
|
||||
Rise(3, Modifier.weight(1f).fillMaxWidth()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
||||
@@ -5,9 +5,13 @@ import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.luminance
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import com.droiddeck.launcher.core.AppUiPrefs
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
|
||||
class Palette(
|
||||
@@ -67,7 +71,7 @@ val LocalPalette = staticCompositionLocalOf { Themes.byId(Themes.GRAPHITE) }
|
||||
val Palette.onSignal: Color get() = if (signal.luminance() > 0.18f) Color(0xFF03111F) else Color.White
|
||||
|
||||
@Composable
|
||||
fun DroidDeckTheme(theme: String? = null, content: @Composable () -> Unit) {
|
||||
fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCALE, content: @Composable () -> Unit) {
|
||||
val id = theme ?: SessionPrefs.theme(LocalContext.current)
|
||||
val p = Themes.byId(id)
|
||||
val scheme = darkColorScheme(
|
||||
@@ -77,5 +81,13 @@ fun DroidDeckTheme(theme: String? = null, content: @Composable () -> Unit) {
|
||||
surfaceVariant = p.surfaceVariant, onSurfaceVariant = p.onSurfaceVariant,
|
||||
error = p.error,
|
||||
)
|
||||
CompositionLocalProvider(LocalPalette provides p) { MaterialTheme(colorScheme = scheme, content = content) }
|
||||
val baseDensity = LocalDensity.current
|
||||
val baseConfiguration = LocalConfiguration.current
|
||||
val density = remember(baseDensity, appScale) { scaledAppDensity(baseDensity, appScale) }
|
||||
val configuration = remember(baseConfiguration, appScale) { scaledAppConfiguration(baseConfiguration, appScale) }
|
||||
CompositionLocalProvider(
|
||||
LocalPalette provides p,
|
||||
LocalDensity provides density,
|
||||
LocalConfiguration provides configuration,
|
||||
) { MaterialTheme(colorScheme = scheme, content = content) }
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
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.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.heightIn
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.LinearProgressIndicator
|
||||
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.rememberCoroutineScope
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.frontend.DependencyDetector
|
||||
import com.droiddeck.launcher.frontend.PrefixInstalledDetector
|
||||
import com.droiddeck.launcher.frontend.SteamRedists
|
||||
import com.droiddeck.launcher.session.WinComponentNames
|
||||
import com.droiddeck.launcher.session.WinComponents
|
||||
import com.droiddeck.launcher.session.WinComponents.Support
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import androidx.compose.runtime.withFrameNanos
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.File
|
||||
|
||||
// Windows components for one added game, Bannerlator's list: what the game's folder suggests first,
|
||||
// then everything that installs here, then the ones that need a Windows installer (not yet). Each
|
||||
// one is a switch, downloaded the first time it is turned on for any game; the launch puts the
|
||||
// picked ones into the game's prefix (droiddeck-wincomponents).
|
||||
|
||||
/** Bannerlator's detector names installers; here the DLL-copy twin is the one that installs. */
|
||||
private fun installable(name: String, all: Map<String, WinComponents.Component>): String {
|
||||
val dll = when (name) {
|
||||
"oalinst" -> "oalinst_dll"
|
||||
else -> "${name}_dll"
|
||||
}
|
||||
val twin = all[dll]
|
||||
return if (twin != null && WinComponents.support(twin, all) == Support.READY) dll else name
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal fun WinComponentsDialog(
|
||||
appKey: String, gameName: String, gameDir: File?, byPad: Boolean,
|
||||
/** compatdata/<id>: what the prefix already has. [steamAppId]: a Steam title, whose appmanifest lists Steam's own redists. */
|
||||
compat: File? = null, steamAppId: Int? = null,
|
||||
onClose: () -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val coroutine = rememberCoroutineScope()
|
||||
val shown = rememberShown(onClose)
|
||||
val close = { shown.targetState = false }
|
||||
// null while the catalog loads; empty when it could not be had.
|
||||
var catalog by remember { mutableStateOf<Map<String, WinComponents.Component>?>(null) }
|
||||
var offline by remember { mutableStateOf(false) }
|
||||
var recommended by remember { mutableStateOf(emptyList<DependencyDetector.Recommendation>()) }
|
||||
var installed by remember { mutableStateOf(emptySet<String>()) }
|
||||
// Detector names (oalinst, physx...) already in the prefix from elsewhere.
|
||||
var present by remember { mutableStateOf(emptySet<String>()) }
|
||||
var picks by remember { mutableStateOf(WinComponents.picks(context, appKey)) }
|
||||
var progress by remember { mutableStateOf<Pair<String, Int>?>(null) }
|
||||
var error by remember { mutableStateOf<String?>(null) }
|
||||
var showWaiting by remember { mutableStateOf(false) }
|
||||
// With a pad: Done holds focus while the list loads, then the first component takes it; LB and RB
|
||||
// jump between the sections, since the full list runs past sixty switches.
|
||||
val recFocus = remember { FocusRequester() }
|
||||
val allFocus = remember { FocusRequester() }
|
||||
val waitFocus = remember { FocusRequester() }
|
||||
val doneFocus = remember { FocusRequester() }
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
val (entries, found) = withContext(Dispatchers.IO) {
|
||||
// The folder's own installers first, then what Steam installs with the game.
|
||||
val own = gameDir?.let { DependencyDetector.detect(it) } ?: emptyList()
|
||||
val steam = steamAppId?.let { SteamRedists.detect(gameDir, it) } ?: emptyList()
|
||||
WinComponents.fetch() to (own + steam)
|
||||
}
|
||||
offline = entries == null
|
||||
catalog = entries.orEmpty().associateBy { it.name }
|
||||
recommended = found
|
||||
present = withContext(Dispatchers.IO) { PrefixInstalledDetector.detect(compat) }
|
||||
installed = withContext(Dispatchers.IO) { WinComponents.installedIds(context).toSet() }
|
||||
}
|
||||
fun setPicks(next: List<String>) {
|
||||
picks = next
|
||||
coroutine.launch(Dispatchers.IO) { WinComponents.setPicks(context, appKey, next) }
|
||||
}
|
||||
fun toggle(id: String, on: Boolean) {
|
||||
// Switches stay enabled during a download - a disabled one drops the pad's focus - so a press
|
||||
// then is ignored here.
|
||||
if (progress != null) return
|
||||
error = null
|
||||
if (!on) { setPicks(picks - id); return }
|
||||
val all = catalog.orEmpty()
|
||||
val c = all[id]
|
||||
if (id in installed || c == null) { setPicks(picks + id); return }
|
||||
progress = id to -1
|
||||
coroutine.launch {
|
||||
val problem = withContext(Dispatchers.IO) {
|
||||
WinComponents.install(context, c, all) { stage, percent -> progress = stage to percent }
|
||||
}
|
||||
progress = null
|
||||
installed = withContext(Dispatchers.IO) { WinComponents.installedIds(context).toSet() }
|
||||
if (problem != null) error = problem else setPicks(picks + id)
|
||||
}
|
||||
}
|
||||
|
||||
val all = catalog
|
||||
val here = if (all == null) emptySet() else present.map { installable(it, all) }.toSet()
|
||||
fun supportOf(id: String): Support =
|
||||
all?.get(id)?.let { WinComponents.support(it, all) } ?: if (id in installed) Support.READY else Support.UNSUPPORTED
|
||||
val recIds = if (all == null) emptyList() else recommended.distinctBy { installable(it.componentName, all) }
|
||||
val ready = all.orEmpty().values.filter { WinComponents.support(it, all.orEmpty()) == Support.READY }.map { it.name }
|
||||
val extra = (installed + picks).filter { all?.containsKey(it) != true }
|
||||
val list = (ready + extra).distinct().sortedBy { WinComponentNames.of(it).lowercase() }
|
||||
val waiting = all.orEmpty().values.filter { WinComponents.support(it, all.orEmpty()) == Support.NEEDS_INSTALLER }
|
||||
.map { it.name }.sortedBy { WinComponentNames.of(it).lowercase() }
|
||||
val hasRec = all != null && recIds.any { supportOf(installable(it.componentName, all)) == Support.READY }
|
||||
val sections = listOfNotNull(recFocus.takeIf { hasRec }, allFocus.takeIf { list.isNotEmpty() },
|
||||
waitFocus.takeIf { waiting.isNotEmpty() }, doneFocus)
|
||||
var section by remember { mutableStateOf(0) }
|
||||
fun jump(step: Int) {
|
||||
section = (section + step + sections.size) % sections.size
|
||||
runCatching { sections[section].requestFocus() }
|
||||
}
|
||||
LaunchedEffect(all != null) {
|
||||
if (!byPad || all == null) return@LaunchedEffect
|
||||
repeat(2) { withFrameNanos { } }
|
||||
section = 0
|
||||
runCatching { sections.first().requestFocus() }
|
||||
}
|
||||
|
||||
AppDialog(shown, close, "winComponents", wide = true, modifier = Modifier.bumpers({ jump(-1) }, { jump(1) })) {
|
||||
PadFocus(byPad, doneFocus)
|
||||
DialogHeader(gameName, stringResource(R.string.wincomp_title))
|
||||
Small(stringResource(R.string.wincomp_applies))
|
||||
if (byPad) Small(stringResource(R.string.wincomp_pad_hint))
|
||||
if (all == null) Small(stringResource(R.string.wincomp_loading))
|
||||
if (offline) Small(stringResource(R.string.wincomp_offline), error = true)
|
||||
@Composable
|
||||
fun Item(id: String, reason: String?, focus: FocusRequester?) {
|
||||
val c = all?.get(id)
|
||||
val support = supportOf(id)
|
||||
val status = when {
|
||||
id in here && id !in picks -> stringResource(R.string.wincomp_already_here)
|
||||
id in installed -> stringResource(R.string.wincomp_downloaded)
|
||||
support == Support.NEEDS_INSTALLER -> stringResource(R.string.wincomp_needs_installer)
|
||||
support == Support.UNSUPPORTED -> stringResource(R.string.wincomp_unsupported)
|
||||
else -> null
|
||||
}
|
||||
// The catalog key stays in the detail: it is what a log or a bug report names.
|
||||
val detail = listOfNotNull(reason, c?.description?.takeIf { it.isNotEmpty() }, status, id).joinToString(" · ")
|
||||
val usable = support == Support.READY
|
||||
ComponentRow(
|
||||
WinComponentNames.of(id), detail, checked = id in picks, enabled = usable || id in picks,
|
||||
dim = !usable, modifier = if (usable && focus != null) Modifier.focusRequester(focus) else Modifier,
|
||||
) { on -> toggle(id, on) }
|
||||
}
|
||||
/** The section's requester goes to its first switch that can take focus. */
|
||||
fun firstUsable(ids: List<String>, focus: FocusRequester): (String) -> FocusRequester? {
|
||||
val first = ids.firstOrNull { supportOf(it) == Support.READY }
|
||||
return { id -> focus.takeIf { id == first } }
|
||||
}
|
||||
|
||||
if (all != null && recIds.isNotEmpty()) {
|
||||
Section(stringResource(R.string.wincomp_recommended))
|
||||
val focusOf = firstUsable(recIds.map { installable(it.componentName, all) }, recFocus)
|
||||
Panel {
|
||||
recIds.forEachIndexed { i, rec ->
|
||||
if (i > 0) Divider()
|
||||
val reason = stringResource(
|
||||
when (rec.kind) {
|
||||
DependencyDetector.Kind.BUNDLED -> R.string.wincomp_found_bundled
|
||||
DependencyDetector.Kind.SHIPPED -> R.string.wincomp_found_shipped
|
||||
DependencyDetector.Kind.STEAM -> R.string.wincomp_found_steam
|
||||
}, rec.reason,
|
||||
)
|
||||
val id = installable(rec.componentName, all)
|
||||
Item(id, reason, focusOf(id))
|
||||
}
|
||||
}
|
||||
} else if (all != null && gameDir != null) Small(stringResource(R.string.wincomp_no_recommendation))
|
||||
|
||||
if (list.isNotEmpty()) {
|
||||
Section(stringResource(R.string.wincomp_all, list.size))
|
||||
val focusOf = firstUsable(list, allFocus)
|
||||
Panel { list.forEachIndexed { i, id -> if (i > 0) Divider(); Item(id, null, focusOf(id)) } }
|
||||
}
|
||||
if (waiting.isNotEmpty()) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Section(stringResource(R.string.wincomp_installers, waiting.size))
|
||||
Spacer(Modifier.weight(1f))
|
||||
SecondaryButton(
|
||||
stringResource(if (showWaiting) R.string.wincomp_hide else R.string.wincomp_show), compact = true,
|
||||
modifier = Modifier.focusRequester(waitFocus),
|
||||
) { showWaiting = !showWaiting }
|
||||
}
|
||||
Small(stringResource(R.string.wincomp_installers_note))
|
||||
if (showWaiting) Panel { waiting.forEachIndexed { i, id -> if (i > 0) Divider(); Item(id, null, null) } }
|
||||
}
|
||||
|
||||
progress?.let { (stage, percent) ->
|
||||
Small(if (percent >= 0) "$stage · $percent%" else stage)
|
||||
if (percent >= 0) LinearProgressIndicator(progress = { percent / 100f }, modifier = Modifier.fillMaxWidth())
|
||||
else LinearProgressIndicator(Modifier.fillMaxWidth())
|
||||
}
|
||||
error?.let { Small(it, error = true) }
|
||||
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 4.dp)) {
|
||||
Small(stringResource(R.string.wincomp_next_launch))
|
||||
Spacer(Modifier.weight(1f))
|
||||
PrimaryButton(stringResource(R.string.game_env_done), enabled = progress == null, modifier = Modifier.focusRequester(doneFocus), onClick = close)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun Section(title: String) =
|
||||
Text(title.uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.5.sp, color = MaterialTheme.colorScheme.onSurfaceVariant)
|
||||
|
||||
@Composable
|
||||
private fun Panel(content: @Composable androidx.compose.foundation.layout.ColumnScope.() -> Unit) =
|
||||
Column(Modifier.fillMaxWidth().clip(Shape14).background(MaterialTheme.colorScheme.surface).border(1.dp, LocalPalette.current.line, Shape14), content = content)
|
||||
|
||||
@Composable
|
||||
private fun Divider() =
|
||||
Box(Modifier.fillMaxWidth().padding(horizontal = 14.dp).heightIn(min = 1.dp, max = 1.dp).background(LocalPalette.current.line))
|
||||
|
||||
@Composable
|
||||
private fun ComponentRow(name: String, detail: String, checked: Boolean, enabled: Boolean, dim: Boolean, modifier: Modifier, onChange: (Boolean) -> Unit) {
|
||||
val colors = MaterialTheme.colorScheme
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 14.dp, vertical = 10.dp).alpha(if (dim) 0.55f else 1f),
|
||||
) {
|
||||
Column(Modifier.weight(1f)) {
|
||||
Text(name, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground)
|
||||
if (detail.isNotEmpty()) Text(detail, fontSize = 12.sp, lineHeight = 16.sp, color = colors.onSurfaceVariant)
|
||||
}
|
||||
ToggleSwitch(checked, enabled, name, modifier, onChange)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,952 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">DroidDeck</string>
|
||||
<string-array name="loading_hints">
|
||||
<item>Le premier lancement télécharge Steam. Cela peut prendre quelques minutes.</item>
|
||||
<item>Par défaut, quitter l\'application met Steam en pause ; y revenir reprend là où vous vous étiez arrêté.</item>
|
||||
<item>Votre manette apparaîtra comme une manette Xbox 360. Sinon, utilisez les commandes à l\'écran.</item>
|
||||
</string-array>
|
||||
<string-array name="loading_hints_desktop">
|
||||
<item>Le premier lancement configure le bureau. Cela peut prendre quelques minutes.</item>
|
||||
<item>Par défaut, quitter l\'application met la session en pause ; y revenir reprend là où vous vous étiez arrêté.</item>
|
||||
<item>Le tactile fonctionne comme un pavé tactile : faites glisser pour déplacer le pointeur, tapotez pour cliquer.</item>
|
||||
<item>Votre manette apparaîtra comme une manette Xbox 360. Sinon, utilisez les commandes à l\'écran.</item>
|
||||
</string-array>
|
||||
<string name="session_channel">Session</string>
|
||||
<string name="session_channel_description">Affiché lorsqu\'une session Steam ou Bureau est ouverte</string>
|
||||
<string name="session_notification">Steam est en cours d\'exécution</string>
|
||||
<string name="session_notification_paused">Session en pause - Appuyez pour reprendre quand vous êtes prêt</string>
|
||||
<string name="resume_session">Reprendre</string>
|
||||
<string name="stop_session">Terminer cette session</string>
|
||||
<string name="frame_gen_title">Génération d\'images</string>
|
||||
<string name="frame_gen_hint">Sélectionnez le mode de génération d\'images à utiliser</string>
|
||||
<string name="frame_gen_off">Désactivé</string>
|
||||
<string name="frame_gen_winfg">Win-FG %1$d×</string>
|
||||
<string name="frame_gen_lsfg">LSFG %1$d×</string>
|
||||
<string name="frame_gen_lsfg_adaptive">LSFG Adaptatif %1$d</string>
|
||||
<string name="lsfg_needs_steam">Nécessite Lossless Scaling sur Steam</string>
|
||||
<string name="lsfg_needs_install">Installez Lossless Scaling sur Steam ou importez Lossless.dll</string>
|
||||
<string name="lsfg_import">Importer Lossless.dll…</string>
|
||||
<string name="lsfg_using_steam">Utilise la version sur Steam</string>
|
||||
<string name="lsfg_using_import">Utilise la version importée</string>
|
||||
<string name="lsfg_pick_title">Sélectionner le fichier Lossless.dll</string>
|
||||
<string name="lsfg_imported">Lossless.dll importé</string>
|
||||
<string name="lsfg_import_unchanged">Ce Lossless.dll est déjà utilisé</string>
|
||||
<string name="lsfg_import_not_owned">Ce compte Steam ne possède pas Lossless Scaling</string>
|
||||
<string name="lsfg_import_invalid">Ce fichier n\'est pas le Lossless.dll de Lossless Scaling</string>
|
||||
<string name="lsfg_import_failed">Impossible de préparer LSFG à partir de ce Lossless.dll</string>
|
||||
<string name="lsfg_problem_missing">LSFG nécessite Lossless Scaling depuis Steam, ou un fichier Lossless.dll importé</string>
|
||||
<string name="lsfg_problem_failed">LSFG ne peut pas préparer ses shaders à partir de ce Lossless.dll</string>
|
||||
<string name="hud_fg_unsupported">%1$s : non pris en charge</string>
|
||||
<string name="hud_fg_failed">%1$s : échec du moteur</string>
|
||||
<string name="hud_fg_needs_lossless">%1$s : nécessite Lossless Scaling</string>
|
||||
<string name="hud_fg_starting">%1$s %2$s · Démarrage en cours</string>
|
||||
<string name="added_games_import_hint">Un dossier contenant plusieurs sous-dossiers, chaque sous-dossier correspondant à un jeu Windows. Les jeux que vous possédez sur Steam utiliseront les entrées Steam correspondantes après le redémarrage de Steam ; les autres jeux deviendront des raccourcis non-Steam.</string>
|
||||
<string name="second_library_import_hint">Ajoutez une bibliothèque Steam et analysez-y les jeux Windows. Les jeux déjà possédés utiliseront les entrées Steam correspondantes, les autres deviendront des raccourcis non-Steam.</string>
|
||||
<string name="added_games_forget_hint">« Oublier » supprimera ces raccourcis lors de la prochaine session. Mais les fichiers resteront sur le disque.</string>
|
||||
<string name="game_env_title">Environnement de jeu</string>
|
||||
<string name="game_env_hint">Variables d\'environnement pour les jeux Proton.</string>
|
||||
<string name="game_env_edit">Modifier</string>
|
||||
<string name="game_env_shared">Tous les jeux Proton</string>
|
||||
<string name="game_env_scope">Profil</string>
|
||||
<string name="game_env_app_id">ID d\'application Steam</string>
|
||||
<string name="game_env_open">Ouvrir</string>
|
||||
<string name="game_env_profile">Jeu %1$s</string>
|
||||
<string name="game_env_add">Ajouter une variable</string>
|
||||
<string name="game_env_name">Nom de la variable</string>
|
||||
<string name="game_env_value">Valeur</string>
|
||||
<string name="game_env_save">Enregistrer</string>
|
||||
<string name="game_env_remove">Supprimer</string>
|
||||
<string name="game_env_restore">Rétablir l\'héritage</string>
|
||||
<string name="game_env_reset">Réinitialiser ce profil</string>
|
||||
<string name="game_env_unset">Annuler la définition pour ce profil</string>
|
||||
<string name="game_env_empty">Aucune variable définie.</string>
|
||||
<string name="game_env_inherited">Hérité</string>
|
||||
<string name="game_env_custom">Variable personnalisée</string>
|
||||
<string name="game_env_error">Impossible de charger ou d\'enregistrer. Vérifiez l\'espace de stockage restant et réessayez.</string>
|
||||
<string name="game_env_invalid">Veuillez saisir un nom et une valeur valides, jusqu\'à 8192 caractères.</string>
|
||||
<string name="game_env_unused">L\'environnement d\'exécution Proton standard ne lit pas cette variable.</string>
|
||||
<string name="game_env_loading">Chargement…</string>
|
||||
<string name="game_env_feature">Remplacement du niveau de fonctionnalité D3D12. 12_2 signalera les capacités DirectX 12 Ultimate ; les fonctionnalités non prises en charge peuvent entraîner un échec. Laissez vide pour la détection automatique.</string>
|
||||
<string name="game_env_shader">Remplacement du modèle de shader D3D12. 6_9 nécessite un VKD3D suffisamment récent et des fonctionnalités GPU correspondantes. Laissez vide pour la détection automatique.</string>
|
||||
<string name="game_env_cache">Maintient le cache de shaders Mesa activé pour réduire les recompilations. Définir sur false pour l\'activer.</string>
|
||||
<string name="game_env_cache_size">Taille maximale du cache de shaders Mesa, par exemple 1G. Un cache plus grand occupe plus d\'espace de stockage.</string>
|
||||
<string name="game_env_vkd3d_config">Options VKD3D pour D3D12. nodxr désactive le ray tracing ; à utiliser uniquement si le jeu le nécessite.</string>
|
||||
<string name="game_env_proton_log">Définir sur 1 pour générer un journal de diagnostic Proton. La journalisation peut réduire les performances et consommer de l\'espace de stockage.</string>
|
||||
<string name="game_env_wined3d">Définir sur 1 pour utiliser WineD3D (basé sur OpenGL) au lieu de DXVK, pour tester la compatibilité D3D9–11.</string>
|
||||
<string name="game_env_xalia">Définir sur 0 pour désactiver l\'assistant de navigation à la manette de Proton pour ce jeu.</string>
|
||||
<string name="game_env_hud">Superposition DXVK pour D3D9–11. fps affiche le taux de rafraîchissement ; annuler la définition masque la superposition.</string>
|
||||
<string name="game_env_dxvk_config">Paramètres DXVK séparés par des points-virgules. Les versions récentes utilisent dxvk.maxFrameRate pour limiter le taux de rafraîchissement ; pour un jeu quotidien, il est recommandé d\'utiliser le limiteur de taux de rafraîchissement de session.</string>
|
||||
<string name="game_env_vkd3d_limit">Limite de taux de rafraîchissement D3D12. 0 désactive la limite.</string>
|
||||
<string name="game_env_glthread">Mesa OpenGL multithread. Pour les jeux OpenGL limités par le CPU, true peut aider ; à tester jeu par jeu.</string>
|
||||
<string name="fex_preset_title">Préréglages FEX</string>
|
||||
<string name="fex_next_launch">Prendra effet au prochain lancement du jeu.</string>
|
||||
<string name="game_settings_title">Jeu</string>
|
||||
<string name="fex_default_label">FEX par défaut</string>
|
||||
<string name="fex_default_detail">Utiliser les paramètres par défaut de FEX.</string>
|
||||
<string name="fex_stability_label">Stabilité</string>
|
||||
<string name="fex_stability_detail">Paramètres les plus sûrs, les plus lents.</string>
|
||||
<string name="fex_compatibility_label">Compatibilité</string>
|
||||
<string name="fex_compatibility_detail">TSO complet + multiblock.</string>
|
||||
<string name="fex_intermediate_label">Intermédiaire</string>
|
||||
<string name="fex_intermediate_detail">Paramètres TSO équilibrés, avec une précision x87 réduite.</string>
|
||||
<string name="fex_performance_label">Performance</string>
|
||||
<string name="fex_performance_detail">Désactive tous les TSO ; active le multiblock.</string>
|
||||
<string name="fex_performance_tso_label">Performance + TSO</string>
|
||||
<string name="fex_performance_tso_detail">Paramètres de performance, avec TSO principal activé.</string>
|
||||
<string name="fex_extreme_label">Extrême</string>
|
||||
<string name="fex_extreme_detail">Désactive la vérification du code auto-modifiant. Les jeux JIT et les DRM peuvent ne pas fonctionner.</string>
|
||||
<string name="fex_extreme_tso_label">Extrême + TSO</string>
|
||||
<string name="fex_extreme_tso_detail">Paramètres extrêmes, avec TSO principal activé.</string>
|
||||
<string name="fex_extreme_gn_label">Extrême-gn</string>
|
||||
<string name="fex_extreme_gn_detail">Paramètres de performance, active TSC et les astuces de métadonnées. Il est recommandé d\'essayer d\'abord ce mode avant « Extrême ».</string>
|
||||
<string name="fex_denuvo_label">Denuvo</string>
|
||||
<string name="fex_denuvo_detail">Paramètres de performance, active la vérification complète du code et masque les bits de l\'hyperviseur.</string>
|
||||
<string name="game_env_custom_value">Valeur personnalisée</string>
|
||||
<string name="game_env_select_value">Sélectionner une valeur</string>
|
||||
<string name="user_apps_section">Émulateurs et applications</string>
|
||||
<string name="user_apps_add">Ajouter</string>
|
||||
<string name="user_apps_add_detail">Votre propre application ou jeu</string>
|
||||
<string name="user_apps_kind_script">Script</string>
|
||||
<string name="user_apps_kind_appimage">AppImage</string>
|
||||
<string name="user_apps_kind_flatpak">Flatpak</string>
|
||||
<string name="user_apps_progress">%1$s · %2$s</string>
|
||||
<string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string>
|
||||
<string name="user_apps_starting">Démarrage…</string>
|
||||
<string name="user_apps_added">%1$s ajouté</string>
|
||||
<string name="user_apps_removed">%1$s supprimé</string>
|
||||
<string name="user_apps_back">Bureau</string>
|
||||
<string name="user_apps_gone">Cette application n\'existe plus. Veuillez la resélectionner depuis le bureau.</string>
|
||||
<string name="user_apps_open">Ouvrir %1$s</string>
|
||||
<string name="user_apps_remove">Supprimer</string>
|
||||
<string name="user_apps_remove_confirm">Appuyez à nouveau pour supprimer</string>
|
||||
<string name="user_apps_stop_session">Veuillez d\'abord terminer la session avant de supprimer</string>
|
||||
<string name="user_apps_script_linked">Exécute %1$s depuis son dossier et lie ce dossier à la session. La suppression de l\'application n\'affectera pas ce dossier.</string>
|
||||
<string name="user_apps_script_copied">Exécute %1$s depuis un dossier copié à l\'intérieur de DroidDeck. La suppression de l\'application supprimera la copie, mais pas le fichier d\'origine.</string>
|
||||
<string name="user_apps_runtime_required">Veuillez d\'abord installer l\'environnement d\'exécution Linux</string>
|
||||
<string name="user_apps_file_gone">Le fichier n\'existe plus</string>
|
||||
<string name="user_apps_no_space">Espace disponible insuffisant : %1$s est nécessaire pour copier ce dossier</string>
|
||||
<string name="user_apps_copying">Copie de %1$s en cours</string>
|
||||
<string name="user_apps_failed">Échec de l\'ajout de l\'application</string>
|
||||
<string name="user_apps_github_checking">Recherche des versions de %1$s</string>
|
||||
<string name="user_apps_github_unreachable">Impossible de lire les versions de %1$s</string>
|
||||
<string name="user_apps_github_no_appimage">%1$s ne fournit pas de version ARM64 AppImage</string>
|
||||
<string name="user_apps_downloading">Téléchargement de %1$s en cours</string>
|
||||
<string name="user_apps_download_failed">Échec du téléchargement</string>
|
||||
<string name="user_apps_update_failed">Échec de la mise à jour de l\'application</string>
|
||||
<string name="user_apps_icon_failed">Impossible de lire cette icône</string>
|
||||
<string name="user_apps_saved">%1$s enregistré</string>
|
||||
<string name="user_apps_edit">Modifier</string>
|
||||
<string name="user_apps_check_updates">Vérifier les mises à jour</string>
|
||||
<string name="user_apps_checking_updates">Vérification des mises à jour…</string>
|
||||
<string name="user_apps_update_to">Mettre à jour vers %1$s</string>
|
||||
<string name="user_apps_up_to_date">À jour · %1$s</string>
|
||||
<string name="user_apps_updated">%1$s mis à jour</string>
|
||||
<string name="user_apps_github_version">%1$s · %2$s</string>
|
||||
<string name="add_app_title">Ajouter une application</string>
|
||||
<string name="add_app_tab_script">Script</string>
|
||||
<string name="add_app_tab_appimage">AppImage</string>
|
||||
<string name="add_app_tab_github">GitHub</string>
|
||||
<string name="add_app_tab_flatpak">Flatpak</string>
|
||||
<string name="add_app_script_hint">Un fichier .sh. Il s\'exécutera depuis son propre dossier et s\'affichera en plein écran via gamescope.</string>
|
||||
<string name="add_app_appimage_hint">Un AppImage ARM64 (aarch64). Il sera décompressé dans l\'environnement d\'exécution Linux lors de la première utilisation.</string>
|
||||
<string name="add_app_github_hint">Installer l\'AppImage ARM64 depuis la dernière version du dépôt.</string>
|
||||
<string name="add_app_flatpak_hint">ID d\'application Flathub ou sa page Flathub. Si Flatpak n\'est pas encore configuré, il le sera d\'abord.</string>
|
||||
<string name="add_app_file">Fichier</string>
|
||||
<string name="add_app_no_file">Aucun fichier sélectionné</string>
|
||||
<string name="add_app_choose_file">Choisir un fichier</string>
|
||||
<string name="add_app_change_file">Modifier</string>
|
||||
<string name="add_app_pick_script">Sélectionner le script</string>
|
||||
<string name="add_app_pick_appimage">Sélectionner l\'AppImage</string>
|
||||
<string name="add_app_pick_icon">Sélectionner l\'icône</string>
|
||||
<string name="add_app_repository">Dépôt</string>
|
||||
<string name="add_app_repository_placeholder">owner/repo ou lien github.com</string>
|
||||
<string name="add_app_repository_invalid">N\'est pas un dépôt GitHub</string>
|
||||
<string name="add_app_flatpak_id">ID d\'application</string>
|
||||
<string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string>
|
||||
<string name="add_app_flatpak_invalid">N\'est pas un ID d\'application Flathub valide</string>
|
||||
<string name="add_app_source">Source</string>
|
||||
<string name="add_app_appearance">Afficher sur le bureau</string>
|
||||
<string name="add_app_preview_name">Nouvelle application</string>
|
||||
<string name="add_app_name">Nom</string>
|
||||
<string name="add_app_name_placeholder">Depuis l\'application</string>
|
||||
<string name="add_app_icon">Icône</string>
|
||||
<string name="add_app_icon_default">Icône par défaut</string>
|
||||
<string name="add_app_choose_icon">Choisir une icône</string>
|
||||
<string name="add_app_clear_icon">Effacer</string>
|
||||
<string name="add_app_icon_suggestions">Depuis le dépôt</string>
|
||||
<string name="add_app_icon_searching">Recherche d\'icônes…</string>
|
||||
<string name="add_app_icon_reset">Par défaut</string>
|
||||
<string name="edit_app_title">Modifier %1$s</string>
|
||||
<string name="edit_app_save">Enregistrer</string>
|
||||
<string name="add_app_checking_folder">Vérification du dossier…</string>
|
||||
<string name="add_app_folder_linked">Son dossier est lié à la session : %1$s</string>
|
||||
<string name="add_app_folder_copied">Ce dossier contient des programmes Linux qui ne peuvent pas s\'exécuter depuis le stockage partagé. Il sera donc copié dans DroidDeck (%1$s).</string>
|
||||
<string name="add_app_confirm">Ajouter</string>
|
||||
<string name="add_app_cancel">Annuler</string>
|
||||
<string name="add_app_runtime_required">Veuillez d\'abord installer l\'environnement d\'exécution Linux depuis les « Paramètres ».</string>
|
||||
<string name="add_app_busy">Veuillez attendre que %1$s soit terminé.</string>
|
||||
<string name="common_cancel">Annuler</string>
|
||||
<string name="common_auto">Auto</string>
|
||||
<string name="common_never">Jamais</string>
|
||||
<string name="common_always">Toujours</string>
|
||||
<string name="common_uninstall">Désinstaller</string>
|
||||
<string name="common_check">Vérifier</string>
|
||||
<string name="common_update">Mettre à jour</string>
|
||||
<string name="common_checking">Vérification…</string>
|
||||
<string name="common_working">Traitement en cours…</string>
|
||||
<string name="common_forget">Oublier</string>
|
||||
<string name="common_add_ellipsis">Ajouter…</string>
|
||||
<string name="common_use">Utiliser</string>
|
||||
<string name="common_applies_next_session">Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_steam_title">Session Steam</string>
|
||||
<string name="mode_desktop_title">Session Bureau</string>
|
||||
<string name="mode_display">Affichage</string>
|
||||
<string name="mode_resolution">Résolution</string>
|
||||
<string name="mode_res_720">Max 720p</string>
|
||||
<string name="mode_res_900">Max 900p</string>
|
||||
<string name="mode_res_1080">Max 1080p</string>
|
||||
<string name="mode_res_native">Native</string>
|
||||
<string name="mode_res_default">%1$s (par défaut)</string>
|
||||
<string name="mode_res_custom_value">Personnalisée · %1$d×%2$d</string>
|
||||
<string name="mode_res_custom">Personnalisée…</string>
|
||||
<string name="mode_res_note">720p peut rendre les menus plus réactifs.</string>
|
||||
<string name="mode_ratio">Format d\'écran</string>
|
||||
<string name="mode_ratio_custom">Défini par la résolution personnalisée.</string>
|
||||
<string name="mode_ratio_auto">Le mode automatique utilise au moins 16:9.</string>
|
||||
<string name="mode_fps">Limite de taux de rafraîchissement</string>
|
||||
<string name="mode_fps_note">Limite le taux de rafraîchissement de toute la session. Le moniteur basculera vers un taux de rafraîchissement divisible par cette limite.</string>
|
||||
<string name="mode_hdr">HDR</string>
|
||||
<string name="mode_hdr10">Sortie HDR10</string>
|
||||
<string name="mode_hdr_unavailable">Non disponible : %1$s.</string>
|
||||
<string name="mode_hdr_restart">Prendra effet après le redémarrage de l\'application.</string>
|
||||
<string name="mode_drivers">Pilotes</string>
|
||||
<string name="mode_gpu_drivers">Pilotes GPU</string>
|
||||
<string name="mode_gpu_drivers_hint">Partagés entre Steam et le bureau. À configurer dans la page « Composants ».</string>
|
||||
<string name="mode_touch_controls">Tactile et contrôles</string>
|
||||
<string name="mode_touch">Tactile</string>
|
||||
<string name="mode_touch_touchpad">Pavé tactile</string>
|
||||
<string name="mode_touch_direct">Direct</string>
|
||||
<string name="mode_touch_note">Auto : pavé tactile pour le bureau, tactile direct pour Steam.</string>
|
||||
<string name="mode_osc">Commandes à l\'écran</string>
|
||||
<string name="mode_osc_qam">Steam + QAM</string>
|
||||
<string name="mode_osc_note">Le mode automatique affiche les commandes à l\'écran lorsqu\'aucune manette n\'est connectée.</string>
|
||||
<string name="mode_controller">Manette</string>
|
||||
<string name="mode_controller_hint">Comment Steam reconnaît votre manette. Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_controller_deck">Manette Steam Deck</string>
|
||||
<string name="mode_controller_x360">Manette Xbox 360</string>
|
||||
<string name="mode_controller_note">Deck : fournit un bouton d\'accès rapide et un gyroscope. Xbox 360 : utilisez Guide+A pour ouvrir l\'accès rapide.</string>
|
||||
<string name="mode_back">Retour</string>
|
||||
<string name="mode_session">Session</string>
|
||||
<string name="mode_suspend">Comportement en arrière-plan</string>
|
||||
<string name="mode_suspend_hint">Comportement lorsque l\'application est masquée ou que l\'écran est éteint.</string>
|
||||
<string name="mode_suspend_manual">Manuel</string>
|
||||
<string name="mode_suspend_note">Le mode automatique met en pause en arrière-plan et reprend à l\'affichage. Le mode manuel nécessite d\'appuyer sur « Reprendre ». Ne reste jamais en cours d\'exécution.</string>
|
||||
<string name="mode_startup">Démarrage</string>
|
||||
<string name="mode_steam_startup">Lancer Steam à l\'ouverture de DroidDeck</string>
|
||||
<string name="mode_steam_startup_hint">Ouvre une session Steam au démarrage de DroidDeck.</string>
|
||||
<string name="mode_decky">Decky</string>
|
||||
<string name="mode_decky_checking">Vérification des versions…</string>
|
||||
<string name="mode_decky_ready">Prêt à installer %1$s.</string>
|
||||
<string name="mode_decky_none">Aucune version compatible trouvée. Veuillez réessayer plus tard.</string>
|
||||
<string name="mode_decky_installed">Installé · %1$s</string>
|
||||
<string name="mode_decky_update">Mise à jour disponible · %1$s</string>
|
||||
<string name="mode_decky_current">À jour · %1$s</string>
|
||||
<string name="mode_decky_loader">Chargeur</string>
|
||||
<string name="mode_decky_install_latest">Installer la dernière version</string>
|
||||
<string name="mode_decky_on">Démarre avec Steam. Une fois activé, d\'autres applications sur cet appareil peuvent contrôler Steam.</string>
|
||||
<string name="mode_decky_off">Désactivé. Le port de débogage distant de Steam reste fermé.</string>
|
||||
<string name="mode_decky_remove_title">Désinstaller Decky Loader ?</string>
|
||||
<string name="mode_decky_remove_text">Supprime le chargeur. Vos plugins et paramètres seront conservés.</string>
|
||||
<string name="mode_client">Client</string>
|
||||
<string name="mode_deck_mode">Mode Steam Deck</string>
|
||||
<string name="mode_deck_mode_hint">Interface Steam Deck et contrôles de performance à accès rapide. Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_mangoapp">Superposition de performance</string>
|
||||
<string name="mode_mangoapp_hint">Désactivez cette option si les jeux plantent ou affichent un écran noir en mode Deck. Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_branch">Branche du client</string>
|
||||
<string name="mode_branch_deck">Bêta Steam Deck (requis pour le mode Deck).</string>
|
||||
<string name="mode_branch_hint">Prendra effet à la prochaine session. Steam peut se mettre à jour une fois de lui-même.</string>
|
||||
<string name="mode_branch_public">Bêta</string>
|
||||
<string name="mode_branch_deck_beta">Bêta Steam Deck</string>
|
||||
<string name="mode_branch_note">Le mode Deck utilise toujours la version bêta de Steam Deck.</string>
|
||||
<string name="mode_added_games">Jeux ajoutés</string>
|
||||
<string name="mode_added_none">Aucun dossier de jeu contenant un .exe trouvé</string>
|
||||
<string name="mode_games_folder">Dossier de jeux</string>
|
||||
<string name="mode_games_folder_another">Autre dossier de jeux</string>
|
||||
<string name="mode_added_art">Images depuis Steam</string>
|
||||
<string name="mode_added_art_hint">Complète les images manquantes selon le nom du dossier. Les fichiers cover.jpg, hero.jpg, logo.png ou icon.png dans le dossier du jeu sont prioritaires.</string>
|
||||
<string name="mode_added_launches">Lancer %1$s</string>
|
||||
<string name="mode_added_launches_in">Lancer %1$s · dans %2$s</string>
|
||||
<string name="mode_added_choose">Choisir un autre fichier…</string>
|
||||
<string name="mode_added_exe_note">Utilise par défaut le .exe portant le même nom que le dossier, sinon le .exe le plus volumineux.</string>
|
||||
<string name="mode_fill">Étirer le jeu pour remplir l\'écran</string>
|
||||
<string name="mode_fill_hint">Maintient en plein écran les jeux capables de se redimensionner. Désactivez cette option si le jeu s\'affiche en petit. Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_stretch169">Étirer les jeux 16:9</string>
|
||||
<string name="mode_stretch169_hint">Sur les écrans dont le rapport d\'aspect est inférieur à 16:9, étire le jeu pour remplir l\'écran au lieu d\'afficher des bandes noires. Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_audio">Audio</string>
|
||||
<string name="mode_directaudio">Utiliser DirectAudio pour le jeu</string>
|
||||
<string name="mode_directaudio_hint">Contourne PulseAudio pour réduire la latence.</string>
|
||||
<string name="mode_client_audio">Audio du client Steam</string>
|
||||
<string name="mode_client_audio_hint">Prendra effet à la prochaine session.</string>
|
||||
<string name="mode_client_audio_classic">Classique</string>
|
||||
<string name="mode_client_audio_direct">DirectAudio</string>
|
||||
<string name="mode_mic">Microphone</string>
|
||||
<string name="mode_mic_hint">Utilisé pour le chat vocal.</string>
|
||||
<string name="mode_network">Réseau</string>
|
||||
<string name="mode_wifi_discovery">Découverte Wi-Fi</string>
|
||||
<string name="mode_wifi_discovery_hint">Affiche les noms Wi-Fi et les réseaux à proximité dans Steam.</string>
|
||||
<string name="mode_wifi_location_off">Les services de localisation sont désactivés.</string>
|
||||
<string name="mode_wifi_permission_denied">L\'autorisation de localisation n\'a pas été accordée.</string>
|
||||
<string name="mode_wifi_open_settings">Ouvrir les paramètres</string>
|
||||
<string name="mode_wifi_continue">Continuer</string>
|
||||
<string name="mode_wifi_explain_title">Activer la découverte Wi-Fi ?</string>
|
||||
<string name="mode_wifi_explain_text">Android a besoin de l\'autorisation de localisation pour lire les noms Wi-Fi et découvrir les réseaux à proximité. DroidDeck utilise cette autorisation pour afficher ces réseaux dans Steam. Nous ne suivons pas votre position. L\'accès à Internet reste possible sans cette autorisation.</string>
|
||||
<string name="mode_storage">Stockage des jeux</string>
|
||||
<string name="mode_storage_auto">Auto - Utiliser la carte SD si disponible</string>
|
||||
<string name="mode_storage_auto_none">Auto - Utiliser la carte SD si disponible (aucune carte SD actuellement)</string>
|
||||
<string name="mode_storage_internal">Stockage interne uniquement</string>
|
||||
<string name="mode_storage_folder">Dossier : %1$s</string>
|
||||
<string name="mode_second_library">Bibliothèque secondaire</string>
|
||||
<string name="mode_storage_note">Les jeux lisant des ressources depuis une carte SD ou un stockage partagé peuvent saccader.</string>
|
||||
<string name="mode_choose_folder">Choisir un dossier…</string>
|
||||
<string name="mode_renderer">Rendu</string>
|
||||
<string name="mode_desktop_renderer">Moteur de rendu du bureau</string>
|
||||
<string name="mode_renderer_hint">Responsable du dessin du bureau.</string>
|
||||
<string name="mode_renderer_vulkan">vulkan - GPU</string>
|
||||
<string name="mode_renderer_gles2">gles2 - GPU (expérimental)</string>
|
||||
<string name="mode_renderer_pixman">pixman - Logiciel</string>
|
||||
<string name="mode_renderer_note">Vulkan utilise le GPU pour exécuter les programmes de bureau, et bascule vers pixman en cas d\'échec. Avec pixman, les jeux s\'exécutent toujours en plein écran sur le GPU.</string>
|
||||
<string name="mode_custom_res_title">Résolution personnalisée</string>
|
||||
<string name="mode_custom_res_text">Remplace la limite de résolution et le format d\'écran. Les dimensions ne correspondant pas à l\'écran afficheront des bandes noires.</string>
|
||||
<string name="mode_width">Largeur</string>
|
||||
<string name="mode_height">Hauteur</string>
|
||||
<string name="mode_custom_res_range">Plage : 320×240 à 3840×2160.</string>
|
||||
<plurals name="mode_added_count">
|
||||
<item quantity="one">%1$d jeu</item>
|
||||
<item quantity="other">%1$d jeux</item>
|
||||
</plurals>
|
||||
<string name="common_ok">OK</string>
|
||||
<string name="common_delete">Supprimer</string>
|
||||
<string name="common_restore">Restaurer</string>
|
||||
<string name="common_download">Télécharger</string>
|
||||
<string name="common_delete_named">Supprimer %1$s</string>
|
||||
<string name="common_size_mb">%1$.1f Mo</string>
|
||||
<string name="comp_runtime_driver">Pilote d\'environnement d\'exécution</string>
|
||||
<string name="comp_runtime_driver_hint">Utilisé par Steam, les jeux et le bureau. Prendra effet à la prochaine session.</string>
|
||||
<string name="comp_import_turnip">Importer Turnip zip…</string>
|
||||
<string name="comp_display_driver">Pilote d\'affichage</string>
|
||||
<string name="comp_display_driver_hint">Responsable de la sortie vidéo vers l\'écran dans les deux modes. Prendra effet après le redémarrage de l\'application.</string>
|
||||
<string name="comp_import_adrenotools">Importer AdrenoTools zip…</string>
|
||||
<string name="comp_never">Jamais</string>
|
||||
<string name="comp_nightlies_checked">Nightlies vérifié le %1$s</string>
|
||||
<string name="comp_title">Composants</string>
|
||||
<string name="comp_about">À propos des composants</string>
|
||||
<string name="comp_check_drivers">Vérifier les nouveaux pilotes</string>
|
||||
<string name="comp_check_nightlies">Vérifier les nouveaux paquets dans Nightlies</string>
|
||||
<string name="comp_proton">Proton</string>
|
||||
<string name="comp_proton_note">Les mises à jour de Steam remplacent le Proton de Valve ; les fichiers originaux de chaque version sont conservés.</string>
|
||||
<string name="comp_swapped">%1$s · %2$d remplacé(s)</string>
|
||||
<string name="comp_all_original">%1$s · Tout est original</string>
|
||||
<string name="comp_game_running_suffix">%1$s · Jeu en cours d\'exécution</string>
|
||||
<string name="comp_gpu_drivers">Pilotes GPU</string>
|
||||
<string name="comp_reapplied">%1$s · Réappliqué au lancement de %2$s</string>
|
||||
<string name="comp_next_queued">Suivant : %1$s · Après la fermeture du jeu</string>
|
||||
<string name="comp_in_use">%1$s en cours d\'utilisation : %2$s</string>
|
||||
<string name="comp_waits">En attente de la fermeture du jeu</string>
|
||||
<string name="comp_applies_next_game">Prendra effet au prochain lancement du jeu</string>
|
||||
<string name="comp_import_zip">Importer .zip</string>
|
||||
<string name="comp_reading">Lecture de Proton…</string>
|
||||
<string name="comp_no_proton">Proton n\'est pas encore installé. Lancez Steam une fois pour télécharger son Proton ARM64, ou ajoutez GE-Proton ou CachyOS depuis les « Paramètres ».</string>
|
||||
<string name="comp_original">Original · %1$s</string>
|
||||
<string name="comp_this_build">%1$s · Version actuelle</string>
|
||||
<string name="comp_earlier_build">%1$s · Version antérieure</string>
|
||||
<string name="comp_installed_count">Installé · %1$d</string>
|
||||
<string name="comp_nothing_stored">Rien n\'a encore été enregistré pour %1$s. Les fichiers fournis avec ce Proton seront enregistrés comme fichiers originaux.</string>
|
||||
<string name="comp_waits_long">Un jeu utilise actuellement ce Proton, il faut donc attendre sa fermeture.</string>
|
||||
<string name="comp_applies_long">Prendra effet au prochain lancement du jeu.</string>
|
||||
<string name="comp_swap_title">Remplacer %1$s ?</string>
|
||||
<string name="comp_swap_body">Placer %1$s dans %2$s ? Ses fichiers originaux continueront d\'être conservés. %3$s</string>
|
||||
<string name="comp_restore_title">Restaurer %1$s ?</string>
|
||||
<string name="comp_restore_body">Remettre les fichiers originaux de %1$s dans %2$s ? %3$s</string>
|
||||
<string name="comp_delete_package_body">Supprime ce paquet de l\'application. Il pourra être téléchargé à nouveau ultérieurement.</string>
|
||||
<string name="comp_delete_original_title">Supprimer cette version originale ?</string>
|
||||
<string name="comp_delete_original_body">Cette version originale de %1$s provient d\'une version antérieure de %2$s. La version originale de la version actuelle sera toujours conservée.</string>
|
||||
<string name="comp_nightlies_count">Dans Nightlies · %1$d</string>
|
||||
<string name="comp_refresh_to_list">Actualiser pour lister les paquets dans Nightlies.</string>
|
||||
<string name="comp_nothing_new">Aucun nouvel élément depuis la dernière vérification.</string>
|
||||
<string name="comp_import_wcp">Importer .wcp</string>
|
||||
<string name="comp_restore_original">Restaurer les fichiers originaux de ce Proton</string>
|
||||
<string name="comp_restore_original_body">Remettre les fichiers originaux %2$s de %1$s ?</string>
|
||||
<string name="comp_swap">Basculer</string>
|
||||
<string name="comp_about_text">FEX, DXVK et VKD3D-Proton : pour chaque Proton utilisé par Steam pour exécuter des jeux.\n\nSélectionnez un élément installé pour le remplacer. Cela prendra effet au prochain lancement du jeu, ou après la fermeture du jeu en cours d\'exécution.\n\nVotre sélection sera revérifiée avant chaque lancement ; si elle a été modifiée, elle sera restaurée. Les fichiers originaux de chaque Proton sont conservés, ils ne seront donc jamais perdus lors des mises à jour de Steam.</string>
|
||||
<string name="comp_tag_original">Original</string>
|
||||
<string name="comp_tag_in_use">Utilisé</string>
|
||||
<string name="comp_tag_new">Nouveau</string>
|
||||
<string name="comp_tag_stored">Enregistré</string>
|
||||
<string name="perf_title">Performance</string>
|
||||
<string name="perf_lede">Cœurs CPU, correctifs de session et nom d\'hôte. Prendra effet à la prochaine session.</string>
|
||||
<string name="perf_client_cores_group">Cœurs du client Steam</string>
|
||||
<string name="perf_override">Remplacer la sélection des cœurs de Steam</string>
|
||||
<string name="perf_override_hint">Fixe Steam, l\'assistant d\'interface et gamescope sur les cœurs sélectionnés ci-dessous.</string>
|
||||
<string name="perf_client_cores">Cœurs du client</string>
|
||||
<string name="perf_client_cores_on">Cœurs utilisés par Steam.</string>
|
||||
<string name="perf_client_cores_off">Activer le remplacement pour pouvoir sélectionner.</string>
|
||||
<string name="perf_game_cores_group">Cœurs de jeu</string>
|
||||
<string name="perf_game_cores">Cœurs de jeu</string>
|
||||
<string name="perf_game_cores_hint">Cœurs utilisés par les jeux. Si tous sont sélectionnés, Android planifie librement.</string>
|
||||
<string name="perf_client_ui">Interface du client</string>
|
||||
<string name="perf_glthread">Multithread GL</string>
|
||||
<string name="perf_glthread_hint">Peut rendre les menus Steam plus réactifs.</string>
|
||||
<string name="perf_zink">Zink : descripteurs différés</string>
|
||||
<string name="perf_zink_hint">Recommandé pour les pilotes sans tampon de descripteurs.</string>
|
||||
<string name="perf_noglerror">Ignorer la vérification des erreurs GL</string>
|
||||
<string name="perf_noglerror_hint">Désactive la validation GL par appel.</string>
|
||||
<string name="perf_gsrealtime">gamescope : file d\'attente GPU temps réel</string>
|
||||
<string name="perf_gsrealtime_hint">Augmente la priorité du travail GPU du compositeur. Peut améliorer la stabilité du temps de frame, mais consomme une partie des performances du jeu.</string>
|
||||
<string name="perf_gpu">GPU</string>
|
||||
<string name="perf_gpuclock">Maintenir le GPU à sa fréquence maximale</string>
|
||||
<string name="perf_gpuclock_hint">Uniquement pour Adreno. Moins de saccades, mais plus de consommation d\'énergie et de chaleur.</string>
|
||||
<string name="perf_fixes">Correctifs de session</string>
|
||||
<string name="perf_sysmem">Turnip : rendu sysmem</string>
|
||||
<string name="perf_sysmem_hint">Steam et la plupart des jeux seront plus rapides. Requis pour Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Ignorer l\'assistant xalia de Steam</string>
|
||||
<string name="perf_xalia_hint">Désactive l\'assistant de navigation à la manette de Proton, qui consomme du CPU dans chaque jeu.</string>
|
||||
<string name="perf_seccomp">Exécuter proot sans seccomp</string>
|
||||
<string name="perf_seccomp_hint">Peut corriger certaines erreurs d\'appels système manquants sur certains noyaux, mais peut réduire les performances.</string>
|
||||
<string name="perf_fastpath">Chemin rapide proot</string>
|
||||
<string name="perf_fastpath_needs_seccomp">Nécessite le filtre seccomp de proot.</string>
|
||||
<string name="perf_fastpath_hint">Recherche de fichiers plus rapide, moins de saccades. Désactivez cette option si un programme ne trouve pas ses fichiers.</string>
|
||||
<string name="perf_identity">Identité de la session</string>
|
||||
<string name="perf_hostname">Nom d\'hôte</string>
|
||||
<string name="perf_hostname_hint">Le nom sous lequel Steam voit cet appareil. Laisser vide pour restaurer %1$s.</string>
|
||||
<string name="perf_hostname_invalid">Ne peut contenir que des lettres, des chiffres et des tirets au milieu, jusqu\'à 63 caractères.</string>
|
||||
<string name="perf_phantom_warning">Android est configuré pour terminer cette session</string>
|
||||
<string name="driver_installed">Installé</string>
|
||||
<string name="driver_available">Téléchargeable</string>
|
||||
<string name="driver_nothing_new">Aucun nouvel élément depuis la dernière vérification.</string>
|
||||
<string name="driver_restore_builtin">Restaurer le pilote intégré</string>
|
||||
<string name="driver_delete_builtin">Pilote intégré à l\'application : cette opération supprimera les fichiers décompressés et masquera le pilote. Utilisez « Restaurer le pilote intégré » pour le restaurer.</string>
|
||||
<string name="driver_delete_bundle">Moitié du bundle Android + Linux : les deux parties seront supprimées. Le pilote en cours d\'utilisation basculera vers le pilote par défaut.</string>
|
||||
<string name="driver_delete_plain">Ses fichiers seront supprimés de l\'application.</string>
|
||||
<string name="driver_delete_in_use">Ses fichiers seront supprimés. Comme il est en cours d\'utilisation, le pilote par défaut sera utilisé à la place.</string>
|
||||
<string name="drawer_page_display">Affichage</string>
|
||||
<string name="drawer_page_controls">Contrôles</string>
|
||||
<string name="drawer_page_components">Composants</string>
|
||||
<string name="drawer_page_settings">Paramètres</string>
|
||||
<string name="drawer_page_desc">Page %1$s</string>
|
||||
<string name="drawer_steam">Steam</string>
|
||||
<string name="drawer_desktop">Bureau</string>
|
||||
<string name="drawer_steam_menu">Menu Steam</string>
|
||||
<string name="drawer_quick_access">Accès rapide</string>
|
||||
<string name="drawer_open_qam">Ouvrir le menu d\'accès rapide</string>
|
||||
<string name="drawer_prev_page">Page précédente</string>
|
||||
<string name="drawer_next_page">Page suivante</string>
|
||||
<string name="drawer_hud">HUD de performance</string>
|
||||
<string name="drawer_fill">Étirer le jeu pour remplir l\'écran</string>
|
||||
<string name="drawer_touch_auto">Auto (%1$s)</string>
|
||||
<string name="drawer_keyboard">Clavier</string>
|
||||
<string name="drawer_pc_keyboard">Clavier PC</string>
|
||||
<string name="drawer_android_keyboard">Android</string>
|
||||
<string name="drawer_second_screen">Deuxième écran</string>
|
||||
<string name="drawer_second_screen_shows">Afficher</string>
|
||||
<string name="drawer_android_apps">Applications Android</string>
|
||||
<string name="drawer_launch_app">Lancer l\'application</string>
|
||||
<string name="common_hide">Masquer</string>
|
||||
<string name="common_show">Afficher</string>
|
||||
<string name="drawer_no_apps">Aucune application à lancer</string>
|
||||
<string name="drawer_session_behavior">Comportement de la session</string>
|
||||
<string name="drawer_suspend_hint">Appliqué immédiatement, et prendra effet pour les futures sessions de ce mode.</string>
|
||||
<string name="drawer_next_session">Prochaine session</string>
|
||||
<string name="drawer_support">Assistance</string>
|
||||
<string name="drawer_logs">Journaux de session</string>
|
||||
<string name="drawer_logs_hint">Joindre au rapport d\'erreur</string>
|
||||
<string name="drawer_share_logs">Partager les journaux</string>
|
||||
<string name="drawer_background">Arrière-plan</string>
|
||||
<string name="drawer_stop">Arrêter</string>
|
||||
<string name="drawer_stop_title">Arrêter la session ?</string>
|
||||
<string name="drawer_running_now">En cours d\'exécution</string>
|
||||
<string name="drawer_no_game">Aucun jeu n\'utilise actuellement Proton</string>
|
||||
<string name="drawer_no_proton">Proton n\'est pas encore installé.</string>
|
||||
<string name="drawer_game_running">Jeu en cours d\'exécution</string>
|
||||
<string name="drawer_reapplied">Réappliqué au lancement de %1$s</string>
|
||||
<string name="drawer_original">Original</string>
|
||||
<string name="drawer_components_note">Veuillez télécharger, importer et supprimer depuis la page « Composants ».</string>
|
||||
<string name="setup_check_done">Terminé</string>
|
||||
<string name="setup_check_warn">À traiter</string>
|
||||
<string name="setup_check_busy">Traitement en cours</string>
|
||||
<string name="setup_limit_adb_failed">Veuillez vérifier l\'adresse IP et le port du débogage sans fil ; si Android a supprimé cet appareil, veuillez le réappairer.</string>
|
||||
<string name="setup_install">Installer</string>
|
||||
<string name="setup_manage">Gérer</string>
|
||||
<string name="setup_tab_overview">Aperçu</string>
|
||||
<string name="setup_tab_controller">Manette</string>
|
||||
<string name="setup_tab_session">Session</string>
|
||||
<string name="setup_tab_launcher">Lanceur</string>
|
||||
<string name="setup_title">Paramètres</string>
|
||||
<string name="setup_all_set">● Tout est prêt</string>
|
||||
<string name="setup_n_ready">%1$d/%2$d prêt(s)</string>
|
||||
<string name="setup_system_check">Vérification du système</string>
|
||||
<string name="setup_gpu_supported">Appareil pris en charge</string>
|
||||
<string name="setup_gpu_untested">GPU non testé</string>
|
||||
<string name="setup_gpu_unsupported">GPU non pris en charge</string>
|
||||
<string name="setup_gpu_detail">%1$s · %2$s</string>
|
||||
<string name="setup_gpu_untested_detail">%1$s : %2$s</string>
|
||||
<string name="setup_gpu_unsupported_detail">Steam nécessite un pilote Adreno ; %1$s peut afficher un écran noir.</string>
|
||||
<string name="setup_runtime">Environnement d\'exécution Linux</string>
|
||||
<string name="setup_runtime_progress">%1$s · %2$d%%</string>
|
||||
<string name="setup_runtime_missing">Non installé · Environ 3 Go, installé lors du premier lancement d\'un jeu</string>
|
||||
<string name="setup_installed">Installé</string>
|
||||
<string name="setup_runtime_update">%1$s · Mise à jour disponible</string>
|
||||
<string name="setup_runtime_current">%1$s · À jour</string>
|
||||
<string name="setup_limit">Limite des processus enfants</string>
|
||||
<string name="setup_limit_on">Activée · Android peut fermer Steam. La désactivation de cette limite prend environ une minute.</string>
|
||||
<string name="setup_limit_unset">Non définie · Android peut fermer Steam. La désactivation de cette limite prend environ une minute.</string>
|
||||
<string name="setup_limit_unknown">Impossible de vérifier · La désactivation de cette limite prend environ une minute.</string>
|
||||
<string name="setup_fix_it">Corriger</string>
|
||||
<string name="setup_details">Détails</string>
|
||||
<string name="setup_dev_options">Options pour les développeurs</string>
|
||||
<string name="setup_use_wireless">Utiliser le débogage sans fil</string>
|
||||
<string name="setup_check_again">Vérifier à nouveau</string>
|
||||
<string name="setup_limit_turn_on">Activer la limite</string>
|
||||
<string name="setup_account">Compte Steam</string>
|
||||
<string name="setup_signed_in_offline">Connecté en tant que %1$s · Mode hors ligne</string>
|
||||
<string name="setup_signed_in">Connecté en tant que %1$s</string>
|
||||
<string name="setup_sign_in">Appuyez sur Play et connectez-vous à Steam</string>
|
||||
<string name="setup_tools">Outils</string>
|
||||
<string name="setup_controller">Manette</string>
|
||||
<string name="setup_controller_unavailable">Les paramètres de la manette ne sont pas disponibles.</string>
|
||||
<string name="setup_session">Session</string>
|
||||
<string name="setup_logs">Journaux de session</string>
|
||||
<string name="setup_logs_hint">Enregistré après chaque fin de session</string>
|
||||
<string name="setup_latest_logs">Derniers journaux de session</string>
|
||||
<string name="setup_saved_logs">Journaux de session enregistrés</string>
|
||||
<string name="setup_saved_logs_hint">Conserver les %1$d plus récents</string>
|
||||
<string name="setup_clear_logs">Effacer les journaux</string>
|
||||
<string name="setup_offline">Mode hors ligne</string>
|
||||
<string name="setup_sign_in_first">Veuillez d\'abord vous connecter à Steam</string>
|
||||
<string name="setup_launcher">Lanceur</string>
|
||||
<string name="setup_theme">Thème</string>
|
||||
<string name="setup_theme_hint">Apparence du lanceur</string>
|
||||
<string name="setup_home">Utiliser comme écran d\'accueil</string>
|
||||
<string name="setup_home_on">DroidDeck peut être utilisé comme application d\'écran d\'accueil</string>
|
||||
<string name="setup_home_off">DroidDeck ne sera pas proposé comme application d\'écran d\'accueil</string>
|
||||
<string name="setup_fullscreen">Plein écran</string>
|
||||
<string name="setup_fullscreen_on">Masquer la barre d\'état et la barre de navigation Android</string>
|
||||
<string name="setup_fullscreen_off">Afficher la barre d\'état et la barre de navigation Android</string>
|
||||
<string name="setup_default_home">Application d\'écran d\'accueil par défaut</string>
|
||||
<string name="setup_choose_home">Choisir l\'application d\'écran d\'accueil</string>
|
||||
<string name="setup_choose">Choisir</string>
|
||||
<string name="setup_linux_apps">Applications Linux (bêta)</string>
|
||||
<string name="setup_store">Boutique Flathub</string>
|
||||
<string name="setup_store_on">Affiché dans le menu. Certaines applications peuvent ne pas se lancer ; les journaux se trouvent dans Download/DroidDeck.</string>
|
||||
<string name="setup_store_off">Installer des applications et des jeux Linux depuis Flathub</string>
|
||||
<string name="setup_tool_files">Fichiers</string>
|
||||
<string name="setup_tool_files_hint">Parcourir et gérer les fichiers</string>
|
||||
<string name="setup_tool_protons">Versions de Proton</string>
|
||||
<string name="setup_tool_protons_hint">Installer les versions ARM64 de Proton</string>
|
||||
<string name="setup_tool_performance">Performance</string>
|
||||
<string name="setup_tool_performance_hint">Attribution des cœurs CPU</string>
|
||||
<string name="setup_tool_roms">Dossiers ROM</string>
|
||||
<string name="setup_tool_roms_hint">Emplacement de stockage des jeux d\'émulateur</string>
|
||||
<string name="setup_card_components">Composants</string>
|
||||
<string name="setup_card_components_hint">FEX, DXVK, VKD3D</string>
|
||||
<string name="setup_card_controls">Contrôles</string>
|
||||
<string name="setup_card_controls_hint">Mappage des boutons</string>
|
||||
<string name="store_tab_discover">Découvrir</string>
|
||||
<string name="store_tab_search">Rechercher</string>
|
||||
<string name="store_tab_installed">Installé</string>
|
||||
<string name="store_tab_count">%1$s · %2$d</string>
|
||||
<string name="store_title">Boutique</string>
|
||||
<string name="store_chip_flathub">Flathub · ARM64</string>
|
||||
<string name="store_chip_ready">● Flatpak prêt</string>
|
||||
<string name="store_needs_runtime">Veuillez d\'abord installer l\'environnement d\'exécution Linux depuis les « Paramètres ».</string>
|
||||
<string name="store_setup_title">Configurer Flatpak</string>
|
||||
<string name="store_setup_text">Ajouter Flatpak et se connecter à Flathub (environ 20 Mo). La première application téléchargera également son environnement d\'exécution.</string>
|
||||
<string name="store_setting_up">Configuration en cours…</string>
|
||||
<string name="store_flatpak">Flatpak</string>
|
||||
<string name="store_updates">Mises à jour</string>
|
||||
<string name="store_busy">%1$s · %2$s</string>
|
||||
<string name="store_busy_percent">%1$s · %2$s · %3$d%%</string>
|
||||
<string name="store_starting">Démarrage…</string>
|
||||
<string name="store_categories">Catégories</string>
|
||||
<string name="store_unreachable">Impossible de se connecter à Flathub. Veuillez vérifier votre connexion réseau et réessayer.</string>
|
||||
<string name="store_try_again">Réessayer</string>
|
||||
<string name="store_search_label">Rechercher sur Flathub</string>
|
||||
<string name="store_search_placeholder">Firefox, jeux, émulateurs…</string>
|
||||
<string name="store_search">Rechercher</string>
|
||||
<string name="store_all">Tout</string>
|
||||
<string name="store_searching">Recherche en cours…</string>
|
||||
<string name="store_search_hint">Recherchez par nom ou sélectionnez une catégorie. Seules les applications ARM64 sont répertoriées ici.</string>
|
||||
<string name="store_no_results">Aucune application ARM64 correspondante sur Flathub.</string>
|
||||
<string name="store_results">Résultats</string>
|
||||
<string name="store_check_updates">Vérifier les mises à jour</string>
|
||||
<string name="store_update_all">Tout mettre à jour (%1$d)</string>
|
||||
<string name="store_all_current">● Tout est à jour</string>
|
||||
<string name="store_no_apps">Aucune application pour le moment. Recherchez dans « Découvrir » ou « Rechercher ».</string>
|
||||
<string name="store_setup_first_note">Configurez Flatpak pour pouvoir installer des applications.</string>
|
||||
<string name="store_update_available_prefix">Mise à jour disponible · %1$s</string>
|
||||
<string name="store_open">Ouvrir</string>
|
||||
<string name="store_details">Détails</string>
|
||||
<string name="store_remove">Supprimer</string>
|
||||
<string name="store_press_again">Appuyez à nouveau pour supprimer</string>
|
||||
<string name="store_installing">Installation…</string>
|
||||
<string name="store_install">Installer</string>
|
||||
<string name="store_setup_first">Configurer d\'abord Flatpak</string>
|
||||
<string name="store_download_size">Télécharger %1$s</string>
|
||||
<string name="store_installed_chip">● Installé</string>
|
||||
<string name="store_details_failed">Impossible de charger la page Flathub de cette application.</string>
|
||||
<string name="store_loading">Chargement depuis Flathub…</string>
|
||||
<string name="store_no_arm">Flathub ne propose pas de version ARM64, l\'installation est donc impossible ici.</string>
|
||||
<string name="store_screenshots">Captures d\'écran</string>
|
||||
<string name="store_about">À propos</string>
|
||||
<string name="store_app_id">ID de l\'application</string>
|
||||
<string name="store_license">Licence</string>
|
||||
<string name="store_runtime">Environnement d\'exécution</string>
|
||||
<string name="store_installed_size">Taille installée</string>
|
||||
<string name="store_installed_size_value">%1$s (plus l\'environnement d\'exécution partagé)</string>
|
||||
<string name="store_website">Site web</string>
|
||||
<string name="store_verified">Vérifié</string>
|
||||
<string name="upd_title">Mises à jour</string>
|
||||
<string name="upd_build">DroidDeck %1$s · %2$s</string>
|
||||
<string name="upd_checked">Vérifié le %1$s</string>
|
||||
<string name="upd_not_checked">Non vérifié</string>
|
||||
<string name="upd_perm_title">Autoriser DroidDeck à se mettre à jour</string>
|
||||
<string name="upd_perm_text">Activez « Autoriser depuis cette source » sur la page suivante, puis revenez. La mise à jour continuera automatiquement.</string>
|
||||
<string name="upd_open_settings">Ouvrir les paramètres</string>
|
||||
<string name="upd_not_now">Pas maintenant</string>
|
||||
<string name="upd_signed_status">Signature différente</string>
|
||||
<string name="upd_signed_headline">Impossible de mettre à jour sur place</string>
|
||||
<string name="upd_signed_detail">Cette copie n\'est pas signée avec la clé de publication de DroidDeck, elle ne peut donc pas être mise à jour par écrasement direct. Veuillez désinstaller puis basculer.</string>
|
||||
<string name="upd_available">Mise à jour disponible</string>
|
||||
<string name="upd_blocked_status">Installation impossible</string>
|
||||
<string name="upd_switch">Basculer possible</string>
|
||||
<string name="upd_ahead_status">En avance sur Stable</string>
|
||||
<string name="upd_ahead_headline">Vous êtes en avance sur Stable</string>
|
||||
<string name="upd_ahead_detail">Cette version est plus récente que la dernière Stable. Vous basculerez sur Stable après la publication de la prochaine version Stable.</string>
|
||||
<string name="upd_gone_status">Test terminé</string>
|
||||
<string name="upd_gone_headline">Ce test est terminé</string>
|
||||
<string name="upd_gone_detail">Ce correctif a été fusionné ou abandonné. Suivez Preview pour obtenir les derniers correctifs.</string>
|
||||
<string name="upd_current_status">À jour</string>
|
||||
<string name="upd_current_headline">Vous disposez de la dernière version de %1$s</string>
|
||||
<string name="upd_dot_ago">· %1$s</string>
|
||||
<string name="upd_stage_percent">%1$s… %2$d%%</string>
|
||||
<string name="upd_stage">%1$s…</string>
|
||||
<string name="upd_update_button">Mettre à jour %1$s</string>
|
||||
<string name="upd_install_button">Installer %1$s</string>
|
||||
<string name="upd_install_anyway">Installer Stable %1$s quand même</string>
|
||||
<string name="upd_follow_preview">Suivre Preview</string>
|
||||
<string name="upd_stop_session">Veuillez arrêter la session en cours avant de mettre à jour.</string>
|
||||
<string name="upd_less">Réduire</string>
|
||||
<string name="upd_more">Plus</string>
|
||||
<string name="upd_new_stable">DroidDeck %1$s</string>
|
||||
<string name="upd_new_preview">Nouvelle version Preview</string>
|
||||
<string name="upd_new_test">Version de test PR #%1$d</string>
|
||||
<string name="upd_mb">%1$d Mo</string>
|
||||
<string name="upd_channel">Canal de mise à jour</string>
|
||||
<string name="upd_stable">Stable</string>
|
||||
<string name="upd_stable_hint">Version testée, adaptée à la plupart des utilisateurs</string>
|
||||
<string name="upd_version_ago">%1$s · %2$s</string>
|
||||
<string name="upd_preview">Preview</string>
|
||||
<string name="upd_preview_hint">Derniers correctifs avant Stable</string>
|
||||
<string name="upd_preview_current">À jour</string>
|
||||
<string name="upd_tests">Versions de test</string>
|
||||
<string name="upd_tests_hint">Essayer un correctif avant sa publication officielle</string>
|
||||
<string name="upd_tests_none">Aucun pour le moment</string>
|
||||
<string name="upd_pr">PR #%1$d</string>
|
||||
<string name="upd_not_built">Non compilé pour cette copie de DroidDeck</string>
|
||||
<string name="upd_updated">%1$s mis à jour</string>
|
||||
<string name="upd_test_name">Version de test PR #%1$d</string>
|
||||
<string name="upd_while_ago">Il y a peu</string>
|
||||
<string name="upd_just_now">À l\'instant</string>
|
||||
<plurals name="upd_tests_count">
|
||||
<item quantity="one">%1$d disponible</item>
|
||||
<item quantity="other">%1$d disponibles</item>
|
||||
</plurals>
|
||||
<plurals name="upd_preview_behind">
|
||||
<item quantity="one">Modifications depuis votre version · %1$d version de retard</item>
|
||||
<item quantity="other">Modifications depuis votre version · %1$d versions de retard</item>
|
||||
</plurals>
|
||||
<plurals name="upd_preview_recent">
|
||||
<item quantity="one">Modifications récentes · %1$d version</item>
|
||||
<item quantity="other">Modifications récentes · %1$d versions</item>
|
||||
</plurals>
|
||||
<string name="gate_title">Un paramètre Android à modifier</string>
|
||||
<string name="gate_eyebrow">Steam</string>
|
||||
<string name="gate_lede">Android arrête les applications qui lancent de nombreux processus en arrière-plan, et Steam en lance des dizaines. Tant que ce paramètre n\'est pas modifié, les jeux peuvent se fermer sans message d\'erreur.</string>
|
||||
<string name="gate_fix_for_me">Corriger pour moi</string>
|
||||
<string name="gate_toggle_steps">Activez « Désactiver la limite de processus enfants », puis revenez. Gardez les options pour les développeurs activées, sinon l\'interrupteur se désactivera à nouveau.</string>
|
||||
<string name="gate_open_dev">Ouvrir les options pour les développeurs</string>
|
||||
<string name="gate_no_toggle">Cette version d\'Android ne dispose pas de cet interrupteur, DroidDeck effectuera donc la modification via le débogage sans fil. Cela prend environ une minute, sans ordinateur.</string>
|
||||
<string name="gate_needs_wifi">Le débogage sans fil nécessite un Wi-Fi. N\'importe quel réseau convient, Internet n\'est pas nécessaire.</string>
|
||||
<string name="gate_needs_notifications">Le code d\'appairage s\'affichera dans une notification. Veuillez autoriser DroidDeck à envoyer des notifications, ou utilisez « Autre méthode ».</string>
|
||||
<string name="gate_allow_notifications">Autoriser les notifications</string>
|
||||
<string name="gate_step1">Ouvrez Paramètres → Options pour les développeurs → Débogage sans fil, et activez-le</string>
|
||||
<string name="gate_step2">Appuyez sur « Associer l\'appareil avec un code d\'appairage »</string>
|
||||
<string name="gate_step3">Saisissez le code d\'appairage dans la notification DroidDeck</string>
|
||||
<string name="gate_waiting">En attente de la fenêtre d\'appairage…</string>
|
||||
<string name="gate_code_needed">Fenêtre trouvée. Veuillez saisir le code d\'appairage affiché dans la notification.</string>
|
||||
<string name="gate_status">État</string>
|
||||
<string name="gate_polling">Vérification toutes les 2 secondes. Cette page se fermera automatiquement une fois cet interrupteur désactivé.</string>
|
||||
<string name="gate_other_ways">Autres méthodes</string>
|
||||
<string name="gate_other_toggle">Débogage sans fil, saisie manuelle de l\'adresse, ADB sur PC</string>
|
||||
<string name="gate_other_no_toggle">Saisie manuelle de l\'adresse, ADB sur PC, options pour les développeurs</string>
|
||||
<string name="gate_use_wireless_instead">Utiliser plutôt le débogage sans fil</string>
|
||||
<string name="gate_some_roms">Certaines ROM proposent encore cet interrupteur. Recherchez « processus enfants » dans les options pour les développeurs.</string>
|
||||
<string name="gate_manual_hint">Si la méthode par notification ne fonctionne pas, saisissez manuellement l\'adresse et le code d\'appairage de la fenêtre.</string>
|
||||
<string name="gate_enter_manually">Saisir l\'adresse manuellement</string>
|
||||
<string name="gate_from_computer">Utiliser ADB depuis un ordinateur :</string>
|
||||
<string name="gate_copy_command">Copier la commande</string>
|
||||
<string name="gate_choose_display">Choisissez l\'écran sur lequel ouvrir les paramètres Android.</string>
|
||||
<string name="gate_main_screen">Écran principal</string>
|
||||
<string name="wadb_finding_port">Appairé. Recherche du port de débogage sans fil…</string>
|
||||
<string name="wadb_enter_port">Appairé. Veuillez saisir le port indiqué dans les paramètres.</string>
|
||||
<string name="wadb_applying">Appareil trouvé. Application des paramètres…</string>
|
||||
<string name="wadb_apply_failed">Impossible d\'appliquer automatiquement. Veuillez vérifier l\'adresse ci-dessous et réessayer. %1$s</string>
|
||||
<string name="wadb_title_wireless">Débogage sans fil</string>
|
||||
<string name="wadb_title_done">Limite des processus enfants mise à jour</string>
|
||||
<string name="wadb_title">Modifier la limite des processus enfants</string>
|
||||
<string name="wadb_lede_compact0">Si cette option n\'est pas disponible, appairez via le débogage sans fil.</string>
|
||||
<string name="wadb_lede_compact1">Appairé. Veuillez vérifier l\'adresse IP et le port dans le débogage sans fil.</string>
|
||||
<string name="wadb_lede_done">La limite des processus enfants a été mise à jour.</string>
|
||||
<string name="wadb_lede0">Si l\'option de processus enfants n\'est pas disponible dans les options pour les développeurs, utilisez l\'étape 2. Ouvrez Options pour les développeurs → Débogage sans fil → Associer l\'appareil avec un code d\'appairage.</string>
|
||||
<string name="wadb_lede1">Appairé. Utilisez l\'adresse ci-dessous, ou mettez-la à jour dans Débogage sans fil → Adresse IP et port.</string>
|
||||
<string name="wadb_lede_done_long">Limite des processus enfants mise à jour via le débogage sans fil.</string>
|
||||
<string name="wadb_confirmed_on">Android a confirmé que la limite est activée.</string>
|
||||
<string name="wadb_confirmed_off">Android a confirmé que la limite est désactivée.</string>
|
||||
<string name="wadb_pair_group">2 · Appairer le débogage sans fil</string>
|
||||
<string name="wadb_pair_address">Adresse IP et port dans la fenêtre d\'appairage</string>
|
||||
<string name="wadb_pin">Code d\'appairage (PIN)</string>
|
||||
<string name="wadb_pin_placeholder">6 chiffres</string>
|
||||
<string name="wadb_pair">Appairer</string>
|
||||
<string name="wadb_apply_group">2 · Appliquer via le débogage sans fil</string>
|
||||
<string name="wadb_connect_address">Adresse IP et port de connexion</string>
|
||||
<string name="wadb_pair_again">Réappairer</string>
|
||||
<string name="wadb_turn_off">Désactiver la limite</string>
|
||||
<string name="wadb_other_ways">Autres méthodes de modification</string>
|
||||
<string name="wadb_dev_try_first">1 · Options pour les développeurs (à essayer en premier)</string>
|
||||
<string name="wadb_restrict_on">Activez « Limiter les processus enfants ».</string>
|
||||
<string name="wadb_restrict_off">Désactivez « Limiter les processus enfants ».</string>
|
||||
<string name="wadb_computer_last">3 · ADB sur PC (en dernier recours)</string>
|
||||
<string name="wadb_only_if">À utiliser uniquement si le débogage sans fil n\'est pas disponible.</string>
|
||||
<string name="wadb_computer_group">3 · ADB sur PC (en dernier recours)</string>
|
||||
<string name="ctrl_osc_hint">Lors de l\'affichage des commandes à l\'écran en session</string>
|
||||
<string name="ctrl_color">Couleur</string>
|
||||
<string name="ctrl_color_hint">Teinte des boutons à l\'écran</string>
|
||||
<string name="ctrl_custom">Personnalisée</string>
|
||||
<string name="ctrl_opacity">Opacité</string>
|
||||
<string name="ctrl_percent">%1$d%%</string>
|
||||
<string name="ctrl_size">Taille des boutons</string>
|
||||
<string name="ctrl_size_hint" formatted="false">100 % correspond à la taille standard</string>
|
||||
<string name="ctrl_stick_click">Clic du joystick</string>
|
||||
<string name="ctrl_stick_click_hint">Double-cliquez et maintenez le joystick pour déclencher L3 ou R3</string>
|
||||
<string name="ctrl_adaptive">Joystick adaptatif</string>
|
||||
<string name="ctrl_rumble">Vibration du jeu</string>
|
||||
<string name="ctrl_steam_button">Bouton Steam</string>
|
||||
<string name="ctrl_qam_button">Bouton QAM</string>
|
||||
<string name="ctrl_keyboard_button">Bouton clavier</string>
|
||||
<string name="setup_animations">Animations</string>
|
||||
<string name="ctrl_adaptive_hint">Le joystick apparaîtra là où vous touchez et se masquera une fois relâché</string>
|
||||
<string name="ctrl_layout">Disposition</string>
|
||||
<string name="ctrl_layout_custom">Position personnalisée enregistrée</string>
|
||||
<string name="ctrl_layout_default">Adapté à cet écran</string>
|
||||
<string name="ctrl_edit">Modifier</string>
|
||||
<string name="ctrl_reset">Réinitialiser</string>
|
||||
<string name="ctrl_mapping">Mappage des boutons</string>
|
||||
<string name="ctrl_mapping_default">Chaque bouton envoie l\'entrée d\'origine correspondante</string>
|
||||
<string name="ctrl_mapping_count">%1$d/%2$d boutons remappés</string>
|
||||
<string name="ctrl_configure">Configurer</string>
|
||||
<string name="ctrl_reset_all">Réinitialiser la manette</string>
|
||||
<string name="ctrl_reset_all_hint">Restaurer tous les paramètres et dispositions de la manette</string>
|
||||
<string name="ctrl_mapping_lede">Définissez l\'entrée que chaque bouton à l\'écran envoie au jeu. « Masquer » supprimera ce bouton.</string>
|
||||
<string name="ctrl_onscreen_buttons">Boutons à l\'écran</string>
|
||||
<string name="ctrl_defaults">Valeurs par défaut</string>
|
||||
<string name="ctrl_reset_mapping">Réinitialiser le mappage</string>
|
||||
<string name="content_android_apps">Applications Android</string>
|
||||
<string name="content_apps_count">%1$d applications</string>
|
||||
<string name="content_no_android_apps">Aucune application Android lançable trouvée.</string>
|
||||
<string name="content_desktop_installed">● Bureau installé</string>
|
||||
<string name="content_desktop_first_open">Installé à la première ouverture</string>
|
||||
<string name="content_available">Installable</string>
|
||||
<string name="content_not_installed">Non installé.</string>
|
||||
<string name="content_not_installed_suffix">%1$s · Non installé</string>
|
||||
<string name="content_open_named">Ouvrir %1$s</string>
|
||||
<string name="content_games">Jeux</string>
|
||||
<string name="content_choose_roms">Sélectionnez un dossier ROM.</string>
|
||||
<string name="content_retroarch_roms">Dans RetroArch, naviguez vers /root/ROMs.</string>
|
||||
<string name="content_add_roms">Ajout de %1$s jeux à ROMs/%2$s.</string>
|
||||
<string name="content_install_named">Installer %1$s</string>
|
||||
<string name="content_stop_to_install">Arrêter la session pour installer</string>
|
||||
<string name="content_runtime_required">Environnement d\'exécution requis</string>
|
||||
<string name="content_loading_details">Chargement des détails d\'installation…</string>
|
||||
<string name="content_details_unavailable">Détails d\'installation non disponibles. Veuillez réessayer plus tard.</string>
|
||||
<string name="content_needs_runtime">Veuillez d\'abord installer l\'environnement d\'exécution Linux depuis les « Paramètres ».</string>
|
||||
<string name="content_stop_first">Veuillez arrêter la session en cours avant d\'installer une application de bureau.</string>
|
||||
<string name="content_install_into">Installer %1$s sur le bureau Linux.</string>
|
||||
<string name="store_busy_percent_short">%1$s · %2$d%%</string>
|
||||
<string name="content_hide_note">Masquer le retirera du bureau. Les fichiers resteront dans l\'environnement d\'exécution Linux.</string>
|
||||
<string name="content_rom_gone">Ce jeu n\'est plus dans le dossier ROM.</string>
|
||||
<string name="content_desktop_system">Bureau · %1$s</string>
|
||||
<string name="content_launch_in">Lancer dans %1$s</string>
|
||||
<string name="content_also_in">Également dans %1$s</string>
|
||||
<string name="content_page_gone">Cette page n\'existe plus. Veuillez sélectionner une section à gauche.</string>
|
||||
<string name="content_open_desktop">Ouvrir le bureau</string>
|
||||
<string name="content_install_open_desktop">Installer et ouvrir le bureau</string>
|
||||
<string name="content_linux_desktop">Bureau Linux</string>
|
||||
<string name="content_linux_desktop_hint">LXQt, Firefox et vos émulateurs</string>
|
||||
<string name="games_empty">Les jeux installés sur Steam apparaîtront ici après la fin de la session.</string>
|
||||
<string name="games_play_steam">Lancer Steam</string>
|
||||
<string name="games_launch_settings">Paramètres de lancement</string>
|
||||
<string name="games_launch">Lancer</string>
|
||||
<string name="games_files">Fichiers du jeu</string>
|
||||
<string name="games_prefix">Préfixe Proton</string>
|
||||
<string name="games_saves_looking">Recherche des sauvegardes…</string>
|
||||
<string name="games_saves_none">Aucun dossier de sauvegarde trouvé par nom. L\'exportation inclura l\'intégralité du dossier utilisateur.</string>
|
||||
<string name="games_saves_folders">%1$d dossiers de sauvegarde</string>
|
||||
<string name="games_saves_summary">%1$s · %2$d fichiers · %3$s</string>
|
||||
<string name="games_kb">%1$d Ko</string>
|
||||
<string name="games_manage_saves">Gérer les sauvegardes</string>
|
||||
<string name="games_saves">Sauvegardes de jeu</string>
|
||||
<string name="games_import_saves">Importer des sauvegardes…</string>
|
||||
<string name="games_import_saves_hint">Archive GameHub ou Winlator. Les sauvegardes actuelles seront sauvegardées avant l\'importation.</string>
|
||||
<string name="games_export_gamehub">Exporter en tant qu\'archive GameHub…</string>
|
||||
<string name="games_export_gamehub_hint">Compatible avec GameHub et BannerHub</string>
|
||||
<string name="games_export_winlator">Exporter en tant qu\'archive Winlator…</string>
|
||||
<string name="games_export_winlator_hint">Compatible avec Winlator, WinNative et Bannerlator</string>
|
||||
<string name="games_open_save_folder">Ouvrir le dossier de sauvegarde</string>
|
||||
<string name="games_never_played">Jamais lancé</string>
|
||||
<string name="games_runtime_busy_percent">Environnement d\'exécution occupé · %1$d%%</string>
|
||||
<string name="games_runtime_busy">Environnement d\'exécution occupé</string>
|
||||
<string name="games_runtime_first_play">Installation de l\'environnement d\'exécution lors du premier lancement du jeu</string>
|
||||
<string name="games_runtime_update">Mise à jour de l\'environnement d\'exécution disponible</string>
|
||||
<string name="games_runtime_ready">● Environnement d\'exécution prêt</string>
|
||||
<string name="games_last_played">Dernier lancement %1$s</string>
|
||||
<string name="games_internal">Stockage interne</string>
|
||||
<string name="games_added">Jeux ajoutés</string>
|
||||
<string name="gpu_auto_hint">Sélectionne la meilleure combinaison de pilotes pour ce GPU et les maintient à jour</string>
|
||||
<string name="gpu_manual_hint">Choisir manuellement la combinaison de pilotes</string>
|
||||
<string name="gpu_checking">Vérification des pilotes…</string>
|
||||
<string name="gpu_none_listed">Aucun pilote répertorié pour le moment. Actualisez pour rechercher des pilotes.</string>
|
||||
<string name="gpu_hide_other">Masquer les pilotes des autres GPU</string>
|
||||
<string name="gpu_show_other">Afficher les pilotes des autres GPU</string>
|
||||
<string name="gpu_advanced">Avancé</string>
|
||||
<string name="gpu_set_with_display">Configuré avec le pilote d\'affichage : %1$s inclut les deux.</string>
|
||||
<string name="gpu_set_with_runtime">Configuré avec le pilote d\'exécution : %1$s inclut les deux.</string>
|
||||
<string name="gpu_runtime_hint">Utilisé par les jeux et le bureau.</string>
|
||||
<string name="gpu_runtime_default">Par défaut de l\'environnement d\'exécution</string>
|
||||
<string name="gpu_display_hint">Responsable de la sortie vidéo vers l\'écran. Prendra effet après le redémarrage de DroidDeck.</string>
|
||||
<string name="gpu_auto_by_gpu">Auto - Sélection par GPU</string>
|
||||
<string name="gpu_manage">Télécharger, importer ou supprimer…</string>
|
||||
<string name="gpu_in_use_caps">Utilisé</string>
|
||||
<string name="gpu_builtin">Pilote intégré à DroidDeck</string>
|
||||
<string name="gpu_matched_pair">Le pilote d\'exécution et le pilote d\'affichage sont configurés ensemble en tant que paire correspondante.</string>
|
||||
<string name="gpu_recommended_for">Recommandé pour ce GPU : %1$s.</string>
|
||||
<string name="gpu_refresh_hint">Actualisez pour rechercher les pilotes adaptés à ce GPU.</string>
|
||||
<string name="gpu_recommended_caps">Recommandé</string>
|
||||
<string name="gpu_unavailable">Non disponible</string>
|
||||
<string name="load_runtime">Environnement d\'exécution Linux</string>
|
||||
<string name="load_runtime_detail">Préparation de l\'environnement d\'exécution Linux</string>
|
||||
<string name="load_session">Session</string>
|
||||
<string name="load_session_detail">Démarrage de l\'affichage et de l\'audio</string>
|
||||
<string name="load_steam">Client Steam</string>
|
||||
<string name="load_steam_detail">Vérification de Steam et de ses outils de compatibilité</string>
|
||||
<string name="load_opening_steam">Ouverture de Steam</string>
|
||||
<string name="load_opening_steam_detail">En attente de la première image de Steam</string>
|
||||
<string name="load_desktop">Bureau</string>
|
||||
<string name="load_desktop_detail">Préparation du bureau</string>
|
||||
<string name="load_opening">Ouverture</string>
|
||||
<string name="load_opening_detail">En attente de la première image</string>
|
||||
<string name="load_starting_steam">Démarrage de Steam</string>
|
||||
<string name="load_ended">Session terminée</string>
|
||||
<string name="load_step">Étape %1$d sur %2$d</string>
|
||||
<string name="load_steam_paused">Steam en pause</string>
|
||||
<string name="deck_tab_grips">Poignées</string>
|
||||
<string name="deck_tab_left">Pavé tactile gauche</string>
|
||||
<string name="deck_tab_right">Pavé tactile droit</string>
|
||||
<string name="deck_tab_both">Les deux</string>
|
||||
<string name="deck_close">Fermer les commandes du deuxième écran</string>
|
||||
<string name="deck_open_steam_menu">Ouvrir le menu Steam</string>
|
||||
<string name="deck_left_upper">Gauche · Haut</string>
|
||||
<string name="deck_left_lower">Gauche · Bas</string>
|
||||
<string name="deck_right_upper">Droite · Haut</string>
|
||||
<string name="deck_right_lower">Droite · Bas</string>
|
||||
<string name="deck_click">Cliquer</string>
|
||||
<string name="deck_right_trackpad">Pavé tactile droit</string>
|
||||
<string name="deck_left_trackpad">Pavé tactile gauche</string>
|
||||
<string name="second_trackpad">Pavé tactile</string>
|
||||
<string name="second_show_keyboard">Afficher le clavier</string>
|
||||
<string name="second_hide_keyboard">Masquer le clavier</string>
|
||||
<string name="second_terminal">Terminal Linux</string>
|
||||
<string name="second_terminal_not_ready">La session Linux n\'est pas prête, le terminal ne peut pas être utilisé.</string>
|
||||
<string name="rail_steam">Steam</string>
|
||||
<string name="rail_games">Jeux</string>
|
||||
<string name="rail_desktop">Bureau</string>
|
||||
<string name="rail_store">Boutique</string>
|
||||
<string name="rail_components">Composants</string>
|
||||
<string name="rail_apps">Applications</string>
|
||||
<string name="rail_setup">Configuration</string>
|
||||
<string name="rail_updates">Mises à jour</string>
|
||||
<string name="rail_percent">%1$d%%</string>
|
||||
<string name="rail_resume_named">Reprendre %1$s</string>
|
||||
<string name="roms_text">Affiché comme /root/ROMs dans chaque session. Le stockage interne se trouve dans /root/Storage.</string>
|
||||
<string name="roms_none">Aucun dossier sélectionné</string>
|
||||
<string name="roms_applies">Prendra effet à la prochaine session. Prend en charge les cartes SD.</string>
|
||||
<string name="roms_choose">Choisir un dossier</string>
|
||||
<string name="roms_change">Modifier le dossier</string>
|
||||
<string name="proton_lede">Installez une version ARM64 de Proton, puis sélectionnez-la pour chaque jeu dans Steam → Propriétés → Compatibilité.</string>
|
||||
<string name="proton_stop_first">Veuillez arrêter la session en cours avant d\'installer ou de supprimer des outils de compatibilité.</string>
|
||||
<string name="proton_available">Versions disponibles</string>
|
||||
<string name="proton_installed">%1$s installé</string>
|
||||
<string name="proton_queued">Élément en attente d\'une demande précédente</string>
|
||||
<string name="proton_not_installed">Non installé</string>
|
||||
<string name="proton_install_now">Installer maintenant</string>
|
||||
<string name="proton_cancel_queued">Annuler la file d\'attente</string>
|
||||
<string name="pckb_android">Clavier Android</string>
|
||||
<string name="pckb_hide">Masquer ✕</string>
|
||||
<string name="main_launch_named">Lancer %1$s</string>
|
||||
<string name="main_choose_screen">Choisir l\'écran. Écran secondaire : %1$s.</string>
|
||||
<string name="main_secondary_gone">L\'écran secondaire n\'est plus disponible.</string>
|
||||
<string name="main_primary">Écran principal</string>
|
||||
<string name="main_secondary">Écran secondaire</string>
|
||||
<string name="widgets_prev_tab">Onglet précédent</string>
|
||||
<string name="widgets_next_tab">Onglet suivant</string>
|
||||
<string name="widgets_on">Activé</string>
|
||||
<string name="widgets_all_n">Tout %1$d</string>
|
||||
<string name="widgets_none">Aucun</string>
|
||||
<string name="widgets_n_of_m">%1$d/%2$d</string>
|
||||
<string name="widgets_off">Désactivé</string>
|
||||
<string name="screen_bottom">Écran inférieur</string>
|
||||
<string name="game_env_applies">Prendra effet au prochain lancement du jeu. Le profil du jeu remplacera la configuration partagée.</string>
|
||||
<string name="game_env_other">Sélectionner un autre jeu par ID d\'application…</string>
|
||||
<string name="game_env_done">Terminé</string>
|
||||
<string name="game_env_default">Par défaut</string>
|
||||
<string name="game_env_off">Désactivé</string>
|
||||
<string name="game_env_change">Modifier…</string>
|
||||
<string name="game_env_change_title">Modifier la variable</string>
|
||||
<string name="game_env_restore_default">Restaurer les valeurs par défaut</string>
|
||||
<string name="game_env_eyebrow">Jeux Proton</string>
|
||||
<string name="pip_title">Picture-in-Picture (PiP)</string>
|
||||
<string name="pip_auto">Passer automatiquement en PiP</string>
|
||||
<string name="pip_suspended">En pause</string>
|
||||
<string name="pip_not_ready">Le mode PiP sera disponible une fois la session prête.</string>
|
||||
<string name="pip_permission">Veuillez autoriser DroidDeck à utiliser le mode PiP dans les paramètres Android.</string>
|
||||
<string name="pip_unavailable">Android ne peut pas ouvrir le mode PiP.</string>
|
||||
<string name="game_shortcut">Raccourci</string>
|
||||
<string name="game_shortcut_add">Ajouter à l\'écran d\'accueil</string>
|
||||
<string name="game_shortcut_choose">Choisir un jeu</string>
|
||||
<string name="game_shortcut_scanning">Analyse des jeux installés…</string>
|
||||
<string name="game_link_copy">Copier le lien de lancement</string>
|
||||
<string name="game_link_copied">Lien de lancement copié</string>
|
||||
<string name="game_shortcut_unsupported">Ce lanceur ne peut pas ajouter de raccourci. Utilisez « Copier le lien de lancement » à la place.</string>
|
||||
<string name="game_link_invalid">Lien de lancement de jeu invalide.</string>
|
||||
<string name="game_link_missing">Ce jeu n\'est plus dans votre bibliothèque DroidDeck.</string>
|
||||
<string name="game_link_session_busy">Veuillez arrêter la session en cours avant de lancer un jeu Steam.</string>
|
||||
<string name="game_link_failed">Impossible d\'envoyer le jeu à Steam. Veuillez réessayer de le lancer.</string>
|
||||
<string name="setup_retry_removal">Réessayer la suppression</string>
|
||||
<string name="runtime_removing">Suppression…</string>
|
||||
<string name="runtime_removal_incomplete">Suppression incomplète</string>
|
||||
<string name="game_file_export">Exporter les fichiers du jeu</string>
|
||||
<string name="game_file_sync">Synchroniser tous les fichiers du jeu dans un dossier</string>
|
||||
<string name="game_file_stop_sync">Arrêter la synchronisation des fichiers du jeu</string>
|
||||
<string name="game_file_folder">Choisir un dossier pour les fichiers du jeu frontal</string>
|
||||
<string name="game_file_exported">Fichiers du jeu enregistrés dans %1$s</string>
|
||||
<string name="game_frontend_files">Fichiers frontaux</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,960 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">DroidDeck</string>
|
||||
<string-array name="loading_hints">
|
||||
<item>При первом запуске будет загружен Steam. Это может занять несколько минут.</item>
|
||||
<item>По умолчанию при выходе из приложения Steam приостанавливается; при возвращении работа возобновляется с того же места.</item>
|
||||
<item>Ваш контроллер будет отображаться как геймпад Xbox 360. В противном случае используйте экранные элементы управления.</item>
|
||||
</string-array>
|
||||
<string-array name="loading_hints_desktop">
|
||||
<item>При первом запуске будет настроен рабочий стол. Это может занять несколько минут.</item>
|
||||
<item>По умолчанию при выходе из приложения сессия приостанавливается; при возвращении работа возобновляется с того же места.</item>
|
||||
<item>Сенсорный ввод работает как тачпад: перетаскивайте для перемещения курсора, нажимайте для клика.</item>
|
||||
<item>Ваш контроллер будет отображаться как геймпад Xbox 360. В противном случае используйте экранные элементы управления.</item>
|
||||
</string-array>
|
||||
<string name="session_channel">Сессия</string>
|
||||
<string name="session_channel_description">Отображается при открытии сессии Steam или рабочего стола</string>
|
||||
<string name="session_notification">Steam запущен</string>
|
||||
<string name="session_notification_paused">Сессия приостановлена - нажмите, чтобы продолжить</string>
|
||||
<string name="resume_session">Продолжить</string>
|
||||
<string name="stop_session">Завершить сессию</string>
|
||||
<string name="frame_gen_title">Генерация кадров</string>
|
||||
<string name="frame_gen_hint">Выберите режим генерации кадров</string>
|
||||
<string name="frame_gen_off">Выкл.</string>
|
||||
<string name="frame_gen_winfg">Win-FG %1$d×</string>
|
||||
<string name="frame_gen_lsfg">LSFG %1$d×</string>
|
||||
<string name="frame_gen_lsfg_adaptive">LSFG Адаптивный %1$d</string>
|
||||
<string name="lsfg_needs_steam">Требуется Lossless Scaling из Steam</string>
|
||||
<string name="lsfg_needs_install">Установите Lossless Scaling в Steam или импортируйте Lossless.dll</string>
|
||||
<string name="lsfg_import">Импорт Lossless.dll…</string>
|
||||
<string name="lsfg_using_steam">Используется версия из Steam</string>
|
||||
<string name="lsfg_using_import">Используется импортированная версия</string>
|
||||
<string name="lsfg_pick_title">Выберите файл Lossless.dll</string>
|
||||
<string name="lsfg_imported">Lossless.dll импортирован</string>
|
||||
<string name="lsfg_import_unchanged">Этот Lossless.dll уже используется</string>
|
||||
<string name="lsfg_import_not_owned">В этой учетной записи Steam нет Lossless Scaling</string>
|
||||
<string name="lsfg_import_invalid">Этот файл не является Lossless.dll от Lossless Scaling</string>
|
||||
<string name="lsfg_import_failed">Не удалось подготовить LSFG из этого Lossless.dll</string>
|
||||
<string name="lsfg_problem_missing">Для LSFG требуется Lossless Scaling из Steam или импортированный файл Lossless.dll</string>
|
||||
<string name="lsfg_problem_failed">LSFG не может подготовить свои шейдеры из этого Lossless.dll</string>
|
||||
<string name="hud_fg_unsupported">%1$s: не поддерживается</string>
|
||||
<string name="hud_fg_failed">%1$s: сбой движка</string>
|
||||
<string name="hud_fg_needs_lossless">%1$s: требуется Lossless Scaling</string>
|
||||
<string name="hud_fg_starting">%1$s %2$s · Запуск</string>
|
||||
<string name="added_games_import_hint">Папка, содержащая несколько подпапок, каждая из которых соответствует игре Windows. Игры, которыми вы владеете в Steam, будут использовать соответствующие записи Steam после перезапуска Steam, остальные игры станут ярлыками, отличными от Steam.</string>
|
||||
<string name="second_library_import_hint">Добавьте библиотеку Steam и отсканируйте в ней игры Windows. Имеющиеся игры будут использовать соответствующие записи Steam, остальные станут ярлыками, отличными от Steam.</string>
|
||||
<string name="added_games_forget_hint">«Забыть» удалит эти ярлыки в следующей сессии. Но файлы останутся на диске.</string>
|
||||
<string name="game_env_title">Игровая среда</string>
|
||||
<string name="game_env_hint">Переменные среды для игр Proton.</string>
|
||||
<string name="game_env_edit">Изменить</string>
|
||||
<string name="game_env_shared">Все игры Proton</string>
|
||||
<string name="game_env_scope">Профиль</string>
|
||||
<string name="game_env_app_id">ID приложения Steam</string>
|
||||
<string name="game_env_open">Открыть</string>
|
||||
<string name="game_env_profile">Игра %1$s</string>
|
||||
<string name="game_env_add">Добавить переменную</string>
|
||||
<string name="game_env_name">Имя переменной</string>
|
||||
<string name="game_env_value">Значение</string>
|
||||
<string name="game_env_save">Сохранить</string>
|
||||
<string name="game_env_remove">Удалить</string>
|
||||
<string name="game_env_restore">Восстановить наследование</string>
|
||||
<string name="game_env_reset">Сбросить профиль</string>
|
||||
<string name="game_env_unset">Снять настройку для профиля</string>
|
||||
<string name="game_env_empty">Переменные не заданы.</string>
|
||||
<string name="game_env_inherited">Унаследовано</string>
|
||||
<string name="game_env_custom">Пользовательская переменная</string>
|
||||
<string name="game_env_error">Не удалось загрузить или сохранить. Проверьте свободное место и повторите попытку.</string>
|
||||
<string name="game_env_invalid">Введите допустимое имя и значение, до 8192 символов.</string>
|
||||
<string name="game_env_unused">Стандартная среда выполнения Proton не считывает эту переменную.</string>
|
||||
<string name="game_env_loading">Загрузка…</string>
|
||||
<string name="game_env_feature">Переопределение уровня функций D3D12. 12_2 сообщает о возможностях DirectX 12 Ultimate; неподдерживаемые функции могут вызвать сбой. Оставьте пустым для автоопределения.</string>
|
||||
<string name="game_env_shader">Переопределение модели шейдеров D3D12. 6_9 требует достаточно нового VKD3D и соответствующих функций GPU. Оставьте пустым для автоопределения.</string>
|
||||
<string name="game_env_cache">Поддерживать кэш шейдеров Mesa включенным для уменьшения повторной компиляции. Установите false, чтобы включить кэш.</string>
|
||||
<string name="game_env_cache_size">Максимальный размер кэша шейдеров Mesa, например 1G. Больший кэш занимает больше места.</string>
|
||||
<string name="game_env_vkd3d_config">Параметры VKD3D для D3D12. nodxr отключает трассировку лучей; используйте только при необходимости в игре.</string>
|
||||
<string name="game_env_proton_log">Установите 1 для создания диагностического журнала Proton. Ведение журнала может снизить производительность и занять место.</string>
|
||||
<string name="game_env_wined3d">Установите 1, чтобы использовать WineD3D на базе OpenGL вместо DXVK для тестирования совместимости с D3D9–11.</string>
|
||||
<string name="game_env_xalia">Установите 0, чтобы отключить помощник навигации геймпада Proton для этой игры.</string>
|
||||
<string name="game_env_hud">Оверлей DXVK для D3D9–11. fps показывает частоту кадров; снимите настройку, чтобы скрыть оверлей.</string>
|
||||
<string name="game_env_dxvk_config">Настройки DXVK, разделенные точкой с запятой. В последних версиях используется dxvk.maxFrameRate для ограничения частоты кадров; для повседневной игры рекомендуется использовать ограничитель частоты кадров сессии.</string>
|
||||
<string name="game_env_vkd3d_limit">Ограничение частоты кадров D3D12. 0 отключает ограничение.</string>
|
||||
<string name="game_env_glthread">Многопоточность Mesa OpenGL. Для игр OpenGL с ограничением CPU значение true может помочь; тестируйте отдельно для каждой игры.</string>
|
||||
<string name="fex_preset_title">Пресеты FEX</string>
|
||||
<string name="fex_next_launch">Вступит в силу при следующем запуске игры.</string>
|
||||
<string name="game_settings_title">Игра</string>
|
||||
<string name="fex_default_label">FEX по умолчанию</string>
|
||||
<string name="fex_default_detail">Использовать настройки FEX по умолчанию.</string>
|
||||
<string name="fex_stability_label">Стабильность</string>
|
||||
<string name="fex_stability_detail">Самые безопасные и медленные настройки.</string>
|
||||
<string name="fex_compatibility_label">Совместимость</string>
|
||||
<string name="fex_compatibility_detail">Полный TSO + multiblock.</string>
|
||||
<string name="fex_intermediate_label">Средний</string>
|
||||
<string name="fex_intermediate_detail">Сбалансированные настройки TSO со сниженной точностью x87.</string>
|
||||
<string name="fex_performance_label">Производительность</string>
|
||||
<string name="fex_performance_detail">Отключить все TSO; включить multiblock.</string>
|
||||
<string name="fex_performance_tso_label">Производительность + TSO</string>
|
||||
<string name="fex_performance_tso_detail">Настройки производительности с включенным основным TSO.</string>
|
||||
<string name="fex_extreme_label">Экстрим</string>
|
||||
<string name="fex_extreme_detail">Отключить проверку самомодифицирующегося кода. Игры JIT и DRM могут не работать.</string>
|
||||
<string name="fex_extreme_tso_label">Экстрим + TSO</string>
|
||||
<string name="fex_extreme_tso_detail">Настройки экстрим с включенным основным TSO.</string>
|
||||
<string name="fex_extreme_gn_label">Экстрим-gn</string>
|
||||
<string name="fex_extreme_gn_detail">Настройки производительности с включенными TSC и подсказками метаданных. Рекомендуется сначала попробовать этот режим, а затем «Экстрим».</string>
|
||||
<string name="fex_denuvo_label">Denuvo</string>
|
||||
<string name="fex_denuvo_detail">Настройки производительности с включенной полной проверкой кода и скрытием битов гипервизора.</string>
|
||||
<string name="game_env_custom_value">Пользовательское значение</string>
|
||||
<string name="game_env_select_value">Выберите значение</string>
|
||||
<string name="user_apps_section">Эмуляторы и приложения</string>
|
||||
<string name="user_apps_add">Добавить</string>
|
||||
<string name="user_apps_add_detail">Ваше приложение или игра</string>
|
||||
<string name="user_apps_kind_script">Скрипт</string>
|
||||
<string name="user_apps_kind_appimage">AppImage</string>
|
||||
<string name="user_apps_kind_flatpak">Flatpak</string>
|
||||
<string name="user_apps_progress">%1$s · %2$s</string>
|
||||
<string name="user_apps_progress_percent">%1$s · %2$s · %3$d%%</string>
|
||||
<string name="user_apps_starting">Запуск…</string>
|
||||
<string name="user_apps_added">%1$s добавлено</string>
|
||||
<string name="user_apps_removed">%1$s удалено</string>
|
||||
<string name="user_apps_back">Рабочий стол</string>
|
||||
<string name="user_apps_gone">Приложение не существует. Выберите его заново на рабочем столе.</string>
|
||||
<string name="user_apps_open">Открыть %1$s</string>
|
||||
<string name="user_apps_remove">Удалить</string>
|
||||
<string name="user_apps_remove_confirm">Нажмите еще раз для удаления</string>
|
||||
<string name="user_apps_stop_session">Сначала завершите сессию</string>
|
||||
<string name="user_apps_script_linked">Запускает %1$s из своей папки и связывает эту папку с сессией. Удаление приложения не повлияет на папку.</string>
|
||||
<string name="user_apps_script_copied">Запускает %1$s из папки, скопированной в DroidDeck. Удаление приложения удалит копию, но не оригинал.</string>
|
||||
<string name="user_apps_runtime_required">Сначала установите среду выполнения Linux</string>
|
||||
<string name="user_apps_file_gone">Файл не существует</string>
|
||||
<string name="user_apps_no_space">Недостаточно места: для копирования папки требуется %1$s</string>
|
||||
<string name="user_apps_copying">Копирование %1$s</string>
|
||||
<string name="user_apps_failed">Ошибка добавления приложения</string>
|
||||
<string name="user_apps_github_checking">Поиск выпусков %1$s</string>
|
||||
<string name="user_apps_github_unreachable">Не удалось прочитать выпуски %1$s</string>
|
||||
<string name="user_apps_github_no_appimage">%1$s не предоставляет выпуск ARM64 AppImage</string>
|
||||
<string name="user_apps_downloading">Загрузка %1$s</string>
|
||||
<string name="user_apps_download_failed">Ошибка загрузки</string>
|
||||
<string name="user_apps_update_failed">Ошибка обновления приложения</string>
|
||||
<string name="user_apps_icon_failed">Не удалось прочитать иконку</string>
|
||||
<string name="user_apps_saved">%1$s сохранено</string>
|
||||
<string name="user_apps_edit">Изменить</string>
|
||||
<string name="user_apps_check_updates">Проверить обновления</string>
|
||||
<string name="user_apps_checking_updates">Проверка обновлений…</string>
|
||||
<string name="user_apps_update_to">Обновить до %1$s</string>
|
||||
<string name="user_apps_up_to_date">Актуально · %1$s</string>
|
||||
<string name="user_apps_updated">%1$s обновлено</string>
|
||||
<string name="user_apps_github_version">%1$s · %2$s</string>
|
||||
<string name="add_app_title">Добавить приложение</string>
|
||||
<string name="add_app_tab_script">Скрипт</string>
|
||||
<string name="add_app_tab_appimage">AppImage</string>
|
||||
<string name="add_app_tab_github">GitHub</string>
|
||||
<string name="add_app_tab_flatpak">Flatpak</string>
|
||||
<string name="add_app_script_hint">Файл .sh. Запускается из своей папки и отображается в полноэкранном режиме через gamescope.</string>
|
||||
<string name="add_app_appimage_hint">ARM64 (aarch64) AppImage. Распаковывается в среду выполнения Linux при первом использовании.</string>
|
||||
<string name="add_app_github_hint">Установить ARM64 AppImage из последнего выпуска репозитория.</string>
|
||||
<string name="add_app_flatpak_hint">ID приложения Flathub или его страница Flathub. Если Flatpak не настроен, он будет настроен сначала.</string>
|
||||
<string name="add_app_file">Файл</string>
|
||||
<string name="add_app_no_file">Файл не выбран</string>
|
||||
<string name="add_app_choose_file">Выбрать файл</string>
|
||||
<string name="add_app_change_file">Изменить</string>
|
||||
<string name="add_app_pick_script">Выбрать скрипт</string>
|
||||
<string name="add_app_pick_appimage">Выбрать AppImage</string>
|
||||
<string name="add_app_pick_icon">Выбрать иконку</string>
|
||||
<string name="add_app_repository">Репозиторий</string>
|
||||
<string name="add_app_repository_placeholder">owner/repo или ссылка github.com</string>
|
||||
<string name="add_app_repository_invalid">Не является репозиторием GitHub</string>
|
||||
<string name="add_app_flatpak_id">ID приложения</string>
|
||||
<string name="add_app_flatpak_placeholder">org.ppsspp.PPSSPP</string>
|
||||
<string name="add_app_flatpak_invalid">Недействительный ID приложения Flathub</string>
|
||||
<string name="add_app_source">Источник</string>
|
||||
<string name="add_app_appearance">Показывать на рабочем столе</string>
|
||||
<string name="add_app_preview_name">Новое приложение</string>
|
||||
<string name="add_app_name">Название</string>
|
||||
<string name="add_app_name_placeholder">Из приложения</string>
|
||||
<string name="add_app_icon">Иконка</string>
|
||||
<string name="add_app_icon_default">Иконка по умолчанию</string>
|
||||
<string name="add_app_choose_icon">Выбрать иконку</string>
|
||||
<string name="add_app_clear_icon">Очистить</string>
|
||||
<string name="add_app_icon_suggestions">Из репозитория</string>
|
||||
<string name="add_app_icon_searching">Поиск иконок…</string>
|
||||
<string name="add_app_icon_reset">По умолчанию</string>
|
||||
<string name="edit_app_title">Изменить %1$s</string>
|
||||
<string name="edit_app_save">Сохранить</string>
|
||||
<string name="add_app_checking_folder">Проверка папки…</string>
|
||||
<string name="add_app_folder_linked">Папка связана с сессией: %1$s</string>
|
||||
<string name="add_app_folder_copied">Эта папка содержит программы Linux, которые не могут работать из общего хранилища, поэтому она будет скопирована в DroidDeck (%1$s).</string>
|
||||
<string name="add_app_confirm">Добавить</string>
|
||||
<string name="add_app_cancel">Отмена</string>
|
||||
<string name="add_app_runtime_required">Сначала установите среду выполнения Linux в «Настройках».</string>
|
||||
<string name="add_app_busy">Подождите, пока завершится %1$s.</string>
|
||||
<string name="common_cancel">Отмена</string>
|
||||
<string name="common_auto">Авто</string>
|
||||
<string name="common_never">Никогда</string>
|
||||
<string name="common_always">Всегда</string>
|
||||
<string name="common_uninstall">Удалить</string>
|
||||
<string name="common_check">Проверить</string>
|
||||
<string name="common_update">Обновить</string>
|
||||
<string name="common_checking">Проверка…</string>
|
||||
<string name="common_working">Обработка…</string>
|
||||
<string name="common_forget">Забыть</string>
|
||||
<string name="common_add_ellipsis">Добавить…</string>
|
||||
<string name="common_use">Использовать</string>
|
||||
<string name="common_applies_next_session">Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_steam_title">Сессия Steam</string>
|
||||
<string name="mode_desktop_title">Сессия рабочего стола</string>
|
||||
<string name="mode_display">Экран</string>
|
||||
<string name="mode_resolution">Разрешение</string>
|
||||
<string name="mode_res_720">До 720p</string>
|
||||
<string name="mode_res_900">До 900p</string>
|
||||
<string name="mode_res_1080">До 1080p</string>
|
||||
<string name="mode_res_native">Нативное</string>
|
||||
<string name="mode_res_default">%1$s (по умолчанию)</string>
|
||||
<string name="mode_res_custom_value">Пользовательское · %1$d×%2$d</string>
|
||||
<string name="mode_res_custom">Пользовательское…</string>
|
||||
<string name="mode_res_note">720p может ускорить отклик меню.</string>
|
||||
<string name="mode_ratio">Соотношение сторон</string>
|
||||
<string name="mode_ratio_custom">Задается пользовательским разрешением.</string>
|
||||
<string name="mode_ratio_auto">Автоматический режим использует не менее 16:9.</string>
|
||||
<string name="mode_fps">Ограничение частоты кадров</string>
|
||||
<string name="mode_fps_note">Ограничивает частоту кадров всей сессии. Монитор переключится на частоту обновления, кратную этому пределу.</string>
|
||||
<string name="mode_hdr">HDR</string>
|
||||
<string name="mode_hdr10">Вывод HDR10</string>
|
||||
<string name="mode_hdr_unavailable">Недоступно: %1$s.</string>
|
||||
<string name="mode_hdr_restart">Вступит в силу после перезапуска приложения.</string>
|
||||
<string name="mode_drivers">Драйверы</string>
|
||||
<string name="mode_gpu_drivers">Драйверы GPU</string>
|
||||
<string name="mode_gpu_drivers_hint">Общие для Steam и рабочего стола. Настройте на странице «Компоненты».</string>
|
||||
<string name="mode_touch_controls">Сенсорный ввод и управление</string>
|
||||
<string name="mode_touch">Сенсорный</string>
|
||||
<string name="mode_touch_touchpad">Тачпад</string>
|
||||
<string name="mode_touch_direct">Прямой</string>
|
||||
<string name="mode_touch_note">Авто: тачпад для рабочего стола, прямой сенсорный ввод для Steam.</string>
|
||||
<string name="mode_osc">Экранные элементы управления</string>
|
||||
<string name="mode_osc_qam">Steam + QAM</string>
|
||||
<string name="mode_osc_note">Автоматический режим показывает экранные элементы управления, если контроллер не подключен.</string>
|
||||
<string name="mode_controller">Контроллер</string>
|
||||
<string name="mode_controller_hint">Как Steam распознает ваш контроллер. Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_controller_deck">Контроллер Steam Deck</string>
|
||||
<string name="mode_controller_x360">Контроллер Xbox 360</string>
|
||||
<string name="mode_controller_note">Deck: кнопка быстрого доступа и гироскоп. Xbox 360: используйте Guide+A для быстрого доступа.</string>
|
||||
<string name="mode_back">Назад</string>
|
||||
<string name="mode_session">Сессия</string>
|
||||
<string name="mode_suspend">Поведение в фоне</string>
|
||||
<string name="mode_suspend_hint">Поведение при скрытии приложения или выключении экрана.</string>
|
||||
<string name="mode_suspend_manual">Вручную</string>
|
||||
<string name="mode_suspend_note">Автоматический режим приостанавливает работу в фоне и возобновляет при отображении. Ручной режим требует нажатия «Продолжить». Никогда не остается запущенным.</string>
|
||||
<string name="mode_startup">Запуск</string>
|
||||
<string name="mode_steam_startup">Запускать Steam при открытии DroidDeck</string>
|
||||
<string name="mode_steam_startup_hint">Открывает сессию Steam при запуске DroidDeck.</string>
|
||||
<string name="mode_decky">Decky</string>
|
||||
<string name="mode_decky_checking">Проверка выпусков…</string>
|
||||
<string name="mode_decky_ready">Готово к установке %1$s.</string>
|
||||
<string name="mode_decky_none">Совместимая версия не найдена. Повторите попытку позже.</string>
|
||||
<string name="mode_decky_installed">Установлено · %1$s</string>
|
||||
<string name="mode_decky_update">Доступно обновление · %1$s</string>
|
||||
<string name="mode_decky_current">Актуально · %1$s</string>
|
||||
<string name="mode_decky_loader">Загрузчик</string>
|
||||
<string name="mode_decky_install_latest">Установить последнюю версию</string>
|
||||
<string name="mode_decky_on">Запускается вместе со Steam. После включения другие приложения на этом устройстве могут управлять Steam.</string>
|
||||
<string name="mode_decky_off">Выкл. Порт удаленной отладки Steam остается закрытым.</string>
|
||||
<string name="mode_decky_remove_title">Удалить Decky Loader?</string>
|
||||
<string name="mode_decky_remove_text">Удаляет загрузчик. Ваши плагины и настройки сохранятся.</string>
|
||||
<string name="mode_client">Клиент</string>
|
||||
<string name="mode_deck_mode">Режим Steam Deck</string>
|
||||
<string name="mode_deck_mode_hint">Интерфейс Steam Deck и управление производительностью через быстрый доступ. Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_mangoapp">Оверлей производительности</string>
|
||||
<string name="mode_mangoapp_hint">Отключите, если игры падают или появляется черный экран в режиме Deck. Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_branch">Ветка клиента</string>
|
||||
<string name="mode_branch_deck">Бета-версия Steam Deck (требуется для режима Deck).</string>
|
||||
<string name="mode_branch_hint">Вступит в силу в следующей сессии. Steam может обновиться самостоятельно один раз.</string>
|
||||
<string name="mode_branch_public">Бета</string>
|
||||
<string name="mode_branch_deck_beta">Бета-версия Steam Deck</string>
|
||||
<string name="mode_branch_note">Режим Deck всегда использует бета-версию Steam Deck.</string>
|
||||
<string name="mode_added_games">Добавленные игры</string>
|
||||
<string name="mode_added_none">Папки с играми .exe не найдены</string>
|
||||
<string name="mode_games_folder">Папка с играми</string>
|
||||
<string name="mode_games_folder_another">Другая папка с играми</string>
|
||||
<string name="mode_added_art">Изображения из Steam</string>
|
||||
<string name="mode_added_art_hint">Дополняет отсутствующие изображения по имени папки. Файлы cover.jpg, hero.jpg, logo.png или icon.png в папке с игрой имеют приоритет.</string>
|
||||
<string name="mode_added_launches">Запустить %1$s</string>
|
||||
<string name="mode_added_launches_in">Запустить %1$s · в %2$s</string>
|
||||
<string name="mode_added_choose">Выбрать другой файл…</string>
|
||||
<string name="mode_added_exe_note">По умолчанию используется .exe с именем папки, иначе самый большой .exe.</string>
|
||||
<string name="mode_fill">Растянуть игру на весь экран</string>
|
||||
<string name="mode_fill_hint">Сохраняет полноэкранный режим для игр, поддерживающих изменение размера. Отключите, если игра отображается мелко. Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_stretch169">Растянуть игры 16:9</string>
|
||||
<string name="mode_stretch169_hint">На экранах с соотношением сторон менее 16:9 растягивает игру на весь экран вместо черных полос. Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_audio">Аудио</string>
|
||||
<string name="mode_directaudio">Использовать DirectAudio в игре</string>
|
||||
<string name="mode_directaudio_hint">Обходит PulseAudio для снижения задержки.</string>
|
||||
<string name="mode_client_audio">Аудио клиента Steam</string>
|
||||
<string name="mode_client_audio_hint">Вступит в силу в следующей сессии.</string>
|
||||
<string name="mode_client_audio_classic">Классический</string>
|
||||
<string name="mode_client_audio_direct">DirectAudio</string>
|
||||
<string name="mode_mic">Микрофон</string>
|
||||
<string name="mode_mic_hint">Используется для голосового чата.</string>
|
||||
<string name="mode_network">Сеть</string>
|
||||
<string name="mode_wifi_discovery">Обнаружение Wi-Fi</string>
|
||||
<string name="mode_wifi_discovery_hint">Показывает названия Wi-Fi и ближайшие сети в Steam.</string>
|
||||
<string name="mode_wifi_location_off">Службы геолокации отключены.</string>
|
||||
<string name="mode_wifi_permission_denied">Разрешение на определение местоположения не предоставлено.</string>
|
||||
<string name="mode_wifi_open_settings">Открыть настройки</string>
|
||||
<string name="mode_wifi_continue">Продолжить</string>
|
||||
<string name="mode_wifi_explain_title">Включить обнаружение Wi-Fi?</string>
|
||||
<string name="mode_wifi_explain_text">Android требует разрешение на определение местоположения для чтения имен Wi-Fi и обнаружения ближайших сетей. DroidDeck использует это разрешение для отображения этих сетей в Steam. Мы не отслеживаем ваше местоположение. Доступ в интернет возможен и без этого разрешения.</string>
|
||||
<string name="mode_storage">Хранилище игр</string>
|
||||
<string name="mode_storage_auto">Авто - Использовать SD-карту при наличии</string>
|
||||
<string name="mode_storage_auto_none">Авто - Использовать SD-карту при наличии (сейчас нет SD-карты)</string>
|
||||
<string name="mode_storage_internal">Только внутреннее хранилище</string>
|
||||
<string name="mode_storage_folder">Папка: %1$s</string>
|
||||
<string name="mode_second_library">Вторая библиотека</string>
|
||||
<string name="mode_storage_note">Игры, читающие ресурсы с SD-карты или из общего хранилища, могут подтормаживать.</string>
|
||||
<string name="mode_choose_folder">Выбрать папку…</string>
|
||||
<string name="mode_renderer">Рендерер</string>
|
||||
<string name="mode_desktop_renderer">Рендерер рабочего стола</string>
|
||||
<string name="mode_renderer_hint">Отвечает за отрисовку рабочего стола.</string>
|
||||
<string name="mode_renderer_vulkan">vulkan - GPU</string>
|
||||
<string name="mode_renderer_gles2">gles2 - GPU (экспериментально)</string>
|
||||
<string name="mode_renderer_pixman">pixman - Программный</string>
|
||||
<string name="mode_renderer_note">Vulkan использует GPU для запуска программ рабочего стола, при сбое переключается на pixman. При использовании pixman игры по-прежнему запускаются в полноэкранном режиме на GPU.</string>
|
||||
<string name="mode_custom_res_title">Пользовательское разрешение</string>
|
||||
<string name="mode_custom_res_text">Заменяет предел разрешения и соотношение сторон. Размеры, не соответствующие экрану, будут отображаться с черными полосами.</string>
|
||||
<string name="mode_width">Ширина</string>
|
||||
<string name="mode_height">Высота</string>
|
||||
<string name="mode_custom_res_range">Диапазон: от 320×240 до 3840×2160.</string>
|
||||
<plurals name="mode_added_count">
|
||||
<item quantity="one">%1$d игра</item>
|
||||
<item quantity="few">%1$d игры</item>
|
||||
<item quantity="many">%1$d игр</item>
|
||||
<item quantity="other">%1$d игр</item>
|
||||
</plurals>
|
||||
<string name="common_ok">ОК</string>
|
||||
<string name="common_delete">Удалить</string>
|
||||
<string name="common_restore">Восстановить</string>
|
||||
<string name="common_download">Скачать</string>
|
||||
<string name="common_delete_named">Удалить %1$s</string>
|
||||
<string name="common_size_mb">%1$.1f МБ</string>
|
||||
<string name="comp_runtime_driver">Драйвер среды выполнения</string>
|
||||
<string name="comp_runtime_driver_hint">Используется Steam, играми и рабочим столом. Вступит в силу в следующей сессии.</string>
|
||||
<string name="comp_import_turnip">Импорт Turnip zip…</string>
|
||||
<string name="comp_display_driver">Драйвер дисплея</string>
|
||||
<string name="comp_display_driver_hint">Отвечает за вывод изображения на экран в обоих режимах. Вступит в силу после перезапуска приложения.</string>
|
||||
<string name="comp_import_adrenotools">Импорт AdrenoTools zip…</string>
|
||||
<string name="comp_never">Никогда</string>
|
||||
<string name="comp_nightlies_checked">Nightlies проверено %1$s</string>
|
||||
<string name="comp_title">Компоненты</string>
|
||||
<string name="comp_about">О компонентах</string>
|
||||
<string name="comp_check_drivers">Проверить новые драйверы</string>
|
||||
<string name="comp_check_nightlies">Проверить новые пакеты в Nightlies</string>
|
||||
<string name="comp_proton">Proton</string>
|
||||
<string name="comp_proton_note">При обновлении Steam заменяет Proton от Valve; оригинальные файлы каждой сборки сохраняются.</string>
|
||||
<string name="comp_swapped">%1$s · заменено %2$d</string>
|
||||
<string name="comp_all_original">%1$s · все оригинальные файлы</string>
|
||||
<string name="comp_game_running_suffix">%1$s · игра запущена</string>
|
||||
<string name="comp_gpu_drivers">Драйверы GPU</string>
|
||||
<string name="comp_reapplied">%1$s · повторно применено при запуске %2$s</string>
|
||||
<string name="comp_next_queued">Далее: %1$s · после закрытия игры</string>
|
||||
<string name="comp_in_use">Используется %1$s: %2$s</string>
|
||||
<string name="comp_waits">Ожидание закрытия игры</string>
|
||||
<string name="comp_applies_next_game">Вступит в силу при следующем запуске игры</string>
|
||||
<string name="comp_import_zip">Импорт .zip</string>
|
||||
<string name="comp_reading">Чтение Proton…</string>
|
||||
<string name="comp_no_proton">Proton не установлен. Запустите Steam один раз для загрузки ARM64 Proton или добавьте GE-Proton или CachyOS в «Настройках».</string>
|
||||
<string name="comp_original">Оригинал · %1$s</string>
|
||||
<string name="comp_this_build">%1$s · текущая сборка</string>
|
||||
<string name="comp_earlier_build">%1$s · более ранняя сборка</string>
|
||||
<string name="comp_installed_count">Установлено · %1$d</string>
|
||||
<string name="comp_nothing_stored">Для %1$s пока ничего не сохранено. Файлы, поставляемые с этим Proton, будут сохранены как оригинальные.</string>
|
||||
<string name="comp_waits_long">Игра использует этот Proton, поэтому нужно дождаться ее закрытия.</string>
|
||||
<string name="comp_applies_long">Вступит в силу при следующем запуске игры.</string>
|
||||
<string name="comp_swap_title">Заменить %1$s?</string>
|
||||
<string name="comp_swap_body">Поместить %1$s в %2$s? Оригинальные файлы продолжат сохраняться. %3$s</string>
|
||||
<string name="comp_restore_title">Восстановить %1$s?</string>
|
||||
<string name="comp_restore_body">Вернуть оригинальные файлы %1$s в %2$s? %3$s</string>
|
||||
<string name="comp_delete_package_body">Удалить пакет из приложения. Его можно будет скачать снова.</string>
|
||||
<string name="comp_delete_original_title">Удалить оригинальную версию?</string>
|
||||
<string name="comp_delete_original_body">Эта оригинальная версия %1$s из более ранней сборки %2$s. Оригинальная версия текущей сборки всегда сохраняется.</string>
|
||||
<string name="comp_nightlies_count">В Nightlies · %1$d</string>
|
||||
<string name="comp_refresh_to_list">Обновить, чтобы показать пакеты в Nightlies.</string>
|
||||
<string name="comp_nothing_new">С момента последней проверки нового нет.</string>
|
||||
<string name="comp_import_wcp">Импорт .wcp</string>
|
||||
<string name="comp_restore_original">Восстановить оригинальные файлы этого Proton</string>
|
||||
<string name="comp_restore_original_body">Вернуть оригинальные файлы %2$s из %1$s?</string>
|
||||
<string name="comp_swap">Переключить</string>
|
||||
<string name="comp_about_text">FEX, DXVK и VKD3D-Proton: для каждого Proton, используемого Steam для запуска игр.\n\nВыберите установленный элемент, чтобы заменить его. Это вступит в силу при следующем запуске игры или после закрытия текущей запущенной игры.\n\nВаш выбор будет перепроверяться перед каждым запуском; если он был изменен, он будет восстановлен. Оригинальные файлы каждого Proton сохраняются, поэтому обновления Steam никогда их не потеряют.</string>
|
||||
<string name="comp_tag_original">Оригинал</string>
|
||||
<string name="comp_tag_in_use">Используется</string>
|
||||
<string name="comp_tag_new">Новый</string>
|
||||
<string name="comp_tag_stored">Сохранено</string>
|
||||
<string name="perf_title">Производительность</string>
|
||||
<string name="perf_lede">Ядра CPU, исправления сессии и имя хоста. Вступит в силу в следующей сессии.</string>
|
||||
<string name="perf_client_cores_group">Ядра клиента Steam</string>
|
||||
<string name="perf_override">Переопределить выбор ядер Steam</string>
|
||||
<string name="perf_override_hint">Закрепить Steam, помощник интерфейса и gamescope за выбранными ниже ядрами.</string>
|
||||
<string name="perf_client_cores">Ядра клиента</string>
|
||||
<string name="perf_client_cores_on">Ядра, используемые Steam.</string>
|
||||
<string name="perf_client_cores_off">Включите переопределение для выбора.</string>
|
||||
<string name="perf_game_cores_group">Ядра игры</string>
|
||||
<string name="perf_game_cores">Ядра игры</string>
|
||||
<string name="perf_game_cores_hint">Ядра, используемые играми. При выборе всех ядер Android планирует свободно.</string>
|
||||
<string name="perf_client_ui">Интерфейс клиента</string>
|
||||
<string name="perf_glthread">Многопоточность GL</string>
|
||||
<string name="perf_glthread_hint">Может ускорить отклик меню Steam.</string>
|
||||
<string name="perf_zink">Zink: отложенные дескрипторы</string>
|
||||
<string name="perf_zink_hint">Рекомендуется для драйверов без буфера дескрипторов.</string>
|
||||
<string name="perf_noglerror">Пропустить проверку ошибок GL</string>
|
||||
<string name="perf_noglerror_hint">Отключить проверку GL для каждого вызова.</string>
|
||||
<string name="perf_gsrealtime">gamescope: очередь GPU в реальном времени</string>
|
||||
<string name="perf_gsrealtime_hint">Повышает приоритет работы GPU композитора. Может улучшить стабильность времени кадра, но потребляет часть производительности игры.</string>
|
||||
<string name="perf_gpu">GPU</string>
|
||||
<string name="perf_gpuclock">Поддерживать максимальную частоту GPU</string>
|
||||
<string name="perf_gpuclock_hint">Только для Adreno. Меньше подтормаживаний, но больше энергопотребления и нагрева.</string>
|
||||
<string name="perf_fixes">Исправления сессии</string>
|
||||
<string name="perf_sysmem">Turnip: рендеринг sysmem</string>
|
||||
<string name="perf_sysmem_hint">Steam и большинство игр будут быстрее. Требуется для Adreno 710/720/722.</string>
|
||||
<string name="perf_xalia">Пропустить помощник xalia в Steam</string>
|
||||
<string name="perf_xalia_hint">Отключает помощник навигации геймпада Proton, который потребляет CPU в каждой игре.</string>
|
||||
<string name="perf_seccomp">Запускать proot без seccomp</string>
|
||||
<string name="perf_seccomp_hint">Может исправить ошибки отсутствующих системных вызовов на некоторых ядрах, но может снизить производительность.</string>
|
||||
<string name="perf_fastpath">Быстрый путь proot</string>
|
||||
<string name="perf_fastpath_needs_seccomp">Требуется фильтр seccomp для proot.</string>
|
||||
<string name="perf_fastpath_hint">Быстрый поиск файлов, меньше подтормаживаний. Отключите, если программа не находит файлы.</string>
|
||||
<string name="perf_identity">Идентификация сессии</string>
|
||||
<string name="perf_hostname">Имя хоста</string>
|
||||
<string name="perf_hostname_hint">Имя, под которым Steam видит это устройство. Оставьте пустым, чтобы вернуть %1$s.</string>
|
||||
<string name="perf_hostname_invalid">Только буквы, цифры и дефисы посередине, до 63 символов.</string>
|
||||
<string name="perf_phantom_warning">Android настроен на завершение этой сессии</string>
|
||||
<string name="driver_installed">Установлен</string>
|
||||
<string name="driver_available">Доступен для скачивания</string>
|
||||
<string name="driver_nothing_new">С момента последней проверки нового нет.</string>
|
||||
<string name="driver_restore_builtin">Восстановить встроенный драйвер</string>
|
||||
<string name="driver_delete_builtin">Встроенный драйвер приложения: удалит распакованные файлы и скроет драйвер. Используйте «Восстановить встроенный драйвер» для восстановления.</string>
|
||||
<string name="driver_delete_bundle">Половина пакета Android + Linux: обе части будут удалены. Используемый драйвер вернется к драйверу по умолчанию.</string>
|
||||
<string name="driver_delete_plain">Файлы будут удалены из приложения.</string>
|
||||
<string name="driver_delete_in_use">Файлы будут удалены. Поскольку драйвер используется, будет применен драйвер по умолчанию.</string>
|
||||
<string name="drawer_page_display">Экран</string>
|
||||
<string name="drawer_page_controls">Управление</string>
|
||||
<string name="drawer_page_components">Компоненты</string>
|
||||
<string name="drawer_page_settings">Настройки</string>
|
||||
<string name="drawer_page_desc">Страница %1$s</string>
|
||||
<string name="drawer_steam">Steam</string>
|
||||
<string name="drawer_desktop">Рабочий стол</string>
|
||||
<string name="drawer_steam_menu">Меню Steam</string>
|
||||
<string name="drawer_quick_access">Быстрый доступ</string>
|
||||
<string name="drawer_open_qam">Открыть меню быстрого доступа</string>
|
||||
<string name="drawer_prev_page">Предыдущая страница</string>
|
||||
<string name="drawer_next_page">Следующая страница</string>
|
||||
<string name="drawer_hud">HUD производительности</string>
|
||||
<string name="drawer_fill">Растянуть игру на весь экран</string>
|
||||
<string name="drawer_touch_auto">Авто (%1$s)</string>
|
||||
<string name="drawer_keyboard">Клавиатура</string>
|
||||
<string name="drawer_pc_keyboard">Клавиатура ПК</string>
|
||||
<string name="drawer_android_keyboard">Android</string>
|
||||
<string name="drawer_second_screen">Второй экран</string>
|
||||
<string name="drawer_second_screen_shows">Показывать</string>
|
||||
<string name="drawer_android_apps">Приложения Android</string>
|
||||
<string name="drawer_launch_app">Запустить приложение</string>
|
||||
<string name="common_hide">Скрыть</string>
|
||||
<string name="common_show">Показать</string>
|
||||
<string name="drawer_no_apps">Нет приложений для запуска</string>
|
||||
<string name="drawer_session_behavior">Поведение сессии</string>
|
||||
<string name="drawer_suspend_hint">Применяется сразу и действует для будущих сессий этого режима.</string>
|
||||
<string name="drawer_next_session">Следующая сессия</string>
|
||||
<string name="drawer_support">Поддержка</string>
|
||||
<string name="drawer_logs">Журналы сессии</string>
|
||||
<string name="drawer_logs_hint">Прикрепить к отчету об ошибке</string>
|
||||
<string name="drawer_share_logs">Поделиться журналами</string>
|
||||
<string name="drawer_background">Фон</string>
|
||||
<string name="drawer_stop">Остановить</string>
|
||||
<string name="drawer_stop_title">Остановить сессию?</string>
|
||||
<string name="drawer_running_now">Сейчас выполняется</string>
|
||||
<string name="drawer_no_game">Сейчас нет игр, запущенных через Proton</string>
|
||||
<string name="drawer_no_proton">Proton не установлен.</string>
|
||||
<string name="drawer_game_running">Игра запущена</string>
|
||||
<string name="drawer_reapplied">Повторно применено при запуске %1$s</string>
|
||||
<string name="drawer_original">Оригинал</string>
|
||||
<string name="drawer_components_note">Скачивайте, импортируйте и удаляйте на странице «Компоненты».</string>
|
||||
<string name="setup_check_done">Готово</string>
|
||||
<string name="setup_check_warn">Требует внимания</string>
|
||||
<string name="setup_check_busy">Обработка</string>
|
||||
<string name="setup_limit_adb_failed">Проверьте IP-адрес и порт отладки по Wi-Fi; если Android удалил устройство, выполните повторное сопряжение.</string>
|
||||
<string name="setup_install">Установить</string>
|
||||
<string name="setup_manage">Управление</string>
|
||||
<string name="setup_tab_overview">Обзор</string>
|
||||
<string name="setup_tab_controller">Контроллер</string>
|
||||
<string name="setup_tab_session">Сессия</string>
|
||||
<string name="setup_tab_launcher">Лаунчер</string>
|
||||
<string name="setup_title">Настройка</string>
|
||||
<string name="setup_all_set">● Все готово</string>
|
||||
<string name="setup_n_ready">%1$d/%2$d готово</string>
|
||||
<string name="setup_system_check">Проверка системы</string>
|
||||
<string name="setup_gpu_supported">Устройство поддерживается</string>
|
||||
<string name="setup_gpu_untested">Непроверенный GPU</string>
|
||||
<string name="setup_gpu_unsupported">GPU не поддерживается</string>
|
||||
<string name="setup_gpu_detail">%1$s · %2$s</string>
|
||||
<string name="setup_gpu_untested_detail">%1$s: %2$s</string>
|
||||
<string name="setup_gpu_unsupported_detail">Steam требует драйвер Adreno; на %1$s возможен черный экран.</string>
|
||||
<string name="setup_runtime">Среда выполнения Linux</string>
|
||||
<string name="setup_runtime_progress">%1$s · %2$d%%</string>
|
||||
<string name="setup_runtime_missing">Не установлено · около 3 ГБ, устанавливается при первом запуске игры</string>
|
||||
<string name="setup_installed">Установлено</string>
|
||||
<string name="setup_runtime_update">%1$s · доступно обновление</string>
|
||||
<string name="setup_runtime_current">%1$s · актуально</string>
|
||||
<string name="setup_limit">Ограничение дочерних процессов</string>
|
||||
<string name="setup_limit_on">Включено · Android может закрыть Steam. Отключение занимает около минуты.</string>
|
||||
<string name="setup_limit_unset">Не задано · Android может закрыть Steam. Отключение занимает около минуты.</string>
|
||||
<string name="setup_limit_unknown">Невозможно проверить · отключение занимает около минуты.</string>
|
||||
<string name="setup_fix_it">Исправить</string>
|
||||
<string name="setup_details">Подробности</string>
|
||||
<string name="setup_dev_options">Для разработчиков</string>
|
||||
<string name="setup_use_wireless">Использовать отладку по Wi-Fi</string>
|
||||
<string name="setup_check_again">Проверить снова</string>
|
||||
<string name="setup_limit_turn_on">Включить ограничение</string>
|
||||
<string name="setup_account">Аккаунт Steam</string>
|
||||
<string name="setup_signed_in_offline">Вход выполнен как %1$s · автономный режим</string>
|
||||
<string name="setup_signed_in">Вход выполнен как %1$s</string>
|
||||
<string name="setup_sign_in">Нажмите Play и войдите в Steam</string>
|
||||
<string name="setup_tools">Инструменты</string>
|
||||
<string name="setup_controller">Контроллер</string>
|
||||
<string name="setup_controller_unavailable">Настройки контроллера недоступны.</string>
|
||||
<string name="setup_session">Сессия</string>
|
||||
<string name="setup_logs">Журналы сессии</string>
|
||||
<string name="setup_logs_hint">Сохраняется после каждой сессии</string>
|
||||
<string name="setup_latest_logs">Последние журналы сессии</string>
|
||||
<string name="setup_saved_logs">Сохраненные журналы сессии</string>
|
||||
<string name="setup_saved_logs_hint">Хранить последние %1$d</string>
|
||||
<string name="setup_clear_logs">Очистить журналы</string>
|
||||
<string name="setup_offline">Автономный режим</string>
|
||||
<string name="setup_sign_in_first">Сначала войдите в Steam</string>
|
||||
<string name="setup_launcher">Лаунчер</string>
|
||||
<string name="setup_theme">Тема</string>
|
||||
<string name="setup_theme_hint">Внешний вид лаунчера</string>
|
||||
<string name="setup_home">Использовать как главный экран</string>
|
||||
<string name="setup_home_on">DroidDeck может использоваться как приложение главного экрана</string>
|
||||
<string name="setup_home_off">DroidDeck не будет доступен как приложение главного экрана</string>
|
||||
<string name="setup_fullscreen">Полноэкранный режим</string>
|
||||
<string name="setup_fullscreen_on">Скрыть строку состояния и навигации Android</string>
|
||||
<string name="setup_fullscreen_off">Показать строку состояния и навигации Android</string>
|
||||
<string name="setup_default_home">Приложение главного экрана по умолчанию</string>
|
||||
<string name="setup_choose_home">Выбрать приложение главного экрана</string>
|
||||
<string name="setup_choose">Выбрать</string>
|
||||
<string name="setup_linux_apps">Приложения Linux (бета)</string>
|
||||
<string name="setup_store">Магазин Flathub</string>
|
||||
<string name="setup_store_on">Показывается в меню. Некоторые приложения могут не запускаться; журналы в Download/DroidDeck.</string>
|
||||
<string name="setup_store_off">Устанавливать приложения и игры Linux из Flathub</string>
|
||||
<string name="setup_tool_files">Файлы</string>
|
||||
<string name="setup_tool_files_hint">Просмотр и управление файлами</string>
|
||||
<string name="setup_tool_protons">Версии Proton</string>
|
||||
<string name="setup_tool_protons_hint">Установить сборки ARM64 Proton</string>
|
||||
<string name="setup_tool_performance">Производительность</string>
|
||||
<string name="setup_tool_performance_hint">Распределение ядер CPU</string>
|
||||
<string name="setup_tool_roms">Папки ROM</string>
|
||||
<string name="setup_tool_roms_hint">Место хранения игр эмулятора</string>
|
||||
<string name="setup_card_components">Компоненты</string>
|
||||
<string name="setup_card_components_hint">FEX, DXVK, VKD3D</string>
|
||||
<string name="setup_card_controls">Управление</string>
|
||||
<string name="setup_card_controls_hint">Сопоставление клавиш</string>
|
||||
<string name="store_tab_discover">Обзор</string>
|
||||
<string name="store_tab_search">Поиск</string>
|
||||
<string name="store_tab_installed">Установлено</string>
|
||||
<string name="store_tab_count">%1$s · %2$d</string>
|
||||
<string name="store_title">Магазин</string>
|
||||
<string name="store_chip_flathub">Flathub · ARM64</string>
|
||||
<string name="store_chip_ready">● Flatpak готов</string>
|
||||
<string name="store_needs_runtime">Сначала установите среду выполнения Linux в «Настройках».</string>
|
||||
<string name="store_setup_title">Настройка Flatpak</string>
|
||||
<string name="store_setup_text">Добавление Flatpak и подключение к Flathub (около 20 МБ). Первое приложение также загрузит свою среду выполнения.</string>
|
||||
<string name="store_setting_up">Настройка…</string>
|
||||
<string name="store_flatpak">Flatpak</string>
|
||||
<string name="store_updates">Обновления</string>
|
||||
<string name="store_busy">%1$s · %2$s</string>
|
||||
<string name="store_busy_percent">%1$s · %2$s · %3$d%%</string>
|
||||
<string name="store_starting">Запуск…</string>
|
||||
<string name="store_categories">Категории</string>
|
||||
<string name="store_unreachable">Не удалось подключиться к Flathub. Проверьте подключение к сети и повторите попытку.</string>
|
||||
<string name="store_try_again">Повторить</string>
|
||||
<string name="store_search_label">Поиск в Flathub</string>
|
||||
<string name="store_search_placeholder">Firefox, игры, эмуляторы…</string>
|
||||
<string name="store_search">Поиск</string>
|
||||
<string name="store_all">Все</string>
|
||||
<string name="store_searching">Поиск…</string>
|
||||
<string name="store_search_hint">Ищите по названию или выберите категорию. Здесь перечислены только приложения ARM64.</string>
|
||||
<string name="store_no_results">В Flathub нет подходящих приложений ARM64.</string>
|
||||
<string name="store_results">Результаты</string>
|
||||
<string name="store_check_updates">Проверить обновления</string>
|
||||
<string name="store_update_all">Обновить все (%1$d)</string>
|
||||
<string name="store_all_current">● Все актуально</string>
|
||||
<string name="store_no_apps">Приложений пока нет. Ищите в «Обзоре» или «Поиске».</string>
|
||||
<string name="store_setup_first_note">Настройте Flatpak, чтобы устанавливать приложения.</string>
|
||||
<string name="store_update_available_prefix">Доступно обновление · %1$s</string>
|
||||
<string name="store_open">Открыть</string>
|
||||
<string name="store_details">Подробности</string>
|
||||
<string name="store_remove">Удалить</string>
|
||||
<string name="store_press_again">Нажмите еще раз для удаления</string>
|
||||
<string name="store_installing">Установка…</string>
|
||||
<string name="store_install">Установить</string>
|
||||
<string name="store_setup_first">Сначала настройте Flatpak</string>
|
||||
<string name="store_download_size">Скачать %1$s</string>
|
||||
<string name="store_installed_chip">● Установлено</string>
|
||||
<string name="store_details_failed">Не удалось загрузить страницу Flathub этого приложения.</string>
|
||||
<string name="store_loading">Загрузка из Flathub…</string>
|
||||
<string name="store_no_arm">В Flathub нет сборки ARM64, поэтому установка здесь невозможна.</string>
|
||||
<string name="store_screenshots">Скриншоты</string>
|
||||
<string name="store_about">О приложении</string>
|
||||
<string name="store_app_id">ID приложения</string>
|
||||
<string name="store_license">Лицензия</string>
|
||||
<string name="store_runtime">Среда выполнения</string>
|
||||
<string name="store_installed_size">Установленный размер</string>
|
||||
<string name="store_installed_size_value">%1$s (плюс общая среда выполнения)</string>
|
||||
<string name="store_website">Веб-сайт</string>
|
||||
<string name="store_verified">Проверено</string>
|
||||
<string name="upd_title">Обновления</string>
|
||||
<string name="upd_build">DroidDeck %1$s · %2$s</string>
|
||||
<string name="upd_checked">Проверено %1$s</string>
|
||||
<string name="upd_not_checked">Не проверено</string>
|
||||
<string name="upd_perm_title">Разрешить DroidDeck самообновление</string>
|
||||
<string name="upd_perm_text">Включите «Разрешить из этого источника» на следующей странице и вернитесь. Обновление продолжится автоматически.</string>
|
||||
<string name="upd_open_settings">Открыть настройки</string>
|
||||
<string name="upd_not_now">Не сейчас</string>
|
||||
<string name="upd_signed_status">Другая подпись</string>
|
||||
<string name="upd_signed_headline">Невозможно обновить на месте</string>
|
||||
<string name="upd_signed_detail">Эта копия подписана не ключом выпуска DroidDeck, поэтому ее нельзя перезаписать напрямую. Удалите и переключитесь.</string>
|
||||
<string name="upd_available">Доступно обновление</string>
|
||||
<string name="upd_blocked_status">Невозможно установить</string>
|
||||
<string name="upd_switch">Можно переключить</string>
|
||||
<string name="upd_ahead_status">Опережает Stable</string>
|
||||
<string name="upd_ahead_headline">Вы опережаете Stable</string>
|
||||
<string name="upd_ahead_detail">Эта сборка новее последней Stable. Вы переключитесь на Stable после выпуска следующей версии Stable.</string>
|
||||
<string name="upd_gone_status">Тест завершен</string>
|
||||
<string name="upd_gone_headline">Этот тест завершен</string>
|
||||
<string name="upd_gone_detail">Исправление было объединено или отменено. Следите за Preview, чтобы получать последние исправления.</string>
|
||||
<string name="upd_current_status">Актуально</string>
|
||||
<string name="upd_current_headline">У вас последняя версия %1$s</string>
|
||||
<string name="upd_dot_ago">· %1$s</string>
|
||||
<string name="upd_stage_percent">%1$s… %2$d%%</string>
|
||||
<string name="upd_stage">%1$s…</string>
|
||||
<string name="upd_update_button">Обновить %1$s</string>
|
||||
<string name="upd_install_button">Установить %1$s</string>
|
||||
<string name="upd_install_anyway">Все равно установить Stable %1$s</string>
|
||||
<string name="upd_follow_preview">Следить за Preview</string>
|
||||
<string name="upd_stop_session">Остановите текущую сессию перед обновлением.</string>
|
||||
<string name="upd_less">Свернуть</string>
|
||||
<string name="upd_more">Еще</string>
|
||||
<string name="upd_new_stable">DroidDeck %1$s</string>
|
||||
<string name="upd_new_preview">Новая сборка Preview</string>
|
||||
<string name="upd_new_test">Тестовая сборка PR #%1$d</string>
|
||||
<string name="upd_mb">%1$d МБ</string>
|
||||
<string name="upd_channel">Канал обновлений</string>
|
||||
<string name="upd_stable">Stable</string>
|
||||
<string name="upd_stable_hint">Протестированная версия, подходит большинству</string>
|
||||
<string name="upd_version_ago">%1$s · %2$s</string>
|
||||
<string name="upd_preview">Preview</string>
|
||||
<string name="upd_preview_hint">Последние исправления перед Stable</string>
|
||||
<string name="upd_preview_current">Актуально</string>
|
||||
<string name="upd_tests">Тестовые сборки</string>
|
||||
<string name="upd_tests_hint">Попробовать исправление до официального выпуска</string>
|
||||
<string name="upd_tests_none">Сейчас нет</string>
|
||||
<string name="upd_pr">PR #%1$d</string>
|
||||
<string name="upd_not_built">Не собрано для этой копии DroidDeck</string>
|
||||
<string name="upd_updated">%1$s обновлено</string>
|
||||
<string name="upd_test_name">Тестовая версия PR #%1$d</string>
|
||||
<string name="upd_while_ago">Недавно</string>
|
||||
<string name="upd_just_now">Только что</string>
|
||||
<plurals name="upd_tests_count">
|
||||
<item quantity="one">%1$d доступный тест</item>
|
||||
<item quantity="few">%1$d доступных теста</item>
|
||||
<item quantity="many">%1$d доступных тестов</item>
|
||||
<item quantity="other">%1$d доступных тестов</item>
|
||||
</plurals>
|
||||
<plurals name="upd_preview_behind">
|
||||
<item quantity="one">Изменения с момента вашей сборки · Отставание на %1$d сборку</item>
|
||||
<item quantity="few">Изменения с момента вашей сборки · Отставание на %1$d сборки</item>
|
||||
<item quantity="many">Изменения с момента вашей сборки · Отставание на %1$d сборок</item>
|
||||
<item quantity="other">Изменения с момента вашей сборки · Отставание на %1$d сборки</item>
|
||||
</plurals>
|
||||
<plurals name="upd_preview_recent">
|
||||
<item quantity="one">Недавние изменения · %1$d сборка</item>
|
||||
<item quantity="few">Недавние изменения · %1$d сборки</item>
|
||||
<item quantity="many">Недавние изменения · %1$d сборок</item>
|
||||
<item quantity="other">Недавние изменения · %1$d сборки</item>
|
||||
</plurals>
|
||||
<string name="gate_title">Одна настройка Android, которую нужно изменить</string>
|
||||
<string name="gate_eyebrow">Steam</string>
|
||||
<string name="gate_lede">Android останавливает приложения, запускающие множество фоновых процессов, а Steam запускает десятки. До изменения этой настройки игры могут закрываться без сообщения об ошибке.</string>
|
||||
<string name="gate_fix_for_me">Исправить за меня</string>
|
||||
<string name="gate_toggle_steps">Включите «Отключить ограничение дочерних процессов» и вернитесь. Оставьте параметры разработчика включенными, иначе переключатель снова отключится.</string>
|
||||
<string name="gate_open_dev">Открыть параметры разработчика</string>
|
||||
<string name="gate_no_toggle">В этой версии Android нет такого переключателя, поэтому DroidDeck внесет изменения через отладку по Wi-Fi. Это займет около минуты, компьютер не нужен.</string>
|
||||
<string name="gate_needs_wifi">Для отладки по Wi-Fi требуется Wi-Fi. Подойдет любая сеть, интернет не нужен.</string>
|
||||
<string name="gate_needs_notifications">Код сопряжения отобразится в уведомлении. Разрешите DroidDeck отправлять уведомления или используйте «Другой способ».</string>
|
||||
<string name="gate_allow_notifications">Разрешить уведомления</string>
|
||||
<string name="gate_step1">Откройте Настройки → Для разработчиков → Отладка по Wi-Fi и включите ее</string>
|
||||
<string name="gate_step2">Нажмите «Сопряжение устройства с помощью кода»</string>
|
||||
<string name="gate_step3">Введите код сопряжения в уведомлении DroidDeck</string>
|
||||
<string name="gate_waiting">Ожидание окна сопряжения…</string>
|
||||
<string name="gate_code_needed">Окно найдено. Введите код сопряжения из него в уведомление.</string>
|
||||
<string name="gate_status">Статус</string>
|
||||
<string name="gate_polling">Проверка каждые 2 секунды. После отключения этого переключателя страница закроется автоматически.</string>
|
||||
<string name="gate_other_ways">Другие способы</string>
|
||||
<string name="gate_other_toggle">Отладка по Wi-Fi, ручной ввод адреса, ADB на ПК</string>
|
||||
<string name="gate_other_no_toggle">Ручной ввод адреса, ADB на ПК, параметры разработчика</string>
|
||||
<string name="gate_use_wireless_instead">Использовать отладку по Wi-Fi</string>
|
||||
<string name="gate_some_roms">Некоторые ROM все еще предоставляют этот переключатель. Найдите «дочерние процессы» в параметрах разработчика.</string>
|
||||
<string name="gate_manual_hint">Если способ с уведомлением не работает, введите адрес и код сопряжения из окна вручную.</string>
|
||||
<string name="gate_enter_manually">Ввести адрес вручную</string>
|
||||
<string name="gate_from_computer">Использовать ADB с компьютера:</string>
|
||||
<string name="gate_copy_command">Копировать команду</string>
|
||||
<string name="gate_choose_display">Выберите экран для открытия настроек Android.</string>
|
||||
<string name="gate_main_screen">Главный экран</string>
|
||||
<string name="wadb_finding_port">Сопряжено. Поиск порта отладки по Wi-Fi…</string>
|
||||
<string name="wadb_enter_port">Сопряжено. Введите порт из настроек.</string>
|
||||
<string name="wadb_applying">Устройство найдено. Применение настроек…</string>
|
||||
<string name="wadb_apply_failed">Не удалось применить автоматически. Проверьте адрес ниже и повторите попытку. %1$s</string>
|
||||
<string name="wadb_title_wireless">Отладка по Wi-Fi</string>
|
||||
<string name="wadb_title_done">Ограничение дочерних процессов обновлено</string>
|
||||
<string name="wadb_title">Изменить ограничение дочерних процессов</string>
|
||||
<string name="wadb_lede_compact0">Если опции нет, выполните сопряжение через отладку по Wi-Fi.</string>
|
||||
<string name="wadb_lede_compact1">Сопряжено. Проверьте IP-адрес и порт в отладке по Wi-Fi.</string>
|
||||
<string name="wadb_lede_done">Ограничение дочерних процессов обновлено.</string>
|
||||
<string name="wadb_lede0">Если в параметрах разработчика нет настройки дочерних процессов, используйте шаг 2. Откройте Для разработчиков → Отладка по Wi-Fi → Сопряжение устройства с помощью кода.</string>
|
||||
<string name="wadb_lede1">Сопряжено. Используйте адрес ниже или обновите его в разделе Отладка по Wi-Fi → IP-адрес и порт.</string>
|
||||
<string name="wadb_lede_done_long">Ограничение дочерних процессов обновлено через отладку по Wi-Fi.</string>
|
||||
<string name="wadb_confirmed_on">Android подтвердил, что ограничение включено.</string>
|
||||
<string name="wadb_confirmed_off">Android подтвердил, что ограничение отключено.</string>
|
||||
<string name="wadb_pair_group">2 · Сопряжение отладки по Wi-Fi</string>
|
||||
<string name="wadb_pair_address">IP-адрес и порт из окна сопряжения</string>
|
||||
<string name="wadb_pin">Код сопряжения (PIN)</string>
|
||||
<string name="wadb_pin_placeholder">6 цифр</string>
|
||||
<string name="wadb_pair">Сопряжение</string>
|
||||
<string name="wadb_apply_group">2 · Применение через отладку по Wi-Fi</string>
|
||||
<string name="wadb_connect_address">Подключить IP-адрес и порт</string>
|
||||
<string name="wadb_pair_again">Сопряжение заново</string>
|
||||
<string name="wadb_turn_off">Отключить ограничение</string>
|
||||
<string name="wadb_other_ways">Другие способы изменения</string>
|
||||
<string name="wadb_dev_try_first">1 · Для разработчиков (попробовать первым)</string>
|
||||
<string name="wadb_restrict_on">Включите «Ограничение дочерних процессов».</string>
|
||||
<string name="wadb_restrict_off">Отключите «Ограничение дочерних процессов».</string>
|
||||
<string name="wadb_computer_last">3 · ADB на ПК (крайняя мера)</string>
|
||||
<string name="wadb_only_if">Используйте только если отладка по Wi-Fi недоступна.</string>
|
||||
<string name="wadb_computer_group">3 · ADB на ПК (крайняя мера)</string>
|
||||
<string name="ctrl_osc_hint">При показе экранных элементов управления в сессии</string>
|
||||
<string name="ctrl_color">Цвет</string>
|
||||
<string name="ctrl_color_hint">Оттенок экранных кнопок</string>
|
||||
<string name="ctrl_custom">Пользовательский</string>
|
||||
<string name="ctrl_opacity">Непрозрачность</string>
|
||||
<string name="ctrl_percent">%1$d%%</string>
|
||||
<string name="ctrl_size">Размер кнопок</string>
|
||||
<string name="ctrl_size_hint" formatted="false">100% — стандартный размер</string>
|
||||
<string name="ctrl_stick_click">Нажатие стика</string>
|
||||
<string name="ctrl_stick_click_hint">Дважды нажмите и удерживайте стик для L3 или R3</string>
|
||||
<string name="ctrl_adaptive">Адаптивный стик</string>
|
||||
<string name="ctrl_rumble">Вибрация игры</string>
|
||||
<string name="ctrl_steam_button">Кнопка Steam</string>
|
||||
<string name="ctrl_qam_button">Кнопка QAM</string>
|
||||
<string name="ctrl_keyboard_button">Кнопка клавиатуры</string>
|
||||
<string name="setup_animations">Анимации</string>
|
||||
<string name="ctrl_adaptive_hint">Стик появится в месте касания и скроется после отпускания</string>
|
||||
<string name="ctrl_layout">Раскладка</string>
|
||||
<string name="ctrl_layout_custom">Сохранена пользовательская позиция</string>
|
||||
<string name="ctrl_layout_default">Адаптировано под этот экран</string>
|
||||
<string name="ctrl_edit">Изменить</string>
|
||||
<string name="ctrl_reset">Сбросить</string>
|
||||
<string name="ctrl_mapping">Сопоставление кнопок</string>
|
||||
<string name="ctrl_mapping_default">Каждая кнопка отправляет соответствующий исходный ввод</string>
|
||||
<string name="ctrl_mapping_count">%1$d/%2$d кнопок переназначено</string>
|
||||
<string name="ctrl_configure">Настроить</string>
|
||||
<string name="ctrl_reset_all">Сбросить контроллер</string>
|
||||
<string name="ctrl_reset_all_hint">Восстановить все настройки и раскладки контроллера</string>
|
||||
<string name="ctrl_mapping_lede">Настройте ввод, отправляемый каждой экранной кнопкой в игру. «Скрыть» удалит кнопку.</string>
|
||||
<string name="ctrl_onscreen_buttons">Экранные кнопки</string>
|
||||
<string name="ctrl_defaults">По умолчанию</string>
|
||||
<string name="ctrl_reset_mapping">Сбросить сопоставление</string>
|
||||
<string name="content_android_apps">Приложения Android</string>
|
||||
<string name="content_apps_count">%1$d приложений</string>
|
||||
<string name="content_no_android_apps">Не найдено приложений Android для запуска.</string>
|
||||
<string name="content_desktop_installed">● Рабочий стол установлен</string>
|
||||
<string name="content_desktop_first_open">Устанавливается при первом открытии</string>
|
||||
<string name="content_available">Доступно для установки</string>
|
||||
<string name="content_not_installed">Не установлено.</string>
|
||||
<string name="content_not_installed_suffix">%1$s · не установлено</string>
|
||||
<string name="content_open_named">Открыть %1$s</string>
|
||||
<string name="content_games">Игры</string>
|
||||
<string name="content_choose_roms">Выберите папку ROM.</string>
|
||||
<string name="content_retroarch_roms">В RetroArch перейдите в /root/ROMs.</string>
|
||||
<string name="content_add_roms">Добавлено %1$s игр в ROMs/%2$s.</string>
|
||||
<string name="content_install_named">Установить %1$s</string>
|
||||
<string name="content_stop_to_install">Остановите сессию для установки</string>
|
||||
<string name="content_runtime_required">Требуется среда выполнения</string>
|
||||
<string name="content_loading_details">Загрузка подробностей установки…</string>
|
||||
<string name="content_details_unavailable">Подробности установки недоступны. Повторите попытку позже.</string>
|
||||
<string name="content_needs_runtime">Сначала установите среду выполнения Linux в «Настройках».</string>
|
||||
<string name="content_stop_first">Остановите текущую сессию перед установкой приложения рабочего стола.</string>
|
||||
<string name="content_install_into">Установить %1$s на рабочий стол Linux.</string>
|
||||
<string name="store_busy_percent_short">%1$s · %2$d%%</string>
|
||||
<string name="content_hide_note">Скрытие удалит его с рабочего стола. Файлы останутся в среде выполнения Linux.</string>
|
||||
<string name="content_rom_gone">Этой игры больше нет в папке ROM.</string>
|
||||
<string name="content_desktop_system">Рабочий стол · %1$s</string>
|
||||
<string name="content_launch_in">Запустить в %1$s</string>
|
||||
<string name="content_also_in">Также в %1$s</string>
|
||||
<string name="content_page_gone">Эта страница больше не существует. Выберите раздел слева.</string>
|
||||
<string name="content_open_desktop">Открыть рабочий стол</string>
|
||||
<string name="content_install_open_desktop">Установить и открыть рабочий стол</string>
|
||||
<string name="content_linux_desktop">Рабочий стол Linux</string>
|
||||
<string name="content_linux_desktop_hint">LXQt, Firefox и ваши эмуляторы</string>
|
||||
<string name="games_empty">Игры, установленные в Steam, появятся здесь после завершения сессии.</string>
|
||||
<string name="games_play_steam">Запустить Steam</string>
|
||||
<string name="games_launch_settings">Настройки запуска</string>
|
||||
<string name="games_launch">Запустить</string>
|
||||
<string name="games_files">Файлы игры</string>
|
||||
<string name="games_prefix">Префикс Proton</string>
|
||||
<string name="games_saves_looking">Поиск сохранений…</string>
|
||||
<string name="games_saves_none">Папка сохранений не найдена по имени. При экспорте будет включена вся папка пользователя.</string>
|
||||
<string name="games_saves_folders">%1$d папок сохранений</string>
|
||||
<string name="games_saves_summary">%1$s · %2$d файлов · %3$s</string>
|
||||
<string name="games_kb">%1$d КБ</string>
|
||||
<string name="games_manage_saves">Управление сохранениями</string>
|
||||
<string name="games_saves">Сохранения игры</string>
|
||||
<string name="games_import_saves">Импорт сохранений…</string>
|
||||
<string name="games_import_saves_hint">Архив GameHub или Winlator. Перед импортом текущие сохранения будут сохранены в резервной копии.</string>
|
||||
<string name="games_export_gamehub">Экспорт как архив GameHub…</string>
|
||||
<string name="games_export_gamehub_hint">Подходит для GameHub и BannerHub</string>
|
||||
<string name="games_export_winlator">Экспорт как архив Winlator…</string>
|
||||
<string name="games_export_winlator_hint">Подходит для Winlator, WinNative и Bannerlator</string>
|
||||
<string name="games_open_save_folder">Открыть папку сохранений</string>
|
||||
<string name="games_never_played">Никогда не запускалась</string>
|
||||
<string name="games_runtime_busy_percent">Среда выполнения занята · %1$d%%</string>
|
||||
<string name="games_runtime_busy">Среда выполнения занята</string>
|
||||
<string name="games_runtime_first_play">Установка среды выполнения при первом запуске игры</string>
|
||||
<string name="games_runtime_update">Доступно обновление среды выполнения</string>
|
||||
<string name="games_runtime_ready">● Среда выполнения готова</string>
|
||||
<string name="games_last_played">Последний запуск %1$s</string>
|
||||
<string name="games_internal">Внутреннее хранилище</string>
|
||||
<string name="games_added">Добавленные игры</string>
|
||||
<string name="gpu_auto_hint">Выбирает лучшую комбинацию драйверов для этого GPU и поддерживает ее в актуальном состоянии</string>
|
||||
<string name="gpu_manual_hint">Выбрать комбинацию драйверов вручную</string>
|
||||
<string name="gpu_checking">Проверка драйверов…</string>
|
||||
<string name="gpu_none_listed">Драйверы пока не перечислены. Обновите, чтобы найти драйверы.</string>
|
||||
<string name="gpu_hide_other">Скрыть драйверы других GPU</string>
|
||||
<string name="gpu_show_other">Показать драйверы других GPU</string>
|
||||
<string name="gpu_advanced">Дополнительно</string>
|
||||
<string name="gpu_set_with_display">Настраивается вместе с драйвером дисплея: %1$s включает оба.</string>
|
||||
<string name="gpu_set_with_runtime">Настраивается вместе с драйвером среды выполнения: %1$s включает оба.</string>
|
||||
<string name="gpu_runtime_hint">Используется играми и рабочим столом.</string>
|
||||
<string name="gpu_runtime_default">По умолчанию среды выполнения</string>
|
||||
<string name="gpu_display_hint">Отвечает за вывод изображения на экран. Вступит в силу после перезапуска DroidDeck.</string>
|
||||
<string name="gpu_auto_by_gpu">Авто - Выбор по GPU</string>
|
||||
<string name="gpu_manage">Скачать, импортировать или удалить…</string>
|
||||
<string name="gpu_in_use_caps">Используется</string>
|
||||
<string name="gpu_builtin">Встроенный драйвер DroidDeck</string>
|
||||
<string name="gpu_matched_pair">Драйвер среды выполнения и драйвер дисплея настраиваются вместе как совместимая пара.</string>
|
||||
<string name="gpu_recommended_for">Рекомендуется для этого GPU: %1$s.</string>
|
||||
<string name="gpu_refresh_hint">Обновите, чтобы найти драйверы, подходящие для этого GPU.</string>
|
||||
<string name="gpu_recommended_caps">Рекомендуется</string>
|
||||
<string name="gpu_unavailable">Недоступно</string>
|
||||
<string name="load_runtime">Среда выполнения Linux</string>
|
||||
<string name="load_runtime_detail">Подготовка среды выполнения Linux</string>
|
||||
<string name="load_session">Сессия</string>
|
||||
<string name="load_session_detail">Запуск дисплея и аудио</string>
|
||||
<string name="load_steam">Клиент Steam</string>
|
||||
<string name="load_steam_detail">Проверка Steam и его инструментов совместимости</string>
|
||||
<string name="load_opening_steam">Открытие Steam</string>
|
||||
<string name="load_opening_steam_detail">Ожидание первого кадра Steam</string>
|
||||
<string name="load_desktop">Рабочий стол</string>
|
||||
<string name="load_desktop_detail">Подготовка рабочего стола</string>
|
||||
<string name="load_opening">Открытие</string>
|
||||
<string name="load_opening_detail">Ожидание первого кадра</string>
|
||||
<string name="load_starting_steam">Запуск Steam</string>
|
||||
<string name="load_ended">Сессия завершена</string>
|
||||
<string name="load_step">Шаг %1$d из %2$d</string>
|
||||
<string name="load_steam_paused">Steam приостановлен</string>
|
||||
<string name="deck_tab_grips">Грипсы</string>
|
||||
<string name="deck_tab_left">Левый тачпад</string>
|
||||
<string name="deck_tab_right">Правый тачпад</string>
|
||||
<string name="deck_tab_both">Оба</string>
|
||||
<string name="deck_close">Закрыть управление вторым экраном</string>
|
||||
<string name="deck_open_steam_menu">Открыть меню Steam</string>
|
||||
<string name="deck_left_upper">Слева · Сверху</string>
|
||||
<string name="deck_left_lower">Слева · Снизу</string>
|
||||
<string name="deck_right_upper">Справа · Сверху</string>
|
||||
<string name="deck_right_lower">Справа · Снизу</string>
|
||||
<string name="deck_click">Нажать</string>
|
||||
<string name="deck_right_trackpad">Правый тачпад</string>
|
||||
<string name="deck_left_trackpad">Левый тачпад</string>
|
||||
<string name="second_trackpad">Тачпад</string>
|
||||
<string name="second_show_keyboard">Показать клавиатуру</string>
|
||||
<string name="second_hide_keyboard">Скрыть клавиатуру</string>
|
||||
<string name="second_terminal">Терминал Linux</string>
|
||||
<string name="second_terminal_not_ready">Сессия Linux не готова, терминал недоступен.</string>
|
||||
<string name="rail_steam">Steam</string>
|
||||
<string name="rail_games">Игры</string>
|
||||
<string name="rail_desktop">Рабочий стол</string>
|
||||
<string name="rail_store">Магазин</string>
|
||||
<string name="rail_components">Компоненты</string>
|
||||
<string name="rail_apps">Приложения</string>
|
||||
<string name="rail_setup">Настройка</string>
|
||||
<string name="rail_updates">Обновления</string>
|
||||
<string name="rail_percent">%1$d%%</string>
|
||||
<string name="rail_resume_named">Продолжить %1$s</string>
|
||||
<string name="roms_text">Отображается как /root/ROMs в каждой сессии. Внутреннее хранилище находится в /root/Storage.</string>
|
||||
<string name="roms_none">Папка не выбрана</string>
|
||||
<string name="roms_applies">Вступит в силу в следующей сессии. Поддерживаются SD-карты.</string>
|
||||
<string name="roms_choose">Выбрать папку</string>
|
||||
<string name="roms_change">Изменить папку</string>
|
||||
<string name="proton_lede">Установите сборку ARM64 Proton, затем выберите ее для каждой игры в Steam → Свойства → Совместимость.</string>
|
||||
<string name="proton_stop_first">Остановите текущую сессию перед установкой или удалением инструментов совместимости.</string>
|
||||
<string name="proton_available">Доступные сборки</string>
|
||||
<string name="proton_installed">%1$s установлено</string>
|
||||
<string name="proton_queued">Ожидающий элемент от предыдущего запроса</string>
|
||||
<string name="proton_not_installed">Не установлено</string>
|
||||
<string name="proton_install_now">Установить сейчас</string>
|
||||
<string name="proton_cancel_queued">Отменить очередь</string>
|
||||
<string name="pckb_android">Клавиатура Android</string>
|
||||
<string name="pckb_hide">Скрыть ✕</string>
|
||||
<string name="main_launch_named">Запустить %1$s</string>
|
||||
<string name="main_choose_screen">Выберите экран. Дополнительный экран: %1$s.</string>
|
||||
<string name="main_secondary_gone">Дополнительный экран недоступен.</string>
|
||||
<string name="main_primary">Главный экран</string>
|
||||
<string name="main_secondary">Дополнительный экран</string>
|
||||
<string name="widgets_prev_tab">Предыдущая вкладка</string>
|
||||
<string name="widgets_next_tab">Следующая вкладка</string>
|
||||
<string name="widgets_on">Вкл.</string>
|
||||
<string name="widgets_all_n">Все %1$d</string>
|
||||
<string name="widgets_none">Нет</string>
|
||||
<string name="widgets_n_of_m">%1$d/%2$d</string>
|
||||
<string name="widgets_off">Выкл.</string>
|
||||
<string name="screen_bottom">Нижний экран</string>
|
||||
<string name="game_env_applies">Вступит в силу при следующем запуске игры. Профиль игры переопределит общие настройки.</string>
|
||||
<string name="game_env_other">Выбрать другую игру по ID приложения…</string>
|
||||
<string name="game_env_done">Готово</string>
|
||||
<string name="game_env_default">По умолчанию</string>
|
||||
<string name="game_env_off">Выкл.</string>
|
||||
<string name="game_env_change">Изменить…</string>
|
||||
<string name="game_env_change_title">Изменить переменную</string>
|
||||
<string name="game_env_restore_default">Восстановить по умолчанию</string>
|
||||
<string name="game_env_eyebrow">Игры Proton</string>
|
||||
<string name="pip_title">Картинка в картинке</string>
|
||||
<string name="pip_auto">Автоматически переходить в режим PiP</string>
|
||||
<string name="pip_suspended">Приостановлено</string>
|
||||
<string name="pip_not_ready">PiP станет доступен после готовности сессии.</string>
|
||||
<string name="pip_permission">Разрешите DroidDeck использовать PiP в настройках Android.</string>
|
||||
<string name="pip_unavailable">Android не может открыть PiP.</string>
|
||||
<string name="game_shortcut">Ярлык</string>
|
||||
<string name="game_shortcut_add">Добавить на главный экран</string>
|
||||
<string name="game_shortcut_choose">Выбрать игру</string>
|
||||
<string name="game_shortcut_scanning">Сканирование установленных игр…</string>
|
||||
<string name="game_link_copy">Копировать ссылку запуска</string>
|
||||
<string name="game_link_copied">Ссылка запуска скопирована</string>
|
||||
<string name="game_shortcut_unsupported">Этот лаунчер не может добавлять ярлыки. Используйте «Копировать ссылку запуска».</string>
|
||||
<string name="game_link_invalid">Недействительная ссылка запуска игры.</string>
|
||||
<string name="game_link_missing">Этой игры больше нет в вашей библиотеке DroidDeck.</string>
|
||||
<string name="game_link_session_busy">Остановите текущую сессию перед запуском игры Steam.</string>
|
||||
<string name="game_link_failed">Не удалось отправить игру в Steam. Попробуйте запустить снова.</string>
|
||||
<string name="setup_retry_removal">Повторить удаление</string>
|
||||
<string name="runtime_removing">Удаление</string>
|
||||
<string name="runtime_removal_incomplete">Удаление не завершено</string>
|
||||
<string name="game_file_export">Экспорт файлов игры</string>
|
||||
<string name="game_file_sync">Синхронизировать все файлы игры в папку</string>
|
||||
<string name="game_file_stop_sync">Остановить синхронизацию файлов игры</string>
|
||||
<string name="game_file_folder">Выбрать папку для файлов игры фронтенда</string>
|
||||
<string name="game_file_exported">Файлы игры сохранены в %1$s</string>
|
||||
<string name="game_frontend_files">Файлы фронтенда</string>
|
||||
</resources>
|
||||
@@ -74,11 +74,21 @@
|
||||
<string name="game_env_vkd3d_config">D3D12 的 VKD3D 选项。nodxr 禁用光线追踪;仅供需要它的游戏使用。</string>
|
||||
<string name="game_env_proton_log">设为 1 可生成 Proton 诊断日志。记录日志会降低性能并占用存储。</string>
|
||||
<string name="game_env_wined3d">设为 1 可对 D3D9–11 使用基于 OpenGL 的 WineD3D 代替 DXVK 进行兼容性测试。</string>
|
||||
<string name="game_env_no_ntsync">设为 1 可让此游戏禁用 ntsync(droiddeck-ntsync 或内核驱动);存在对应包时使用 droiddeck-esync,否则使用 droiddeck-fsync。</string>
|
||||
<string name="game_env_no_esync">设为 1 可为此游戏禁用 droiddeck-esync;改用 droiddeck-fsync,若 fsync 也已禁用则使用 droiddeck-ntsync。</string>
|
||||
<string name="game_env_no_fsync">设为 1 可让此游戏禁用 droiddeck-fsync;存在对应包时使用 droiddeck-esync,否则使用 droiddeck-ntsync。</string>
|
||||
<string name="game_env_fsync_first">设为 1 可让此游戏使用 droiddeck-fsync;设为 0 则在有匹配其 Proton 的包时优先使用 droiddeck-esync。</string>
|
||||
<string name="game_env_xalia">设为 0 可为此游戏禁用 Proton 的手柄导航助手。</string>
|
||||
<string name="game_env_hud">针对 D3D9–11 的 DXVK 覆盖层。fps 显示帧率;不设置则隐藏。</string>
|
||||
<string name="game_env_dxvk_config">以英文分号(;)分隔的 DXVK 设置。新版本使用 dxvk.maxFrameRate 限制帧率;日常游戏建议优先使用会话帧率限制。</string>
|
||||
<string name="game_env_vkd3d_limit">D3D12 帧率限制。0 表示不限制。</string>
|
||||
<string name="game_env_glthread">Mesa OpenGL 多线程。true 可能有助于受 CPU 限制的 OpenGL 游戏;请逐个游戏测试。</string>
|
||||
<string name="sync_backend_title">Wine 同步</string>
|
||||
<string name="sync_backend_hint">游戏保持线程同步的方式。将在下次会话生效。</string>
|
||||
<string name="sync_backend_esync">esync</string>
|
||||
<string name="sync_backend_ntsync">ntsync</string>
|
||||
<string name="sync_backend_fsync">fsync</string>
|
||||
<string name="sync_backend_wineserver">wineserver</string>
|
||||
<string name="fex_preset_title">FEX 预设</string>
|
||||
<string name="fex_next_launch">将在下次启动游戏时生效。</string>
|
||||
<string name="game_settings_title">游戏</string>
|
||||
@@ -151,6 +161,15 @@
|
||||
<string name="add_app_script_hint">一个 .sh 文件。它在自己的文件夹中运行,全屏显示在 gamescope 下。</string>
|
||||
<string name="add_app_appimage_hint">ARM64(aarch64)AppImage。只会解包一次到 Linux 运行时中。</string>
|
||||
<string name="add_app_github_hint">从仓库的最新发布版本安装 ARM64 AppImage。</string>
|
||||
<string name="app_fex_title">使用 FEX</string>
|
||||
<string name="app_fex_auto">自动</string>
|
||||
<string name="app_fex_on">开启</string>
|
||||
<string name="app_fex_off">关闭</string>
|
||||
<string name="app_fex_hint">FEX 在此 ARM64 设备上运行 x86 Linux 程序。自动模式会在程序为 x86 构建时启用。</string>
|
||||
<string name="app_fex_x86">%1$s 经由 FEX</string>
|
||||
<string name="app_fex_not_ready">此程序面向 %1$s PC 构建,需经由 FEX 运行,而 FEX 尚未配置。请在登录状态下打开一次 Steam:DroidDeck 会让其下载 FEX 及所需的 Steam Linux Runtime,之后即可打开。</string>
|
||||
<string name="session_end_program">此程序</string>
|
||||
<string name="session_end_fex_missing">%1$s 面向 x86 PC 构建,需经由 FEX 运行,而 FEX 尚未安装。请在登录状态下启动一次 Steam,让其下载 FEX 与 Steam Linux Runtime,然后重新启动。</string>
|
||||
<string name="add_app_flatpak_hint">一个 Flathub 应用 ID 或其 Flathub 页面。若尚未设置 Flatpak 会先进行设置。</string>
|
||||
<string name="add_app_file">文件</string>
|
||||
<string name="add_app_no_file">未选择文件</string>
|
||||
@@ -186,6 +205,9 @@
|
||||
<string name="add_app_cancel">取消</string>
|
||||
<string name="add_app_runtime_required">请先在“配置”中安装 Linux 运行时。</string>
|
||||
<string name="add_app_busy">请等待 %1$s 完成。</string>
|
||||
<string name="steam_compat_label">兼容</string>
|
||||
<string name="proton_compatible_note">在 Steam 兼容性菜单中标记为“%1$s”的构建带有 DroidDeck 的前缀修复,可在此设备启动游戏。默认为 Proton Experimental ARM64(%1$s),安装更新构建后则为 Proton 11.0 ARM64(%1$s)。未带标记的 Valve 官方 Proton 条目无法在此设备启动游戏。</string>
|
||||
<string name="proton_installed_compatible">已安装 %1$s · %2$s</string>
|
||||
<string name="common_cancel">取消</string>
|
||||
<string name="common_auto">自动</string>
|
||||
<string name="common_never">从不</string>
|
||||
@@ -308,6 +330,8 @@
|
||||
<string name="mode_storage_folder">文件夹:%1$s</string>
|
||||
<string name="mode_second_library">第二库</string>
|
||||
<string name="mode_storage_note">从 SD 卡或共享存储流式读取资源的游戏可能出现卡顿。</string>
|
||||
<string name="mode_storage_diagnostics">存储诊断</string>
|
||||
<string name="mode_storage_diagnostics_hint">在分享日志中记录分配结果和存储采样耗时。启用期间可能减慢安装。将在下次会话生效。</string>
|
||||
<string name="mode_choose_folder">选择文件夹…</string>
|
||||
<string name="mode_renderer">渲染器</string>
|
||||
<string name="mode_desktop_renderer">桌面渲染器</string>
|
||||
@@ -344,9 +368,16 @@
|
||||
<string name="comp_check_nightlies">检查 Nightlies 上的新软件包</string>
|
||||
<string name="comp_proton">Proton</string>
|
||||
<string name="comp_proton_note">Steam 更新时会替换 Valve 的 Proton;每个构建的原件都会保留。</string>
|
||||
<string name="comp_default_live">%1$s 现在将运行所有未在 Steam 中单独选择 Proton 的游戏。</string>
|
||||
<string name="comp_default_next">从下次 Steam 启动起,%1$s 将运行所有未单独选择 Proton 的游戏。</string>
|
||||
<string name="comp_default_not_runnable">%1$s 无法在此设备启动游戏,因此不能设为默认。</string>
|
||||
<string name="comp_default_failed">无法保存默认 Proton:%1$s</string>
|
||||
<string name="comp_swapped">%1$s · 已替换 %2$d 项</string>
|
||||
<string name="comp_all_original">%1$s · 全部为原件</string>
|
||||
<string name="comp_game_running_suffix">%1$s · 游戏运行中</string>
|
||||
<string name="comp_esync_pack">%1$s · droiddeck-esync 包</string>
|
||||
<string name="comp_esync_wanted">%1$s · 尚无 droiddeck-esync 包</string>
|
||||
<string name="comp_esync_builtin">%1$s · 内置 esync,无需包</string>
|
||||
<string name="comp_gpu_drivers">GPU 驱动</string>
|
||||
<string name="comp_reapplied">%1$s · 于启动 %2$s 时重新应用</string>
|
||||
<string name="comp_next_queued">下一个:%1$s · 在游戏关闭后</string>
|
||||
@@ -409,6 +440,12 @@
|
||||
<string name="perf_sysmem">Turnip:sysmem 渲染</string>
|
||||
<string name="perf_sysmem_hint">对 Steam 和大多数游戏更快。Adreno 710/720/722 必需。</string>
|
||||
<string name="perf_xalia">跳过 Steam 的 xalia 助手</string>
|
||||
<string name="perf_fastsync">droiddeck-ntsync(实验性)</string>
|
||||
<string name="perf_fastsync_hint">Linux ntsync 驱动的用户态替代品,供测试使用。开启时,Proton 使用它代替 droiddeck-esync 和 droiddeck-fsync。适用于 Proton Experimental ARM64、GE-Proton 和 proton-cachyos。将在下次会话生效。</string>
|
||||
<string name="perf_esync">droiddeck-esync</string>
|
||||
<string name="perf_fsync">droiddeck-fsync 优先</string>
|
||||
<string name="perf_fsync_hint">在原始 Proton 文件上运行 Proton 自带的 fsync,由用户态提供 futex_waitv,因此无需任何包,且 Steam 更新 Proton 后立即继续可用。开启时,除 Proton 自身禁用 fsync 的少数游戏外,各游戏优先使用它而非 droiddeck-esync。将在下次会话生效。</string>
|
||||
<string name="perf_esync_hint">游戏的 Windows 线程通过 eventfd 和共享内存相互等待,而非经由 wineserver 往返。使用为该 Proton 构建精确制作的 droiddeck-esync 包;包会自动获取。在新 Proton 构建尚无对应包之前,由 droiddeck-fsync 顶替。将在下次会话生效。</string>
|
||||
<string name="perf_xalia_hint">禁用 Proton 的手柄导航助手,它会在每个游戏中消耗 CPU。</string>
|
||||
<string name="perf_seccomp">不启用 seccomp 运行 proot</string>
|
||||
<string name="perf_seccomp_hint">可能修复某些内核上的缺失系统调用错误。可能降低性能。</string>
|
||||
@@ -429,6 +466,7 @@
|
||||
<string name="driver_delete_plain">它的文件会从应用中移除。</string>
|
||||
<string name="driver_delete_in_use">文件将被移除。该驱动正在使用,将由默认驱动接管。</string>
|
||||
<string name="drawer_page_display">显示</string>
|
||||
<string name="drawer_page_effects">画面效果</string>
|
||||
<string name="drawer_page_controls">控制</string>
|
||||
<string name="drawer_page_components">组件</string>
|
||||
<string name="drawer_page_settings">设置</string>
|
||||
@@ -442,6 +480,30 @@
|
||||
<string name="drawer_next_page">下一页</string>
|
||||
<string name="drawer_hud">性能 HUD</string>
|
||||
<string name="drawer_fill">拉伸游戏填满屏幕</string>
|
||||
<string name="drawer_scaling">缩放模式</string>
|
||||
<string name="drawer_scaling_sharpness">缩放锐度</string>
|
||||
<string name="drawer_effects">屏幕效果</string>
|
||||
<string name="drawer_effects_hint">实时生效。任何效果开启期间会占用少量 GPU 时间。</string>
|
||||
<string name="drawer_look">观感</string>
|
||||
<string name="drawer_look_custom">自定义</string>
|
||||
<string name="drawer_cas">锐化(CAS)</string>
|
||||
<string name="drawer_cas_level">锐化级别</string>
|
||||
<string name="drawer_fake_hdr">伪 HDR</string>
|
||||
<string name="drawer_deband">去色带</string>
|
||||
<string name="drawer_deband_strength">去色带强度</string>
|
||||
<string name="drawer_brightness">亮度</string>
|
||||
<string name="drawer_contrast">对比度</string>
|
||||
<string name="drawer_gamma">伽马</string>
|
||||
<string name="drawer_saturation">饱和度</string>
|
||||
<string name="drawer_fxaa">FXAA(边缘平滑)</string>
|
||||
<string name="drawer_toon">卡通描边</string>
|
||||
<string name="drawer_crt">CRT</string>
|
||||
<string name="drawer_ntsc">NTSC</string>
|
||||
<string name="drawer_texture">纹理过滤</string>
|
||||
<string name="drawer_texture_hint">DirectX 9–11 游戏,下次启动时生效。</string>
|
||||
<string name="drawer_anisotropy">各向异性过滤</string>
|
||||
<string name="drawer_texture_sharpness">纹理锐度</string>
|
||||
<string name="drawer_texture_sharpness_note">负 mipmap 偏移:纹理更锐利,可能有轻微闪烁。自动模式会匹配会话放大到屏幕的程度。</string>
|
||||
<string name="drawer_touch_auto">自动(%1$s)</string>
|
||||
<string name="drawer_keyboard">键盘</string>
|
||||
<string name="drawer_pc_keyboard">PC 键盘</string>
|
||||
|
||||
@@ -263,6 +263,8 @@
|
||||
<string name="mode_suspend">Background behavior</string>
|
||||
<string name="mode_suspend_hint">When the app is hidden or the screen turns off.</string>
|
||||
<string name="mode_suspend_manual">Manual</string>
|
||||
<string name="mode_suspend_native">Native</string>
|
||||
<string name="mode_suspend_steam_note">Auto pauses and resumes when shown. Native prepares Steam for sleep first. Manual waits for Resume. Never keeps running.</string>
|
||||
<string name="mode_suspend_note">Auto pauses in the background and resumes when shown. Manual waits for Resume. Never keeps running.</string>
|
||||
<string name="mode_startup">Startup</string>
|
||||
<string name="mode_steam_startup">Start Steam with DroidDeck</string>
|
||||
@@ -305,6 +307,28 @@
|
||||
<string name="mode_added_launches_in">Launches %1$s · in %2$s</string>
|
||||
<string name="mode_added_choose">Choose another file…</string>
|
||||
<string name="mode_added_exe_note">Defaults to the .exe named after the folder, or else the largest.</string>
|
||||
<string name="wincomp_title">Windows components</string>
|
||||
<string name="wincomp_pad_hint">LB / RB jump between the sections.</string>
|
||||
<string name="wincomp_card_none">None</string>
|
||||
<string name="wincomp_applies">Windows DLLs Proton does not include, from Bannerlator\'s component list. Turn on the ones this game needs: they go into the game\'s own Windows folder, never its files, and stay whichever Proton it runs on.</string>
|
||||
<string name="wincomp_offline">Could not reach the component list. Components already downloaded can still be switched.</string>
|
||||
<string name="wincomp_recommended">Recommended for this game</string>
|
||||
<string name="wincomp_found_bundled">The game ships %1$s</string>
|
||||
<string name="wincomp_found_shipped">The game has %1$s (often works as is)</string>
|
||||
<string name="wincomp_found_steam">Steam installs %1$s with this game</string>
|
||||
<string name="wincomp_already_here">Already in this game</string>
|
||||
<string name="wincomp_no_recommendation">Nothing in the game\'s folder points at a component.</string>
|
||||
<string name="wincomp_all">All components (%1$d)</string>
|
||||
<string name="wincomp_installers">Need a Windows installer (%1$d)</string>
|
||||
<string name="wincomp_installers_note">These run a real installer inside the prefix (.NET, PhysX, XNA, the full Visual C++ installers…). DroidDeck cannot do that yet; it is coming next.</string>
|
||||
<string name="wincomp_show">Show</string>
|
||||
<string name="wincomp_hide">Hide</string>
|
||||
<string name="wincomp_needs_installer">Needs a Windows installer (coming)</string>
|
||||
<string name="wincomp_unsupported">Not supported here yet</string>
|
||||
<string name="wincomp_loading">Loading the components…</string>
|
||||
<string name="wincomp_downloaded">Downloaded</string>
|
||||
<string name="wincomp_download_size">%1$s download</string>
|
||||
<string name="wincomp_next_launch">Takes effect the next time the game starts.</string>
|
||||
<string name="mode_fill">Stretch games to fill the screen</string>
|
||||
<string name="mode_fill_hint">Keeps self-resizing games full screen. Turn off if a game shows up small. Applies next session.</string>
|
||||
<string name="mode_stretch169">Stretch 16:9 games</string>
|
||||
@@ -595,6 +619,9 @@
|
||||
<string name="setup_offline">Offline mode</string>
|
||||
<string name="setup_sign_in_first">Sign in to Steam first</string>
|
||||
<string name="setup_launcher">Launcher</string>
|
||||
<string name="setup_app_scale">App scale</string>
|
||||
<string name="setup_app_scale_hint">DroidDeck text and controls</string>
|
||||
<string name="setup_app_scale_default">%1$d%% (Default)</string>
|
||||
<string name="setup_theme">Theme</string>
|
||||
<string name="setup_theme_hint">Launcher appearance</string>
|
||||
<string name="setup_home">Use as Home screen</string>
|
||||
@@ -1036,9 +1063,17 @@
|
||||
<string name="display_frame_rate">Frame rate</string>
|
||||
<string name="display_window_compatibility">Game window compatibility</string>
|
||||
<string name="display_force_fullscreen">Force game windows fullscreen</string>
|
||||
<string name="display_force_fullscreen_hint">Keeps games fullscreen after focus changes. Turn off if a game draws small. Applies live during a session.</string>
|
||||
<string name="display_force_fullscreen_live">Keeps games fullscreen after focus changes. Applies live.</string>
|
||||
<string name="display_force_fullscreen_hint">Makes every game window the size of the screen. Turn on if a game comes back small or in a corner after switching apps; leave off if a game flickers between sizes. Applies live during a session.</string>
|
||||
<string name="display_force_fullscreen_live">Turn on if a game comes back small after switching; off if it flickers. Applies live.</string>
|
||||
<string name="display_look_filter">%1$s Sets scaling to %2$s.</string>
|
||||
<string name="display_match_screen">Match screen (%1$d×%2$d)</string>
|
||||
<string name="mode_tab_steam">Steam</string>
|
||||
<string name="device_info_show">Show device details</string>
|
||||
<string name="device_info_hide">Hide device details</string>
|
||||
<string name="device_info_loading">Reading the device…</string>
|
||||
<string name="device_info_copy">Copy</string>
|
||||
<string name="device_info_copy_hint">Copy these details into a bug report.</string>
|
||||
<string name="device_info_copied">Copied.</string>
|
||||
<string name="force_ssbs_title">Force SSBS</string>
|
||||
<string name="force_ssbs_hint">Keeps a CPU speed setting on that Wine keeps turning off. Can make Windows games faster on Snapdragon 8 Elite; little change seen on older chips. Applies on the next game launch.</string>
|
||||
</resources>
|
||||
@@ -4,4 +4,8 @@
|
||||
<locale android:name="en" />
|
||||
<locale android:name="es" />
|
||||
<locale android:name="zh" />
|
||||
</locale-config>
|
||||
<locale android:name="ko" />
|
||||
<locale android:name="fr" />
|
||||
<locale android:name="ja" />
|
||||
<locale android:name="ru" />
|
||||
</locale-config>
|
||||
@@ -11,6 +11,14 @@ class GameEnvironmentTest {
|
||||
assertEquals("6_9", values["VKD3D_SHADER_MODEL"])
|
||||
}
|
||||
|
||||
@Test fun forceSsbsIsADefaultAGameCanTurnOff() {
|
||||
assertFalse(GameEnvironment.defaults("").containsKey(GameEnvironment.FORCE_SSBS))
|
||||
assertEquals("1", GameEnvironment.defaults("", forceSsbs = true)[GameEnvironment.FORCE_SSBS])
|
||||
val config = GameEnvironment.Config().withEntries("42", mapOf(GameEnvironment.FORCE_SSBS to "0"))
|
||||
assertEquals("0", GameEnvironment.effective(config, "", "42", forceSsbs = true)[GameEnvironment.FORCE_SSBS])
|
||||
assertEquals("1", GameEnvironment.effective(config, "", "43", forceSsbs = true)[GameEnvironment.FORCE_SSBS])
|
||||
}
|
||||
|
||||
@Test fun gameOverridesSharedAndPresetWithoutLeakingToOtherGames() {
|
||||
val config = GameEnvironment.Config(
|
||||
shared = mapOf("FEX_MULTIBLOCK" to "0", "VKD3D_FEATURE_LEVEL" to "12_2"),
|
||||
|
||||
@@ -27,6 +27,7 @@ class GameFileSyncTest {
|
||||
}
|
||||
val folder = File(context.filesDir, "exports").apply { mkdirs() }
|
||||
GameFileSync.enable(context, folder)
|
||||
assertEquals("8400", File(folder, "Geometry Wars.steam").readText())
|
||||
assertEquals(folder.path, GameFileSync.folder(context))
|
||||
assertEquals(1, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION })
|
||||
// An unavailable source must leave the existing export intact.
|
||||
@@ -35,6 +36,8 @@ class GameFileSyncTest {
|
||||
assertThrows(IllegalStateException::class.java) { GameFileSync.syncConfigured(context) }
|
||||
assertEquals(1, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION })
|
||||
assertTrue(unavailable.renameTo(steamapps))
|
||||
GameFileSync.syncConfigured(context)
|
||||
assertTrue(File(folder, "Geometry Wars.steam").exists())
|
||||
// A genuine uninstall removes the owned export at the next tick.
|
||||
assertTrue(manifest.delete())
|
||||
GameFileSync.syncConfigured(context)
|
||||
@@ -44,6 +47,7 @@ class GameFileSyncTest {
|
||||
manifest.writeText("\"name\" \"Geometry Wars\"\n\"StateFlags\" \"4\"")
|
||||
GameFileSync.syncConfigured(context)
|
||||
assertNull(GameFileSync.folder(context))
|
||||
assertFalse(File(folder, "Geometry Wars.steam").exists())
|
||||
assertEquals(0, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION })
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,8 @@ class GameFilesTest {
|
||||
@Test fun exportsPortableFilesAndAcceptsFileUriRawPathAndContentUri() {
|
||||
val folder = tmp.newFolder()
|
||||
val file = GameFiles.export(folder, game("18446744073709551615", "A/B: C"))
|
||||
assertEquals("A_B_ C (18446744073709551615).droiddeck", file.name)
|
||||
assertEquals("droiddeck://game/18446744073709551615\n", file.readText())
|
||||
assertEquals("A_B_ C.steam", file.name)
|
||||
assertEquals("18446744073709551615", file.readText())
|
||||
val context = RuntimeEnvironment.getApplication()
|
||||
listOf(Uri.fromFile(file), Uri.parse(file.path)).forEach { uri ->
|
||||
assertEquals("18446744073709551615", GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, uri)))
|
||||
@@ -44,15 +44,15 @@ class GameFilesTest {
|
||||
|
||||
@Test fun rejectsCommandsMalformedIdsLargeFilesAndUnsupportedIntents() {
|
||||
listOf("", "0", "01", "-1", "18446744073709551616", "steam://rungameid/8400",
|
||||
"8400\n8401", "droiddeck://game/8400?command=quit", "x".repeat(129)).forEach { value ->
|
||||
"8400\n8401", "droiddeck://game/8400", "droiddeck://game/8400?command=quit", "x".repeat(129)).forEach { value ->
|
||||
assertNull(value, GameFiles.read(ByteArrayInputStream(value.toByteArray())))
|
||||
}
|
||||
assertEquals("8400", GameFiles.read(ByteArrayInputStream("8400\n".toByteArray())))
|
||||
val context = RuntimeEnvironment.getApplication()
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_SEND, Uri.parse("droiddeck://game/8400"))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.parse("https://example.com/8400.droiddeck"))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.parse("file://remote/game.droiddeck"))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.fromFile(File(tmp.root, "missing.droiddeck")))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.parse("https://example.com/8400.steam"))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.parse("file://remote/game.steam"))))
|
||||
assertNull(GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.fromFile(File(tmp.root, "missing.steam")))))
|
||||
assertEquals("8400", GameFiles.readIntent(context, Intent(Intent.ACTION_VIEW, Uri.parse("droiddeck://game/8400"))))
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ class GameFilesTest {
|
||||
assertEquals("custom artwork", image.readText())
|
||||
GameFiles.sync(folder, emptyList())
|
||||
assertEquals("custom artwork", image.readText())
|
||||
assertEquals(0, folder.listFiles { f -> f.extension == GameFiles.EXTENSION }!!.size)
|
||||
assertEquals("8400", File(folder, GameFiles.filename(game)).readText())
|
||||
assertEquals(1, folder.listFiles { f -> f.extension == GameFiles.EXTENSION }!!.size)
|
||||
icon.delete()
|
||||
val fallback = tmp.newFolder()
|
||||
GameFiles.export(fallback, game)
|
||||
@@ -80,7 +81,7 @@ class GameFilesTest {
|
||||
|
||||
@Test fun syncAddsRenamesAndRemovesOwnedFilesAndPreservesUnrelatedAndEditedFiles() {
|
||||
val folder = tmp.newFolder()
|
||||
val unrelated = File(folder, "manual.droiddeck").apply { writeText("droiddeck://game/1\n") }
|
||||
val unrelated = File(folder, "manual.steam").apply { writeText("1") }
|
||||
val note = File(folder, "notes.txt").apply { writeText("Keep me") }
|
||||
val first = game()
|
||||
val second = game("620", "Portal 2")
|
||||
@@ -110,10 +111,12 @@ class GameFilesTest {
|
||||
GameFiles.sync(folder, listOf(first))
|
||||
val second = game("620", "Portal 2")
|
||||
val collision = File(folder, GameFiles.filename(second)).apply { writeText("personal file") }
|
||||
val fallback = File(folder, GameFiles.filename(second, disambiguate = true)).apply { writeText("another personal file") }
|
||||
assertThrows(IllegalArgumentException::class.java) { GameFiles.sync(folder, listOf(second)) }
|
||||
assertEquals("personal file", collision.readText())
|
||||
assertTrue(File(folder, GameFiles.filename(first)).isFile)
|
||||
collision.delete()
|
||||
fallback.delete()
|
||||
GameFiles.sync(folder, listOf(second))
|
||||
assertFalse(File(folder, GameFiles.filename(first)).exists())
|
||||
assertTrue(collision.isFile)
|
||||
@@ -132,10 +135,10 @@ class GameFilesTest {
|
||||
@Test fun refusesSymlinksLeavingTheExportFolder() {
|
||||
val folder = tmp.newFolder()
|
||||
val outside = tmp.newFile()
|
||||
outside.writeText("droiddeck://game/8400\n")
|
||||
outside.writeText("8400")
|
||||
java.nio.file.Files.createSymbolicLink(File(folder, GameFiles.filename(game())).toPath(), outside.toPath())
|
||||
assertThrows(IllegalArgumentException::class.java) { GameFiles.export(folder, game()) }
|
||||
assertEquals("droiddeck://game/8400\n", outside.readText())
|
||||
assertEquals("8400", outside.readText())
|
||||
}
|
||||
|
||||
@Test fun caseOnlyRenameKeepsTheLiveExportOnCaseInsensitiveStorage() {
|
||||
@@ -148,6 +151,8 @@ class GameFilesTest {
|
||||
assertTrue(file.isFile)
|
||||
assertEquals("8400", file.inputStream().use(GameFiles::read))
|
||||
assertEquals(1, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION })
|
||||
GameFiles.sync(folder, emptyList())
|
||||
assertFalse(file.exists())
|
||||
}
|
||||
|
||||
@Test fun unrelatedInventoryIsPreserved() {
|
||||
@@ -158,6 +163,52 @@ class GameFilesTest {
|
||||
assertEquals(0, folder.listFiles()!!.count { it.extension == GameFiles.EXTENSION })
|
||||
}
|
||||
|
||||
@Test fun steamExportContainsOnlyIdForSteamAndAddedGames() {
|
||||
val folder = tmp.newFolder()
|
||||
val file = GameFiles.export(folder, game("620", "Portal 2"))
|
||||
assertEquals("Portal 2.steam", file.name)
|
||||
assertEquals("620", file.readText())
|
||||
assertEquals("620", GameFiles.readIntent(RuntimeEnvironment.getApplication(), Intent(Intent.ACTION_VIEW, Uri.fromFile(file))))
|
||||
val added = Library.SteamGame(1, "Added Game", null, Library.ADDED, -1L)
|
||||
val addedFile = GameFiles.export(folder, added)
|
||||
assertEquals("Added Game.steam", addedFile.name)
|
||||
assertEquals("18446744073709551615", addedFile.readText())
|
||||
}
|
||||
|
||||
@Test fun steamSyncDisambiguatesTitlesAndPreservesEditedAndForeignFiles() {
|
||||
val folder = tmp.newFolder()
|
||||
val first = game("620", "A/B")
|
||||
val second = game("8400", "A:B")
|
||||
val foreign = File(folder, "Existing.steam").apply { writeText("1") }
|
||||
val existing = game("1", "Existing")
|
||||
GameFiles.sync(folder, listOf(first, second, existing))
|
||||
val owned = File(folder, "A_B (620).steam")
|
||||
assertEquals("620", owned.readText())
|
||||
assertEquals("8400", File(folder, "A_B (8400).steam").readText())
|
||||
owned.writeText("user edit")
|
||||
GameFiles.sync(folder, listOf(first, second, existing))
|
||||
assertEquals("user edit", owned.readText())
|
||||
GameFiles.sync(folder, emptyList())
|
||||
assertEquals("user edit", owned.readText())
|
||||
assertEquals("1", foreign.readText())
|
||||
assertFalse(File(folder, "A_B (8400).steam").exists())
|
||||
}
|
||||
|
||||
@Test fun steamCollisionFallbackDoesNotClaimAnExistingFile() {
|
||||
val folder = tmp.newFolder()
|
||||
val collision = File(folder, "Geometry Wars.steam").apply { writeText("other file") }
|
||||
val existing = File(folder, "Geometry Wars (8400).steam").apply { writeText("8400") }
|
||||
GameFiles.sync(folder, listOf(game()))
|
||||
GameFiles.sync(folder, emptyList())
|
||||
assertEquals("other file", collision.readText())
|
||||
assertEquals("8400", existing.readText())
|
||||
existing.writeText("another file")
|
||||
assertThrows(IllegalArgumentException::class.java) {
|
||||
GameFiles.sync(folder, listOf(game()))
|
||||
}
|
||||
assertEquals("another file", existing.readText())
|
||||
}
|
||||
|
||||
private class LaunchFileProvider(private val file: File) : ContentProvider() {
|
||||
override fun onCreate() = true
|
||||
override fun openFile(uri: Uri, mode: String): ParcelFileDescriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY)
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import android.content.Intent
|
||||
import org.junit.Assert.*
|
||||
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 = [33])
|
||||
class GameLaunchIntentTest {
|
||||
@Test fun acceptsNativeAndExplicitlyRetargetedGameNativeProfiles() {
|
||||
listOf(GameLaunchIntent.ACTION, "app.gamenative.LAUNCH_GAME").forEach { action ->
|
||||
val request = Intent(action).putExtra("app_id", 620).putExtra("game_source", "STEAM")
|
||||
assertEquals("620", GameLaunchIntent.read(RuntimeEnvironment.getApplication(), request))
|
||||
assertEquals("8400", GameLaunchIntent.readId(Intent(action).putExtra("app_id", "8400")))
|
||||
assertEquals("620", GameLaunchIntent.readId(request.putExtra("game_source", "steam")))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun stringIdsPreserveUnsignedShortcutIds() {
|
||||
listOf("2147483648", "18446744073709551615").forEach { id ->
|
||||
assertEquals(id, GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", id)))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun rejectsUnsupportedSourcesTypesAndIdsWithoutFallingBackToData() {
|
||||
listOf("", "0", "01", "+1", "-1", "18446744073709551616", "620\n", "steam://rungameid/620").forEach { id ->
|
||||
assertNull(id, GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", id)))
|
||||
}
|
||||
listOf("EPIC", "GOG", "CUSTOM_GAME", "", "STEAM ").forEach { source ->
|
||||
assertNull(GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", 620).putExtra("game_source", source)))
|
||||
}
|
||||
assertNull(GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", 620L)))
|
||||
assertNull(GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", -1)))
|
||||
assertNull(GameLaunchIntent.readId(Intent(GameLaunchIntent.ACTION).putExtra("app_id", 620).putExtra("game_source", 1)))
|
||||
assertNull(GameLaunchIntent.readId(Intent(Intent.ACTION_MAIN).putExtra("app_id", 620)))
|
||||
assertNull(GameLaunchIntent.read(RuntimeEnvironment.getApplication(), Intent(GameLaunchIntent.ACTION,
|
||||
android.net.Uri.parse("droiddeck://game/620"))))
|
||||
}
|
||||
|
||||
@Test fun deepLinksStillAcceptUnsignedShortcutIds() {
|
||||
val context = RuntimeEnvironment.getApplication()
|
||||
assertEquals("18446744073709551615", GameLaunchIntent.read(context,
|
||||
Intent(Intent.ACTION_VIEW, android.net.Uri.parse("droiddeck://game/18446744073709551615"))))
|
||||
assertFalse(GameLaunchIntent.accepts(Intent.ACTION_SEND))
|
||||
assertTrue(GameLaunchIntent.accepts(GameLaunchIntent.ACTION))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.droiddeck.launcher.frontend
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.rules.TemporaryFolder
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
import java.io.File
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class WinComponentDetectorsTest {
|
||||
@get:Rule val tmp = TemporaryFolder()
|
||||
|
||||
@Test fun steamsSharedDepotsBecomeRecommendations() {
|
||||
val steamapps = tmp.newFolder("steamapps")
|
||||
val game = File(steamapps, "common/BioShock Remastered").apply { mkdirs() }
|
||||
File(steamapps, "appmanifest_409710.acf").writeText(
|
||||
"""
|
||||
"AppState"
|
||||
{
|
||||
"appid" "409710"
|
||||
"SharedDepots"
|
||||
{
|
||||
"228983" "228980"
|
||||
"228984" "228980"
|
||||
"228988" "228980"
|
||||
"228987" "228980"
|
||||
"228990" "228980"
|
||||
"999999" "228980"
|
||||
}
|
||||
}
|
||||
""".trimIndent(),
|
||||
)
|
||||
val found = SteamRedists.detect(game, 409710)
|
||||
assertEquals(listOf("vcredist2010_dll", "vcredist2012_dll", "vcredist2019_dll", "d3dx9"), found.map { it.componentName })
|
||||
assertTrue(found.all { it.kind == DependencyDetector.Kind.STEAM })
|
||||
assertEquals("VC++ 2010", found.first().reason)
|
||||
assertEquals(emptyList<DependencyDetector.Recommendation>(), SteamRedists.detect(game, 1))
|
||||
}
|
||||
|
||||
@Test fun thePrefixCountsOnlyWhatDroidDeckDidNotPutThere() {
|
||||
val compat = tmp.newFolder("compatdata", "409710")
|
||||
val pfx = File(compat, "pfx")
|
||||
File(pfx, "drive_c/windows/syswow64").mkdirs()
|
||||
File(pfx, "drive_c/windows/syswow64/OpenAL32.dll").writeText("x")
|
||||
File(pfx, "system.reg").writeText("[Software\\\\Microsoft\\\\Games for Windows Live]\n")
|
||||
assertEquals(setOf("oalinst", "XLiveRedist"), PrefixInstalledDetector.detect(compat))
|
||||
File(compat, ".droiddeck-wincomponents.json").writeText("""{"files": {"drive_c/windows/syswow64/openal32.dll": "oalinst_dll"}}""")
|
||||
assertEquals(setOf("XLiveRedist"), PrefixInstalledDetector.detect(compat))
|
||||
assertEquals(emptySet<String>(), PrefixInstalledDetector.detect(File(tmp.root, "missing")))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class GpuModelFallbackTest {
|
||||
@Test fun aPlatformCodeNameGivesItsAdreno() {
|
||||
// AYANEO's Pocket FIT: KGSL says "Adreno33v2", the platform says pineapple.
|
||||
assertEquals(750, GpuInfo.platformModel("pineapple"))
|
||||
assertEquals(740, GpuInfo.platformModel("KALAMA"))
|
||||
assertEquals(830, GpuInfo.platformModel("sun"))
|
||||
assertEquals(0, GpuInfo.platformModel("somethingelse"))
|
||||
assertEquals(GpuInfo.Family.A7XX, GpuInfo.familyOf(true, GpuInfo.platformModel("pineapple")))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.droiddeck.launcher.gpu
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
|
||||
class SocNamesTest {
|
||||
private fun props(vararg pairs: Pair<String, String>): (String) -> String = { pairs.toMap()[it].orEmpty() }
|
||||
|
||||
@Test fun theModelIsFoundWhereVendorsPutIt() {
|
||||
// AYANEO Pocket FIT: ro.soc.model blank, the vendor property set, ro.fota.platform a branch name.
|
||||
assertEquals("SG8350P", SocNames.model(props("ro.vendor.qti.soc_model" to "SG8350P", "ro.fota.platform" to "MSM_13.0")))
|
||||
assertEquals("QCS8550", SocNames.model(props("ro.soc.model" to "QCS8550", "ro.vendor.qti.soc_model" to "other")))
|
||||
assertEquals("", SocNames.model(props("ro.fota.platform" to "MSM_13.0")))
|
||||
}
|
||||
|
||||
@Test fun knownModelsAndPlatformsGetTheirNames() {
|
||||
assertEquals("Snapdragon 8 Gen 2", SocNames.name("QCS8550", ""))
|
||||
assertEquals("Snapdragon 8 Gen 3 family", SocNames.name("SG8350P", "pineapple"))
|
||||
assertNull(SocNames.name("XYZ123", "nowhere"))
|
||||
assertEquals("Snapdragon 8 Gen 2 (QCS8550)", SocNames.label("QCS8550", ""))
|
||||
assertEquals("Snapdragon 8 Gen 3 family (SG8350P)", SocNames.label("SG8350P", "pineapple"))
|
||||
assertEquals("XYZ123", SocNames.label("XYZ123", ""))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.BatteryManager
|
||||
import java.io.File
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.rules.TemporaryFolder
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.Shadows.shadowOf
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [28], manifest = Config.NONE)
|
||||
class BatteryComponentTest {
|
||||
@get:Rule val tmp = TemporaryFolder()
|
||||
private var battery: BatteryComponent? = null
|
||||
|
||||
@After fun stop() { battery?.stop() }
|
||||
|
||||
@Test fun oneAggregateBatteryKeepsOverlayPowerAndLifetimeConsistentWithQam() {
|
||||
val supplies = tmp.newFolder("power_supply")
|
||||
val vpower = tmp.newFolder("vpower")
|
||||
start(supplies, vpower, -2_000_000L)
|
||||
assertTelemetry(supplies, vpower)
|
||||
}
|
||||
|
||||
@Test fun upgradingRemovesTheDuplicateRatherThanLeavingItForOverlayDiscovery() {
|
||||
val supplies = tmp.newFolder("power_supply")
|
||||
val vpower = tmp.newFolder("vpower")
|
||||
val legacy = File(supplies, "BAT0").apply { mkdirs() }
|
||||
File(legacy, "power_now").writeText("8000000\n")
|
||||
File(legacy, "charge_now").writeText("4000000\n")
|
||||
start(supplies, vpower, 2_000_000L)
|
||||
assertFalse(legacy.exists())
|
||||
assertTelemetry(supplies, vpower)
|
||||
}
|
||||
|
||||
private fun start(supplies: File, vpower: File, currentUa: Long) {
|
||||
val context = RuntimeEnvironment.getApplication()
|
||||
context.sendStickyBroadcast(Intent(Intent.ACTION_BATTERY_CHANGED).apply {
|
||||
putExtra(BatteryManager.EXTRA_STATUS, BatteryManager.BATTERY_STATUS_DISCHARGING)
|
||||
putExtra(BatteryManager.EXTRA_LEVEL, 50)
|
||||
putExtra(BatteryManager.EXTRA_SCALE, 100)
|
||||
putExtra(BatteryManager.EXTRA_VOLTAGE, 4000)
|
||||
})
|
||||
shadowOf(context.getSystemService(BatteryManager::class.java)).apply {
|
||||
setLongProperty(BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER, 4_000_000L)
|
||||
setLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_NOW, currentUa)
|
||||
setLongProperty(BatteryManager.BATTERY_PROPERTY_CURRENT_AVERAGE, currentUa)
|
||||
}
|
||||
battery = BatteryComponent(supplies, vpower).also { it.attach(context); it.start() }
|
||||
}
|
||||
|
||||
private fun assertTelemetry(supplies: File, vpower: File) {
|
||||
val discovered = supplies.listFiles()!!.filter { it.name.contains("BAT") }
|
||||
assertEquals(listOf("BAT1"), discovered.map { it.name })
|
||||
fun read(name: String) = File(discovered.single(), name).readText().trim().toLong()
|
||||
// One 4 Ah battery at 4 V drawing 2 A: 8 W and two hours, regardless of vendor current sign.
|
||||
assertEquals(8_000_000L, read("power_now"))
|
||||
assertEquals(16_000_000L, read("energy_now"))
|
||||
assertEquals(7200L, read("time_to_empty_now"))
|
||||
assertEquals("7200", File(vpower, "secs_until_shutdown_request").readText().trim())
|
||||
assertEquals("50.00", File(vpower, "battery_percent").readText().trim())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import com.droiddeck.launcher.gpu.GpuInfo
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.RuntimeEnvironment
|
||||
import org.robolectric.annotation.Config
|
||||
import java.io.File
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [28], manifest = Config.NONE)
|
||||
class ForcedPackageTest {
|
||||
private val dxvk2 = "dxvk-2.7.1-linux.wcp"
|
||||
private lateinit var context: Context
|
||||
|
||||
@Before fun setUp() {
|
||||
context = RuntimeEnvironment.getApplication()
|
||||
File(context.filesDir, "components").deleteRecursively()
|
||||
LinuxRuntime.rootDir(context).deleteRecursively()
|
||||
}
|
||||
|
||||
@Test fun adreno6xxForcesDxvk2AndNothingElseDoes() {
|
||||
val rule = ComponentsManager.FORCED_PACKAGES.single { GpuInfo.Family.A6XX in it.families }
|
||||
assertEquals("dxvk", rule.comp)
|
||||
assertEquals(dxvk2, rule.file)
|
||||
assertEquals("Dxvk-Linux", rule.release)
|
||||
assertTrue(rule.models.isEmpty())
|
||||
assertTrue(rule.matches(gpu(650, GpuInfo.Family.A6XX)))
|
||||
assertTrue(rule.matches(gpu(610, GpuInfo.Family.A6XX)))
|
||||
assertTrue(rule.matches(gpu(690, GpuInfo.Family.A6XX)))
|
||||
assertFalse(rule.matches(gpu(740, GpuInfo.Family.A7XX)))
|
||||
assertFalse(rule.matches(gpu(830, GpuInfo.Family.A8XX)))
|
||||
assertTrue(ComponentsManager.FORCED_PACKAGES.none { GpuInfo.Family.A7XX in it.families })
|
||||
}
|
||||
|
||||
@Test fun aModelListOnlyMatchesThoseChips() {
|
||||
val rule = ComponentsManager.ForcedPackage(
|
||||
setOf(GpuInfo.Family.A7XX_LOW), "dxvk", dxvk2, "Dxvk-Linux", setOf(710),
|
||||
)
|
||||
assertTrue(rule.matches(gpu(710, GpuInfo.Family.A7XX_LOW)))
|
||||
assertFalse(rule.matches(gpu(720, GpuInfo.Family.A7XX_LOW)))
|
||||
assertFalse(rule.matches(gpu(710, GpuInfo.Family.A6XX)))
|
||||
assertFalse(ComponentsManager.ForcedPackage(emptySet(), "dxvk", dxvk2, "Dxvk-Linux").matches(gpu(650, GpuInfo.Family.A6XX)))
|
||||
}
|
||||
|
||||
@Test fun aShippedComponentIsReplacedUntilTheUserChoosesOne() {
|
||||
assertTrue(ComponentsManager.forcedPackageWanted(null, false))
|
||||
assertTrue(ComponentsManager.forcedPackageWanted(null, true))
|
||||
assertTrue(ComponentsManager.forcedPackageWanted("", false))
|
||||
assertFalse(ComponentsManager.forcedPackageWanted(dxvk2, true))
|
||||
assertTrue(ComponentsManager.forcedPackageWanted(dxvk2, false))
|
||||
assertFalse(ComponentsManager.forcedPackageWanted("dxvk-3.1-linux.wcp", true))
|
||||
assertTrue(ComponentsManager.forcedPackageWanted("dxvk-3.1-linux.wcp", false))
|
||||
assertTrue(ComponentsManager.forcedPackageWanted("dxvk-gplasync-2.7.1-1-linux.wcp", false))
|
||||
}
|
||||
|
||||
@Test fun catalogMatchPicksTheReleaseAndIgnoresAnother() {
|
||||
val wanted = item(dxvk2, "Dxvk-Linux")
|
||||
val otherRelease = item(dxvk2, "Dxvk-gplasync-Linux")
|
||||
val otherFile = item("dxvk-3.1-linux.wcp", "Dxvk-Linux")
|
||||
assertEquals(wanted, ComponentsManager.catalogMatch(listOf(otherFile, otherRelease, wanted), dxvk2, "Dxvk-Linux"))
|
||||
assertNull(ComponentsManager.catalogMatch(listOf(otherFile, otherRelease), dxvk2, "Dxvk-Linux"))
|
||||
assertNull(ComponentsManager.catalogMatch(emptyList(), dxvk2, "Dxvk-Linux"))
|
||||
}
|
||||
|
||||
@Test fun thisMachineIsNotForced() {
|
||||
assertNull(ComponentsManager.ensureForcedPackages(context))
|
||||
}
|
||||
|
||||
@Test fun anotherGpuIsLeftAlone() {
|
||||
proton("proton-exp")
|
||||
assertNull(install(gpu(740, GpuInfo.Family.A7XX)))
|
||||
}
|
||||
|
||||
@Test fun noInstalledProtonNeedsNothing() {
|
||||
assertNull(install(gpu(650, GpuInfo.Family.A6XX)))
|
||||
}
|
||||
|
||||
@Test fun aChosenPackageIsNotReplaced() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", "dxvk-3.1-linux.wcp", "experimental-11")
|
||||
assertNull(install(gpu(650, GpuInfo.Family.A6XX)))
|
||||
}
|
||||
|
||||
@Test fun theSamePackageOnThisProtonBuildIsNotFetchedAgain() {
|
||||
proton("proton-exp")
|
||||
writeState("proton-exp", dxvk2, "experimental-11")
|
||||
assertNull(install(gpu(650, GpuInfo.Family.A6XX)))
|
||||
}
|
||||
|
||||
@Test fun aMissingListingLeavesTheShippedCopy() {
|
||||
proton("proton-exp")
|
||||
val result = install(gpu(650, GpuInfo.Family.A6XX), lookup = { _, _ -> null })
|
||||
assertEquals("$dxvk2 is not in the Nightlies listing; DXVK stays on the Proton's copy", result)
|
||||
}
|
||||
|
||||
@Test fun aShippedCopyAndAProtonUpdateAreBothSwapped() {
|
||||
proton("kept")
|
||||
proton("proton-exp", "experimental-12")
|
||||
proton("other", "experimental-12")
|
||||
writeState("kept", "dxvk-3.1-linux.wcp", "experimental-11")
|
||||
writeState("proton-exp", dxvk2, "experimental-11")
|
||||
writeState("other", "dxvk-3.1-linux.wcp", "experimental-11")
|
||||
val fetched = mutableListOf<String>()
|
||||
val applied = mutableListOf<String>()
|
||||
val result = install(
|
||||
gpu(650, GpuInfo.Family.A6XX),
|
||||
lookup = { file, release -> item(file, release) },
|
||||
fetch = { fetched += it.file },
|
||||
apply = { id, file -> applied += "$id $file"; "DXVK 2.7.1 is now in $id. It applies the next time a game starts." },
|
||||
)
|
||||
assertEquals(listOf(dxvk2), fetched)
|
||||
assertEquals(listOf("other $dxvk2", "proton-exp $dxvk2"), applied)
|
||||
assertEquals(
|
||||
"DXVK 2.7.1 is now in other. It applies the next time a game starts.; " +
|
||||
"DXVK 2.7.1 is now in proton-exp. It applies the next time a game starts.",
|
||||
result,
|
||||
)
|
||||
}
|
||||
|
||||
@Test fun everyProtonStillOnItsShippedCopyIsSwapped() {
|
||||
proton("one")
|
||||
proton("two")
|
||||
val applied = mutableListOf<String>()
|
||||
val result = install(
|
||||
gpu(650, GpuInfo.Family.A6XX),
|
||||
lookup = { file, release -> item(file, release) },
|
||||
fetch = {},
|
||||
apply = { id, _ -> applied += id; "DXVK 2.7.1 is now in $id. It applies the next time a game starts." },
|
||||
)
|
||||
assertEquals(listOf("one", "two"), applied)
|
||||
assertEquals(
|
||||
"DXVK 2.7.1 is now in one. It applies the next time a game starts.; " +
|
||||
"DXVK 2.7.1 is now in two. It applies the next time a game starts.",
|
||||
result,
|
||||
)
|
||||
}
|
||||
|
||||
@Test fun aBrokenStoredPackageIsFetchedAgain() {
|
||||
proton("proton-exp")
|
||||
File(context.filesDir, "components/packages/$dxvk2").apply { parentFile!!.mkdirs(); writeText("not a package") }
|
||||
val fetched = mutableListOf<String>()
|
||||
install(
|
||||
gpu(650, GpuInfo.Family.A6XX),
|
||||
lookup = { file, release -> item(file, release) },
|
||||
fetch = { fetched += it.file },
|
||||
apply = { _, _ -> "swapped" },
|
||||
)
|
||||
assertEquals(listOf(dxvk2), fetched)
|
||||
assertFalse(File(context.filesDir, "components/packages/$dxvk2").isFile)
|
||||
}
|
||||
|
||||
@Test fun aFailedFetchIsLeftForTheSessionToLog() {
|
||||
proton("proton-exp")
|
||||
val applied = mutableListOf<String>()
|
||||
val error = assertThrows(IllegalStateException::class.java) {
|
||||
install(
|
||||
gpu(650, GpuInfo.Family.A6XX),
|
||||
lookup = { file, release -> item(file, release) },
|
||||
fetch = { throw IllegalStateException("Download failed") },
|
||||
apply = { id, _ -> applied += id; "" },
|
||||
)
|
||||
}
|
||||
assertEquals("Download failed", error.message)
|
||||
assertTrue(applied.isEmpty())
|
||||
}
|
||||
|
||||
@Test fun theCachedListingIsUsedBeforeRefreshing() {
|
||||
writeCatalog()
|
||||
assertEquals(cachedUrl, ComponentsManager.catalogItem(context, dxvk2, "Dxvk-Linux")?.url)
|
||||
}
|
||||
|
||||
@Test fun aCacheMissReadsTheRefreshedListingOnce() {
|
||||
var refreshes = 0
|
||||
val refreshed = item(dxvk2, "Dxvk-Linux")
|
||||
val found = ComponentsManager.resolveCatalogItem(dxvk2, "Dxvk-Linux", { emptyList() }, { refreshes += 1; listOf(refreshed) })
|
||||
assertEquals(refreshed, found)
|
||||
assertEquals(1, refreshes)
|
||||
assertNull(ComponentsManager.resolveCatalogItem("missing.wcp", "Dxvk-Linux", { emptyList() }, { refreshes += 1; emptyList() }))
|
||||
assertEquals(2, refreshes)
|
||||
val cached = item(dxvk2, "Dxvk-Linux")
|
||||
assertEquals(cached, ComponentsManager.resolveCatalogItem(dxvk2, "Dxvk-Linux", { listOf(cached) }, { error("refresh") }))
|
||||
}
|
||||
|
||||
private fun gpu(model: Int, family: GpuInfo.Family) = GpuInfo("Adreno $model", model, family, "", false)
|
||||
|
||||
private fun install(
|
||||
gpu: GpuInfo,
|
||||
lookup: (String, String) -> ComponentsManager.CatalogItem? = ::refuseLookup,
|
||||
fetch: (ComponentsManager.CatalogItem) -> Unit = ::refuseFetch,
|
||||
apply: (String, String) -> String = ::refuseApply,
|
||||
) = ComponentsManager.ensureForcedPackages(context, gpu, lookup, fetch, apply)
|
||||
|
||||
private fun refuseLookup(file: String, release: String): ComponentsManager.CatalogItem? = error("catalog $file $release")
|
||||
|
||||
private fun refuseFetch(item: ComponentsManager.CatalogItem) { error("fetch ${item.file}") }
|
||||
|
||||
private fun refuseApply(protonId: String, file: String): String = error("apply $protonId $file")
|
||||
|
||||
private fun proton(name: String, version: String = "experimental-11") {
|
||||
val dir = File(LinuxRuntime.rootDir(context), "root/.local/share/Steam/steamapps/common/$name")
|
||||
File(dir, "files/lib/wine").mkdirs()
|
||||
File(dir, "proton").writeText("#!/bin/sh\n")
|
||||
File(dir, "version").writeText("1 $version\n")
|
||||
}
|
||||
|
||||
private fun writeState(protonId: String, file: String, protonVersion: String) {
|
||||
val state = File(context.filesDir, "components/state.json")
|
||||
state.parentFile!!.mkdirs()
|
||||
val active = if (state.isFile) JSONObject(state.readText()).getJSONObject("active") else JSONObject()
|
||||
active.put(protonId, JSONObject().put("dxvk", JSONObject().put("file", file).put("protonVersion", protonVersion)))
|
||||
state.writeText(JSONObject().put("active", active).put("queued", JSONObject()).toString())
|
||||
}
|
||||
|
||||
private val cachedUrl = "https://github.com/The412Banner/Nightlies/releases/download/Dxvk-Linux/$dxvk2?cached=1"
|
||||
|
||||
private fun writeCatalog() {
|
||||
val cache = File(context.filesDir, "components/catalog.json")
|
||||
cache.parentFile!!.mkdirs()
|
||||
cache.writeText(JSONObject()
|
||||
.put("fetchedAt", 1)
|
||||
.put("items", JSONArray().put(JSONObject()
|
||||
.put("file", dxvk2).put("comp", "dxvk").put("release", "Dxvk-Linux")
|
||||
.put("url", cachedUrl).put("size", 4).put("digest", "sha256:" + "ab".repeat(32))))
|
||||
.toString())
|
||||
}
|
||||
|
||||
private fun item(file: String, release: String) = ComponentsManager.CatalogItem(
|
||||
file, "dxvk", release, "https://github.com/The412Banner/Nightlies/releases/download/$release/$file", 4, "sha256:" + "ab".repeat(32),
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import android.content.Context
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Before
|
||||
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 SessionBackgroundPrefsTest {
|
||||
private val context get() = RuntimeEnvironment.getApplication()
|
||||
|
||||
@Before fun clearSettings() {
|
||||
context.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit()
|
||||
}
|
||||
|
||||
@Test fun nativeIsOptInAndDoesNotChangeDesktopOrExistingPolicies() {
|
||||
assertEquals(SessionPrefs.SUSPEND_MANUAL, SessionPrefs.suspendPolicy(context, "steam"))
|
||||
for (policy in listOf(SessionPrefs.SUSPEND_AUTO, SessionPrefs.SUSPEND_MANUAL, SessionPrefs.SUSPEND_NEVER,
|
||||
SessionPrefs.SUSPEND_NATIVE)) {
|
||||
SessionPrefs.setSuspendPolicy(context, "steam", policy)
|
||||
assertEquals(policy, SessionPrefs.suspendPolicy(context, "steam"))
|
||||
assertEquals(SessionPrefs.SUSPEND_MANUAL, SessionPrefs.suspendPolicy(context, "desktop"))
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun directGamesUseAutoWithoutOverwritingSteamsNativeChoice() {
|
||||
SessionPrefs.setSuspendPolicy(context, SessionService.MODE_STEAM, SessionPrefs.SUSPEND_NATIVE)
|
||||
assertEquals(SessionPrefs.SUSPEND_AUTO, SessionPrefs.suspendPolicy(context, SessionService.MODE_RUN))
|
||||
assertEquals(SessionPrefs.SUSPEND_NATIVE, SessionPrefs.suspendPolicy(context, SessionService.MODE_STEAM))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class WinComponentNamesTest {
|
||||
@Test fun catalogKeysReadAsPeopleKnowThem() {
|
||||
val names = mapOf(
|
||||
"oalinst_dll" to "OpenAL", "vcredist2010_dll" to "Visual C++ 2010", "vcredist2022" to "Visual C++ 2015-2022",
|
||||
"dotnet48" to ".NET Framework 4.8", "dotnet452" to ".NET Framework 4.5.2", "dotnet20sp1" to ".NET Framework 2.0 SP1",
|
||||
"d3dcompiler_47" to "D3DCompiler 47", "xaudio2.7" to "XAudio 2.7", "mono-10.4.1" to "Wine Mono 10.4.1",
|
||||
"msxml6" to "MSXML 6", "dmsynth" to "DirectMusic (dmsynth)", "XLiveRedist" to "Games for Windows Live",
|
||||
"something-new" to "something-new",
|
||||
)
|
||||
for ((id, name) in names) assertEquals(id, name, WinComponentNames.of(id))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.droiddeck.launcher.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.ui.unit.Density
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.droiddeck.launcher.core.AppUiPrefs
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Before
|
||||
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 AppScaleTest {
|
||||
private val context get() = RuntimeEnvironment.getApplication()
|
||||
|
||||
@Before fun clearScale() {
|
||||
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit().clear().commit()
|
||||
}
|
||||
|
||||
@Test fun defaultsToSystemDensityAndCanRestoreItAfterChoosingAnotherScale() {
|
||||
assertEquals(100, AppUiPrefs.scale(context))
|
||||
AppUiPrefs.setScale(context, 75)
|
||||
assertEquals(75, AppUiPrefs.scale(context))
|
||||
AppUiPrefs.setScale(context, 100)
|
||||
assertEquals(100, AppUiPrefs.scale(context))
|
||||
val density = Density(2f, 1.3f)
|
||||
val configuration = Configuration(context.resources.configuration)
|
||||
assertSame(density, scaledAppDensity(density, 100))
|
||||
assertSame(configuration, scaledAppConfiguration(configuration, 100))
|
||||
}
|
||||
|
||||
@Test fun invalidStoredOrRequestedScaleFallsBackToTheDefault() {
|
||||
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit().putInt("scale", 0).commit()
|
||||
assertEquals(100, AppUiPrefs.scale(context))
|
||||
AppUiPrefs.setScale(context, 1000)
|
||||
assertEquals(100, AppUiPrefs.scale(context))
|
||||
}
|
||||
|
||||
@Test fun scalingDoesNotModifySessionPreferencesOrAndroidDisplayMetrics() {
|
||||
val session = context.getSharedPreferences("session", Context.MODE_PRIVATE)
|
||||
session.edit().putString("resolution.steam", "1280x720").putInt("upscaler", 2).commit()
|
||||
val before = session.all.toMap()
|
||||
val density = context.resources.displayMetrics.density
|
||||
val configuration = Configuration(context.resources.configuration)
|
||||
AppUiPrefs.setScale(context, 150)
|
||||
scaledAppConfiguration(context.resources.configuration, AppUiPrefs.scale(context))
|
||||
assertEquals(before, session.all)
|
||||
assertEquals(density, context.resources.displayMetrics.density, 0f)
|
||||
assertEquals(configuration, context.resources.configuration)
|
||||
}
|
||||
|
||||
@Test fun textAndControlsScaleTogetherWhilePreservingAccessibilityFontScale() {
|
||||
val base = Density(2f, 1.3f)
|
||||
for (percent in AppUiPrefs.scales) {
|
||||
val scaled = scaledAppDensity(base, percent)
|
||||
assertEquals(1.3f, scaled.fontScale, 0f)
|
||||
assertEquals(base.run { 44.dp.toPx() } * percent / 100f, scaled.run { 44.dp.toPx() }, 0.001f)
|
||||
assertEquals(base.run { 16.sp.toPx() } * percent / 100f, scaled.run { 16.sp.toPx() }, 0.001f)
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun responsiveWidthAndPopupHeightFitTheSamePhysicalWindowAtEveryScale() {
|
||||
val base = Configuration().apply {
|
||||
densityDpi = 320
|
||||
screenWidthDp = 960
|
||||
screenHeightDp = 540
|
||||
smallestScreenWidthDp = 540
|
||||
fontScale = 1.3f
|
||||
orientation = Configuration.ORIENTATION_LANDSCAPE
|
||||
}
|
||||
for (percent in AppUiPrefs.scales) {
|
||||
val scaled = scaledAppConfiguration(base, percent)
|
||||
val density = scaledAppDensity(Density(2f, 1.3f), percent).density
|
||||
assertEquals(1920f, scaled.screenWidthDp * density, 2f)
|
||||
assertEquals(1080f, scaled.screenHeightDp * density, 2f)
|
||||
assertEquals(1080f, scaled.smallestScreenWidthDp * density, 2f)
|
||||
assertEquals(1.3f, scaled.fontScale, 0f)
|
||||
assertEquals(base.orientation, scaled.orientation)
|
||||
}
|
||||
assertEquals(960, base.screenWidthDp)
|
||||
assertEquals(540, base.screenHeightDp)
|
||||
assertEquals(320, base.densityDpi)
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,11 @@ and explicit removals take precedence over these defaults. FEX's own default
|
||||
remains the default preset. Shader caching in VKD3D/DXVK, synchronization, ray
|
||||
tracing and diagnostic logging otherwise retain the runtime's defaults.
|
||||
|
||||
On an Adreno 6xx, Turnip does not expose `storageBuffer8BitAccess`, which DXVK 3
|
||||
requires. A Steam or desktop session installs DXVK 2.7.1 into any Proton whose
|
||||
DXVK is still the copy that Proton shipped, including after a Proton update put
|
||||
that copy back. A DXVK package chosen in Components stays for that Proton build.
|
||||
|
||||
The variable-name picker offers 24 predefined variables and a Custom entry. Like
|
||||
WinNative, known variables use toggles, value dropdowns, multi-select lists, or
|
||||
numeric/text fields. Feature-level and shader-model dropdowns also accept custom
|
||||
|
||||
@@ -16,6 +16,11 @@ export QT_QPA_PLATFORMTHEME=lxqt
|
||||
# The prefs for this are only advisory and a profile can override them; the environment is not.
|
||||
export MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_DISABLE_GMP_SANDBOX=1 MOZ_DISABLE_RDD_SANDBOX=1
|
||||
export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1 MOZ_DISABLE_UTILITY_SANDBOX=1
|
||||
# Firefox seals the size of the shared memory it hands a tab; on Android 16 (Galaxy S25/S26,
|
||||
# RedMagic) adding the seal fails, Firefox only warns, and the tab refuses the unsealed memory
|
||||
# ("Shared memory PlatformHandle is not safe to map") and dies on signal 11 - every page. Firefox's
|
||||
# own switch skips the seals.
|
||||
export MOZ_SHM_NO_SEALS=1
|
||||
# pixman composites in software and gives programs shm buffers only, so a Vulkan program on it
|
||||
# fails at its swapchain. vulkan (or gles2) composite on the GPU and give programs DMA-BUFs, but
|
||||
# stock wlroots allocates through gbm on a real DRM node and the KGSL stand-in is not one ("unable
|
||||
|
||||
@@ -24,6 +24,8 @@ fi
|
||||
# X11, which it picks from the session type.
|
||||
export MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_DISABLE_GMP_SANDBOX=1 MOZ_DISABLE_RDD_SANDBOX=1
|
||||
export MOZ_DISABLE_SOCKET_PROCESS_SANDBOX=1 MOZ_DISABLE_UTILITY_SANDBOX=1
|
||||
# Android 16 refuses Firefox the size seal on a tab's shared memory; see droiddeck-desktop.
|
||||
export MOZ_SHM_NO_SEALS=1
|
||||
# sharun images start the app through their own ld.so, patched not to read /etc/ld.so.preload, and
|
||||
# drop LD_PRELOAD unless allowed: without this the app never gets the session's pads.
|
||||
if [ -s /etc/ld.so.preload ]; then
|
||||
|
||||
@@ -3,10 +3,12 @@ import json
|
||||
import os
|
||||
import re
|
||||
import runpy
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
SYNC_KEYS = ("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")
|
||||
|
||||
|
||||
@@ -117,6 +119,21 @@ def engine_fixes(exe, args):
|
||||
return env, extra, notes
|
||||
|
||||
|
||||
def win_components(compat, app_id):
|
||||
"""The game's Windows components put into its prefix; returns their WINEDLLOVERRIDES entries."""
|
||||
if not compat:
|
||||
return ""
|
||||
try:
|
||||
module = runpy.run_path(str(Path(__file__).resolve().parent / "droiddeck-wincomponents"))
|
||||
names, notes = module["apply"](compat.rstrip("/"), app_id)
|
||||
for note in notes:
|
||||
print("droiddeck-game-env: " + note, file=sys.stderr)
|
||||
return module["overrides_value"](names)
|
||||
except Exception as error:
|
||||
print("droiddeck-game-env: Windows components not applied (%s)" % error, file=sys.stderr)
|
||||
return ""
|
||||
|
||||
|
||||
def apply_config(env, config, app_id, fixes=None):
|
||||
if config.get("version") != 1:
|
||||
raise ValueError("unsupported environment configuration")
|
||||
@@ -196,11 +213,57 @@ def without_pack(chosen_env, env):
|
||||
return result
|
||||
|
||||
|
||||
SSBS_LIB = "/usr/local/lib/libssbs.so"
|
||||
|
||||
|
||||
def force_ssbs(command, env):
|
||||
"""DROIDDECK_FORCE_SSBS=1 (a game's or the shared environment): preload libssbs.so into this
|
||||
Proton's Wine, which then keeps PSTATE.SSBS set across signal returns - speculative store
|
||||
bypass stays allowed, as force_ssbs.diff does inside a rebuilt ntdll. ARM64 Protons only: the
|
||||
library is aarch64 and only arm64 Wine has the signal path it fixes."""
|
||||
if env.get("DROIDDECK_FORCE_SSBS", "").lower() not in ("1", "on", "true", "yes"):
|
||||
return env
|
||||
proton = os.path.dirname(command[0]) if command else ""
|
||||
if not os.path.isdir(os.path.join(proton, "files/lib/wine/aarch64-unix")):
|
||||
print("droiddeck-game-env: force SSBS asked for, but this Proton is not an ARM64 one; left off", file=sys.stderr)
|
||||
return env
|
||||
if not os.path.isfile(SSBS_LIB):
|
||||
print("droiddeck-game-env: force SSBS asked for, but %s is missing; left off" % SSBS_LIB, file=sys.stderr)
|
||||
return env
|
||||
parts = [p for p in re.split(r"[:\s]+", env.get("LD_PRELOAD", "")) if p]
|
||||
if SSBS_LIB not in parts:
|
||||
env = dict(env, LD_PRELOAD=":".join(parts + [SSBS_LIB]))
|
||||
print("droiddeck-game-env: force SSBS on (libssbs.so preloaded)", file=sys.stderr)
|
||||
return env
|
||||
|
||||
|
||||
EVALUATOR_SCRIPT = re.compile(r"(?:^|[\\/])evaluatorscript_[0-9]+\.vdf$", re.IGNORECASE)
|
||||
|
||||
|
||||
def mark_install_scripts(command, env):
|
||||
"""The client is about to run a game's install scripts (iscriptevaluator.exe): mark every process
|
||||
in them as already run first, so no redistributable installer starts - on first launch the
|
||||
shared ones may still be downloading, and on ARM64 Proton the VC++ ones stop with an error."""
|
||||
if not any(arg.lower().replace("\\", "/").endswith("iscriptevaluator.exe") for arg in command):
|
||||
return
|
||||
root = env.get("STEAM_COMPAT_CLIENT_INSTALL_PATH") or str(Path.home() / ".local/share/Steam")
|
||||
scripts = [str(Path(root) / arg.replace("\\", "/")) for arg in command if EVALUATOR_SCRIPT.search(arg)]
|
||||
scripts = [path for path in scripts if os.path.isfile(path)]
|
||||
if not scripts:
|
||||
return
|
||||
try:
|
||||
subprocess.run([SEED_REDISTS, root], env=dict(env, DROIDDECK_SEED_SCRIPTS="\n".join(scripts)),
|
||||
stdout=sys.stderr, timeout=60, check=False)
|
||||
except (OSError, subprocess.SubprocessError) as error:
|
||||
print("droiddeck-game-env: install scripts not marked (%s)" % error, file=sys.stderr)
|
||||
|
||||
|
||||
def main():
|
||||
command = sys.argv[1:]
|
||||
if not command:
|
||||
return 2
|
||||
env = os.environ.copy()
|
||||
mark_install_scripts(command, env)
|
||||
app_id = game_id(env)
|
||||
if app_id:
|
||||
waiting = len(command) > 1 and command[1] == "waitforexitandrun"
|
||||
@@ -210,6 +273,10 @@ 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
|
||||
path = Path.home() / ".config/droiddeck/game-environment.json"
|
||||
try:
|
||||
with path.open(encoding="utf-8") as source:
|
||||
@@ -223,6 +290,7 @@ def main():
|
||||
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)
|
||||
env = force_ssbs(command, env)
|
||||
sync = load_sync()
|
||||
launch, launch_env = select_sync(command, env, sync)
|
||||
if launch[0] != command[0]:
|
||||
|
||||
@@ -7,6 +7,7 @@ must see this service before startup or it can stay black after its idle timer.
|
||||
"""
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
@@ -18,6 +19,9 @@ from gi.repository import Gio, GLib # noqa: E402
|
||||
NAME = "org.freedesktop.login1"
|
||||
ROOT = "/org/freedesktop/login1"
|
||||
INTERFACE = NAME + ".Manager"
|
||||
UPOWER = "org.freedesktop.UPower"
|
||||
UPOWER_ROOT = "/org/freedesktop/UPower"
|
||||
NATIVE_PREPARE_MS = 1500
|
||||
INTROSPECTION = """
|
||||
<node>
|
||||
<interface name="org.freedesktop.login1.Manager">
|
||||
@@ -29,6 +33,13 @@ INTROSPECTION = """
|
||||
</interface>
|
||||
</node>
|
||||
"""
|
||||
UPOWER_INTROSPECTION = """
|
||||
<node>
|
||||
<interface name="org.freedesktop.UPower">
|
||||
<method name="Suspend"/>
|
||||
</interface>
|
||||
</node>
|
||||
"""
|
||||
|
||||
|
||||
class LoginManager:
|
||||
@@ -37,10 +48,18 @@ class LoginManager:
|
||||
self.directory = Path(directory)
|
||||
self.request = self.directory / "steam-sleep"
|
||||
self.state = self.directory / "steam-sleep-state"
|
||||
self.wake = self.directory / "steam-wake"
|
||||
self.native_request = self.directory / "steam-native-sleep"
|
||||
self.native_ready = self.directory / "steam-native-ready"
|
||||
self.pending = None
|
||||
self.timeout = None
|
||||
self.preparation = None
|
||||
info = Gio.DBusNodeInfo.new_for_xml(INTROSPECTION).interfaces[0]
|
||||
self.registration = bus.register_object(ROOT, info, self.method, self.property, None)
|
||||
# Steam can issue its suspend command through the legacy UPower service even
|
||||
# while listening to login1's sleep/resume notifications. Use one handshake.
|
||||
upower_info = Gio.DBusNodeInfo.new_for_xml(UPOWER_INTROSPECTION).interfaces[0]
|
||||
self.upower_registration = bus.register_object(UPOWER_ROOT, upower_info, self.method, None, None)
|
||||
self.monitor = Gio.File.new_for_path(str(self.directory)).monitor_directory(Gio.FileMonitorFlags.NONE, None)
|
||||
self.monitor.connect("changed", self.changed)
|
||||
|
||||
@@ -69,29 +88,73 @@ class LoginManager:
|
||||
reply.return_value(None)
|
||||
# Flush the signal and method reply without blocking this D-Bus callback. Once both are
|
||||
# on the wire, publishing the request lets the host safely freeze this service.
|
||||
self.bus.flush_async(None, self.publish_after_flush, None)
|
||||
self.bus.flush(None, self.publish_after_flush, self.pending)
|
||||
|
||||
def publish_after_flush(self, connection, result, _data):
|
||||
def publish_after_flush(self, connection, result, token):
|
||||
try:
|
||||
connection.flush_finish(result)
|
||||
except GLib.Error as error:
|
||||
print("== login1: cannot complete suspend handshake: " + str(error), file=sys.stderr)
|
||||
self.resume()
|
||||
return
|
||||
self.publish()
|
||||
if self.pending == token:
|
||||
self.publish(self.request)
|
||||
|
||||
def publish(self):
|
||||
def publish(self, request):
|
||||
self.check_state()
|
||||
if self.pending is None:
|
||||
return False
|
||||
try:
|
||||
staged = self.request.with_suffix(".tmp")
|
||||
staged = request.with_suffix(".tmp")
|
||||
staged.write_text(self.pending + "\n")
|
||||
staged.replace(self.request)
|
||||
staged.replace(request)
|
||||
self.timeout = GLib.timeout_add_seconds(5, self.check_ack)
|
||||
except OSError as error:
|
||||
print("== login1: cannot request pause: " + str(error), file=sys.stderr)
|
||||
self.resume()
|
||||
return False
|
||||
|
||||
def prepare_native(self):
|
||||
try:
|
||||
token = self.native_request.read_text().strip()
|
||||
self.native_request.unlink(missing_ok=True)
|
||||
except OSError:
|
||||
return
|
||||
if not re.fullmatch(r"[a-f0-9]{32}", token) or self.pending is not None:
|
||||
return
|
||||
# Android may have returned before this helper read its request.
|
||||
if self.read_state() == token + ":awake":
|
||||
return
|
||||
self.pending = token
|
||||
self.notify(True)
|
||||
self.bus.flush(None, self.prepare_after_flush, token)
|
||||
|
||||
def prepare_after_flush(self, connection, result, token):
|
||||
try:
|
||||
connection.flush_finish(result)
|
||||
except GLib.Error as error:
|
||||
print("== login1: cannot prepare native sleep: " + str(error), file=sys.stderr)
|
||||
self.resume()
|
||||
return
|
||||
self.check_state()
|
||||
if self.pending == token:
|
||||
# Keep Steam runnable while it handles the system sleep notification.
|
||||
# This is a bounded grace period, not a claim that every game has saved.
|
||||
self.preparation = GLib.timeout_add(NATIVE_PREPARE_MS, self.finish_preparation, token)
|
||||
|
||||
def finish_preparation(self, token):
|
||||
self.preparation = None
|
||||
if self.pending == token:
|
||||
self.publish(self.native_ready)
|
||||
return False
|
||||
|
||||
def changed(self, monitor, file, other, event):
|
||||
if file.get_basename() == self.native_request.name or (other and other.get_basename() == self.native_request.name):
|
||||
self.prepare_native()
|
||||
if file.get_basename() == self.wake.name or (other and other.get_basename() == self.wake.name):
|
||||
if self.wake.exists():
|
||||
self.wake.unlink(missing_ok=True)
|
||||
self.resume(force=True)
|
||||
if file.get_basename() == self.state.name or (other and other.get_basename() == self.state.name):
|
||||
self.check_state()
|
||||
|
||||
@@ -110,18 +173,35 @@ class LoginManager:
|
||||
if self.pending and self.read_state() != self.pending + ":paused":
|
||||
# A missing host or a failed freeze must not strand Steam in black.
|
||||
self.request.unlink(missing_ok=True)
|
||||
self.native_ready.unlink(missing_ok=True)
|
||||
self.resume()
|
||||
return False
|
||||
|
||||
def resume(self):
|
||||
def resume(self, force=False):
|
||||
if self.pending is None:
|
||||
if force:
|
||||
# A missed suspend command leaves Steam without the first half of
|
||||
# the handshake. Replay both notifications, without pausing again.
|
||||
self.notify(True)
|
||||
self.bus.flush(None, self.finish_recovery, None)
|
||||
return
|
||||
self.pending = None
|
||||
if self.preparation is not None:
|
||||
GLib.source_remove(self.preparation)
|
||||
self.preparation = None
|
||||
if self.timeout is not None:
|
||||
GLib.source_remove(self.timeout)
|
||||
self.timeout = None
|
||||
self.notify(False)
|
||||
|
||||
def finish_recovery(self, connection, result, _data):
|
||||
try:
|
||||
connection.flush_finish(result)
|
||||
except GLib.Error as error:
|
||||
print("== login1: cannot flush wake recovery: " + str(error), file=sys.stderr)
|
||||
if self.pending is None:
|
||||
self.notify(False)
|
||||
|
||||
|
||||
def main():
|
||||
directory = os.environ.get("BL_LAUNCH_DIR")
|
||||
@@ -131,23 +211,29 @@ def main():
|
||||
ready.unlink(missing_ok=True)
|
||||
loop = GLib.MainLoop()
|
||||
manager = []
|
||||
acquired_names = set()
|
||||
|
||||
def connected(bus, name):
|
||||
manager.append(LoginManager(bus, directory))
|
||||
if not manager:
|
||||
manager.append(LoginManager(bus, directory))
|
||||
|
||||
def acquired(bus, name):
|
||||
ready.write_text("ready\n")
|
||||
acquired_names.add(name)
|
||||
if acquired_names == {NAME, UPOWER}:
|
||||
ready.write_text("ready\n")
|
||||
|
||||
def lost(bus, name):
|
||||
ready.unlink(missing_ok=True)
|
||||
loop.quit()
|
||||
|
||||
owner = Gio.bus_own_name(Gio.BusType.SYSTEM, NAME, Gio.BusNameOwnerFlags.NONE, connected, acquired, lost)
|
||||
owners = [Gio.bus_own_name(Gio.BusType.SYSTEM, name, Gio.BusNameOwnerFlags.NONE, connected, acquired, lost)
|
||||
for name in (NAME, UPOWER)]
|
||||
try:
|
||||
loop.run()
|
||||
finally:
|
||||
ready.unlink(missing_ok=True)
|
||||
Gio.bus_unown_name(owner)
|
||||
for owner in owners:
|
||||
Gio.bus_unown_name(owner)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -11,28 +11,39 @@
|
||||
# WineUtils.seedVcRedistRegistryIfDllsPresent() takes for the app's own containers. The names and
|
||||
# versions come out of the install scripts rather than a list kept here, because Valve revises
|
||||
# them; a prefix already carrying the same set is left alone.
|
||||
#
|
||||
# Games also carry install scripts of their own (<game>/_CommonRedist/vcredist/2022/installscript.vdf
|
||||
# and the like), often with another version in the value name; those are read too. And the VC++
|
||||
# 2015-2022 runtime is recorded as installed the way Microsoft's installers look for it: on ARM64
|
||||
# Proton the x64 bundle otherwise stops with "Microsoft Visual C++ 2015-2022 Redistributable (arm64)
|
||||
# is required", while Proton's own msvcp140/vcruntime140 already serve the game.
|
||||
set -u
|
||||
steam_root=${1:?steam root}
|
||||
LIBRARIES=${DROIDDECK_LIBRARIES-/mnt/droiddeck /mnt/droiddeck-sd}
|
||||
|
||||
redist="$steam_root/steamapps/common/Steamworks Shared/_CommonRedist"
|
||||
|
||||
# Every process an install script would run, as the registry key and value the client writes once
|
||||
# it has run it. Names sit one level inside "Run Process", the key they share a level further in.
|
||||
pairs=$(find "$redist" -name installscript.vdf -print0 2>/dev/null | sort -z | xargs -0 -r awk '
|
||||
FNR == 1 { depth = 0; name = ""; key = "" }
|
||||
/^[[:space:]]*\{/ { depth++; next }
|
||||
read_scripts() { xargs -0 -r awk '
|
||||
# A block whose HasRunKey is set is one process; its name is the key the block opened under, at
|
||||
# whatever depth - an install script nests it under "Run Process", the client'"'"'s evaluator script
|
||||
# for a game wraps the same blocks once more.
|
||||
FNR == 1 { depth = 0; pending = "" }
|
||||
/^[[:space:]]*\{/ { depth++; name[depth] = pending; key[depth] = ""; pending = ""; next }
|
||||
/^[[:space:]]*\}/ {
|
||||
if (depth == 3 && name != "" && key != "")
|
||||
printf "%s\t%s\n", key, name
|
||||
depth--
|
||||
if (depth > 0 && key[depth] != "" && name[depth] != "")
|
||||
printf "%s\t%s\n", key[depth], name[depth]
|
||||
if (depth > 0) depth--
|
||||
next
|
||||
}
|
||||
{
|
||||
n = split($0, part, "\"")
|
||||
if (n >= 5 && tolower(part[2]) == "hasrunkey") { key = part[4]; next }
|
||||
if (n >= 3 && depth == 2) { name = part[2]; key = "" }
|
||||
if (n >= 5 && tolower(part[2]) == "hasrunkey") { key[depth] = part[4]; next }
|
||||
if (n == 3) pending = part[2]
|
||||
}
|
||||
')
|
||||
'; }
|
||||
pairs=$(find "$redist" -name installscript.vdf -print0 2>/dev/null | sort -z | read_scripts)
|
||||
# The client downloads the scripts with the first game that wants them, which is too late for that
|
||||
# game; until then the set they held when this was written stands in. (WinNative's list.)
|
||||
[ -n "$pairs" ] || pairs=$(sed 's/^\([^ ]*\) /HKEY_LOCAL_MACHINE\\\\Software\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\\1\t/' <<'KNOWN'
|
||||
@@ -54,9 +65,51 @@ vcredist\\2022 x86 14.51.36247.0
|
||||
vcredist\\2022 x64 14.51.36247.0
|
||||
KNOWN
|
||||
)
|
||||
|
||||
# The games' own scripts. Finding them walks every game folder, so the list is kept until a game is
|
||||
# installed, updated or removed (its appmanifest changes) - this runs every quarter minute.
|
||||
cache="$steam_root/.droiddeck-game-scripts"
|
||||
libraries="$steam_root"
|
||||
for library in $LIBRARIES; do libraries="$libraries
|
||||
$library"; done
|
||||
sig=$(while IFS= read -r library; do ls -l --time-style=+%s "$library"/steamapps/appmanifest_*.acf 2>/dev/null; done <<<"$libraries" | cksum)
|
||||
if [ "$(head -n 1 "$cache" 2>/dev/null)" != "$sig" ]; then
|
||||
{
|
||||
printf '%s\n' "$sig"
|
||||
while IFS= read -r library; do
|
||||
[ -d "$library/steamapps/common" ] || continue
|
||||
find "$library/steamapps/common" -mindepth 2 -maxdepth 5 -iname 'installscript*.vdf' \
|
||||
-not -path '*/Steamworks Shared/*' 2>/dev/null
|
||||
done <<<"$libraries" | sort -u
|
||||
} >"$cache.tmp" && mv -f "$cache.tmp" "$cache"
|
||||
fi
|
||||
game_pairs=$(tail -n +2 "$cache" 2>/dev/null | tr '\n' '\0' | read_scripts)
|
||||
# DROIDDECK_SEED_SCRIPTS: more scripts, one path a line - droiddeck-game-env passes the client's
|
||||
# evaluator script for the game about to run its installers, read before the client looks.
|
||||
if [ -n "${DROIDDECK_SEED_SCRIPTS:-}" ]; then
|
||||
game_pairs=$(printf '%s\n%s\n' "$game_pairs" "$(printf '%s\n' "$DROIDDECK_SEED_SCRIPTS" | tr '\n' '\0' | read_scripts)")
|
||||
fi
|
||||
[ -n "$(printf '%s' "$game_pairs" | tr -d '[:space:]')" ] && pairs=$(printf '%s\n%s\n' "$pairs" "$game_pairs" | sort -u | sed '/^$/d')
|
||||
|
||||
# The VC++ 2015-2022 runtime as its installers check for it, for each architecture and both registry
|
||||
# views. The version is the newest the scripts above know, so any 2015-2022 bundle finds itself
|
||||
# already installed and exits without asking for anything.
|
||||
VCRT_MAJOR=14 VCRT_MINOR=51 VCRT_BUILD=36247
|
||||
vcrt() {
|
||||
local view arch
|
||||
for view in 'Software' 'Software\\Wow6432Node'; do
|
||||
for arch in x86 x64 arm64; do
|
||||
printf '\n[%s\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\%s] %d\n' "$view" "$arch" "$1"
|
||||
printf '"Bld"=dword:%08x\n"Installed"=dword:00000001\n"Major"=dword:%08x\n"Minor"=dword:%08x\n"Rbld"=dword:00000000\n' \
|
||||
"$VCRT_BUILD" "$VCRT_MAJOR" "$VCRT_MINOR"
|
||||
printf '"Version"="v%d.%d.%d.00"\n' "$VCRT_MAJOR" "$VCRT_MINOR" "$VCRT_BUILD"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# The stamp is the set of names, taken before the block below dates its keys: stamped from the
|
||||
# dated block it never matched, and every prefix had the whole block appended again on every beat.
|
||||
stamp=$(printf '%s' "$pairs" | cksum)
|
||||
stamp=$(printf '%s vcrt %s.%s.%s' "$pairs" "$VCRT_MAJOR" "$VCRT_MINOR" "$VCRT_BUILD" | cksum)
|
||||
|
||||
block=$(printf '%s\n' "$pairs" | awk -F'\t' -v now="$(date +%s)" '
|
||||
{
|
||||
@@ -67,11 +120,14 @@ block=$(printf '%s\n' "$pairs" | awk -F'\t' -v now="$(date +%s)" '
|
||||
printf "\n[%s] %d\n\"%s\"=dword:00000001\n", path, now, $2
|
||||
# The client writes these from 32-bit steam.exe, so its own copy lands under Wow6432Node;
|
||||
# both spellings are seeded because the reader picks by its own word size.
|
||||
sub(/^Software\\\\/, "Software\\\\\\\\Wow6432Node\\\\\\\\", path)
|
||||
printf "\n[%s] %d\n\"%s\"=dword:00000001\n", path, now, $2
|
||||
# Joined rather than sub()stituted: gawk and mawk read backslashes in a replacement differently.
|
||||
if (substr(path, 1, 10) != "Software\\\\")
|
||||
next
|
||||
printf "\n[%s] %d\n\"%s\"=dword:00000001\n", "Software\\\\Wow6432Node\\\\" substr(path, 11), now, $2
|
||||
}
|
||||
')
|
||||
[ -n "$block" ] || exit 0
|
||||
block="$block
|
||||
$(vcrt "$(date +%s)")"
|
||||
|
||||
# Proton builds a new prefix from its template, and the client runs the install scripts in that
|
||||
# prefix moments later, so the template carries the markers too. Its date is kept: Proton reads a
|
||||
|
||||
@@ -162,7 +162,7 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
fi
|
||||
fi
|
||||
args=(--backend wayland --expose-wayland -f -W "$width" -H "$height" -w "$nested" -h "$height")
|
||||
[ "$nested" != "$width" ] && args+=(-S stretch)
|
||||
[ "$nested" != "$width" ] && args+=(-S stretch) && export BL_STRETCHED=1
|
||||
# -r is what gamescope advertises as the refresh rate, and what a game reads as the display's.
|
||||
# Left unset it defaults to 60, so a 120 Hz panel offers only 60 Hz in game settings. The FPS
|
||||
# limiter wins when it is on (it is a deliberate cap); otherwise use the panel's own rate.
|
||||
@@ -179,9 +179,10 @@ if [ -z "${BL_INSIDE:-}" ]; then
|
||||
[ "$mode" = steam ] && args+=(--default-touch-mode 4)
|
||||
# A game that resizes its own window when it loses focus (the Steam menu opening over it) comes
|
||||
# back smaller, and gamescope draws a window that is not flagged fullscreen at its own size in
|
||||
# the top-left corner. Forcing every window to the output's size keeps it filling the screen.
|
||||
# BL_GAMESCOPE_FORCE_FULLSCREEN=0 turns it off.
|
||||
[ "$mode" = steam ] && [ "${BL_GAMESCOPE_FORCE_FULLSCREEN:-1}" = 1 ] && args+=(--force-windows-fullscreen)
|
||||
# the top-left corner. Forcing every window to the output's size keeps it filling the screen,
|
||||
# but a game running at a resolution other than the screen's fights it and flickers, so it is
|
||||
# off unless the app asks for it: BL_GAMESCOPE_FORCE_FULLSCREEN=1 turns it on.
|
||||
[ "$mode" = steam ] && [ "${BL_GAMESCOPE_FORCE_FULLSCREEN:-0}" = 1 ] && args+=(--force-windows-fullscreen)
|
||||
# HDR10: the app opened its compositor's colour-management gate for this session (BL_HDR=1);
|
||||
# gamescope then offers HDR to its clients through the same wp_color_manager_v1 it binds on ours.
|
||||
[ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled)
|
||||
@@ -445,7 +446,7 @@ case $mode in
|
||||
# the root window, which it watches. What gamescope was started with is where this begins.
|
||||
# Not on the desktop (BL_DESKTOP): no gamescope there, and the loop would outlive the client.
|
||||
[ -z "${BL_DESKTOP:-}" ] && (
|
||||
last=${BL_GAMESCOPE_FORCE_FULLSCREEN:-1}
|
||||
last=${BL_GAMESCOPE_FORCE_FULLSCREEN:-0}
|
||||
while :; do
|
||||
nap 1
|
||||
want=
|
||||
@@ -458,6 +459,19 @@ case $mode in
|
||||
fi
|
||||
done
|
||||
) &
|
||||
# With the 16:9 stretch on, the client's own scaler must not undo it: in Deck mode it sets
|
||||
# GAMESCOPE_NEW_SCALING_SCALER to Auto (0), which fits the 16:9 picture with bars and outranks -S.
|
||||
# Auto is put back to Stretch (4); a mode picked in the QAM (Integer, Fit, Fill) is kept.
|
||||
[ -z "${BL_DESKTOP:-}" ] && [ "${BL_STRETCHED:-0}" = 1 ] && (
|
||||
while :; do
|
||||
nap 1
|
||||
cur=$(xprop -root GAMESCOPE_NEW_SCALING_SCALER 2>/dev/null) || continue
|
||||
case $cur in *" = "*) cur=${cur##* = } ;; *) cur=0 ;; esac
|
||||
[ "$cur" = 0 ] || continue
|
||||
xprop -root -f GAMESCOPE_NEW_SCALING_SCALER 32c -set GAMESCOPE_NEW_SCALING_SCALER 4 2>/dev/null \
|
||||
&& echo "== stretch 16:9 to panel: the client's scaler was Auto, set to Stretch"
|
||||
done
|
||||
) &
|
||||
# Resume from the Steam menu. The menu is an overlay that takes input, and a fullscreen game that
|
||||
# loses input minimizes itself; gamescope only takes a window out of that state when the focused
|
||||
# window changes, which the menu never does, so the game stayed minimized after Resume (a black
|
||||
@@ -684,6 +698,8 @@ BUSCONF
|
||||
_bl_ui+=(-steamdeck -steamos3)
|
||||
# The QAM's Scaling Filter lists NVIDIA Image Scaling only when told gamescope has it (it does).
|
||||
export STEAM_GAMESCOPE_NIS_SUPPORTED=1
|
||||
# And shows its Scaling Mode and Scaling Filter only when told gamescope takes them.
|
||||
export STEAM_GAMESCOPE_FANCY_SCALING_SUPPORT=1
|
||||
echo "== steam: Deck mode on (-steamdeck -steamos3)"
|
||||
fi
|
||||
# What a killed session leaves behind. Android ends sessions without warning (backgrounding, the
|
||||
|
||||
+241
@@ -0,0 +1,241 @@
|
||||
#!/usr/bin/python3
|
||||
"""Windows components (OpenAL, d3dx, XAudio, ...) for a game's Proton prefix.
|
||||
|
||||
The app installs each component under STORE/<id>: its files in system32/ (64-bit) and syswow64/
|
||||
(32-bit) as Windows lays them out, and component.json naming the overrides that make Wine load
|
||||
them instead of its own ("name" for native-then-builtin, or "name=n" with Wine's own letters) and
|
||||
the components it bundles ("requires"). The ids are Bannerlator's catalog names (xaudio2.7,
|
||||
oalinst_dll...). The user picks components per game; the picks are in SELECTION as
|
||||
{"version": 1, "games": {"<appid>": ["oalinst_dll", ...]}}.
|
||||
|
||||
droiddeck-game-env calls apply() before every game launch. It copies what is missing or changed
|
||||
into compatdata/<appid>/pfx and returns the overrides for WINEDLLOVERRIDES, so nothing is written
|
||||
to the prefix's registry and Wine never has to be running.
|
||||
|
||||
Proton leaves the files alone afterwards: its builtin refresh (update_builtin_libs) replaces only
|
||||
files that are its own builtins, and a new prefix is built around files already there (copy_pfx
|
||||
skips them). The one case that removes them is a launch on an older Proton than the prefix's,
|
||||
which deletes every file Proton once placed - and the next launch's apply() puts ours back.
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
STORE = Path("/opt/droiddeck/wincomponents")
|
||||
SELECTION = Path.home() / ".config/droiddeck/wincomponents.json"
|
||||
# What this prefix holds from us, so a component the user turns off is taken out again.
|
||||
STATE = ".droiddeck-wincomponents.json"
|
||||
# A file ours replaced that was not Proton's (a real installer's, the user's own), put back when the
|
||||
# component is turned off. Proton's builtins need no copy: it restores those itself.
|
||||
BACKUP = ".droiddeck-wincomponents-backup"
|
||||
BUILTIN_MARKS = (b"Wine builtin DLL", b"Wine placeholder DLL")
|
||||
ARCH_DIRS = ("system32", "syswow64")
|
||||
ID = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]{0,63}")
|
||||
|
||||
|
||||
def valid_id(value):
|
||||
return isinstance(value, str) and ID.fullmatch(value) is not None and ".." not in value
|
||||
|
||||
|
||||
def wanted(app_id, selection=SELECTION):
|
||||
try:
|
||||
with open(selection, encoding="utf-8") as source:
|
||||
config = json.load(source)
|
||||
except FileNotFoundError:
|
||||
return []
|
||||
if config.get("version") != 1:
|
||||
raise ValueError("unsupported components selection")
|
||||
ids = config.get("games", {}).get(app_id, [])
|
||||
if not isinstance(ids, list) or not all(valid_id(i) for i in ids):
|
||||
raise ValueError("invalid components selection")
|
||||
return ids
|
||||
|
||||
|
||||
def component(store, cid):
|
||||
"""The component's overrides, its files as (relative path, source) and the ids it bundles, or None if not installed."""
|
||||
root = Path(store) / cid
|
||||
try:
|
||||
with open(root / "component.json", encoding="utf-8") as source:
|
||||
meta = json.load(source)
|
||||
except (FileNotFoundError, ValueError):
|
||||
return None
|
||||
files = []
|
||||
for arch in ARCH_DIRS:
|
||||
folder = root / arch
|
||||
if folder.is_dir():
|
||||
# A few go one level down (gmdls: system32/drivers/gm.dls).
|
||||
for entry in sorted(folder.rglob("*")):
|
||||
if entry.is_file() and not entry.is_symlink():
|
||||
rel = entry.relative_to(folder).as_posix().lower()
|
||||
files.append(("drive_c/windows/%s/%s" % (arch, rel), entry))
|
||||
requires = [r for r in meta.get("requires", []) if valid_id(r)]
|
||||
return [str(o) for o in meta.get("overrides", [])], files, requires
|
||||
|
||||
|
||||
def expand(store, ids):
|
||||
"""The picks with everything they bundle, each once, a bundle's parts before it."""
|
||||
out, seen = [], set()
|
||||
|
||||
def visit(cid, depth):
|
||||
if cid in seen or depth > 8:
|
||||
return
|
||||
seen.add(cid)
|
||||
found = component(store, cid)
|
||||
for dep in (found[2] if found else []):
|
||||
visit(dep, depth + 1)
|
||||
out.append(cid)
|
||||
|
||||
for cid in ids:
|
||||
visit(cid, 0)
|
||||
return out
|
||||
|
||||
|
||||
def existing(path):
|
||||
"""The file at path as the prefix spells it: Windows names ignore case, the filesystem may not."""
|
||||
folder = path.parent
|
||||
try:
|
||||
with os.scandir(folder) as entries:
|
||||
for entry in entries:
|
||||
if entry.name.lower() == path.name:
|
||||
return folder / entry.name
|
||||
except OSError:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
||||
def same(src, dst):
|
||||
try:
|
||||
if dst.is_symlink():
|
||||
return False
|
||||
a, b = src.stat(), dst.stat()
|
||||
except OSError:
|
||||
return False
|
||||
return a.st_size == b.st_size and int(a.st_mtime) == int(b.st_mtime)
|
||||
|
||||
|
||||
def builtin(path):
|
||||
"""Proton's own: a symlink into its files, or a Wine DLL that says so in its DOS stub."""
|
||||
if path.is_symlink():
|
||||
return True
|
||||
try:
|
||||
with open(path, "rb") as source:
|
||||
head = source.read(512)
|
||||
except OSError:
|
||||
return False
|
||||
return any(mark in head for mark in BUILTIN_MARKS)
|
||||
|
||||
|
||||
def place(src, target, backup=None):
|
||||
"""Copies src over target unless it is already there; a file of someone else's goes to backup first."""
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
found = existing(target)
|
||||
if found is not None and same(src, found):
|
||||
return False
|
||||
if found is not None and backup is not None and not backup.exists() and not builtin(found):
|
||||
backup.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(found, backup)
|
||||
final = found or target
|
||||
temp = final.with_name(".%s.droiddeck" % final.name)
|
||||
shutil.copy2(src, temp)
|
||||
# Over a Proton builtin this swaps its symlink for our file.
|
||||
os.replace(temp, final)
|
||||
return True
|
||||
|
||||
|
||||
def load_state(compat):
|
||||
try:
|
||||
with open(compat / STATE, encoding="utf-8") as source:
|
||||
state = json.load(source)
|
||||
return state if isinstance(state.get("files"), dict) else {"files": {}}
|
||||
except (FileNotFoundError, ValueError, AttributeError):
|
||||
return {"files": {}}
|
||||
|
||||
|
||||
def save_state(compat, state):
|
||||
temp = compat / (STATE + ".tmp")
|
||||
with open(temp, "w", encoding="utf-8") as out:
|
||||
json.dump(state, out, indent=1, sort_keys=True)
|
||||
os.replace(temp, compat / STATE)
|
||||
|
||||
|
||||
def apply(compat_path, app_id, selection=SELECTION, store=STORE):
|
||||
"""Brings the prefix in line with the game's picks. Returns (overrides, notes)."""
|
||||
compat = Path(compat_path)
|
||||
pfx = compat / "pfx"
|
||||
ids = wanted(app_id, selection)
|
||||
state = load_state(compat)
|
||||
if not ids and not state["files"]:
|
||||
return [], []
|
||||
notes, overrides, keep = [], [], {}
|
||||
copied = 0
|
||||
installed = []
|
||||
for cid in expand(store, ids):
|
||||
found = component(store, cid)
|
||||
if found is None:
|
||||
notes.append("%s is not installed; skipped" % cid)
|
||||
continue
|
||||
installed.append(cid)
|
||||
names, files, _ = found
|
||||
overrides += names
|
||||
for rel, src in files:
|
||||
# A file this prefix already has from us is ours to replace; anything else is kept.
|
||||
if place(src, pfx / rel, None if rel in state["files"] else compat / BACKUP / rel):
|
||||
copied += 1
|
||||
keep[rel] = cid
|
||||
removed = restored = 0
|
||||
for rel, cid in state["files"].items():
|
||||
if rel in keep:
|
||||
continue
|
||||
path = existing(pfx / rel)
|
||||
saved = compat / BACKUP / rel
|
||||
if saved.is_file():
|
||||
target = path or (pfx / rel)
|
||||
os.replace(saved, target)
|
||||
restored += 1
|
||||
elif path is not None and not path.is_symlink():
|
||||
path.unlink()
|
||||
removed += 1
|
||||
if removed:
|
||||
# Proton refreshes its builtins only when its config changes; forgetting the config puts
|
||||
# its own DLLs back where ours were on the next launch - this one.
|
||||
try:
|
||||
(compat / "config_info").unlink()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
compat.mkdir(parents=True, exist_ok=True)
|
||||
save_state(compat, {"files": keep, "components": installed})
|
||||
if copied or removed or restored:
|
||||
note = "components %s: %d file(s) placed, %d removed" % (",".join(ids) or "none", copied, removed)
|
||||
notes.append(note + (", %d put back as they were" % restored if restored else ""))
|
||||
return overrides, notes
|
||||
|
||||
|
||||
def overrides_value(names):
|
||||
"""WINEDLLOVERRIDES entries: native-then-builtin unless the component says otherwise; the last word on a DLL wins."""
|
||||
modes = {}
|
||||
for entry in names:
|
||||
name, _, mode = entry.partition("=")
|
||||
name = name.strip().lower()
|
||||
if name and re.fullmatch(r"[a-z0-9._-]+", name) and re.fullmatch(r"[nb,]*", mode):
|
||||
modes.pop(name, None)
|
||||
modes[name] = mode if "=" in entry else "n,b"
|
||||
return ";".join("%s=%s" % item for item in modes.items())
|
||||
|
||||
|
||||
def main():
|
||||
# droiddeck-wincomponents <compatdata dir> <appid>: what a launch would do, for a shell.
|
||||
if len(sys.argv) != 3:
|
||||
print("usage: droiddeck-wincomponents <compatdata dir> <appid>", file=sys.stderr)
|
||||
return 2
|
||||
names, notes = apply(sys.argv[1], sys.argv[2])
|
||||
for note in notes:
|
||||
print(note)
|
||||
print("WINEDLLOVERRIDES=" + overrides_value(names))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
+119
-15
@@ -12,13 +12,29 @@
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define MAX_HANDLES 4096
|
||||
|
||||
/* DRM_IOCTL_GEM_CLOSE from drm.h: _IOW('d', 0x09, struct drm_gem_close { u32 handle, pad; }). */
|
||||
struct gem_close {
|
||||
uint32_t handle;
|
||||
uint32_t pad;
|
||||
};
|
||||
#define GEM_CLOSE _IOW('d', 0x09, struct gem_close)
|
||||
|
||||
struct handle_entry {
|
||||
uint32_t handle;
|
||||
int dma_fd;
|
||||
int drm_fd;
|
||||
};
|
||||
|
||||
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int handle_fds[MAX_HANDLES];
|
||||
static struct handle_entry handle_entries[MAX_HANDLES];
|
||||
static uint32_t next_handle = 1;
|
||||
static dev_t kgsl_dev;
|
||||
static int kgsl_state; /* 0 unknown, 1 known, -1 absent */
|
||||
|
||||
@@ -41,6 +57,58 @@ static void *real(const char *name) {
|
||||
return fn;
|
||||
}
|
||||
|
||||
static int same_file_description(int a, int b) {
|
||||
if (a == b) {
|
||||
return 1;
|
||||
}
|
||||
#ifdef SYS_kcmp
|
||||
int saved_errno = errno;
|
||||
long ret = syscall(SYS_kcmp, getpid(), getpid(), 0 /* KCMP_FILE */, a, b);
|
||||
errno = saved_errno;
|
||||
return ret == 0;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int find_handle_locked(int fd, uint32_t handle) {
|
||||
for (int i = 0; i < MAX_HANDLES; i++) {
|
||||
if (handle_entries[i].handle == handle &&
|
||||
same_file_description(handle_entries[i].drm_fd, fd)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* The old table used its slot index as the public handle. Once #275 started freeing slots,
|
||||
* rapidly recreated swapchains immediately reused those numbers. Keep storage slots reusable but
|
||||
* make the public token monotonic so a stale handle can fail instead of aliasing a newer buffer.
|
||||
*/
|
||||
static uint32_t alloc_handle_locked(void) {
|
||||
for (int tries = 0; tries <= MAX_HANDLES; tries++) {
|
||||
uint32_t candidate = next_handle++;
|
||||
if (next_handle == 0) {
|
||||
next_handle = 1;
|
||||
}
|
||||
if (candidate == 0) {
|
||||
continue;
|
||||
}
|
||||
int used = 0;
|
||||
for (int i = 0; i < MAX_HANDLES; i++) {
|
||||
if (handle_entries[i].handle == candidate) {
|
||||
used = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!used) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle) {
|
||||
if (!is_kgsl(fd)) {
|
||||
int (*fn)(int, int, uint32_t *) = (int (*)(int, int, uint32_t *)) real("drmPrimeFDToHandle");
|
||||
@@ -52,10 +120,16 @@ int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle) {
|
||||
}
|
||||
int ret = -ENOMEM;
|
||||
pthread_mutex_lock(&lock);
|
||||
for (uint32_t i = 1; i < MAX_HANDLES; i++) {
|
||||
if (handle_fds[i] == 0) {
|
||||
handle_fds[i] = dup_fd;
|
||||
*handle = i;
|
||||
for (int i = 0; i < MAX_HANDLES; i++) {
|
||||
if (handle_entries[i].handle == 0) {
|
||||
uint32_t token = alloc_handle_locked();
|
||||
if (!token) {
|
||||
break;
|
||||
}
|
||||
handle_entries[i].handle = token;
|
||||
handle_entries[i].dma_fd = dup_fd;
|
||||
handle_entries[i].drm_fd = fd;
|
||||
*handle = token;
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
@@ -74,28 +148,58 @@ int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd) {
|
||||
}
|
||||
int ret = -EINVAL;
|
||||
pthread_mutex_lock(&lock);
|
||||
if (handle > 0 && handle < MAX_HANDLES && handle_fds[handle] > 0) {
|
||||
*prime_fd = fcntl(handle_fds[handle], F_DUPFD_CLOEXEC, 0);
|
||||
int index = find_handle_locked(fd, handle);
|
||||
if (index >= 0) {
|
||||
*prime_fd = fcntl(handle_entries[index].dma_fd, F_DUPFD_CLOEXEC, 0);
|
||||
ret = *prime_fd < 0 ? -errno : 0;
|
||||
}
|
||||
pthread_mutex_unlock(&lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Drops only a handle belonging to this KGSL file description. */
|
||||
static int release_handle(int fd, uint32_t handle) {
|
||||
int found = 0;
|
||||
pthread_mutex_lock(&lock);
|
||||
int index = find_handle_locked(fd, handle);
|
||||
if (index >= 0) {
|
||||
close(handle_entries[index].dma_fd);
|
||||
handle_entries[index] = (struct handle_entry){0};
|
||||
found = 1;
|
||||
}
|
||||
pthread_mutex_unlock(&lock);
|
||||
return found;
|
||||
}
|
||||
|
||||
int drmCloseBufferHandle(int fd, uint32_t handle) {
|
||||
if (!is_kgsl(fd)) {
|
||||
int (*fn)(int, uint32_t) = (int (*)(int, uint32_t)) real("drmCloseBufferHandle");
|
||||
return fn ? fn(fd, handle) : -ENOSYS;
|
||||
}
|
||||
int ret = -EINVAL;
|
||||
pthread_mutex_lock(&lock);
|
||||
if (handle > 0 && handle < MAX_HANDLES && handle_fds[handle] > 0) {
|
||||
close(handle_fds[handle]);
|
||||
handle_fds[handle] = 0;
|
||||
ret = 0;
|
||||
return release_handle(fd, handle) ? 0 : -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Zink gives its handles back with the GEM_CLOSE ioctl itself, not drmCloseBufferHandle
|
||||
* (zink_bo.c, bo_destroy). KGSL refuses the ioctl, so the duplicated descriptor stayed open and
|
||||
* kept the whole buffer alive. Preserve #275's reclamation without letting another KGSL file
|
||||
* description release the token or making a new buffer immediately inherit a retired token.
|
||||
*
|
||||
* Caught at ioctl() (netif.c), which libdrm's drmIoctl calls, rather than by exporting drmIoctl:
|
||||
* every session process preloads this library, and exporting drmIoctl from it brought on a
|
||||
* judder replaying old frames in No Man's Sky on an Adreno 840 even with no handle released.
|
||||
*/
|
||||
__attribute__((visibility("hidden"))) int bl_drm_gem_close(int fd, unsigned long request, void *arg, int *rc) {
|
||||
if (request != GEM_CLOSE || !arg || !is_kgsl(fd)) {
|
||||
return 0;
|
||||
}
|
||||
pthread_mutex_unlock(&lock);
|
||||
return ret;
|
||||
if (release_handle(fd, ((struct gem_close *) arg)->handle)) {
|
||||
*rc = 0;
|
||||
} else {
|
||||
errno = EINVAL;
|
||||
*rc = -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -353,6 +353,7 @@ void bl_kgsl_chip_id_fixup(unsigned long request, void *arg, int rc); /* kgslid.
|
||||
int bl_kgsl_poll(int (*real)(int, unsigned long, void *), int fd, unsigned long request,
|
||||
void *arg, int *rc) __attribute__((visibility("hidden")));
|
||||
int bl_ntsync_ioctl(int fd, unsigned long request, void *arg, int *rc) __attribute__((visibility("hidden")));
|
||||
int bl_drm_gem_close(int fd, unsigned long request, void *arg, int *rc) __attribute__((visibility("hidden")));
|
||||
|
||||
/* Every DRM and evdev call comes through here, so the lookup is done once. Two threads racing
|
||||
* to store it store the same pointer. */
|
||||
@@ -366,6 +367,7 @@ int ioctl(int fd, unsigned long request, ...) {
|
||||
|
||||
int rc;
|
||||
if (bl_ntsync_ioctl(fd, request, arg, &rc)) return rc;
|
||||
if (bl_drm_gem_close(fd, request, arg, &rc)) return rc;
|
||||
if (real == NULL) real = (ioctl_fn) dlsym(RTLD_NEXT, "ioctl");
|
||||
if (!bl_kgsl_poll(real, fd, request, arg, &rc)) rc = real(fd, request, arg);
|
||||
bl_kgsl_chip_id_fixup(request, arg, rc);
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
* libssbs.so - keep PSTATE.SSBS set across signal returns, without rebuilding Wine.
|
||||
*
|
||||
* Wine's arm64 signal code writes PSTATE back from a Windows CONTEXT, whose Cpsr never carries
|
||||
* SSBS (bit 12). Every signal return through that code (exception fixups, NtSetContextThread on
|
||||
* another thread, the SIGUSR2 suspend path) therefore resumes the thread with SSBS clear, so the
|
||||
* CPU runs it with speculative store bypass disabled - slower on cores such as Oryon.
|
||||
* force_ssbs.diff (Sonicadvance1, FEX) fixes this inside ntdll; this library does the same from
|
||||
* outside, for Protons that cannot be rebuilt: the Valve, GE and CachyOS ARM64 builds DroidDeck
|
||||
* runs, which come prebuilt from Steam. Same source as Bannerlator's adapter (bionic), built here
|
||||
* for glibc.
|
||||
*
|
||||
* How: interpose sigaction()/signal() via LD_PRELOAD. Every handler is installed behind one
|
||||
* SA_SIGINFO trampoline that calls the real handler and then sets SSBS in the ucontext it is
|
||||
* about to return through. The kernel accepts SSBS from userspace on sigreturn and context-
|
||||
* switches it per thread, so the bit sticks until the next sigreturn. Handlers that never return
|
||||
* (siglongjmp) are unaffected either way.
|
||||
*
|
||||
* Env:
|
||||
* SSBS_ADAPTER_DISABLE=1 pass everything through untouched.
|
||||
* SSBS_ADAPTER_OBSERVE=1 wrap and count, but leave SSBS as the handler left it (the baseline).
|
||||
* SSBS_ADAPTER_DEBUG=1 log to stderr (implied by OBSERVE):
|
||||
* - "returned with SSBS clear": a handler was about to resume a thread without SSBS.
|
||||
* - "arrived with SSBS clear": a thread was RUNNING without SSBS when a signal reached it.
|
||||
* Under the adapter this should stop after each thread's first fixed return; if it keeps
|
||||
* counting, something other than a signal return is clearing the bit.
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <stdatomic.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define PSTATE_SSBS 0x1000ULL
|
||||
#define MAX_SIG 65
|
||||
|
||||
typedef void (*sigact_fn)(int, siginfo_t *, void *);
|
||||
typedef void (*sighand_fn)(int);
|
||||
typedef int (*sigaction_fn)(int, const struct sigaction *, struct sigaction *);
|
||||
|
||||
/* Per signal: the handler the program asked for, and whether it wanted SA_SIGINFO. */
|
||||
static _Atomic(void *) real_handler[MAX_SIG];
|
||||
static atomic_bool real_siginfo[MAX_SIG];
|
||||
|
||||
static sigaction_fn next_sigaction;
|
||||
static int disabled;
|
||||
static int observe;
|
||||
static int debug;
|
||||
static atomic_ulong n_returns, n_fixed, n_arrived, n_arrived_clear;
|
||||
|
||||
static void init(void)
|
||||
{
|
||||
if (next_sigaction) return;
|
||||
next_sigaction = (sigaction_fn)dlsym(RTLD_NEXT, "sigaction");
|
||||
const char *e = getenv("SSBS_ADAPTER_DISABLE");
|
||||
disabled = e && *e == '1';
|
||||
e = getenv("SSBS_ADAPTER_OBSERVE");
|
||||
observe = e && *e == '1';
|
||||
e = getenv("SSBS_ADAPTER_DEBUG");
|
||||
debug = observe || (e && *e == '1');
|
||||
}
|
||||
|
||||
__attribute__((constructor)) static void ctor(void)
|
||||
{
|
||||
init();
|
||||
if (debug) fprintf(stderr, "libssbs: loaded (%s)\n", disabled ? "disabled" : observe ? "observing only" : "active");
|
||||
}
|
||||
|
||||
/* 1, 2, 4, 8, ...: enough lines to see a trend without flooding the log. */
|
||||
static int milestone(unsigned long n) { return (n & (n - 1)) == 0; }
|
||||
|
||||
static void trampoline(int sig, siginfo_t *info, void *uc_v)
|
||||
{
|
||||
ucontext_t *uc = uc_v;
|
||||
if (debug) {
|
||||
unsigned long a = atomic_fetch_add(&n_arrived, 1) + 1;
|
||||
if (!(uc->uc_mcontext.pstate & PSTATE_SSBS)) {
|
||||
unsigned long c = atomic_fetch_add(&n_arrived_clear, 1) + 1;
|
||||
if (milestone(c))
|
||||
fprintf(stderr, "libssbs: sig %d arrived with SSBS clear (%lu of %lu arrivals)\n", sig, c, a);
|
||||
}
|
||||
}
|
||||
void *h = atomic_load_explicit(&real_handler[sig], memory_order_acquire);
|
||||
if (h) {
|
||||
if (atomic_load_explicit(&real_siginfo[sig], memory_order_relaxed))
|
||||
((sigact_fn)h)(sig, info, uc_v);
|
||||
else
|
||||
((sighand_fn)h)(sig);
|
||||
}
|
||||
if (debug) {
|
||||
unsigned long r = atomic_fetch_add(&n_returns, 1) + 1;
|
||||
if (!(uc->uc_mcontext.pstate & PSTATE_SSBS)) {
|
||||
unsigned long f = atomic_fetch_add(&n_fixed, 1) + 1;
|
||||
if (milestone(f))
|
||||
fprintf(stderr, "libssbs: sig %d returned with SSBS clear, %s (%lu of %lu returns)\n",
|
||||
sig, observe ? "left as is" : "set it", f, r);
|
||||
}
|
||||
}
|
||||
if (!observe) uc->uc_mcontext.pstate |= PSTATE_SSBS;
|
||||
}
|
||||
|
||||
static int wrapped(void *h)
|
||||
{
|
||||
return h != (void *)SIG_DFL && h != (void *)SIG_IGN && h != (void *)SIG_ERR;
|
||||
}
|
||||
|
||||
int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact)
|
||||
{
|
||||
init();
|
||||
if (disabled || sig <= 0 || sig >= MAX_SIG)
|
||||
return next_sigaction(sig, act, oldact);
|
||||
|
||||
struct sigaction mine;
|
||||
const struct sigaction *pass = act;
|
||||
void *new_h = NULL;
|
||||
int new_info = 0;
|
||||
if (act) {
|
||||
new_info = (act->sa_flags & SA_SIGINFO) != 0;
|
||||
new_h = new_info ? (void *)act->sa_sigaction : (void *)act->sa_handler;
|
||||
if (wrapped(new_h)) {
|
||||
mine = *act;
|
||||
mine.sa_flags |= SA_SIGINFO;
|
||||
mine.sa_sigaction = trampoline;
|
||||
pass = &mine;
|
||||
}
|
||||
}
|
||||
|
||||
void *prev_h = atomic_load(&real_handler[sig]);
|
||||
int prev_info = atomic_load(&real_siginfo[sig]);
|
||||
/* Publish before installing so the trampoline never runs with a stale handler. */
|
||||
if (act && wrapped(new_h)) {
|
||||
atomic_store(&real_siginfo[sig], new_info);
|
||||
atomic_store_explicit(&real_handler[sig], new_h, memory_order_release);
|
||||
}
|
||||
|
||||
int ret = next_sigaction(sig, pass, oldact);
|
||||
if (ret != 0 && act && wrapped(new_h)) {
|
||||
atomic_store(&real_siginfo[sig], prev_info);
|
||||
atomic_store(&real_handler[sig], prev_h);
|
||||
}
|
||||
|
||||
/* Report the caller's own handler, not the trampoline, so handler chaining keeps working. */
|
||||
if (ret == 0 && oldact && oldact->sa_sigaction == trampoline && prev_h) {
|
||||
if (prev_info) {
|
||||
oldact->sa_sigaction = (sigact_fn)prev_h;
|
||||
} else {
|
||||
oldact->sa_flags &= ~SA_SIGINFO;
|
||||
oldact->sa_handler = (sighand_fn)prev_h;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
sighandler_t signal(int sig, sighandler_t handler)
|
||||
{
|
||||
struct sigaction sa, old;
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sa_handler = handler;
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
if (sigaction(sig, &sa, &old) != 0) return SIG_ERR;
|
||||
return (old.sa_flags & SA_SIGINFO) ? (sighandler_t)(void *)old.sa_sigaction : old.sa_handler;
|
||||
}
|
||||
|
||||
sighandler_t bsd_signal(int sig, sighandler_t handler) { return signal(sig, handler); }
|
||||
|
||||
/* glibc's System V flavour: a one-shot handler with no restart. */
|
||||
sighandler_t sysv_signal(int sig, sighandler_t handler)
|
||||
{
|
||||
struct sigaction sa, old;
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sa_handler = handler;
|
||||
sa.sa_flags = SA_RESETHAND | SA_NODEFER;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
if (sigaction(sig, &sa, &old) != 0) return SIG_ERR;
|
||||
return (old.sa_flags & SA_SIGINFO) ? (sighandler_t)(void *)old.sa_sigaction : old.sa_handler;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ if [ "$pkg" = "$P" ]; then
|
||||
else
|
||||
python3 "$here/axml_rename.py" "$in" "$work/renamed.apk" \
|
||||
"$P=$pkg" "$P.androidx-startup=$pkg.androidx-startup" "$P.logs=$pkg.logs" \
|
||||
"$P.documents=$pkg.documents" "$P.home=$pkg.home" \
|
||||
"$P.documents=$pkg.documents" "$P.home=$pkg.home" "$P.agent=$pkg.agent" \
|
||||
"$P.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION=$pkg.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
|
||||
fi
|
||||
got=$("$BUILD_TOOLS/aapt" dump badging "$work/renamed.apk" | sed -n "s/^package: name='\([^']*\)'.*/\1/p")
|
||||
|
||||
@@ -26,6 +26,25 @@ def config_text(entries):
|
||||
|
||||
|
||||
class GameEnvironmentTest(unittest.TestCase):
|
||||
def test_the_install_script_evaluator_gets_its_scripts_marked_first(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
root = Path(tmp)
|
||||
script = root / "legacycompat/evaluatorscript_409710.vdf"
|
||||
script.parent.mkdir(parents=True)
|
||||
script.write_text("{}")
|
||||
calls = []
|
||||
run = MODULE["mark_install_scripts"].__globals__["subprocess"].run
|
||||
MODULE["mark_install_scripts"].__globals__["subprocess"].run = lambda args, **kw: calls.append((args, kw["env"]))
|
||||
try:
|
||||
env = {"STEAM_COMPAT_CLIENT_INSTALL_PATH": str(root)}
|
||||
MODULE["mark_install_scripts"](["/proton", "run", str(root / "legacycompat/iscriptevaluator.exe"), "legacycompat\\evaluatorscript_409710.vdf"], env)
|
||||
MODULE["mark_install_scripts"](["/proton", "waitforexitandrun", "/game/Game.exe"], env)
|
||||
finally:
|
||||
MODULE["mark_install_scripts"].__globals__["subprocess"].run = run
|
||||
self.assertEqual(len(calls), 1)
|
||||
self.assertEqual(calls[0][0][1], str(root))
|
||||
self.assertEqual(calls[0][1]["DROIDDECK_SEED_SCRIPTS"], str(script))
|
||||
|
||||
def test_profile_precedence_and_unset(self):
|
||||
env = {"KEEP": "inherited", "REMOVE": "inherited", "CUSTOM": "launch option"}
|
||||
config = {"version": 1, "shared": {"CUSTOM": "shared"}, "games": {"42": {"REMOVE": None, "CUSTOM": "game", "EMPTY": ""}}}
|
||||
@@ -461,3 +480,27 @@ class DirectAudioPrefixTest(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
class ForceSsbsTest(unittest.TestCase):
|
||||
def test_libssbs_is_preloaded_only_when_asked_and_only_into_arm64_proton(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
arm = Path(tmp) / "arm"
|
||||
(arm / "files/lib/wine/aarch64-unix").mkdir(parents=True)
|
||||
x86 = Path(tmp) / "x86"
|
||||
(x86 / "files/lib/wine/x86_64-unix").mkdir(parents=True)
|
||||
lib = Path(tmp) / "libssbs.so"
|
||||
lib.write_bytes(b"\x7fELF")
|
||||
g = MODULE["force_ssbs"].__globals__
|
||||
old = g["SSBS_LIB"]
|
||||
g["SSBS_LIB"] = str(lib)
|
||||
try:
|
||||
env = {"LD_PRELOAD": "/usr/local/lib/libblsession.so"}
|
||||
self.assertEqual(MODULE["force_ssbs"]([str(arm / "proton"), "waitforexitandrun"], env), env)
|
||||
on = dict(env, DROIDDECK_FORCE_SSBS="1")
|
||||
got = MODULE["force_ssbs"]([str(arm / "proton"), "waitforexitandrun"], on)
|
||||
self.assertEqual(got["LD_PRELOAD"], "/usr/local/lib/libblsession.so:" + str(lib))
|
||||
self.assertEqual(MODULE["force_ssbs"]([str(arm / "proton")], got)["LD_PRELOAD"], got["LD_PRELOAD"])
|
||||
self.assertEqual(MODULE["force_ssbs"]([str(x86 / "proton")], on), on)
|
||||
finally:
|
||||
g["SSBS_LIB"] = old
|
||||
@@ -117,6 +117,97 @@ class SleepHandshakeTest(unittest.TestCase):
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.assertFalse(self.preparing())
|
||||
|
||||
def test_legacy_upower_suspend_uses_the_same_wake_handshake(self):
|
||||
self.bus.call_sync("org.freedesktop.UPower", "/org/freedesktop/UPower",
|
||||
"org.freedesktop.UPower", "Suspend", None, None,
|
||||
Gio.DBusCallFlags.NONE, 2000, None)
|
||||
self.wait_for(lambda: (self.dir / "steam-sleep").exists())
|
||||
self.wait_for(lambda: self.signals == [True])
|
||||
token = (self.dir / "steam-sleep").read_text().strip()
|
||||
self.assertTrue(self.preparing())
|
||||
self.state(token, "awake")
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.assertFalse(self.preparing())
|
||||
|
||||
def request_wake(self):
|
||||
staged = self.dir / "steam-wake.tmp"
|
||||
staged.write_text("wake\n")
|
||||
staged.replace(self.dir / "steam-wake")
|
||||
|
||||
def request_native(self, token="1" * 32):
|
||||
staged = self.dir / "steam-native-sleep.tmp"
|
||||
staged.write_text(token + "\n")
|
||||
staged.replace(self.dir / "steam-native-sleep")
|
||||
return token
|
||||
|
||||
def test_native_sleep_prepares_before_host_can_freeze(self):
|
||||
started = time.monotonic()
|
||||
token = self.request_native()
|
||||
self.wait_for(lambda: self.signals == [True])
|
||||
self.assertTrue(self.preparing())
|
||||
self.assertFalse((self.dir / "steam-native-ready").exists())
|
||||
self.assertFalse((self.dir / "steam-sleep").exists())
|
||||
self.wait_for(lambda: (self.dir / "steam-native-ready").exists())
|
||||
self.assertGreaterEqual(time.monotonic() - started, 1.4)
|
||||
self.assertEqual((self.dir / "steam-native-ready").read_text().strip(), token)
|
||||
self.state(token, "paused")
|
||||
self.state(token, "awake")
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.assertFalse(self.preparing())
|
||||
|
||||
def test_return_during_native_preparation_cancels_late_pause(self):
|
||||
token = self.request_native()
|
||||
self.wait_for(lambda: self.signals == [True])
|
||||
self.state(token, "awake")
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
time.sleep(1.7)
|
||||
self.assertFalse((self.dir / "steam-native-ready").exists())
|
||||
self.assertFalse(self.preparing())
|
||||
|
||||
def test_native_request_cancelled_before_helper_reads_it(self):
|
||||
os.kill(self.process.pid, signal.SIGSTOP)
|
||||
token = self.request_native()
|
||||
self.state(token, "awake")
|
||||
os.kill(self.process.pid, signal.SIGCONT)
|
||||
self.wait_for(lambda: not (self.dir / "steam-native-sleep").exists())
|
||||
time.sleep(1.7)
|
||||
self.assertFalse((self.dir / "steam-native-ready").exists())
|
||||
self.assertFalse(self.preparing())
|
||||
self.assertEqual(self.signals, [])
|
||||
|
||||
def test_second_native_sleep_cannot_receive_first_preparation_callback(self):
|
||||
first = self.request_native()
|
||||
self.wait_for(lambda: self.signals == [True])
|
||||
self.state(first, "awake")
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.signals.clear()
|
||||
second = self.request_native("2" * 32)
|
||||
self.wait_for(lambda: (self.dir / "steam-native-ready").exists())
|
||||
self.assertEqual((self.dir / "steam-native-ready").read_text().strip(), second)
|
||||
self.state(second, "awake")
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
|
||||
def test_native_sleep_with_missing_host_recovers(self):
|
||||
self.request_native()
|
||||
self.wait_for(lambda: self.signals == [True, False], timeout=9)
|
||||
self.assertFalse(self.preparing())
|
||||
self.assertFalse((self.dir / "steam-native-ready").exists())
|
||||
|
||||
def test_host_resume_recovers_without_a_sleep_request(self):
|
||||
self.assertFalse(self.preparing())
|
||||
self.request_wake()
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.assertFalse((self.dir / "steam-wake").exists())
|
||||
|
||||
def test_host_wake_survives_frozen_service(self):
|
||||
token = self.suspend()
|
||||
self.state(token, "paused")
|
||||
os.kill(self.process.pid, signal.SIGSTOP)
|
||||
self.request_wake()
|
||||
os.kill(self.process.pid, signal.SIGCONT)
|
||||
self.wait_for(lambda: self.signals == [True, False])
|
||||
self.assertFalse(self.preparing())
|
||||
|
||||
def test_failed_pause_recovers_and_duplicate_is_rejected(self):
|
||||
token = self.suspend()
|
||||
with self.assertRaises(GLib.Error):
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin/droiddeck-seed-redists"
|
||||
|
||||
GAME_SCRIPT = r'''"InstallScript"
|
||||
{
|
||||
"Run Process"
|
||||
{
|
||||
"VCRedist2022"
|
||||
{
|
||||
"HasRunKey" "HKEY_LOCAL_MACHINE\\Software\\Valve\\Steam\\Apps\\CommonRedist\\vcredist\\2022"
|
||||
"process 1" "%INSTALLDIR%\\_CommonRedist\\vcredist\\2022\\VC_redist.x64.exe"
|
||||
"command 1" "/q /norestart"
|
||||
"NoCleanUp" "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
'''
|
||||
|
||||
|
||||
class SeedRedistsTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tmp = Path(tempfile.mkdtemp())
|
||||
self.addCleanup(shutil.rmtree, self.tmp, True)
|
||||
self.steam = self.tmp / "Steam"
|
||||
self.reg = self.steam / "steamapps/compatdata/1234/pfx/system.reg"
|
||||
self.reg.parent.mkdir(parents=True)
|
||||
self.reg.write_text("WINE REGISTRY Version 2\n")
|
||||
|
||||
def game(self, name="Some Game", script=GAME_SCRIPT, library=None):
|
||||
root = Path(library or self.steam)
|
||||
path = root / "steamapps/common" / name / "_CommonRedist/vcredist/2022/installscript.vdf"
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(script)
|
||||
manifest = root / "steamapps" / ("appmanifest_%d.acf" % (abs(hash(name)) % 100000))
|
||||
manifest.write_text('"AppState" { "installdir" "%s" }' % name)
|
||||
return path
|
||||
|
||||
def run_seed(self, libraries=""):
|
||||
env = dict(os.environ, DROIDDECK_LIBRARIES=libraries)
|
||||
return subprocess.run(["bash", str(SCRIPT), str(self.steam)], env=env, capture_output=True, text=True, check=True)
|
||||
|
||||
def test_a_games_own_install_script_is_marked_as_run(self):
|
||||
self.game()
|
||||
self.run_seed()
|
||||
reg = self.reg.read_text()
|
||||
self.assertIn("[Software\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\vcredist\\\\2022]", reg)
|
||||
self.assertIn("[Software\\\\Wow6432Node\\\\Valve\\\\Steam\\\\Apps\\\\CommonRedist\\\\vcredist\\\\2022]", reg)
|
||||
self.assertIn('"VCRedist2022"=dword:00000001', reg)
|
||||
|
||||
def test_games_in_other_libraries_are_read(self):
|
||||
sd = self.tmp / "sd"
|
||||
self.game(library=sd)
|
||||
self.run_seed(str(sd))
|
||||
self.assertIn('"VCRedist2022"=dword:00000001', self.reg.read_text())
|
||||
|
||||
def test_the_vc_runtime_is_recorded_for_every_architecture_and_view(self):
|
||||
self.run_seed()
|
||||
reg = self.reg.read_text()
|
||||
for view in ("Software", "Software\\\\Wow6432Node"):
|
||||
for arch in ("x86", "x64", "arm64"):
|
||||
self.assertIn("[%s\\\\Microsoft\\\\VisualStudio\\\\14.0\\\\VC\\\\Runtimes\\\\%s]" % (view, arch), reg)
|
||||
self.assertIn('"Installed"=dword:00000001', reg)
|
||||
self.assertIn('"Major"=dword:0000000e', reg)
|
||||
self.assertIn('"Version"="v14.51.36247.00"', reg)
|
||||
|
||||
def test_a_seeded_prefix_is_left_alone_until_a_game_changes(self):
|
||||
self.run_seed()
|
||||
once = self.reg.read_text()
|
||||
self.run_seed()
|
||||
self.assertEqual(once, self.reg.read_text())
|
||||
self.game()
|
||||
self.run_seed()
|
||||
self.assertIn('"VCRedist2022"=dword:00000001', self.reg.read_text())
|
||||
|
||||
def test_an_evaluator_script_nested_deeper_is_read(self):
|
||||
script = self.tmp / "legacycompat/evaluatorscript_409710.vdf"
|
||||
script.parent.mkdir(parents=True)
|
||||
script.write_text('"evaluatorscript"\n{\n\t"1"\n' + "\n".join("\t" + line for line in GAME_SCRIPT.replace("VCRedist2022", "x64 14.99.1.0").splitlines()) + "\n}\n")
|
||||
env = dict(os.environ, DROIDDECK_LIBRARIES="", DROIDDECK_SEED_SCRIPTS=str(script))
|
||||
subprocess.run(["bash", str(SCRIPT), str(self.steam)], env=env, capture_output=True, text=True, check=True)
|
||||
self.assertIn('"x64 14.99.1.0"=dword:00000001', self.reg.read_text())
|
||||
|
||||
def test_the_prefix_date_is_kept(self):
|
||||
os.utime(self.reg, (1_000_000_000, 1_000_000_000))
|
||||
self.run_seed()
|
||||
self.assertEqual(int(self.reg.stat().st_mtime), 1_000_000_000)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -0,0 +1,170 @@
|
||||
import json
|
||||
import os
|
||||
import runpy
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
BIN = Path(__file__).resolve().parents[1] / "linuxfs/overlay/usr/local/bin"
|
||||
MODULE = runpy.run_path(str(BIN / "droiddeck-wincomponents"))
|
||||
GAME_ENV = runpy.run_path(str(BIN / "droiddeck-game-env"))
|
||||
|
||||
|
||||
class WinComponentsTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
root = Path(self.tmp.name)
|
||||
self.store = root / "store"
|
||||
self.compat = root / "compatdata/2571976725"
|
||||
self.selection = root / "wincomponents.json"
|
||||
self.pfx = self.compat / "pfx/drive_c/windows"
|
||||
|
||||
def tearDown(self):
|
||||
self.tmp.cleanup()
|
||||
|
||||
def component(self, cid, overrides, files):
|
||||
folder = self.store / cid
|
||||
for rel, data in files.items():
|
||||
path = folder / rel
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_bytes(data)
|
||||
(folder / "component.json").write_text(json.dumps({"id": cid, "overrides": overrides}))
|
||||
|
||||
def pick(self, *ids):
|
||||
self.selection.write_text(json.dumps({"version": 1, "games": {"2571976725": list(ids)}}))
|
||||
|
||||
def apply(self):
|
||||
return MODULE["apply"](self.compat, "2571976725", self.selection, self.store)
|
||||
|
||||
def test_places_files_before_the_prefix_exists_and_returns_overrides(self):
|
||||
self.component("openal", ["openal32"], {"syswow64/OpenAL32.dll": b"x86", "system32/OpenAL32.dll": b"x64"})
|
||||
self.pick("openal")
|
||||
names, notes = self.apply()
|
||||
self.assertEqual(names, ["openal32"])
|
||||
self.assertEqual((self.pfx / "syswow64/openal32.dll").read_bytes(), b"x86")
|
||||
self.assertEqual((self.pfx / "system32/openal32.dll").read_bytes(), b"x64")
|
||||
self.assertIn("2 file(s) placed", notes[-1])
|
||||
self.assertEqual(MODULE["overrides_value"](names + names), "openal32=n,b")
|
||||
|
||||
def test_second_launch_copies_nothing(self):
|
||||
self.component("openal", ["openal32"], {"syswow64/OpenAL32.dll": b"x86"})
|
||||
self.pick("openal")
|
||||
self.apply()
|
||||
_, notes = self.apply()
|
||||
self.assertEqual(notes, [])
|
||||
|
||||
def test_replaces_a_proton_builtin_symlink_and_keeps_the_prefix_spelling(self):
|
||||
self.component("xaudio", ["xaudio2_7"], {"syswow64/xaudio2_7.dll": b"native"})
|
||||
builtin = Path(self.tmp.name) / "proton/lib/wine/i386-windows/xaudio2_7.dll"
|
||||
builtin.parent.mkdir(parents=True)
|
||||
builtin.write_bytes(b"builtin")
|
||||
(self.pfx / "syswow64").mkdir(parents=True)
|
||||
(self.pfx / "syswow64/XAudio2_7.dll").symlink_to(builtin)
|
||||
self.pick("xaudio")
|
||||
self.apply()
|
||||
placed = self.pfx / "syswow64/XAudio2_7.dll"
|
||||
self.assertFalse(placed.is_symlink())
|
||||
self.assertEqual(placed.read_bytes(), b"native")
|
||||
self.assertEqual(builtin.read_bytes(), b"builtin")
|
||||
self.assertEqual(os.listdir(self.pfx / "syswow64"), ["XAudio2_7.dll"])
|
||||
|
||||
def test_restores_a_file_an_older_proton_deleted(self):
|
||||
self.component("openal", ["openal32"], {"syswow64/OpenAL32.dll": b"x86"})
|
||||
self.pick("openal")
|
||||
self.apply()
|
||||
(self.pfx / "syswow64/openal32.dll").unlink()
|
||||
_, notes = self.apply()
|
||||
self.assertTrue((self.pfx / "syswow64/openal32.dll").is_file())
|
||||
self.assertIn("1 file(s) placed", notes[-1])
|
||||
|
||||
def test_turning_a_component_off_removes_its_files_and_forgets_protons_config(self):
|
||||
self.component("openal", ["openal32"], {"syswow64/OpenAL32.dll": b"x86"})
|
||||
self.pick("openal")
|
||||
self.apply()
|
||||
(self.compat / "config_info").write_text("cached")
|
||||
self.pick()
|
||||
names, notes = self.apply()
|
||||
self.assertEqual(names, [])
|
||||
self.assertFalse((self.pfx / "syswow64/openal32.dll").exists())
|
||||
self.assertFalse((self.compat / "config_info").exists())
|
||||
self.assertIn("1 removed", notes[-1])
|
||||
|
||||
def test_a_file_of_someone_elses_is_kept_and_put_back_when_turned_off(self):
|
||||
self.component("vc", ["msvcp100"], {"syswow64/msvcp100.dll": b"ours"})
|
||||
installer = self.pfx / "syswow64/MSVCP100.dll"
|
||||
installer.parent.mkdir(parents=True)
|
||||
installer.write_bytes(b"from a real installer")
|
||||
self.pick("vc")
|
||||
self.apply()
|
||||
self.assertEqual(installer.read_bytes(), b"ours")
|
||||
self.apply() # a second launch keeps the first backup, not ours
|
||||
self.pick()
|
||||
names, notes = self.apply()
|
||||
self.assertEqual(installer.read_bytes(), b"from a real installer")
|
||||
self.assertIn("1 put back as they were", notes[-1])
|
||||
self.assertFalse((self.compat / ".droiddeck-wincomponents-backup/drive_c/windows/syswow64/msvcp100.dll").exists())
|
||||
|
||||
def test_protons_own_dlls_and_our_earlier_copy_get_no_backup(self):
|
||||
self.component("vc", ["msvcp100"], {"syswow64/msvcp100.dll": b"ours v1", "system32/msvcp100.dll": b"ours 64"})
|
||||
builtin = self.pfx / "system32/msvcp100.dll"
|
||||
builtin.parent.mkdir(parents=True)
|
||||
builtin.write_bytes(b"MZ" + b"\0" * 62 + b"Wine builtin DLL")
|
||||
self.pick("vc")
|
||||
self.apply()
|
||||
(self.store / "vc/syswow64/msvcp100.dll").write_bytes(b"ours v2")
|
||||
os.utime(self.store / "vc/syswow64/msvcp100.dll", (1, 1))
|
||||
self.apply()
|
||||
self.assertFalse((self.compat / ".droiddeck-wincomponents-backup").exists())
|
||||
|
||||
def test_missing_component_is_skipped(self):
|
||||
self.pick("physx")
|
||||
names, notes = self.apply()
|
||||
self.assertEqual(names, [])
|
||||
self.assertEqual(notes, ["physx is not installed; skipped"])
|
||||
|
||||
def test_no_selection_touches_nothing(self):
|
||||
self.assertEqual(self.apply(), ([], []))
|
||||
self.assertFalse(self.compat.exists())
|
||||
|
||||
def test_bad_selection_is_refused(self):
|
||||
self.selection.write_text(json.dumps({"version": 1, "games": {"2571976725": ["a/../etc"]}}))
|
||||
with self.assertRaises(ValueError):
|
||||
self.apply()
|
||||
|
||||
def test_game_env_puts_component_overrides_before_the_games_own(self):
|
||||
self.component("openal", ["openal32"], {"syswow64/OpenAL32.dll": b"x86"})
|
||||
self.pick("openal")
|
||||
globals_ = GAME_ENV["win_components"].__globals__
|
||||
real = runpy.run_path(str(BIN / "droiddeck-wincomponents"))
|
||||
real["apply"].__defaults__ = (self.selection, self.store)
|
||||
with mock.patch.dict(globals_, {"runpy": mock.Mock(run_path=lambda _path: real)}):
|
||||
self.assertEqual(GAME_ENV["win_components"](str(self.compat) + "/", "2571976725"), "openal32=n,b")
|
||||
self.assertEqual(GAME_ENV["win_components"]("", "2571976725"), "")
|
||||
|
||||
def test_bundle_brings_its_parts_and_catalog_names_with_dots_work(self):
|
||||
self.component("dmband", ["dmband"], {"syswow64/dmband.dll": b"band"})
|
||||
self.component("dsound", ["dsound=n"], {"syswow64/dsound.dll": b"ds"})
|
||||
meta = self.store / "directmusic"
|
||||
meta.mkdir(parents=True)
|
||||
(meta / "component.json").write_text(json.dumps({"id": "directmusic", "overrides": [], "requires": ["dmband", "dsound"]}))
|
||||
self.component("xaudio2.7", ["xaudio2_7"], {"system32/xaudio2_7.dll": b"xa"})
|
||||
self.pick("directmusic", "xaudio2.7")
|
||||
names, _ = self.apply()
|
||||
self.assertEqual(MODULE["overrides_value"](names), "dmband=n,b;dsound=n;xaudio2_7=n,b")
|
||||
self.assertEqual((self.pfx / "syswow64/dmband.dll").read_bytes(), b"band")
|
||||
self.assertEqual(json.loads((self.compat / ".droiddeck-wincomponents.json").read_text())["components"],
|
||||
["dmband", "dsound", "directmusic", "xaudio2.7"])
|
||||
|
||||
def test_files_one_level_down_are_placed(self):
|
||||
self.component("gmdls", [], {"system32/drivers/GM.DLS": b"dls"})
|
||||
self.pick("gmdls")
|
||||
self.apply()
|
||||
self.assertEqual((self.pfx / "system32/drivers/gm.dls").read_bytes(), b"dls")
|
||||
|
||||
def test_overrides_value_last_word_wins_and_refuses_junk(self):
|
||||
self.assertEqual(MODULE["overrides_value"](["a", "b=n", "a=b", "bad;name", "c=x"]), "b=n;a=b")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user