diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2010-04-07 15:07:27 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2010-04-07 15:07:27 +0200 |
commit | d6b28723a26151d8ac6cb195d4e2135b05fdac5a (patch) | |
tree | 3b70252d6384a1a4434364095c3b600118872307 /src/Bindings | |
parent | c0d2d54ea1687a80ff76fa032ad4dc89670d2988 (diff) | |
download | htanks-d6b28723a26151d8ac6cb195d4e2135b05fdac5a.tar htanks-d6b28723a26151d8ac6cb195d4e2135b05fdac5a.zip |
Use system sleep functions as threadDelay sleep to long without -threaded
Diffstat (limited to 'src/Bindings')
-rw-r--r-- | src/Bindings/GLX.hsc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Bindings/GLX.hsc b/src/Bindings/GLX.hsc index d5fed4d..f773aad 100644 --- a/src/Bindings/GLX.hsc +++ b/src/Bindings/GLX.hsc @@ -20,6 +20,7 @@ module Bindings.GLX ( createColormap , makeCurrent , destroyContext , swapBuffers + , glxUsleep , Context(..) , Drawable ) where @@ -41,6 +42,7 @@ import Graphics.X11.Xlib.Types (Dimension, Display, Pixel, Position) #include <GL/glx.h> +#include <unistd.h> type Drawable = XID @@ -263,3 +265,6 @@ foreign import ccall unsafe "GL/glx.h glXDestroyContext" foreign import ccall unsafe "GL/glx.h glXSwapBuffers" swapBuffers :: Display -> Drawable -> IO () + +foreign import ccall unsafe "unistd.h usleep" + glxUsleep :: CULong -> IO () |