# HG changeset patch # User reimar # Date 1267133242 0 # Node ID ebe42a93c6c33bc3fb1fd723201249d5d92561f0 # Parent 748eade8a8dc929f97016a577f9da3b9a237973c Fix silly type of guiGetEvent argument to use void * instead of char * and get rid of some of the insane amount of casts necessary to hide the utter idiocy of the type used before. diff -r 748eade8a8dc -r ebe42a93c6c3 gui/interface.c --- a/gui/interface.c Thu Feb 25 21:21:29 2010 +0000 +++ b/gui/interface.c Thu Feb 25 21:27:22 2010 +0000 @@ -523,15 +523,15 @@ } } -int guiGetEvent( int type,char * arg ) +int guiGetEvent( int type,void * arg ) { const ao_functions_t *audio_out = NULL; const vo_functions_t *video_out = NULL; mixer_t *mixer = NULL; - stream_t * stream = (stream_t *) arg; + stream_t * stream = arg; #ifdef CONFIG_DVDREAD - dvd_priv_t * dvdp = (dvd_priv_t *) arg; + dvd_priv_t * dvdp = arg; #endif if (guiIntfStruct.mpcontext) { @@ -543,8 +543,8 @@ switch ( type ) { case guiXEvent: - guiIntfStruct.event_struct=(void *)arg; - wsEvents( wsDisplay,(XEvent *)arg,NULL ); + guiIntfStruct.event_struct=arg; + wsEvents( wsDisplay,arg,NULL ); gtkEventHandling(); break; case guiCEvent: @@ -574,12 +574,12 @@ else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); break; case guiSetContext: - guiIntfStruct.mpcontext=(void *)arg; + guiIntfStruct.mpcontext=arg; case guiSetDemuxer: - guiIntfStruct.demuxer=(void *)arg; + guiIntfStruct.demuxer=arg; break; case guiSetAfilter: - guiIntfStruct.afilter=(void *)arg; + guiIntfStruct.afilter=arg; break; case guiSetShVideo: { @@ -675,7 +675,7 @@ guiIntfStruct.sh_video=arg; if ( arg ) { - sh_video_t * sh = (sh_video_t *)arg; + sh_video_t * sh = arg; guiIntfStruct.FPS=sh->fps; } diff -r 748eade8a8dc -r ebe42a93c6c3 gui/interface.h --- a/gui/interface.h Thu Feb 25 21:21:29 2010 +0000 +++ b/gui/interface.h Thu Feb 25 21:27:22 2010 +0000 @@ -163,7 +163,7 @@ void guiInit( void ); void guiDone( void ); -int guiGetEvent( int type,char * arg ); +int guiGetEvent( int type,void * arg ); void guiEventHandling( void ); void guiLoadFont( void ); void guiLoadSubtitle( char * name );