diff options
author | Simon Howard | 2015-02-20 00:31:09 -0500 |
---|---|---|
committer | Simon Howard | 2015-02-20 00:33:12 -0500 |
commit | b39121c6a682eb8ae5efd29a875bd7c098185f04 (patch) | |
tree | c6a8b42412682c49d73aff7c794e333e55c807bc /src/setup/mouse.c | |
parent | 1f5ce047ad6cb709f746b794b4a2dea9e2f89fb6 (diff) | |
download | chocolate-doom-b39121c6a682eb8ae5efd29a875bd7c098185f04.tar.gz chocolate-doom-b39121c6a682eb8ae5efd29a875bd7c098185f04.tar.bz2 chocolate-doom-b39121c6a682eb8ae5efd29a875bd7c098185f04.zip |
Refactor config file API.
The config file API previously relied on binding config variables
using M_BindVariable() which took a void pointer. It occurred to me
that if used on a boolean variable, this would be erroneous, but the
void pointer would make it impossible to tell. Split this into
separate M_Bind{Foo}Variable() functions based on type, which allows
for proper type checking on the pointers that are passed.
Vaguely related to #509.
Diffstat (limited to 'src/setup/mouse.c')
-rw-r--r-- | src/setup/mouse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/setup/mouse.c b/src/setup/mouse.c index 1d7ed68e..9fdfc833 100644 --- a/src/setup/mouse.c +++ b/src/setup/mouse.c @@ -153,10 +153,10 @@ void ConfigMouse(void) void BindMouseVariables(void) { - M_BindVariable("use_mouse", &usemouse); - M_BindVariable("novert", &novert); - M_BindVariable("mouse_sensitivity", &mouseSensitivity); - M_BindVariable("mouse_acceleration", &mouse_acceleration); - M_BindVariable("mouse_threshold", &mouse_threshold); - M_BindVariable("grabmouse", &grabmouse); + M_BindIntVariable("use_mouse", &usemouse); + M_BindIntVariable("novert", &novert); + M_BindIntVariable("grabmouse", &grabmouse); + M_BindIntVariable("mouse_sensitivity", &mouseSensitivity); + M_BindIntVariable("mouse_threshold", &mouse_threshold); + M_BindFloatVariable("mouse_acceleration", &mouse_acceleration); } |