Ticket #532 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

[PATCH] GUI resolution incorrect when screen smaller than requested window size

Reported by: Philip Owned by: sergiovier
Priority: Nice to Have Milestone: Alpha 4
Component: Core engine Keywords: simple, review
Cc:

Description

Steps to reproduce:

  • Optionally set up a .cfg file to start the game in windowed mode with a certain xres/yres (else the default is 1024x768).
  • Set display resolution to smaller than that size.
  • Start the game.

The initial window is shrunk to fit on the screen, but the game renders everything at the configured size instead (so the menu screen is partially off the side of the screen). It should detect this kind of situation and update things to fit.

(ps/VideoMode.cpp is probably a relevant place to look for this.)

Attachments

incorrect-resolution.patch (1009 bytes) - added by sergiovier 2 years ago.
fix resolution when we have wrong values

Change History

comment:1 Changed 3 years ago by Philip

This may have been fixed in #544.

comment:2 Changed 3 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:3 Changed 3 years ago by wacko

  • Owner set to wacko
  • Milestone set to OS Alpha 2

comment:4 Changed 3 years ago by k776

  • Milestone changed from OS Alpha 2 to OS Alpha 3

comment:5 Changed 3 years ago by k776

  • Owner wacko deleted

comment:6 Changed 2 years ago by k776

  • Milestone changed from Alpha 3 to Alpha 4

comment:7 Changed 2 years ago by sergiovier

  • Owner set to sergiovier

comment:8 Changed 2 years ago by sergiovier

  • Keywords simple, review added; simple removed

if not misunderstood, this patch fix the resolution problem (i've tested in linux)

Changed 2 years ago by sergiovier

fix resolution when we have wrong values

comment:9 Changed 2 years ago by k776

  • Summary changed from GUI resolution incorrect when screen smaller than requested window size to [PATCH] GUI resolution incorrect when screen smaller than requested window size

comment:10 follow-up: ↓ 11 Changed 2 years ago by Philip

Hrm... Were you able to reproduce the bug before applying this patch? I tried it on Linux and Windows and couldn't get this bug - the window was shrunk to fit the screen and the main menu GUI rendered correctly. It's possible it was fixed by r8072 from #544. Did you still get that problem? (Or maybe a slightly different problem where the window wasn't shrunk to fit, or something? I don't know why that would happen but it looks like the patch would fix that too.)

comment:11 in reply to: ↑ 10 Changed 2 years ago by sergiovier

When i set up my desktop resolution to 960x600, config the game to start in windowed mode and default resolution is 1024x768, I get this at just the start of the game (it's a capture of all my desktop, without touch anything).

Replying to Philip:

Hrm... Were you able to reproduce the bug before applying this patch? I tried it on Linux and Windows and couldn't get this bug - the window was shrunk to fit the screen and the main menu GUI rendered correctly. It's possible it was fixed by r8072 from #544. Did you still get that problem? (Or maybe a slightly different problem where the window wasn't shrunk to fit, or something? I don't know why that would happen but it looks like the patch would fix that too.)

comment:12 Changed 2 years ago by philip

  • Status changed from new to closed
  • Resolution set to fixed

(In [8915]) Restrict the initial window size to the screen size (hopefully fixes #532).

Note: See TracTickets for help on using tickets.