From 5e0f43d051b6a794a8f5f6385335d441e1a038e3 Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Fri, 18 Dec 2015 03:41:44 -0300 Subject: [PATCH] naming the audio thread from within itself --- servers/audio/audio_server_sw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp index d20e2d42e05..3c55b10dacb 100644 --- a/servers/audio/audio_server_sw.cpp +++ b/servers/audio/audio_server_sw.cpp @@ -763,9 +763,10 @@ void AudioServerSW::free(RID p_id) { void AudioServerSW::_thread_func(void *self) { - AudioServerSW *as=(AudioServerSW *)self; + as->thread->set_name("AudioServerSW"); + while (!as->exit_update_thread) { as->_update_streams(true); OS::get_singleton()->delay_usec(5000); @@ -806,7 +807,6 @@ void AudioServerSW::init() { #ifndef NO_THREADS exit_update_thread=false; thread = Thread::create(_thread_func,this); - thread->set_name("AudioServerSW"); #endif }