Vid mode slider resets vid_conwidth and vid_conheight

If you've had any problems with Nexuiz, or would like to report bugs, post here.

Moderators: Nexuiz Moderators, Moderators

Vid mode slider resets vid_conwidth and vid_conheight

Postby Ed » Sun Sep 21, 2008 5:35 pm

In the new menu system (tested in 2.4.2 and SVN), moving the video mode slider in the menu resets vid_conwidth to 800 and vid_conheight to 600.

As an example, I run a screen resolution of 1920x1200 and an 800x600 console would make the menu and console text much too big. Instead I use a 1280x800 console for aspect ratio reasons.

Code: Select all
vid_conwidth 1280
vid_conheight 800


When I move the video mode slider at all, without even pressing apply, the console text mode is immediately reset to 800x600. This is annoying.

Could this behaviour be stopped? What I would like to see is the 800x600 setting to stay as default but for the aspect ratio to be varied in accordance with the aspect ratio of the selected resolution. IE, by selecting a 16:10 aspect ratio, vid_conheight would be changed (when apply is pressed) to 960 so the console would be 960x600. IN addition I would add a 2D scaling option which just varies vid_conwidth and vid_conheight.
Ed
Forum addon
 
Posts: 1172
Joined: Wed Mar 01, 2006 12:32 am
Location: UK

Postby divVerent » Sun Sep 21, 2008 5:54 pm

The main reason for this is 640x480 support, which CANNOT run at the default 800x600 console resolution, so the menu switches to 640x480 console resolution then too. No idea how to change that part without allowing a possibility to get unreadable text.

Basically... if you do not like what the slider does, don't touch it. If you have an idea that fixes the 640x480 issue too, tell us...
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Ed » Sun Sep 21, 2008 6:19 pm

divVerent wrote:The main reason for this is 640x480 support, which CANNOT run at the default 800x600 console resolution

I thought it had something to do with that. To be fair I am using the console to get into the problem and therefore I should expect to use the console to get out of it and it's all my fault if it doesn't work. :wink:

divVerent wrote:If you have an idea that fixes the 640x480 issue too, tell us...

In pseudocode this could be added to the vid_restart command:
Code: Select all
If vid_conwidth > vid_width {
vid_conwidth = vid_width };

If vid_conheight > vid_height {
vid_conheight = vid_height };
Ed
Forum addon
 
Posts: 1172
Joined: Wed Mar 01, 2006 12:32 am
Location: UK

Postby divVerent » Mon Sep 22, 2008 6:36 am

That won't fix it if you switch back to a higher resolution...
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Ed » Mon Sep 22, 2008 8:21 am

Use two variables, one as the existing cvar and one internal one:
Code: Select all
If vid_conwidth > vid_width {
vid_conwidth2 = vid_width
else vid_conwidth2 = vid_conwidth
};

If vid_conheight > vid_height {
vid_conheight2 = vid_height
else vid_conheight2 = vid_conheight
};


Vid_conwidth and vid_conheight would not be changed. Vid_conwidth2 and vid_conheight2 would be what actually sets the console size on a restart and are determined by the resolutions size relative to 800x600.
Ed
Forum addon
 
Posts: 1172
Joined: Wed Mar 01, 2006 12:32 am
Location: UK

Postby divVerent » Mon Sep 22, 2008 12:16 pm

This can't be in the engine, which is the problem. The engine shall do NO Nexuiz specific stuff - such customizations belong in the game code (e.g. menu). And the cvars vid_conwidth already have their special meaning in the engine.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Ed » Mon Sep 22, 2008 1:50 pm

You've misunderstood what I mean here. The engine has to do no Nexuiz specific stuff. If the console size is larger than the screen size, this doesn't look good in Darkplaces either. What I am trying to suggest is that the engine should have an override in it so that the vid_conwidth and vid_conheight are overridden if they are larger than the screen dimensions. There values themselves would not be altered however as the vid_conwidth and vid_conheight values would remain, but be ignored whilst in a low resolution. Thus if someone used a custom size it would make sense too.

For instance:
A user loads a game that uses Darkplaces. By default it runs at 800x600 and so does the console. The user lowers the screen resolution to 640x480 and therefore the console size is overridden. They then expand it back up and the override no longer happens so the console is shown at 800x600. This is how the two resolutions would compare in this setting:

Code: Select all
Screen      Console
320x200     320x200
640x480     640x480
800x600     800x600
1024x768    800x600
1280x960    800x600


The user now runs at a much higher resolution and decides to change the console size to 1024x768. The resolutions would then compare like this:

Code: Select all
Screen      Console
320x200     320x200
640x480     640x480
800x600     800x600
1024x768    1024x768
1280x960    1024x768


If this were to be implemented into the engine it would be an improvement to Darkplaces and would also allow the console size reset that's currently done by the Nexuiz menu to be dropped as it would no longer be required.
Ed
Forum addon
 
Posts: 1172
Joined: Wed Mar 01, 2006 12:32 am
Location: UK


Return to Nexuiz - Support / Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron