Small OpenGL fix

Lionel Ulmer lionel.ulmer at free.fr
Sun Jul 15 11:31:33 CDT 2001


Hi all,

I spent most of the day tracking an 'abort' in SYSMETRICS_Init due to the
fact that the "DISPLAY" driver was not loaded.

I tracked this down to the fact that OpenGL32.DLL was the first library
loaded by the application.

The problem is here in the dependencies graph :

   Skully.exe (my debug program)
   |
   + OpenGL32.dll
     |
     + X11DRV.dll
       |
       + User32.dll

The problem is that when the loading of OpenGL32 happens, it first loads
'USER32'. When attaching 'USER32', it tries to reload 'X11DRV' (and fails as
the 'recursion' lock is in place). 

This means that when it calls SYSMETRICS_Init, the 'DISPLAY' driver was not
registered yet (as we did not yet attach to the X11 driver) => we get the
abort.

This is more a problem of inter-dependencies of X11DRV and USER32 (as the
former should NEVER be loaded before the latter)... But as I could not fix
this problem, I prefered going 'around' the problem :-) 

And thus the attached patch (I see it was already done for DDraw) :

Changelog:
 Make sure user32 is always loaded before x11drv

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: wine/dlls/opengl32/opengl32.spec
===================================================================
RCS file: /home/wine/wine/dlls/opengl32/opengl32.spec,v
retrieving revision 1.8
diff -u -r1.8 opengl32.spec
--- wine/dlls/opengl32/opengl32.spec	2001/03/04 01:05:20	1.8
+++ wine/dlls/opengl32/opengl32.spec	2001/07/15 16:00:57
@@ -3,6 +3,7 @@
 type win32
 
 init OpenGL32_Init
+import user32
 import x11drv
 import kernel32
 


More information about the wine-patches mailing list