[Mplayer-dev-eng] Add SDL_QUIT support in vo_sdl.c

Lethal Weapon lethalwp at LethalWP.dyndns.org
Sun Aug 26 17:05:08 CEST 2001


Hi,

Dunno if this was the right way to do it, but it's a suggestion: when playing in sdl mode, the 'Close' button didn't work, it was in ignore state,
this little diff adds support for it:

--begindiff--snip--
--- main/libvo/vo_sdl.c Tue Aug 14 10:18:52 2001
+++ main-patched/libvo/vo_sdl.c Sun Aug 26 16:54:51 2001
@@ -430,7 +430,7 @@
        SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
        SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE);
        SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE);
-       SDL_EventState(SDL_QUIT, SDL_IGNORE);
+//     SDL_EventState(SDL_QUIT, SDL_IGNORE);
        SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
        SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
 #endif
@@ -1034,6 +1034,11 @@
                                if(verbose > 2) printf("SDL: Window resize\n");
                        break;
                        
+                       case SDL_QUIT:
+                                       SDL_ShowCursor(1);
+                                       mplayer_put_key('q');
+                                       break;
+                                       
                        
                        /* graphics mode selection shortcuts */
 #ifdef BUGGY_SDL
---enddiff--snip---

PS: next thing i plan to try to add is to show the resolution 2 or 3 seconds after pressing 'c', do you think it's a good idea?
PPS: in the vo_sdl.c begin comment, you can read about some plugin_exit, but i have found no traces in other files

Greetz,
    Lethalwp

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list