1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00

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.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30731 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-02-25 21:27:22 +00:00
parent 150de6566f
commit adc345131f
2 changed files with 10 additions and 10 deletions

View File

@ -523,15 +523,15 @@ static void remove_vf( char * str )
} }
} }
int guiGetEvent( int type,char * arg ) int guiGetEvent( int type,void * arg )
{ {
const ao_functions_t *audio_out = NULL; const ao_functions_t *audio_out = NULL;
const vo_functions_t *video_out = NULL; const vo_functions_t *video_out = NULL;
mixer_t *mixer = NULL; mixer_t *mixer = NULL;
stream_t * stream = (stream_t *) arg; stream_t * stream = arg;
#ifdef CONFIG_DVDREAD #ifdef CONFIG_DVDREAD
dvd_priv_t * dvdp = (dvd_priv_t *) arg; dvd_priv_t * dvdp = arg;
#endif #endif
if (guiIntfStruct.mpcontext) { if (guiIntfStruct.mpcontext) {
@ -543,8 +543,8 @@ int guiGetEvent( int type,char * arg )
switch ( type ) switch ( type )
{ {
case guiXEvent: case guiXEvent:
guiIntfStruct.event_struct=(void *)arg; guiIntfStruct.event_struct=arg;
wsEvents( wsDisplay,(XEvent *)arg,NULL ); wsEvents( wsDisplay,arg,NULL );
gtkEventHandling(); gtkEventHandling();
break; break;
case guiCEvent: case guiCEvent:
@ -574,12 +574,12 @@ int guiGetEvent( int type,char * arg )
else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
break; break;
case guiSetContext: case guiSetContext:
guiIntfStruct.mpcontext=(void *)arg; guiIntfStruct.mpcontext=arg;
case guiSetDemuxer: case guiSetDemuxer:
guiIntfStruct.demuxer=(void *)arg; guiIntfStruct.demuxer=arg;
break; break;
case guiSetAfilter: case guiSetAfilter:
guiIntfStruct.afilter=(void *)arg; guiIntfStruct.afilter=arg;
break; break;
case guiSetShVideo: case guiSetShVideo:
{ {
@ -675,7 +675,7 @@ int guiGetEvent( int type,char * arg )
guiIntfStruct.sh_video=arg; guiIntfStruct.sh_video=arg;
if ( arg ) if ( arg )
{ {
sh_video_t * sh = (sh_video_t *)arg; sh_video_t * sh = arg;
guiIntfStruct.FPS=sh->fps; guiIntfStruct.FPS=sh->fps;
} }

View File

@ -163,7 +163,7 @@ extern int use_gui;
void guiInit( void ); void guiInit( void );
void guiDone( void ); void guiDone( void );
int guiGetEvent( int type,char * arg ); int guiGetEvent( int type,void * arg );
void guiEventHandling( void ); void guiEventHandling( void );
void guiLoadFont( void ); void guiLoadFont( void );
void guiLoadSubtitle( char * name ); void guiLoadSubtitle( char * name );