Commit 54e84562 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Win32 threads: Set priority on success rather than failure.

Patch from atmo.
parent e5896809
...@@ -591,12 +591,12 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line ...@@ -591,12 +591,12 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
#endif #endif
p_priv->thread_id.id = (DWORD)threadId; p_priv->thread_id.id = (DWORD)threadId;
p_priv->thread_id.hThread = (HANDLE)hThread; p_priv->thread_id.hThread = (HANDLE)hThread;
ResumeThread((HANDLE)hThread); ResumeThread((HANDLE)hThread);
} }
i_ret = ( p_priv->thread_id.hThread ? 0 : 1 ); i_ret = ( p_priv->thread_id.hThread ? 0 : 1 );
if( i_ret && i_priority ) if( !i_ret && i_priority )
{ {
if( !SetThreadPriority(p_priv->thread_id.hThread, i_priority) ) if( !SetThreadPriority(p_priv->thread_id.hThread, i_priority) )
{ {
......
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