Commit 4a3df555 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins2/*: a few bug fixes.

parent 2a73b728
......@@ -2,7 +2,7 @@
* async_queue.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: async_queue.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
......@@ -40,6 +40,7 @@ AsyncQueue::AsyncQueue( intf_thread_t *pIntf ): SkinObject( pIntf )
AsyncQueue::~AsyncQueue()
{
delete( m_pTimer );
}
......
......@@ -166,7 +166,7 @@ static void Run( intf_thread_t *p_intf )
ThemeLoader *pLoader = new ThemeLoader( p_intf );
char *skin_last = config_GetPsz( p_intf, "skins2-last" );
if( skin_last == NULL || !pLoader->load( skin_last ) )
if( !skin_last || !*skin_last || !pLoader->load( skin_last ) )
{
// Get the resource path and try to load the default skin
OSFactory *pOSFactory = OSFactory::instance( p_intf );
......@@ -219,16 +219,7 @@ static void Run( intf_thread_t *p_intf )
FIND_ANYWHERE );
if( p_playlist )
{
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist );
}
else
{
vlc_mutex_unlock( &p_playlist->object_lock );
}
vlc_object_release( p_playlist );
}
}
......
......@@ -80,7 +80,8 @@ LRESULT CALLBACK Win32Proc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
Win32Factory::Win32Factory( intf_thread_t *pIntf ):
OSFactory( pIntf ), TransparentBlt( NULL ), AlphaBlend( NULL ),
SetLayeredWindowAttributes( NULL ), m_dirSep( "\\" )
SetLayeredWindowAttributes( NULL ), m_hParentWindow( NULL ),
m_dirSep( "\\" )
{
// see init()
}
......@@ -178,8 +179,12 @@ bool Win32Factory::init()
}
// Initialize the resource path
m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir +
"\\" + CONFIG_DIR + "\\skins2" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
"\\skins2" );
m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
"\\share\\skins2" );
// All went well
return true;
......@@ -191,6 +196,8 @@ Win32Factory::~Win32Factory()
// Uninitialize the OLE library
OleUninitialize();
if( m_hParentWindow ) DestroyWindow( m_hParentWindow );
// Unload msimg32.dll and user32.dll
if( m_hMsimg32 )
FreeLibrary( m_hMsimg32 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment