1
0
Fork 0
forked from fte/fteqw

make sure vid_conautoscale refreshes on reinit and resize, go back to old behavior with vid_conheight/vid_conwidth

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2145 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-04-02 09:11:37 +00:00
parent 4e2a0f564f
commit 19cfb4a2c5
2 changed files with 9 additions and 5 deletions

View file

@ -172,12 +172,12 @@ void GLSCR_UpdateScreen (void)
if (vid_conwidth.modified || vid_conheight.modified)
{
//let let the user be too crazy
if (vid_conwidth.value > (glwidth * 2)) //anything higher is unreadable.
Cvar_SetValue(&vid_conwidth, (float)(glwidth * 2));
if (vid_conwidth.value > 2048) //anything higher is unreadable.
Cvar_Set(&vid_conwidth, "2048");
if (vid_conheight.value > 1536) //anything higher is unreadable.
Cvar_Set(&vid_conheight, "1536");
if (vid_conwidth.value < 320) //lower would be wrong
Cvar_Set(&vid_conwidth, "320");
if (vid_conheight.value > (glheight * 2)) //anything higher is unreadable.
Cvar_SetValue(&vid_conheight, (float)(glheight * 2));
if (vid_conheight.value < 200) //lower would be wrong
Cvar_Set(&vid_conheight, "200");

View file

@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define WM_INPUT 255
#endif
extern cvar_t vid_conwidth;
extern cvar_t vid_conwidth, vid_conautoscale;
#define WINDOW_CLASS_NAME "WinQuake"
@ -400,6 +400,7 @@ qboolean VID_SetWindowedMode (rendererstate_t *info)
{
vid.conwidth = 640;
vid_conwidth.modified = true; //make it reapplied
vid_conautoscale.modified = true;
}
vid.conwidth &= 0xfff8; // make it a multiple of eight
@ -422,6 +423,7 @@ qboolean VID_SetWindowedMode (rendererstate_t *info)
vid.width = vid.conwidth;
vid.height = vid.conheight;
vid_conwidth.modified = true;
vid_conautoscale.modified = true;
vid.numpages = 2;
@ -536,6 +538,7 @@ qboolean VID_SetFullDIBMode (rendererstate_t *info)
vid.width = vid.conwidth;
vid.height = vid.conheight;
vid_conwidth.modified = true;
vid_conautoscale.modified = true;
vid.numpages = 2;
@ -1412,6 +1415,7 @@ LONG WINAPI GLMainWndProc (
WindowRect.right = ((short*)&lParam)[0] - WindowRect.left;
WindowRect.bottom = ((short*)&lParam)[1] - WindowRect.top;
vid_conwidth.modified = true; //make it reapplied
vid_conautoscale.modified = true;
}
break;