changeset 1825:1791c7930776

fix sizeof :))))
author pontscho
date Sat, 01 Sep 2001 18:39:46 +0000
parents 33035a1d897e
children fc5efe18d15e
files Gui/mplayer/play.c Gui/mplayer/widgets.c Gui/mplayer/widgets.h
diffstat 3 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/play.c	Sat Sep 01 17:56:31 2001 +0000
+++ b/Gui/mplayer/play.c	Sat Sep 01 18:39:46 2001 +0000
@@ -50,6 +50,7 @@
  if ( !mplShMem->Playing ) return;
  mplShMem->Playing=0;
  mplShMem->TimeSec=0;
+ mplShMem->Position=0;
  if ( !appMPlayer.subWindow.isFullScreen )
   {
    wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
@@ -96,15 +97,9 @@
 
 void mplMPlayerInit( int argc,char* argv[], char *envp[] )
 {
-#if 0
- mplShMem=shmem_alloc( ShMemSize );
-#else
- mplShMem=calloc( 1,ShMemSize );
-#endif
+ mplShMem=calloc( 1,sizeof( mplCommStruct ) );
+ mplShMem->Balance=50.0f;
  signal( SIGTYPE,mplMainSigHandler );
-
- memset( mplShMem,0,ShMemSize );
- mplShMem->Balance=50.0f;
 }
 
 float mplGetPosition( void )
--- a/Gui/mplayer/widgets.c	Sat Sep 01 17:56:31 2001 +0000
+++ b/Gui/mplayer/widgets.c	Sat Sep 01 18:39:46 2001 +0000
@@ -85,7 +85,7 @@
 
 void gtkInit( int argc,char* argv[], char *envp[] )
 {
- gtkShMem=shmem_alloc( ShMemSize );
+ gtkShMem=shmem_alloc( sizeof( gtkCommStruct ) );
  if ( ( gtkPID = fork() ) == 0 ) gtkThreadProc( argc,argv );
 }
 
--- a/Gui/mplayer/widgets.h	Sat Sep 01 17:56:31 2001 +0000
+++ b/Gui/mplayer/widgets.h	Sat Sep 01 18:39:46 2001 +0000
@@ -47,8 +47,6 @@
  gtkOptionsStruct      op;
 } gtkCommStruct;
 
-#define ShMemSize sizeof( gtkCommStruct )
-
 extern gtkCommStruct * gtkShMem;
 
 extern GtkWidget     * SkinBrowser;