[PATCH 3/7] d3d9/tests: Test messages on focus loss (v3).

Stefan Dösinger stefandoesinger at gmail.com
Mon Oct 6 09:34:47 CDT 2014


Am 06.10.2014 um 15:49 schrieb Henri Verbeet <hverbeet at gmail.com>:

> On 6 October 2014 13:42, Stefan Dösinger <stefan at codeweavers.com> wrote:
>> -    device = create_device(d3d9, device_window, focus_window, FALSE);
>> -    if (!device)
>> +    present_parameters.Windowed = FALSE;
>> +    present_parameters.hDeviceWindow = device_window;
>> +    present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
>> +    present_parameters.BackBufferWidth = 640;
>> +    present_parameters.BackBufferHeight = 480;
>> +    present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
>> +    if (FAILED(IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, focus_window,
>> +            D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device)))
> We're just hoping the display resolution isn't already 640x480 here,
> right?
Yes. It seems like a reasonable assumption to me nowadays. I preferred not to complicate the tests with checks for the current resolution.

> I'd also rather see this using create_device(). Or perhaps some
> variant like create_device_pp() taking a D3DPRESENT_PARAMETERS
> structure,
I can do that, but you preferred a direct call to CreateDevice over a parameter when the parameter in question was software vs hardware rendering.

> although it seems to me that the issue you're running into
> is just that screen_width and screen_height aren't very good choices
> for the backbuffer dimensions in the general case.
No, I think it is reasonable for the other tests that use fullscreen mode. On some monitors changing to a different mode takes a lot more time than just switching to fullscreen.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20141006/2380a5c5/attachment.sig>


More information about the wine-devel mailing list