comparison 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
comparison
equal deleted inserted replaced
1189:c96b326b90ba 1190:173c063d4f55
87 if ( SDL_EventThread && (SDL_ThreadID() != event_thread) ) { 87 if ( SDL_EventThread && (SDL_ThreadID() != event_thread) ) {
88 SDL_mutexV(SDL_EventLock.lock); 88 SDL_mutexV(SDL_EventLock.lock);
89 } 89 }
90 } 90 }
91 91
92 #ifdef __OS2__
93 /*
94 * We'll increase the priority of GobbleEvents thread, so it will process
95 * events in time for sure! For this, we need the DosSetPriority() API
96 * from the os2.h include file.
97 */
98 #define INCL_DOSPROCESS
99 #include <os2.h>
100 #include <time.h>
101 #endif
102
92 static int SDL_GobbleEvents(void *unused) 103 static int SDL_GobbleEvents(void *unused)
93 { 104 {
94 event_thread = SDL_ThreadID(); 105 event_thread = SDL_ThreadID();
106
107 #ifdef __OS2__
108 #ifdef USE_DOSSETPRIORITY
109 /* Increase thread priority, so it will process events in time for sure! */
110 DosSetPriority(PRTYS_THREAD, PRTYC_REGULAR, +16, 0);
111 #endif
112 #endif
113
95 while ( SDL_EventQ.active ) { 114 while ( SDL_EventQ.active ) {
96 SDL_VideoDevice *video = current_video; 115 SDL_VideoDevice *video = current_video;
97 SDL_VideoDevice *this = current_video; 116 SDL_VideoDevice *this = current_video;
98 117
99 /* Get events from the video subsystem */ 118 /* Get events from the video subsystem */