diff --git a/runtime/mouse_direct.c b/runtime/mouse_direct.c index ecafaf06..979fa24b 100644 --- a/runtime/mouse_direct.c +++ b/runtime/mouse_direct.c @@ -23,8 +23,8 @@ #endif static int direct_mode(void) { - const char *mode = cfg_get("TOTK_MOUSE_MODE"); - return mode && !strcmp(mode, "direct") && rt_patch_enabled(rt_patch_set("mouse_direct")); + // cfg_value: unset is the settings table's default (direct), as the menu shows it + return !strcmp(cfg_value("TOTK_MOUSE_MODE"), "direct") && rt_patch_enabled(rt_patch_set("mouse_direct")); } static uint64_t last_update; diff --git a/tests/mouse_direct_check.py b/tests/mouse_direct_check.py index 212cd4f7..0dadee48 100644 --- a/tests/mouse_direct_check.py +++ b/tests/mouse_direct_check.py @@ -18,6 +18,7 @@ static float ratio=0.5f; static uint64_t now=1000000000; static GuestFn hook, activity_hook, begin_hook, angles_hook, hand_hook; const char *cfg_get(const char *key) { (void)key; return mode ? "direct" : "stick"; } +const char *cfg_value(const char *key) { return cfg_get(key); } double cfg_double(const char *key) { (void)key; return 1; } int rt_patch_set(const char *s) { (void)s; return 0; } int rt_patch_enabled(int s) { (void)s; return patched; }