highgui: g_thread_create deprecated warning

This commit is contained in:
Alexander Alekhin 2016-11-25 16:16:25 +03:00
parent a53f93ff8d
commit 3f37e34e76

View File

@ -619,9 +619,13 @@ CV_IMPL int cvStartWindowThread(){
// conditional that indicates a key has been pressed
cond_have_key = g_cond_new();
#if !GLIB_CHECK_VERSION(2, 32, 0)
// this is the window update thread
window_thread = g_thread_create((GThreadFunc) icvWindowThreadLoop,
NULL, TRUE, NULL);
#else
window_thread = g_thread_new("OpenCV window update", (GThreadFunc)icvWindowThreadLoop, NULL);
#endif
}
thread_started = window_thread!=NULL;
return thread_started;