diff src/events/SDL_events.c @ 1190:173c063d4f55

OS/2 port! This was mostly, if not entirely, written by "Doodle" and "Caetano": doodle@scenergy.dfmk.hu daniel@caetano.eng.br --ryan.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 23 Nov 2005 07:29:56 +0000
parents af8b0f9ac2f4
children c9b51268668f
line wrap: on
line diff
--- 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;