summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-04-07 15:07:27 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-04-07 15:07:27 +0200
commitd6b28723a26151d8ac6cb195d4e2135b05fdac5a (patch)
tree3b70252d6384a1a4434364095c3b600118872307 /src/Bindings
parentc0d2d54ea1687a80ff76fa032ad4dc89670d2988 (diff)
downloadhtanks-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.hsc5
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 ()