diff snr --

This commit is contained in:
Bill Currie 2001-10-11 17:31:41 +00:00
parent 7c64e1ba3f
commit 62873d6980
2 changed files with 14 additions and 17 deletions

View file

@ -58,11 +58,10 @@ HWND mainwindow;
// static float oldin_grab = 0; // static float oldin_grab = 0;
cvar_t *vid_system_gamma; cvar_t *vid_system_gamma;
extern viddef_t vid; // global video state extern viddef_t vid; // global video state
int modestate; // FIXME: just to avoid cross-compile int modestate; // FIXME: just to avoid cross-compile errors - remove later
// errors - remove later
// The original defaults // The original defaults
#define BASEWIDTH 320 #define BASEWIDTH 320
@ -90,8 +89,6 @@ VID_SetPalette (unsigned char *palette)
void void
VID_Init (unsigned char *palette) VID_Init (unsigned char *palette)
{ {
// Uint8 video_bpp;
// Uint16 video_w, video_h;
Uint32 flags; Uint32 flags;
// Load the SDL library // Load the SDL library
@ -158,9 +155,9 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen)
void void
VID_Init_Cvars () VID_Init_Cvars ()
{ {
vid_fullscreen = vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_NONE,
Cvar_Get ("vid_fullscreen", "0", CVAR_NONE, VID_UpdateFullscreen, VID_UpdateFullscreen,
"Toggles fullscreen game mode"); "Toggles fullscreen game mode");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL, vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available"); "Use system gamma control if available");
} }
@ -253,6 +250,5 @@ VID_SetCaption (const char *text)
qboolean qboolean
VID_SetGamma (double gamma) VID_SetGamma (double gamma)
{ {
// return SDL_SetGamma ((float) gamma, (float) gamma, (float) gamma); return false; //FIXME
return false; // FIXME
} }

View file

@ -47,12 +47,11 @@ static const char rcsid[] =
#include "QF/va.h" #include "QF/va.h"
#include "QF/vid.h" #include "QF/vid.h"
//#include "compat.h"
#include "d_iface.h" #include "d_iface.h"
#include "d_local.h" #include "d_local.h"
#ifdef WIN32 #ifdef WIN32
/* fixme: this is evil hack to get full DirectSound support with SDL */ /* FIXME: this is evil hack to get full DirectSound support with SDL */
#include <windows.h> #include <windows.h>
#include <SDL_syswm.h> #include <SDL_syswm.h>
HWND mainwindow; HWND mainwindow;
@ -63,7 +62,7 @@ HWND mainwindow;
cvar_t *vid_bitdepth; cvar_t *vid_bitdepth;
extern viddef_t vid; // global video state extern viddef_t vid; // global video state
int modestate; // fixme: just to avoid cross-comp errors - remove later int modestate; // FIXME: just to avoid cross-compile errors - remove later
// The original defaults // The original defaults
#define BASEWIDTH 320 #define BASEWIDTH 320
@ -178,7 +177,7 @@ VID_Init (unsigned char *palette)
SDL_ShowCursor (0); SDL_ShowCursor (0);
#ifdef WIN32 #ifdef WIN32
// fixme: EVIL thing - but needed for win32 until // FIXME: EVIL thing - but needed for win32 until
// SDL_sound works better - without this DirectSound fails. // SDL_sound works better - without this DirectSound fails.
// SDL_GetWMInfo(&info); // SDL_GetWMInfo(&info);
@ -194,8 +193,8 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen)
{ {
if (!vid.initialized) if (!vid.initialized)
return; return;
if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN)) || if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN))
(!vid_fullscreen->int_val && screen->flags & SDL_FULLSCREEN)) || (!vid_fullscreen->int_val && screen->flags & SDL_FULLSCREEN))
if (!SDL_WM_ToggleFullScreen (screen)) if (!SDL_WM_ToggleFullScreen (screen))
Con_Printf ("VID_UpdateFullscreen: error setting fullscreen\n"); Con_Printf ("VID_UpdateFullscreen: error setting fullscreen\n");
} }
@ -281,10 +280,12 @@ VID_SetCaption (const char *text)
{ {
if (text && *text) { if (text && *text) {
char *temp = strdup (text); char *temp = strdup (text);
SDL_WM_SetCaption (va ("%s %s: %s", PROGRAM, VERSION, temp), NULL); SDL_WM_SetCaption (va ("%s %s: %s", PROGRAM, VERSION, temp), NULL);
free (temp); free (temp);
} else } else {
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL); SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
}
} }
qboolean qboolean