On 6 October 2014 13:42, Stefan Dösinger <stefan(a)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? I'd also rather see this using create_device(). Or perhaps some
variant like create_device_pp() taking a D3DPRESENT_PARAMETERS
structure, 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.