mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
Ports the Windows x64 bridge DLLs of michaelisomer-cyber/Winlator-NeuralScale (a0ab6b0f, GPL-3.0) to tools/upscale/bridges. They replace a game's nvngx, nvapi64, FidelityFX, FSR 2/3 and XeSS DLLs inside Wine and hand each frame to the Android Vulkan layer through the unchanged fsr4_seam_proto.h buffers. - build.sh builds the 12 DLLs with MinGW-w64 GCC, deterministically, checks each export table against its .def and stamps them as Wine builtins (winebuild --builtin signature at 0x40), into x86_64-windows/ and aarch64-windows/. - CI: recipe upscale-bridges into linuxfs/usr/local/lib/droiddeck-upscale/bridges, kept out of the APK and shipped as the upscale add-on pack, like dirt. - D3D11 NGX now reports DLSS unavailable instead of succeeding and rendering nothing. - The nvapi64 signature hooks run only with DROIDDECK_UPSCALE_SIGFIX=1, logging only with DROIDDECK_UPSCALE_LOG=1; DROIDDECK_UPSCALE_* variables are read before the fork's WINLATOR_FSR4_* names.
21 lines
612 B
C
21 lines
612 B
C
// DroidDeck: environment lookups shared by the upscale bridges.
|
|
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
// Copies the first variable in the NULL-terminated list that is set and fits into buf.
|
|
static DWORD dd_env_first(const char *const *names, char *buf, DWORD size) {
|
|
for (; *names; names++) {
|
|
DWORD n = GetEnvironmentVariableA(*names, buf, size);
|
|
if (n > 0 && n < size) return n;
|
|
}
|
|
if (size) buf[0] = '\0';
|
|
return 0;
|
|
}
|
|
|
|
static int dd_env_is_on(const char *name) {
|
|
char buf[8];
|
|
DWORD n = GetEnvironmentVariableA(name, buf, sizeof buf);
|
|
return n == 1 && buf[0] == '1';
|
|
}
|