src/events/SDL_events.c
changeset 1190 173c063d4f55
parent 1140 af8b0f9ac2f4
child 1312 c9b51268668f
--- a/src/events/SDL_events.c	Wed Nov 23 07:23:48 2005 +0000
+++ b/src/events/SDL_events.c	Wed Nov 23 07:29:56 2005 +0000
@@ -89,9 +89,28 @@
 	}
 }
 
+#ifdef __OS2__
+/*
+ * We'll increase the priority of GobbleEvents thread, so it will process
+ *  events in time for sure! For this, we need the DosSetPriority() API
+ *  from the os2.h include file.
+ */
+#define INCL_DOSPROCESS
+#include <os2.h>
+#include <time.h>
+#endif
+
 static int SDL_GobbleEvents(void *unused)
 {
 	event_thread = SDL_ThreadID();
+
+#ifdef __OS2__
+#ifdef USE_DOSSETPRIORITY
+	/* Increase thread priority, so it will process events in time for sure! */
+	DosSetPriority(PRTYS_THREAD, PRTYC_REGULAR, +16, 0);
+#endif
+#endif
+
 	while ( SDL_EventQ.active ) {
 		SDL_VideoDevice *video = current_video;
 		SDL_VideoDevice *this  = current_video;