- host/android: Vulkan replay backend (nvn_vk.c) with pipeline/descriptor caching, ADPF, AChoreographer present link; Linux compat layer; Makefile.android (headless dmhost + APK lib) - android/app: GameActivity shell without Gradle (build_apk.sh), AAudio output, touch HUD port (touch_app.c + TouchOverlay.java, three layers: body / joystick / minimap goals), lifecycle save-on-background like iOS, art_from_ipa.py for touch / HUD / mapgoal art - touch: shared touch controls moved from ios/Sources to dm/touch - patch_nso.py Android ruleset, dmsh_vk.py shader pack, DM_TOUCH_PRODUCT defaults - hle_audio: AAudio resume waits through STARTING and reopens once on failure - .gitignore: local resources/ (original game data) never committed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
2.2 KiB
C
35 lines
2.2 KiB
C
// 平台差异的最小公共面:信号上下文寄存器、宿主登记段。Darwin 与 Linux 各一份定义,其余差异见 compat/linux/compat_linux.h。
|
||
// Minimal common surface of platform differences: signal-context registers and host registration sections. One definition each for Darwin and Linux;
|
||
// other differences are in compat/linux/compat_linux.h.
|
||
#pragma once
|
||
#if defined(__APPLE__)
|
||
#define UC_X(uc, i) ((uc)->uc_mcontext->__ss.__x[i])
|
||
#define UC_PC(uc) ((uc)->uc_mcontext->__ss.__pc)
|
||
#define UC_LR(uc) ((uc)->uc_mcontext->__ss.__lr)
|
||
#define UC_FP(uc) ((uc)->uc_mcontext->__ss.__fp)
|
||
#define UC_SP(uc) ((uc)->uc_mcontext->__ss.__sp)
|
||
#define UC_ESR(uc) ((uint64_t)(uc)->uc_mcontext->__es.__esr)
|
||
// 登记段:Mach-O 段名 "__DATA,<名>"
|
||
// Registration section: Mach-O section name "__DATA,<name>"
|
||
#define DM_SECT(name) section("__DATA," name)
|
||
#else
|
||
#define UC_X(uc, i) ((uc)->uc_mcontext.regs[i])
|
||
#define UC_PC(uc) ((uc)->uc_mcontext.pc)
|
||
#define UC_LR(uc) ((uc)->uc_mcontext.regs[30])
|
||
#define UC_FP(uc) ((uc)->uc_mcontext.regs[29])
|
||
#define UC_SP(uc) ((uc)->uc_mcontext.sp)
|
||
#define UC_ESR(uc) dm_uc_esr(uc)
|
||
// 登记段:ELF 段名须是 C 标识符,链接器才给 __start_<名> / __stop_<名>;retain 防 --gc-sections 丢弃
|
||
// Registration section: the ELF section name must be a C identifier for the linker to provide __start_<name> / __stop_<name>; retain keeps --gc-sections from dropping it
|
||
#define DM_SECT(name) section(name), retain
|
||
#endif
|
||
// 触摸产品(iOS 包、Android 包):设置缺省、掉落过滤规则、自动补增益这类「产品缺省开、Mac 宿主对拍时缺省关」的开关看它,不看 TARGET_OS_IPHONE。
|
||
// 展开时才读 TARGET_OS_IPHONE,用处须已包含 TargetConditionals(Linux 由 compat_linux.h 定义)。
|
||
// Touch product (iOS build, Android build): switches that are "on by default in the product, off by default for Mac host parity" (settings defaults, loot filter rules, auto-buff)
|
||
// check this rather than TARGET_OS_IPHONE. TARGET_OS_IPHONE is read at expansion, so the use site must already include TargetConditionals (compat_linux.h defines it on Linux).
|
||
#if defined(__ANDROID__)
|
||
#define DM_TOUCH_PRODUCT 1
|
||
#else
|
||
#define DM_TOUCH_PRODUCT TARGET_OS_IPHONE
|
||
#endif
|