src/events/SDL_events.c
changeset 1190 173c063d4f55
parent 1140 af8b0f9ac2f4
child 1312 c9b51268668f
     1.1 --- a/src/events/SDL_events.c	Wed Nov 23 07:23:48 2005 +0000
     1.2 +++ b/src/events/SDL_events.c	Wed Nov 23 07:29:56 2005 +0000
     1.3 @@ -89,9 +89,28 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 +#ifdef __OS2__
     1.8 +/*
     1.9 + * We'll increase the priority of GobbleEvents thread, so it will process
    1.10 + *  events in time for sure! For this, we need the DosSetPriority() API
    1.11 + *  from the os2.h include file.
    1.12 + */
    1.13 +#define INCL_DOSPROCESS
    1.14 +#include <os2.h>
    1.15 +#include <time.h>
    1.16 +#endif
    1.17 +
    1.18  static int SDL_GobbleEvents(void *unused)
    1.19  {
    1.20  	event_thread = SDL_ThreadID();
    1.21 +
    1.22 +#ifdef __OS2__
    1.23 +#ifdef USE_DOSSETPRIORITY
    1.24 +	/* Increase thread priority, so it will process events in time for sure! */
    1.25 +	DosSetPriority(PRTYS_THREAD, PRTYC_REGULAR, +16, 0);
    1.26 +#endif
    1.27 +#endif
    1.28 +
    1.29  	while ( SDL_EventQ.active ) {
    1.30  		SDL_VideoDevice *video = current_video;
    1.31  		SDL_VideoDevice *this  = current_video;