changeset 7718:05ded2e1327a

fixed 2 10l bugs, ATI VCR2 dll now working
author alex
date Sat, 12 Oct 2002 16:40:56 +0000
parents 14fc17fce5bd
children 41e8d0916c60
files loader/win32.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/loader/win32.c	Sat Oct 12 15:49:19 2002 +0000
+++ b/loader/win32.c	Sat Oct 12 16:40:56 2002 +0000
@@ -1243,7 +1243,7 @@
 	pthread_mutex_init(&cs->mutex, NULL);
 	cs->locked=0;
         cs->deadbeef = 0xdeadbeef;
-	*(void**)c = cs + 1;
+	*(void**)c = cs;
     }
 #endif
     return;
@@ -1254,10 +1254,9 @@
 #ifdef CRITSECS_NEWTYPE
     struct CRITSECT* cs = critsecs_get_unix(c);
 #else
-    struct CRITSECT* cs = (*(struct CRITSECT**)c) - 1;
-
+    struct CRITSECT* cs = (*(struct CRITSECT**)c);
 #endif
-    dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, cs->deadbeef);
+    dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:NULL);
     if (!cs)
     {
 	dbgprintf("entered uninitialized critisec!\n");
@@ -1265,7 +1264,7 @@
 #ifdef CRITSECS_NEWTYPE
 	cs=critsecs_get_unix(c);
 #else
-	cs = (*(struct CRITSECT**)c) - 1;
+	cs = (*(struct CRITSECT**)c);
 #endif
 	printf("Win32 Warning: Accessed uninitialized Critical Section (%p)!\n", c);
     }
@@ -1282,7 +1281,7 @@
 #ifdef CRITSECS_NEWTYPE
     struct CRITSECT* cs = critsecs_get_unix(c);
 #else
-    struct CRITSECT* cs = (*(struct CRITSECT**)c) - 1;
+    struct CRITSECT* cs = (*(struct CRITSECT**)c);
 #endif
     //    struct CRITSECT* cs=(struct CRITSECT*)c;
     dbgprintf("LeaveCriticalSection(0x%x) 0x%x\n",c, cs->deadbeef);
@@ -1300,7 +1299,7 @@
 #ifdef CRITSECS_NEWTYPE
     struct CRITSECT* cs = critsecs_get_unix(c);
 #else
-    struct CRITSECT* cs= (*(struct CRITSECT**)c) - 1;
+    struct CRITSECT* cs= (*(struct CRITSECT**)c);
 #endif
     //    struct CRITSECT* cs=(struct CRITSECT*)c;
     dbgprintf("DeleteCriticalSection(0x%x)\n",c);