summaryrefslogtreecommitdiff
path: root/common/action_oneshot.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-21 14:42:40 +0900
committertmk <nobody@nowhere>2013-03-21 14:42:40 +0900
commitd44290b91b96f89cfc2dfa85a59cc267ffd13fb4 (patch)
tree0acf399005d0d5fba6511dd9ca16a65f0bb46037 /common/action_oneshot.c
parent9a3edb897ab8549bae089645c0d7f27df8fa15b7 (diff)
Add NO_ACTION_ONESHOT config option
Diffstat (limited to 'common/action_oneshot.c')
-rw-r--r--common/action_oneshot.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/action_oneshot.c b/common/action_oneshot.c
new file mode 100644
index 0000000000..d34f44b5ab
--- /dev/null
+++ b/common/action_oneshot.c
@@ -0,0 +1,21 @@
+#include "action_oneshot.h"
+
+
+#ifndef NO_ACTION_ONESHOT
+oneshot_state_t oneshot_state;
+
+void oneshot_start(uint8_t mods)
+{
+ oneshot_state.mods = mods;
+}
+
+void oneshot_cancel(void)
+{
+ oneshot_state.mods = 0;
+}
+
+void oneshot_toggle(void)
+{
+ oneshot_state.disabled = !oneshot_state.disabled;
+}
+#endif