--- Lionel Ulmer lionel.ulmer@free.fr wrote:
This patch partially implements the ChangeDisplaySettings* functions.
Well, I am 100 % sure that Alexandre will reject it :-)
:-\
If you want to do something like that, you need to implement the feature in the X11 driver and then call it via the 'USER_Driver.pFunctionName' protocol.
Hmm, I was going to try something like that, however, I had problems with that method simply b/c of the load order between the dlls. ChangeDisplaySettings is implemented in user32.dll which loads BEFORE x11drv. This makes it impossible to initalize the function with the user32.dll. However, with DDraw, the x11drv.dll is loaded before the ddraw.dll! The only way I saw to exchange info was to initialize the function with a call from x11drv.dll. If you can suggest an alternative that takes load order into account I will likely use it.
Moreover, there are already some DDraw-related mode change functions (in dlls/x11drv/xvidmode.c). This should be factorized between both code.
Already using so of that code, although it could probably be cleaned up a bit. I will get to that soon.
- Travis Michielsen
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Hmm, I was going to try something like that, however, I had problems with that method simply b/c of the load order between the dlls. ChangeDisplaySettings is implemented in user32.dll which loads BEFORE x11drv.
Yes, but if you look at file user32.spec, you have :
init USER_Init
This is a function called at DLL loading (AFAIK). It is in file user_main.c
At DLL loading, this function calls 'process_attach' that calls 'load_driver' (all functions are in the same file).
'load_driver' does the following :
strcpy( buffer, "x11drv" ); /* default value */ (...) if (!(graphics_driver = LoadLibraryA( buffer ))) { MESSAGE( "Could not load graphics driver '%s'\n", buffer ); return FALSE; } This means that even if USER32.dll is loaded BEFORE x11drv.dll, the init function of USER32 will load the current graphics driver, i.e. x11drv.
Later in the same function, all function pointers are initialized using the GET_USER_FUNC macro.
BTW, you did NOT read the thread about my OpenGL fixes recently where Alexandre plainly told that putting x11drv.dll in a spec file is bad :-) ?
Already using so of that code, although it could probably be cleaned up a bit. I will get to that soon.
Ah, did not look in details at your patch :-) Stopped at the 'Oh my god, X11 calls in USER' :-)
Anyway, let's hope I will not discourage you :-)
Lionel
--- Lionel Ulmer lionel.ulmer@free.fr wrote:
Hmm, I was going to try something like that, however, I had problems with
that
method simply b/c of the load order between the dlls.
ChangeDisplaySettings is
implemented in user32.dll which loads BEFORE x11drv.
Yes, but if you look at file user32.spec, you have :
init USER_Init
This is a function called at DLL loading (AFAIK). It is in file user_main.c
At DLL loading, this function calls 'process_attach' that calls 'load_driver' (all functions are in the same file).
'load_driver' does the following :
strcpy( buffer, "x11drv" ); /* default value */
(...) if (!(graphics_driver = LoadLibraryA( buffer ))) { MESSAGE( "Could not load graphics driver '%s'\n", buffer ); return FALSE; }
This means that even if USER32.dll is loaded BEFORE x11drv.dll, the init function of USER32 will load the current graphics driver, i.e. x11drv.
Later in the same function, all function pointers are initialized using the GET_USER_FUNC macro.
Ahh, now I see.
BTW, you did NOT read the thread about my OpenGL fixes recently where Alexandre plainly told that putting x11drv.dll in a spec file is bad :-) ?
Hmm, will go find and reread it. Probably just skimmed through it the first time.
Already using so of that code, although it could probably be cleaned up a
bit.
I will get to that soon.
Ah, did not look in details at your patch :-) Stopped at the 'Oh my god, X11 calls in USER' :-)
Anyway, let's hope I will not discourage you :-)
Lionel
Not to worry, I accept most of the constructive critizism that I recieve. Besides, I'm still new to and learning things about the project.
- Travis Michielsen
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/