Perhaps use detours to hook the ChangeDisplaySettingsEx function and dump the devmode structure to a file?<br>Regards,<br>mark<br><br><br><div class="gmail_quote">On Wed, Mar 5, 2008 at 9:09 AM, Denver Gingerich &lt;<a href="mailto:denver@ossguy.com">denver@ossguy.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am trying to trace the sequence of screen mode<br>
(resolution/bpp/refresh rate) changes that occur when StarCraft is run<br>
in Windows so that I can make Wine emulate Windows&#39; behavior. &nbsp;Right<br>
now I&#39;m trying to see exactly what resolution, bits per pixel, and<br>
refresh rate StarCraft is using. &nbsp;Unfortunately, I can&#39;t just go into<br>
Display Properties while StarCraft is running because it switches the<br>
resolution back when you Alt-Tab out of the game.<br>
<br>
My current plan is to install an SSH or telnet server on the Windows<br>
machine and run a command line tool to check the current screen mode<br>
while StarCraft is running. &nbsp; I have used a couple of command-line<br>
tools for changing the screen mode [1] [2], but neither of them have<br>
an option to list the current mode. &nbsp;Does anyone know of a tool or can<br>
anyone quickly create a tool that will list the resolution currently<br>
in use from the command line?<br>
<br>
I have tried using StraceNT [3] to see the parameters passed to<br>
ChangeDisplaySettingsEx (which is the function StarCraft uses to<br>
change the resolution), but it does not let me look at the DEVMODE<br>
structure that is passed in. &nbsp;Does anyone know of a trace tool that<br>
would let me do that?<br>
<br>
Based on my testing so far, there appears to be a discrepancy in how<br>
Windows and Wine set the refresh rate if none is specified on a<br>
resolution change. &nbsp;Wine always picks the first mode with a matching<br>
resolution, while Windows does not. &nbsp;My tests in Windows have shown<br>
that even though StarCraft asks for 640x480 and the first mode with<br>
that resolution has a 60 Hz refresh rate, Windows chooses a higher<br>
refresh rate. &nbsp;Unfortunately, I don&#39;t know exactly which refresh rate,<br>
but I can verify by sight that 60 Hz is not being used (the screen<br>
doesn&#39;t flicker as it would at 60 Hz). &nbsp;This discrepancy is why I wish<br>
to run further tests and acquire more precise information about the<br>
refresh rate being used.<br>
<br>
I am performing this testing according to a request in a previous<br>
thread [4]. &nbsp;If you have any questions about my testing, please let me<br>
know.<br>
<br>
Denver<br>
<br>
<br>
1. <a href="http://www.vrdevelopers.de/content/view/15/44/" target="_blank">http://www.vrdevelopers.de/content/view/15/44/</a><br>
2. <a href="http://www.nirsoft.net/utils/nircmd.html" target="_blank">http://www.nirsoft.net/utils/nircmd.html</a><br>
3. <a href="http://www.intellectualheaven.com/default.asp?BH=projects&amp;H=strace.htm" target="_blank">http://www.intellectualheaven.com/default.asp?BH=projects&amp;H=strace.htm</a><br>
4. <a href="http://www.winehq.org/pipermail/wine-devel/2008-March/063150.html" target="_blank">http://www.winehq.org/pipermail/wine-devel/2008-March/063150.html</a><br>
<br>
<br>
</blockquote></div><br>