28 #include "../../idlib/precompiled.h"
43 #define MAX_POLL_EVENTS 50
44 #define POLL_EVENTS_HEADROOM 2 // some situations require to add several events
46 static int poll_keyboard_event_count;
48 static int poll_mouse_event_count;
57 common->
FatalError(
"poll_keyboard_event_count exceeded MAX_POLL_EVENT + POLL_EVENTS_HEADROOM\n");
58 poll_events_keyboard[poll_keyboard_event_count].
key = key;
59 poll_events_keyboard[poll_keyboard_event_count++].
state = state;
61 common->
DPrintf(
"WARNING: reached MAX_POLL_EVENT poll_keyboard_event_count\n");
74 common->
FatalError(
"poll_mouse_event_count exceeded MAX_POLL_EVENT + POLL_EVENTS_HEADROOM\n");
75 poll_events_mouse[poll_mouse_event_count].
action = action;
76 poll_events_mouse[poll_mouse_event_count++].
value =
value;
78 common->
DPrintf(
"WARNING: reached MAX_POLL_EVENT poll_mouse_event_count\n");
94 return poll_keyboard_event_count;
98 if ( n >= poll_keyboard_event_count ) {
101 key = poll_events_keyboard[
n].
key;
102 state = poll_events_keyboard[
n].
state;
108 poll_keyboard_event_count = 0;
112 #if 0 //moved to the Sys_End functions
113 poll_keyboard_event_count = 0;
114 poll_mouse_event_count = 0;
120 return poll_mouse_event_count;
125 if ( n>=poll_mouse_event_count ) {
128 action = poll_events_mouse[
n ].
action;
129 value = poll_events_mouse[
n ].
value;
135 poll_mouse_event_count = 0;
GLsizei const GLfloat * value
virtual void virtual void FatalError(const char *fmt,...) id_attribute((format(printf
virtual void DPrintf(const char *fmt,...) id_attribute((format(printf