Author: ayoung
Date: Fri Aug 27 04:10:48 2010
New Revision: 9071
URL: http://svn.slimdevices.com/jive?rev=9071&view=rev
Log:
Initialize SDL event loop even when not using video support.
Modified:
7.6/trunk/squeezeplay/src/SDL-1.2.13/src/SDL.c
7.6/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c
Modified: 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/SDL.c
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/SDL-1.2.13/src/SDL.c?rev=9071&r1=9070&r2=9071&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/SDL.c (original)
+++ 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/SDL.c Fri Aug 27 04:10:48 2010
@@ -106,6 +106,15 @@
return(-1);
}
SDL_initialized |= SDL_INIT_TIMER;
+
+ /* if we have timers but no Video then we still need the event
loop */
+ if (!(flags & SDL_INIT_VIDEO)) {
+ /* Start the event loop */
+ if ( SDL_StartEventLoop(flags) < 0 ) {
+ SDL_TimerQuit();
+ return(-1);
+ }
+ }
}
#else
if ( flags & SDL_INIT_TIMER ) {
Modified: 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c?rev=9071&r1=9070&r2=9071&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c (original)
+++ 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/events/SDL_events.c Fri Aug 27
04:10:48 2010
@@ -240,14 +240,16 @@
SDL_ProcessEvents[SDL_SYSWMEVENT] = SDL_IGNORE;
/* Initialize event handlers */
- retcode = 0;
- retcode += SDL_AppActiveInit();
- retcode += SDL_KeyboardInit();
- retcode += SDL_MouseInit();
- retcode += SDL_QuitInit();
- if ( retcode < 0 ) {
- /* We don't expect them to fail, but... */
- return(-1);
+ if (flags & SDL_INIT_VIDEO) {
+ retcode = 0;
+ retcode += SDL_AppActiveInit();
+ retcode += SDL_KeyboardInit();
+ retcode += SDL_MouseInit();
+ retcode += SDL_QuitInit();
+ if ( retcode < 0 ) {
+ /* We don't expect them to fail, but... */
+ return(-1);
+ }
}
/* Create the lock and event thread */
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins