]> git.sur5r.net Git - cc65/commitdiff
added sleep() implementation
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 15 Aug 2003 19:24:20 +0000 (19:24 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 15 Aug 2003 19:24:20 +0000 (19:24 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2324 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/geos/common/Makefile
libsrc/geos/common/sleep.c [new file with mode: 0644]

index 575d4e1c14cad56292ab6dc31d50635603530486..48dce5cc73d9c1a3b2163f1a92a5927bc75cf975 100644 (file)
@@ -10,7 +10,7 @@
 %.o:   %.s
        @$(AS) -o $@ $(AFLAGS) $<
 
-C_OBJS = _afailed.o abort.o perror.o
+C_OBJS = _afailed.o abort.o perror.o sleep.o
 S_OBJS = copydata.o memcpy.o memset.o zerobss.o
 
 all: $(C_OBJS) $(S_OBJS)
diff --git a/libsrc/geos/common/sleep.c b/libsrc/geos/common/sleep.c
new file mode 100644 (file)
index 0000000..32b9689
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * sleep.c
+ *
+ * Maciej 'YTM/Elysium' Witkowiak, 15.08.2003
+ *
+ */
+
+#include <geos.h>
+
+unsigned __fastcall__ sleep (unsigned wait)
+{
+    char typ;
+
+    if ( (get_tv()) & TV_NTSC ) {
+       typ = 60;
+    } else {
+       typ = 50;
+    }
+
+    Sleep(wait*typ);
+
+    return 0;
+}