Author: ayoung
Date: Mon Aug 30 05:37:49 2010
New Revision: 9080

URL: http://svn.slimdevices.com/jive?rev=9080&view=rev
Log:
Task : SN test harness 
Allow SDL event subsystem to be initialized even when Video is not being used. 

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
    7.6/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_video.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=9080&r1=9079&r2=9080&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 Mon Aug 30 05:37:49 2010
@@ -107,6 +107,14 @@
                }
                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=9080&r1=9079&r2=9080&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 Mon Aug 30 
05:37:49 2010
@@ -239,14 +239,17 @@
        SDL_eventstate &= ~(0x00000001 << SDL_SYSWMEVENT);
        SDL_ProcessEvents[SDL_SYSWMEVENT] = SDL_IGNORE;
 
-       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);
+       /* Initialize event handlers */
+       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);
+               }
        }
 
 

Modified: 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_video.c
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_video.c?rev=9080&r1=9079&r2=9080&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_video.c (original)
+++ 7.6/trunk/squeezeplay/src/SDL-1.2.13/src/video/SDL_video.c Mon Aug 30 
05:37:49 2010
@@ -268,7 +268,7 @@
        video->info.vfmt = SDL_VideoSurface->format;
 
        /* Start the event loop */
-       if ( SDL_StartEventLoop(flags) < 0 ) {
+       if ( SDL_StartEventLoop(flags | SDL_INIT_VIDEO) < 0 ) {
                SDL_VideoQuit();
                return(-1);
        }

_______________________________________________
Jive-checkins mailing list
Jive-checkins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to