aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/ginput_toggle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ginput/ginput_toggle.c')
-rw-r--r--src/ginput/ginput_toggle.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ginput/ginput_toggle.c b/src/ginput/ginput_toggle.c
index eb65d6e0..592d6b18 100644
--- a/src/ginput/ginput_toggle.c
+++ b/src/ginput/ginput_toggle.c
@@ -71,14 +71,14 @@ static void TogglePoll(void *param) {
if ((psl->listenflags & GLISTEN_TOGGLE_ON)) {
pe->type = GEVENT_TOGGLE;
pe->instance = i;
- pe->on = TRUE;
+ pe->on = gTrue;
geventSendEvent(psl);
}
} else {
if ((psl->listenflags & GLISTEN_TOGGLE_OFF)) {
pe->type = GEVENT_TOGGLE;
pe->instance = i;
- pe->on = FALSE;
+ pe->on = gFalse;
geventSendEvent(psl);
}
}
@@ -102,7 +102,7 @@ GSourceHandle ginputGetToggle(uint16_t instance) {
if (!gtimerIsActive(&ToggleTimer)) {
for(ptc = GInputToggleConfigTable; ptc < GInputToggleConfigTable+sizeof(GInputToggleConfigTable)/sizeof(GInputToggleConfigTable[0]); ptc++)
ginput_lld_toggle_init(ptc);
- gtimerStart(&ToggleTimer, TogglePoll, 0, TRUE, GINPUT_TOGGLE_POLL_PERIOD);
+ gtimerStart(&ToggleTimer, TogglePoll, 0, gTrue, GINPUT_TOGGLE_POLL_PERIOD);
}
// OK - return this input
@@ -110,7 +110,7 @@ GSourceHandle ginputGetToggle(uint16_t instance) {
}
// If invert is true, invert the on/off sense for the toggle
-void ginputInvertToggle(uint16_t instance, bool_t invert) {
+void ginputInvertToggle(uint16_t instance, gBool invert) {
if (instance >= GINPUT_TOGGLE_NUM_PORTS)
return;
if (invert) {
@@ -127,19 +127,19 @@ void ginputInvertToggle(uint16_t instance, bool_t invert) {
}
/* Get the current toggle status.
- * Returns FALSE on error (eg invalid instance)
+ * Returns gFalse on error (eg invalid instance)
*/
-bool_t ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle) {
+gBool ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle) {
// Win32 threads don't seem to recognise priority and/or pre-emption
// so we add a sleep here to prevent 100% polled applications from locking up.
gfxSleepMilliseconds(1);
if (instance >= GINPUT_TOGGLE_NUM_PORTS)
- return FALSE;
+ return gFalse;
ptoggle->type = GEVENT_TOGGLE;
ptoggle->instance = instance;
- ptoggle->on = (ToggleStatus[instance].status & GINPUT_TOGGLE_ISON) ? TRUE : FALSE;
- return TRUE;
+ ptoggle->on = (ToggleStatus[instance].status & GINPUT_TOGGLE_ISON) ? gTrue : gFalse;
+ return gTrue;
}
/* Wake up the mouse driver from an interrupt service routine (there may be new readings available) */