2016-02-23 18:37 GMT+01:00 Miklós Máté mtmkls@gmail.com:
This enables high resolution setting in Anachronox, when Wine is configured to emulate a virtual desktop. The game only supports 640x480 and 1280x960.
Signed-off-by: Miklós Máté mtmkls@gmail.com
dlls/winex11.drv/desktop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 603e19f..2d8c039 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -37,8 +37,8 @@ static unsigned int dd_mode_count; static unsigned int max_width; static unsigned int max_height;
-static const unsigned int widths[] = {320, 400, 512, 640, 800, 1024, 1152, 1280, 1400, 1600}; -static const unsigned int heights[] = {200, 300, 384, 480, 600, 768, 864, 1024, 1050, 1200}; +static const unsigned int widths[] = {320, 400, 512, 640, 800, 1024, 1152, 1280, 1280, 1400, 1600}; +static const unsigned int heights[] = {200, 300, 384, 480, 600, 768, 864, 960, 1024, 1050, 1200}; #define NUM_DESKTOP_MODES (sizeof(widths) / sizeof(widths[0]))
I would replace those two arrays with an array of structs i.e. something like:
static const struct { unsigned int width; unsigned int height; } desktop_modes[] = { {320, 200}, ... };
changing the rest accordingly.
Not sure if there are other concerns with this patch. I guess we could add more modes (e.g. 1366x768, 1280x800, 1920x1080, 1920x1200, 2560x1440, 2560x1600, maybe even more from https://en.wikipedia.org/wiki/Graphics_display_resolution or similar). I don't think there is a problem with maintaining a list here (or, at least, I don't see any way to do without).
I trust someone else will correct me if I'm utterly wrong.