static vmode_t modelist[MAX_MODE_LIST];
static int nummodes;
-static vmode_t *pcurrentmode;
+//static vmode_t *pcurrentmode;
static vmode_t badmode;
static DEVMODE gdevmode;
viddef_t vid; // global video state
-float gldepthmin, gldepthmax;
-
modestate_t modestate = MS_UNINIT;
void VID_MenuDraw (void);
int VID_SetMode (int modenum)
{
- int original_mode, temp;
- qboolean stat;
+ int original_mode;
+ //int temp;
+ qboolean stat = 0;
MSG msg;
if ((windowed && (modenum != 0)) || (!windowed && (modenum < 1)) || (!windowed && (modenum >= nummodes)))
Sys_Error ("Bad video mode\n");
// so Con_Printfs don't mess us up by forcing vid and snd updates
- temp = scr_disabled_for_loading;
- scr_disabled_for_loading = true;
+// temp = scr_disabled_for_loading;
+// scr_disabled_for_loading = true;
CDAudio_Pause ();
VID_UpdateWindowStatus ();
CDAudio_Resume ();
- scr_disabled_for_loading = temp;
+// scr_disabled_for_loading = temp;
if (!stat)
Sys_Error ("Couldn't set video mode");
/*
=================
-GL_BeginRendering
-
+VID_GetWindowSize
=================
*/
-void GL_BeginRendering (int *x, int *y, int *width, int *height)
+void VID_GetWindowSize (int *x, int *y, int *width, int *height)
{
*x = *y = 0;
*width = WindowRect.right - WindowRect.left;
*height = WindowRect.bottom - WindowRect.top;
-
-// if (!wglMakeCurrent( maindc, baseRC ))
-// Sys_Error ("wglMakeCurrent failed");
-
-// glViewport (*x, *y, *width, *height);
}
-void GL_EndRendering (void)
+void VID_Finish (void)
{
int usemouse;
if (r_render.integer && !scr_skipupdate)
+ {
+ qglFinish();
SwapBuffers(maindc);
+ }
// handle the mouse state when windowed if that's changed
usemouse = false;
// LordHavoc: free textures before closing (may help NVIDIA)
for (i = 0;i < 8192;i++)
temp[i] = i+1;
- glDeleteTextures(8192, temp);
+ qglDeleteTextures(8192, temp);
if (hRC)
wglDeleteContext(hRC);
-byte scantokey[128] =
+qbyte scantokey[128] =
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ,27 ,'1' ,'2' ,'3' ,'4' ,'5' ,'6' ,'7' ,'8' ,'9' ,'0' ,'-' ,'=' ,K_BACKSPACE,9 , // 0
};
/*
-byte shiftscantokey[128] =
+qbyte shiftscantokey[128] =
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ,27 ,'!' ,'@' ,'#' ,'$' ,'%' ,'^' ,'&' ,'*' ,'(' ,')' ,'_' ,'+' ,K_BACKSPACE,9 , // 0
Con_SafePrintf ("No fullscreen DIB modes found\n");
}
-static int grabsysgamma = true;
+//static int grabsysgamma = true;
WORD systemgammaramps[3][256], currentgammaramps[3][256];
int VID_SetGamma(float prescale, float gamma, float scale, float base)
{
int i;
// int existingmode;
- int basenummodes, width, height, bpp, findbpp, done;
+ int basenummodes, width, height = 0, bpp, findbpp, done;
HDC hdc;
DEVMODE devmode;
extern void M_DrawCharacter (int cx, int line, int num);
extern void M_DrawPic (int x, int y, char *picname);
-static int vid_line, vid_wmodes;
+static int vid_wmodes;
typedef struct
{