mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-02 20:21:59 -05:00
DroidDeck-Bionic: a Steam compatibility tool that runs the game itself on Android's libc (bionic) instead of glibc inside proot. Steam, the stores and the session stay on DroidDeck's Linux side; only the game process leaves proot. - Listed in the Proton list only when Run without proot is on, in its own row. Its builds are pre-releases on Droid-Deck/DroidDeck-Proton (DroidDeck-Bionic-12.8-rNN, runtime built by .github/workflows/build-bionic-runtime.yml from tools/bionic-runtime); the app installs and updates them like the other extra tools and never makes one the default unless the user picks it. - With proot on, a launch sent to a bionic tool goes to the newest DroidDeck-Proton (picks stay as set). - ProtonExtras / ProtonMenu / ExperimentalProtons / droiddeck-proton-extra: bionic pre-releases checked and listed only without proot; updates carry the default and per-game picks over; deleting a tool never follows links out of it. ProtonDefault: picks left on an older bionic build move to the installed one. - Components: FEX builds for bionic (bionic-stable on DroidDeck-Components); each tool is offered only the FEX builds that fit it. - Session logs: the bionic game log and its graphics logs are part of Share logs. Synced with main twice before the merge (latest syncfbed69ceon main 67b82ad9; Build APK and validation green); a local trial merge on main3e1fc3e6had no conflicts and the game-environment, Proton-extra and store-launch tests pass.
12 lines
751 B
C
12 lines
751 B
C
// Turns off Android's heap pointer tagging (TBI) in the bionic Wine processes it is preloaded into.
|
|
// Wine/FEX paths can hand free() a pointer whose top byte was dropped; with tagging on, bionic aborts
|
|
// ("Pointer tag for 0x... was truncated"). Going from TBI to none at run time is allowed by bionic.
|
|
// mallopt is looked up at run time, so the file builds with any NDK API level.
|
|
#include <dlfcn.h>
|
|
#define M_BIONIC_SET_HEAP_TAGGING_LEVEL_OPT (-204)
|
|
#define M_HEAP_TAGGING_LEVEL_NONE_VAL 0
|
|
__attribute__((constructor(101))) static void ddbionic_notag(void) {
|
|
int (*mallopt_fn)(int, int) = (int (*)(int, int))dlsym(RTLD_DEFAULT, "mallopt");
|
|
if (mallopt_fn) mallopt_fn(M_BIONIC_SET_HEAP_TAGGING_LEVEL_OPT, M_HEAP_TAGGING_LEVEL_NONE_VAL);
|
|
}
|