aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/con_.h6
-rw-r--r--src/rinput.c7
-rw-r--r--src/sst.c1
3 files changed, 12 insertions, 2 deletions
diff --git a/src/con_.h b/src/con_.h
index a10488b..8bef5d0 100644
--- a/src/con_.h
+++ b/src/con_.h
@@ -464,6 +464,12 @@ void con_regcmd(struct con_cmd *c);
* doing so. In practice this means anything that's not OE. On OE, these
* functions currently just do nothing, although it would be possible in theory
* to patch in command-hiding support if deemed important enough.
+ *
+ * Note: con_hide() will not work on an unregistered command or variable with
+ * CON_INIT_HIDDEN; this includes any of a feature's commands/variables during
+ * feature initialisation, except those that are manually registered first.
+ * In cases where a variable/command is to be registered automatically, the
+ * CON_INIT_HIDDEN flag can be removed using bitwise ops.
*/
void con_hide(struct con_cmdbase *b);
void con_unhide(struct con_cmdbase *b);
diff --git a/src/rinput.c b/src/rinput.c
index 554577c..a7ed1a4 100644
--- a/src/rinput.c
+++ b/src/rinput.c
@@ -205,8 +205,11 @@ INIT {
hook_inline_commit(h1.prologue, (void *)&hook_GetCursorPos);
hook_inline_commit(h2.prologue, (void *)&hook_SetCursorPos);
-ok: con_unhide(&m_rawinput->base);
- con_unhide(&sst_mouse_factor->base);
+ok: // XXX: this is a little tricky and a little clunky. we have registered
+ // m_rawinput above but sst_mouse_factor will get auto-registered after init
+ // returns, so the flags are different.
+ con_unhide(&m_rawinput->base);
+ sst_mouse_factor->base.flags &= ~CON_INIT_HIDDEN;
return FEAT_OK;
e1: DestroyWindow(inwin);
diff --git a/src/sst.c b/src/sst.c
index 6a0d810..8bdb56c 100644
--- a/src/sst.c
+++ b/src/sst.c
@@ -270,6 +270,7 @@ static bool already_loaded = false, skip_unload = false;
// auto-update message. see below in do_featureinit()
static const char *updatenotes = "\
+* Fix sst_mouse_factor being hidden, causing toggle binds to break\n\
";
enum { // used in generated code, must line up with featmsgs arrays below