X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-glk.c;h=a350c5aa0442bd35dd5dcb9aff389fa567eedd4a;hb=1e0dc5378f314f555e3b923c6d95f5017abd528b;hp=337cfa5fce112326e50b4349b0b696c8bb050b6e;hpb=e4a75256e901a89729c48fcc2f9229cd0cfe9124;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 337cfa5..a350c5a 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -1128,8 +1128,8 @@ glk_main() runs. Takes ownership of @startup and will free it. */ static gpointer glk_enter(struct StartupData *startup) { - extern GPrivate *glk_data_key; - g_private_set(glk_data_key, startup->glk_data); + extern GPrivate glk_data_key; + g_private_set(&glk_data_key, startup->glk_data); /* Acquire the Glk thread's references to the input queues */ g_async_queue_ref(startup->glk_data->char_input_queue); @@ -1236,8 +1236,8 @@ chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *argv[], GE g_object_notify(G_OBJECT(glk), "program-name"); /* Run in a separate thread */ - priv->thread = g_thread_create((GThreadFunc)glk_enter, startup, TRUE, error); - + priv->thread = g_thread_try_new("glk", (GThreadFunc)glk_enter, startup, error); + return !(priv->thread == NULL); }