Read the mouse mode with its default so direct is on without a totk.ini line

direct_mode read TOTK_MOUSE_MODE with cfg_get, which is NULL when the player never set it, so a fresh totk.ini kept
stick emulation (and its speed cap) while the menu showed Direct. cfg_value gives the settings table's default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-04 08:52:06 +03:00
1 parent 5ae81ba8e6
commit 9e5a817916
2 files changed
+3 -2

No files matched your search

+2 -2
View File
@@ -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;
+1
View File
@@ -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; }