Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

No resolutions available to change #4324

Closed
wzdev-ci opened this issue Jan 2, 2016 · 13 comments
Closed

No resolutions available to change #4324

wzdev-ci opened this issue Jan 2, 2016 · 13 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Jan 2, 2016

resolution_fixed type_bug | by ilario


I'm running Warzone2100 compiled today from master branch. I have a laptop with NVIDIA GeForce Go 7300 running nvidia driver 304.131 on Debian testing 32bit. The game opens up at 640x480 resolution and when I attempt to change resolution nothing happens while in the logs I can read:

error   |08:40:20: [runVideoOptionsMenu:1170] No resolutions available to change.

Then I changed the resolution manually in ~/.warzone2100-master/config file and that worked.


Issue migrated from trac:4324 at 2022-04-16 11:52:28 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2016

vexed changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2016

vexed changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2016

vexed commented


No idea, could be video driver related or perhaps a bug in SDL 2, which is what we use.

I tried debian & mint, and I don't have your issues, so hard to say what is going on.

If you are good at tracing things, I would start with the SDL 2 code we use that sets that up, and see where it is going wrong on your system.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

ilario commented


Seems that my monitor is reporting 59 Hz as refresh rate, so it's filtered here:
https://github.com/Warzone2100/warzone2100/blob/master/lib/sdl/main_sdl.cpp#L1322

$ xrandr                
Screen 0: minimum 8 x 8, current 1280 x 800, maximum 4096 x 4096
VGA-0 disconnected primary (normal left inverted right x axis y axis)
TV-0 disconnected (normal left inverted right x axis y axis)
LVDS-0 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800      59.98*+
DVI-I-0 disconnected (normal left inverted right x axis y axis)

Anyway "SDL_GetNumDisplayModes(0)" gives just one display mode which is "Monitor[0]1280x800 59 SDL_PIXELFORMAT_RGB888".
I'm going to try using nouveau graphic driver (now I'm using nvidia 304.131).

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

ilario changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

ilario commented


Using nouveau I have more resolutions available:

$ xrandr 
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800      59.98*+
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   720x400       59.55  
   640x400       59.95  
   640x350       59.77  
VGA-1 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
TV-1 disconnected (normal left inverted right x axis y axis)

And they are recognized in WZ as

Monitor[0]1280x800 59 SDL_PIXELFORMAT_RGB888
Monitor[0]1024x768 59 SDL_PIXELFORMAT_RGB888
Monitor[0]800x600 59 SDL_PIXELFORMAT_RGB888
Monitor[0]720x400 59 SDL_PIXELFORMAT_RGB888
Monitor[0]640x480 59 SDL_PIXELFORMAT_RGB888
Monitor[0]640x400 59 SDL_PIXELFORMAT_RGB888
Monitor[0]640x350 59 SDL_PIXELFORMAT_RGB888

So always 59 Hz.
I can't really run the game because of laziness of completely replace nvidia driver with nouveau driver.
Anyway there seems to be two problems:

  1. the refresh rate of my screen is not accepted
  2. even when used in windowed mode, just a list of available screen resolutions is provided

In my opinion they can be resolved:

  1. changing "if (displaymode.refresh_rate <= 59)" in "if (displaymode.refresh_rate < 59)", if you want I can make a pull request for this :P
  2. adding a list of common resolutions to the list of "real" resolutions taken from sdl, checking that their X and Y are minor than the biggest real ones

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2016

vexed commented


OK, thanks, I'll push a fix.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 4, 2016

ilario commented


  1. Accepting monitors with refresh rate of 59 Hz warzone2100#60
  2. my knowledge of C++ is close to zero, better if someone else tries to implement this

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 4, 2016

vexed commented


No need for pull requests, we don't use them. http://forums.wz2100.net/viewtopic.php?f=1&t=11570

As for the fix, I will get to it, just got to finish fixing the release of 3.1.3, please be patient. :)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 5, 2016

Cyp <cyp@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 5, 2016

Cyp <cyp@...> changed owner from `` to Cyp <cyp@wz2100.net>

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 5, 2016

Cyp <cyp@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 5, 2016

Cyp <cyp@...> committed [4]


In Warzone2100/warzone2100@4cf3753:

#CommitTicketReference repository="" revision="4cf37531a46d9240310c5c0ba7560a98859830e9"
Merge remote-tracking branch 'ilario/master'

Fixes #4324.

@wzdev-ci wzdev-ci closed this as completed May 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant