diff options
author | Loïc Hoguin <[email protected]> | 2014-04-08 11:24:52 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-04-08 11:24:52 +0200 |
commit | c62f79fc3266ba7c21ed4ada84d16aab771f0d02 (patch) | |
tree | 34f63bdd0985ccf2bcb1122316bb1c27402d687c /src/sdl_surface.erl | |
parent | 424cf7c72829a39f10f1d5e6975118e4348c0379 (diff) | |
download | esdl2-c62f79fc3266ba7c21ed4ada84d16aab771f0d02.tar.gz esdl2-c62f79fc3266ba7c21ed4ada84d16aab771f0d02.tar.bz2 esdl2-c62f79fc3266ba7c21ed4ada84d16aab771f0d02.zip |
Make sdl_surface:img_load/1 run in the main thread
While this and other surface functions don't need to, depending
on the backend or flags the surface may not be in system memory
and therefore may not be thread safe.
Diffstat (limited to 'src/sdl_surface.erl')
-rw-r--r-- | src/sdl_surface.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sdl_surface.erl b/src/sdl_surface.erl index f36407f..15a4dec 100644 --- a/src/sdl_surface.erl +++ b/src/sdl_surface.erl @@ -17,4 +17,5 @@ -export([load/1]). load(Filename) -> - esdl2:img_load(Filename). + esdl2:img_load(Filename), + receive {'_nif_thread_ret_', Ret} -> Ret end. |