I have been browsing the source tree and was following the methods used by DirectDraw and was considering a similar approach. While I was browsing the source, I was eventually lead to dlls/x11drv/xvidmode.c which contains most of the functions that I will probably need. But I still have a few concerns:
- Is the x11drv used for ddraw AND the gdi or just one?
- what is the best way to query if the video exists? without knowing syncs?
- and if i need to know syncs how do I find them?
My first question was : why implement it ? I would personnaly find VERY annoying to have any Windows app. change the size of my desktop window when I prefer running my applications 'windowed'.
Moreover, I would prefer you to handle first the 'Desktop' case :-) In that case, no need to use any X extension, you just have to resize the desktop window.
Another question I have is about pixel depth. From what I understand, it is imposible to change the pixel format of the screen while X is running. However, it is possible to start more than one X server with different configs (and depth) which we could use if we have to but probably not a good idea. Of course another posibility is to emulate the pixel depth, but that would probably cause performance problems, especially when used by games. Anyone have any suggestions or should we just leave changing depths as unimplemented?
Depth changing is part of the new X extension called 'RandR' (Rotate and Resize). I do not know at all though when it will be available on 'normal' X servers (as it was mostly developped now for the iPAQ handheld to rotate the screen).
Keith Packard (the Render author (BTW how is the support of this extension progressing :-) ? )) and Jim Gettys are the main developpers of this extension.
So I would probably wait for this extension to be available before starting any code on ChangeDisplaySettings... And please consider having it optional :-)
Lionel