display modes

Alex Pasadyn ajp at mail.utexas.edu
Sun Sep 28 14:24:31 CDT 2003

Lionel Ulmer wrote:
>>Specifically, it will:
>>- include more choices for the desktop size
>>- always list all modes as including 8, 16, and 32-bit
>>- silently ignore you when you try to change the depth
>>- remove duplicated modes (see above)
>>- include more TRACE lines for better debugging
> Well, if XVidMode returns only one mode, will your new patch still enumerate
> 'fake' modes ?

Here's what I did.  I assume that the users fall into two categories: 
those who want to really change the X server resolutions and those that 
do not.  (I operate in both categories depending on the situation, using 
per-app defaults.)  So, I set it up so that the user will either use 
XVidMode (and set up their X server to include all the modes they want 
to use) or use the Wine desktop (and have access to the hard-coded list 
of modes).

My original patch was not friendly about the depth changing, so I am 
improving that.  Now, it will always enumerate 8, 16, and 32-bit modes 
and silently ignore depth change requests.  This allows the ddraw and 
d3d code to be "clean" so if we ever get depth change support they will 
not have to change.

I wrote a small test program that just lets you test all the modes, and 
I believe that it should now handle all the cases.  I have tested 
starting up a new Wine on a second X server (in Wine desktop mode, with 
no window manager), and that all seems fine, so I think that handles the 
case you talked about a while back.

One thing was that desktop mode had a tendency to crash a lot.  I found 
the error that made that happen (at least on my system) and submitted a 
patch for it yesterday.

I believe that handles all the cases.  Everything I've tested works 
(that worked before anyway).  The only time you don't get any modes 
enumerated is if you are running without the Wine desktop and without 
XVidmode.  Assuming all this new patch works as intended, is there any 
advantage to running that way now?

> And, yes, somes games will fail if you did strict depth checking (Jedi
> Knight being one of them that I am sure of).

That's not one I have but it should be taken care of with this next patch.

> So the conclusion : most of the hacks that were here were for a reason :-)

Yeah I understand that.  My problem is that there are at least half a 
dozen ways to change the resolution that all work on Windows.  I have 
several games installed, and I know that using them I exercised 
ChangeDisplaySettings, D3D8, DDRAW, and they all worked (even with my 
old patch) in both Wine desktop and XVidMode modes.  Hopefully this one 
will be a little friendlier.


More information about the wine-devel mailing list