Default shadow storage to on when running under Wine

This commit is contained in:
Chris Koos committed 2026-10-31 15:02:30 -07:00
1 parent f469c5a774
commit d9d6264bb2
4 files changed
+10 -2

No files matched your search

+2 -2
View File
@@ -827,7 +827,7 @@ static int query_stamp(uint64_t lo, uint64_t hi, uint32_t g) {
// - GPU -> guest: the replay notes each GPU write into CPU-visible memory at record time (vk_mem_gpu_pending) and
// reports it at the fence (vk_gpu_written), which copies those bytes back into guest memory. Until then the CPU
// copies skip them: a page the CPU and the GPU both write keeps the GPU's bytes.
// TOTK_SHADOW=1/0 forces the mode on or off; the default is on for Linux.
// TOTK_SHADOW=1/0 forces the mode on or off; the default is on for Linux and Wine.
typedef struct { uint64_t lo, hi; } SRange;
static PlatMutex shadow_lock = PLAT_MUTEX_INIT; // after pool_lock; before gen_lock
static PoolRec **stouch; // shadow_lock: pools resolved since the last sync
@@ -1187,7 +1187,7 @@ static void mirror_mode(int discrete) {
if (freeze_idle < 0) freeze_idle = 0;
const char *sh = cfg_get("TOTK_SHADOW");
#ifdef _WIN32
shadow_on = sh && *sh && strcmp(sh, "0");
shadow_on = sh && *sh ? strcmp(sh, "0") != 0 : plat_is_wine();
#else
shadow_on = !sh || !*sh || strcmp(sh, "0");
#endif