comparison Gui/mplayer/play.c @ 19061:86350b4b8203

drops casts from void * on malloc/calloc from the gui code
author reynaldo
date Thu, 13 Jul 2006 16:17:24 +0000
parents 0e1471d9da74
children 64d82a45a05d
comparison
equal deleted inserted replaced
19060:b508e7ef1ea8 19061:86350b4b8203
125 void mplPause( void ) 125 void mplPause( void )
126 { 126 {
127 if ( !guiIntfStruct.Playing ) return; 127 if ( !guiIntfStruct.Playing ) return;
128 if ( guiIntfStruct.Playing == 1 ) 128 if ( guiIntfStruct.Playing == 1 )
129 { 129 {
130 mp_cmd_t * cmd = (mp_cmd_t *)calloc( 1,sizeof( *cmd ) ); 130 mp_cmd_t * cmd = calloc( 1,sizeof( *cmd ) );
131 cmd->id=MP_CMD_PAUSE; 131 cmd->id=MP_CMD_PAUSE;
132 cmd->name=strdup("pause"); 132 cmd->name=strdup("pause");
133 mp_input_queue_cmd(cmd); 133 mp_input_queue_cmd(cmd);
134 } else guiIntfStruct.Playing=1; 134 } else guiIntfStruct.Playing=1;
135 } 135 }
192 // --- reload menu window 192 // --- reload menu window
193 193
194 if ( prev && appMPlayer.menuIsPresent ) 194 if ( prev && appMPlayer.menuIsPresent )
195 { 195 {
196 if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); 196 if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
197 if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) 197 if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
198 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } 198 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
199 wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); 199 wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
200 wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); 200 wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
201 wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image ); 201 wsSetShape( &appMPlayer.menuWindow,appMPlayer.menuBase.Mask.Image );
202 wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow ); 202 wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
222 if ( bprev ) wsDestroyWindow( &appMPlayer.barWindow ); 222 if ( bprev ) wsDestroyWindow( &appMPlayer.barWindow );
223 mplPBInit(); 223 mplPBInit();
224 224
225 // --- reload main window 225 // --- reload main window
226 if ( mplDrawBuffer ) free( mplDrawBuffer ); 226 if ( mplDrawBuffer ) free( mplDrawBuffer );
227 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) 227 if ( ( mplDrawBuffer = calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
228 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; } 228 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
229 229
230 wsDestroyWindow( &appMPlayer.mainWindow ); 230 wsDestroyWindow( &appMPlayer.mainWindow );
231 231
232 wsCreateWindow( &appMPlayer.mainWindow, 232 wsCreateWindow( &appMPlayer.mainWindow,