Screen mode retrieval/trace tool for Windows

mark cox melbournemark+wine-devel at gmail.com
Tue Mar 4 18:38:59 CST 2008


Perhaps use detours to hook the ChangeDisplaySettingsEx function and dump
the devmode structure to a file?
Regards,
mark


On Wed, Mar 5, 2008 at 9:09 AM, Denver Gingerich <denver at ossguy.com> wrote:

> 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
> know.
>
> Denver
>
>
> 1. http://www.vrdevelopers.de/content/view/15/44/
> 2. http://www.nirsoft.net/utils/nircmd.html
> 3. http://www.intellectualheaven.com/default.asp?BH=projects&H=strace.htm
> 4. http://www.winehq.org/pipermail/wine-devel/2008-March/063150.html
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20080305/772b38ea/attachment.htm 


More information about the wine-devel mailing list