Detect screen resolution change errors

Francois Gouget fgouget at codeweavers.com
Tue Jan 30 07:10:03 CST 2007


When I run the dlls/d3d9/device conformance test on Windows in VMware, I 
get a trace telling me that IDirect3D9_CreateDevice() failed and 
returned 0x8876086c. This seems to be because Windows has trouble 
changing the screen resolution when running in VMware (though it's 
perfectly capable of doing it when I go through the control panel).

But when I run the test in Wine I'm getting a test failure because:
  * IDirect3D9_CreateDevice() did not change the screen resolution
  * but it returned success so that the screen size checks fail

That's because XRandR fails to change the resolution (for whatever 
reason, it's irrelevant here). Wine detects that but does not report the 
information to the upper layers. So I have made a couple of patches:
  * the first one detects when XRandR, XVidMode or some low level 
routine fails to change the screen resolution, and propagates this so 
ChangeDisplaySettingsEx() returns an error
  * the second one modifies 
IWineD3DDeviceImpl_CreateAdditionalSwapChain() so it detects when 
ChangeDisplaySettingsEx() propagates that error upstream too

Now the dlls/d3d9/device test succeeds on my machine (all while loudly 
complaining something is wrong):
[...]
err:xrandr:X11DRV_XRandR_SetCurrentMode Resolution change not successful 
-- perhaps display has changed?
fixme:d3d9:IDirect3DDevice9Impl_CreateAdditionalSwapChain (0x1c4358) 
call to IWineD3DDevice_CreateAdditionalSwapChain failed
fixme:d3d9:IDirect3D9Impl_CreateDevice (0x171448) D3D Initialization 
failed for WineD3DDevice 0x174ee8
device.c:741:could not create device, IDirect3D9_CreateDevice returned 
0x8876086c
device.c: 245 tests executed (0 marked as todo, 0 failures), 0 skipped.


I have attached the relevant patches. Does this look ok to the DirectX 
gurus?


-- 
Francois Gouget
fgouget at codeweavers.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wined3d.diff
Type: text/x-diff
Size: 1169 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070130/9ea57a09/wined3d-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winex11.diff
Type: text/x-diff
Size: 6081 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070130/9ea57a09/winex11-0001.bin


More information about the wine-devel mailing list