%g is no good :/
menu.c screen.c:
	float -> int cleanup for scr_viewsize
vid_glx.c:
	remove unused vid_mode cvar
This commit is contained in:
Bill Currie 2000-10-21 21:08:04 +00:00
parent 0e950c65f5
commit 499eaa2a7d
5 changed files with 4 additions and 7 deletions

View file

@ -1 +1 @@
set args -nodga -nosound +set _windowed_mouse 0
set args -nosound +set _windowed_mouse 0

View file

@ -237,7 +237,7 @@ void Cvar_SetValue (cvar_t *var, float value)
char val[32];
int i;
sprintf (val, "%g", value);
sprintf (val, "%f", value);
for (i=strlen(val)-1 ; i>0 && val[i]=='0' && val[i-1]!='.' ; i--)
{
val[i] = 0;

View file

@ -507,7 +507,7 @@ void M_Options_Draw (void)
M_Print (16, 48, " Reset to defaults");
M_Print (16, 56, " Screen size");
r = (scr_viewsize->int_val - 30) / (120 - 30);
r = (scr_viewsize->int_val - 30) / (120.0 - 30.0);
M_DrawSlider (220, 56, r);
M_Print (16, 64, " Brightness");

View file

@ -979,7 +979,7 @@ needs almost the entire 256k of stack space!
*/
void SCR_UpdateScreen (void)
{
static float oldscr_viewsize;
static int oldscr_viewsize;
vrect_t vrect;
if (scr_skipupdate || block_drawing)

View file

@ -90,8 +90,6 @@ unsigned short d_8to16table[256];
unsigned int d_8to24table[256];
unsigned char d_15to8table[65536];
cvar_t *vid_mode;
#ifdef HAVE_DGA
static int hasdgavideo = 0;
static int hasdga = 0;
@ -448,7 +446,6 @@ void VID_Init(unsigned char *palette)
char gldir[MAX_OSPATH];
VID_GetWindowSize (640, 480);
vid_mode = Cvar_Get ("vid_mode","0",0,"None");
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap = host_colormap;