Screen mode retrieval/trace tool for Windows

Denver Gingerich denver at
Tue Mar 4 16:09:10 CST 2008

I am trying to trace the sequence of screen mode
(resolution/bpp/refresh rate) changes that occur when StarCraft is run
in Windows so that I can make Wine emulate Windows' behavior.  Right
now I'm trying to see exactly what resolution, bits per pixel, and
refresh rate StarCraft is using.  Unfortunately, I can't just go into
Display Properties while StarCraft is running because it switches the
resolution back when you Alt-Tab out of the game.

My current plan is to install an SSH or telnet server on the Windows
machine and run a command line tool to check the current screen mode
while StarCraft is running.   I have used a couple of command-line
tools for changing the screen mode [1] [2], but neither of them have
an option to list the current mode.  Does anyone know of a tool or can
anyone quickly create a tool that will list the resolution currently
in use from the command line?

I have tried using StraceNT [3] to see the parameters passed to
ChangeDisplaySettingsEx (which is the function StarCraft uses to
change the resolution), but it does not let me look at the DEVMODE
structure that is passed in.  Does anyone know of a trace tool that
would let me do that?

Based on my testing so far, there appears to be a discrepancy in how
Windows and Wine set the refresh rate if none is specified on a
resolution change.  Wine always picks the first mode with a matching
resolution, while Windows does not.  My tests in Windows have shown
that even though StarCraft asks for 640x480 and the first mode with
that resolution has a 60 Hz refresh rate, Windows chooses a higher
refresh rate.  Unfortunately, I don't know exactly which refresh rate,
but I can verify by sight that 60 Hz is not being used (the screen
doesn't flicker as it would at 60 Hz).  This discrepancy is why I wish
to run further tests and acquire more precise information about the
refresh rate being used.

I am performing this testing according to a request in a previous
thread [4].  If you have any questions about my testing, please let me



More information about the wine-devel mailing list