* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include "../libvlc.h"
#include <vlc_playlist.h>
#if !defined( UNDER_CE )
# include <io.h>
# include <fcntl.h>
+# include <mmsystem.h>
#endif
#include <winsock.h>
/*****************************************************************************
* system_Init: initialize winsock and misc other things.
*****************************************************************************/
-void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
{
WSADATA Data;
#if !defined( UNDER_CE )
_fmode = _O_BINARY;
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
+
+ timeBeginPeriod(5);
#endif
/* Call mdate() once to make sure it is initialized properly */
char data[0];
} vlc_ipc_data_t;
-void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
{
#if !defined( UNDER_CE )
/* Raise default priority of the current process */
* with stronger alignment requirements, right. */
*((size_t *)(p_data->data + i_data)) = i_len;
i_data += sizeof (size_t);
- memcpy( &p_data[i_data], ppsz_argv[ i_opt ], i_len );
+ memcpy( &p_data->data[i_data], ppsz_argv[ i_opt ], i_len );
i_data += i_len;
}
i_data += sizeof (*p_data);
NULL ); /* sent to WM_CREATE */
SetWindowLong( ipcwindow, GWL_WNDPROC, (LONG)WMCOPYWNDPROC );
- SetWindowLong( ipcwindow, GWL_USERDATA, (LONG)p_this );
+ SetWindowLongPtr( ipcwindow, GWL_USERDATA, (LONG_PTR)p_this );
/* Signal the creation of the thread and events queue */
vlc_thread_ready( p_this );
vlc_object_t *p_this;
playlist_t *p_playlist;
- p_this = (vlc_object_t *)GetWindowLong( hwnd, GWL_USERDATA );
+ p_this = (vlc_object_t *)GetWindowLongPtr( hwnd, GWL_USERDATA );
if( !p_this ) return 0;
vlc_global()->psz_vlcpath = NULL;
}
+#if !defined( UNDER_CE )
+ timeEndPeriod(5);
+#endif
+
WSACleanup();
}