From 734d0db4b957c880a84b9c5445e93b471a13a789 Mon Sep 17 00:00:00 2001 From: Sander Schobers <sander@schobers.eu> Date: Sat, 17 Feb 2018 15:01:58 +0100 Subject: [PATCH] Locking OS thread in init method. --- allegro5/system.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/allegro5/system.go b/allegro5/system.go index 653c8e1..6fd40fe 100644 --- a/allegro5/system.go +++ b/allegro5/system.go @@ -12,8 +12,13 @@ import "C" import ( "errors" + "runtime" ) +func init() { + runtime.LockOSThread() +} + type InitConfig struct { Font bool Image bool