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

@ -61,8 +61,7 @@ HWND mainwindow;
cvar_t *vid_system_gamma;
extern viddef_t vid; // global video state
int modestate; // FIXME: just to avoid cross-compile
// errors - remove later
int modestate; // FIXME: just to avoid cross-compile errors - remove later
// The original defaults
#define BASEWIDTH 320
@ -90,8 +89,6 @@ VID_SetPalette (unsigned char *palette)
void
VID_Init (unsigned char *palette)
{
// Uint8 video_bpp;
// Uint16 video_w, video_h;
Uint32 flags;
// Load the SDL library
@ -158,8 +155,8 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen)
void
VID_Init_Cvars ()
{
vid_fullscreen =
Cvar_Get ("vid_fullscreen", "0", CVAR_NONE, VID_UpdateFullscreen,
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_NONE,
VID_UpdateFullscreen,
"Toggles fullscreen game mode");
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
@ -253,6 +250,5 @@ VID_SetCaption (const char *text)
qboolean
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/vid.h"
//#include "compat.h"
#include "d_iface.h"
#include "d_local.h"
#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 <SDL_syswm.h>
HWND mainwindow;
@ -63,7 +62,7 @@ HWND mainwindow;
cvar_t *vid_bitdepth;
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
#define BASEWIDTH 320
@ -178,7 +177,7 @@ VID_Init (unsigned char *palette)
SDL_ShowCursor (0);
#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_GetWMInfo(&info);
@ -194,8 +193,8 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen)
{
if (!vid.initialized)
return;
if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN)) ||
(!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))
if (!SDL_WM_ToggleFullScreen (screen))
Con_Printf ("VID_UpdateFullscreen: error setting fullscreen\n");
}
@ -281,10 +280,12 @@ VID_SetCaption (const char *text)
{
if (text && *text) {
char *temp = strdup (text);
SDL_WM_SetCaption (va ("%s %s: %s", PROGRAM, VERSION, temp), NULL);
free (temp);
} else
} else {
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
}
}
qboolean