icculus quake2 doxygen  1.0 dev
vid_dll.c File Reference
#include <assert.h>
#include <float.h>
#include "..\client\client.h"
#include "winquake.h"

Go to the source code of this file.

Classes

struct  vidmode_s
 

Macros

#define WM_MOUSEWHEEL   (WM_MOUSELAST+1)
 
#define VID_NUM_MODES   ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )
 
#define MAXPRINTMSG   4096
 

Typedefs

typedef struct vidmode_s vidmode_t
 

Functions

LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static void WIN_DisableAltTab (void)
 
static void WIN_EnableAltTab (void)
 
void VID_Printf (int print_level, char *fmt,...)
 
void VID_Error (int err_level, char *fmt,...)
 
int MapKey (int key)
 
void AppActivate (BOOL fActive, BOOL minimize)
 
void VID_Restart_f (void)
 
void VID_Front_f (void)
 
qboolean VID_GetModeInfo (int *width, int *height, int mode)
 
void VID_UpdateWindowPosAndSize (int x, int y)
 
void VID_NewWindow (int width, int height)
 
void VID_FreeReflib (void)
 
qboolean VID_LoadRefresh (char *name)
 
void VID_CheckChanges (void)
 
void VID_Init (void)
 
void VID_Shutdown (void)
 

Variables

refexport_t re
 
cvar_twin_noalttab
 
static UINT MSH_MOUSEWHEEL
 
cvar_tvid_gamma
 
cvar_tvid_ref
 
cvar_tvid_xpos
 
cvar_tvid_ypos
 
cvar_tvid_fullscreen
 
viddef_t viddef
 
HINSTANCE reflib_library
 
qboolean reflib_active = 0
 
HWND cl_hwnd
 
static qboolean s_alttab_disabled
 
unsigned sys_msg_time
 
qboolean s_win95
 
byte scantokey [128]
 
vidmode_t vid_modes []
 

Macro Definition Documentation

◆ MAXPRINTMSG

#define MAXPRINTMSG   4096

Definition at line 115 of file vid_dll.c.

◆ VID_NUM_MODES

#define VID_NUM_MODES   ( sizeof( vid_modes ) / sizeof( vid_modes[0] ) )

Definition at line 55 of file vid_dll.c.

◆ WM_MOUSEWHEEL

#define WM_MOUSEWHEEL   (WM_MOUSELAST+1)

Definition at line 36 of file vid_dll.c.

Typedef Documentation

◆ vidmode_t

typedef struct vidmode_s vidmode_t

Function Documentation

◆ AppActivate()

void AppActivate ( BOOL  fActive,
BOOL  minimize 
)

Definition at line 242 of file vid_dll.c.

243 {
244  Minimized = minimize;
245 
246  Key_ClearStates();
247 
248  // we don't want to act like we're active if we're minimized
249  if (fActive && !Minimized)
250  ActiveApp = true;
251  else
252  ActiveApp = false;
253 
254  // minimize/restore mouse-capture on demand
255  if (!ActiveApp)
256  {
257  IN_Activate (false);
258  CDAudio_Activate (false);
259  S_Activate (false);
260 
261  if ( win_noalttab->value )
262  {
264  }
265  }
266  else
267  {
268  IN_Activate (true);
269  CDAudio_Activate (true);
270  S_Activate (true);
271  if ( win_noalttab->value )
272  {
274  }
275  }
276 }

Referenced by MainWndProc().

◆ MainWndProc()

LONG WINAPI MainWndProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 285 of file vid_dll.c.

290 {
291  LONG lRet = 0;
292 
293  if ( uMsg == MSH_MOUSEWHEEL )
294  {
295  if ( ( ( int ) wParam ) > 0 )
296  {
298  Key_Event( K_MWHEELUP, false, sys_msg_time );
299  }
300  else
301  {
304  }
305  return DefWindowProc (hWnd, uMsg, wParam, lParam);
306  }
307 
308  switch (uMsg)
309  {
310  case WM_MOUSEWHEEL:
311  /*
312  ** this chunk of code theoretically only works under NT4 and Win98
313  ** since this message doesn't exist under Win95
314  */
315  if ( ( short ) HIWORD( wParam ) > 0 )
316  {
318  Key_Event( K_MWHEELUP, false, sys_msg_time );
319  }
320  else
321  {
324  }
325  break;
326 
327  case WM_HOTKEY:
328  return 0;
329 
330  case WM_CREATE:
331  cl_hwnd = hWnd;
332 
333  MSH_MOUSEWHEEL = RegisterWindowMessage("MSWHEEL_ROLLMSG");
334  return DefWindowProc (hWnd, uMsg, wParam, lParam);
335 
336  case WM_PAINT:
337  SCR_DirtyScreen (); // force entire screen to update next frame
338  return DefWindowProc (hWnd, uMsg, wParam, lParam);
339 
340  case WM_DESTROY:
341  // let sound and input know about this?
342  cl_hwnd = NULL;
343  return DefWindowProc (hWnd, uMsg, wParam, lParam);
344 
345  case WM_ACTIVATE:
346  {
347  int fActive, fMinimized;
348 
349  // KJB: Watch this for problems in fullscreen modes with Alt-tabbing.
350  fActive = LOWORD(wParam);
351  fMinimized = (BOOL) HIWORD(wParam);
352 
353  AppActivate( fActive != WA_INACTIVE, fMinimized);
354 
355  if ( reflib_active )
356  re.AppActivate( !( fActive == WA_INACTIVE ) );
357  }
358  return DefWindowProc (hWnd, uMsg, wParam, lParam);
359 
360  case WM_MOVE:
361  {
362  int xPos, yPos;
363  RECT r;
364  int style;
365 
366  if (!vid_fullscreen->value)
367  {
368  xPos = (short) LOWORD(lParam); // horizontal position
369  yPos = (short) HIWORD(lParam); // vertical position
370 
371  r.left = 0;
372  r.top = 0;
373  r.right = 1;
374  r.bottom = 1;
375 
376  style = GetWindowLong( hWnd, GWL_STYLE );
377  AdjustWindowRect( &r, style, FALSE );
378 
379  Cvar_SetValue( "vid_xpos", xPos + r.left);
380  Cvar_SetValue( "vid_ypos", yPos + r.top);
381  vid_xpos->modified = false;
382  vid_ypos->modified = false;
383  if (ActiveApp)
384  IN_Activate (true);
385  }
386  }
387  return DefWindowProc (hWnd, uMsg, wParam, lParam);
388 
389 // this is complicated because Win32 seems to pack multiple mouse events into
390 // one update sometimes, so we always check all states and look for events
391  case WM_LBUTTONDOWN:
392  case WM_LBUTTONUP:
393  case WM_RBUTTONDOWN:
394  case WM_RBUTTONUP:
395  case WM_MBUTTONDOWN:
396  case WM_MBUTTONUP:
397  case WM_MOUSEMOVE:
398  {
399  int temp;
400 
401  temp = 0;
402 
403  if (wParam & MK_LBUTTON)
404  temp |= 1;
405 
406  if (wParam & MK_RBUTTON)
407  temp |= 2;
408 
409  if (wParam & MK_MBUTTON)
410  temp |= 4;
411 
412  IN_MouseEvent (temp);
413  }
414  break;
415 
416  case WM_SYSCOMMAND:
417  if ( wParam == SC_SCREENSAVE )
418  return 0;
419  return DefWindowProc (hWnd, uMsg, wParam, lParam);
420  case WM_SYSKEYDOWN:
421  if ( wParam == 13 )
422  {
423  if ( vid_fullscreen )
424  {
425  Cvar_SetValue( "vid_fullscreen", !vid_fullscreen->value );
426  }
427  return 0;
428  }
429  // fall through
430  case WM_KEYDOWN:
431  Key_Event( MapKey( lParam ), true, sys_msg_time);
432  break;
433 
434  case WM_SYSKEYUP:
435  case WM_KEYUP:
436  Key_Event( MapKey( lParam ), false, sys_msg_time);
437  break;
438 
439  case MM_MCINOTIFY:
440  {
441  LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
442  lRet = CDAudio_MessageHandler (hWnd, uMsg, wParam, lParam);
443  }
444  break;
445 
446  default: // pass all unhandled messages to DefWindowProc
447  return DefWindowProc (hWnd, uMsg, wParam, lParam);
448  }
449 
450  /* return 0 if handled message, 1 if not */
451  return DefWindowProc( hWnd, uMsg, wParam, lParam );
452 }

Referenced by VID_LoadRefresh().

◆ MapKey()

int MapKey ( int  key)

Definition at line 185 of file vid_dll.c.

186 {
187  int result;
188  int modified = ( key >> 16 ) & 255;
189  qboolean is_extended = false;
190 
191  if ( modified > 127)
192  return 0;
193 
194  if ( key & ( 1 << 24 ) )
195  is_extended = true;
196 
197  result = scantokey[modified];
198 
199  if ( !is_extended )
200  {
201  switch ( result )
202  {
203  case K_HOME:
204  return K_KP_HOME;
205  case K_UPARROW:
206  return K_KP_UPARROW;
207  case K_PGUP:
208  return K_KP_PGUP;
209  case K_LEFTARROW:
210  return K_KP_LEFTARROW;
211  case K_RIGHTARROW:
212  return K_KP_RIGHTARROW;
213  case K_END:
214  return K_KP_END;
215  case K_DOWNARROW:
216  return K_KP_DOWNARROW;
217  case K_PGDN:
218  return K_KP_PGDN;
219  case K_INS:
220  return K_KP_INS;
221  case K_DEL:
222  return K_KP_DEL;
223  default:
224  return result;
225  }
226  }
227  else
228  {
229  switch ( result )
230  {
231  case 0x0D:
232  return K_KP_ENTER;
233  case 0x2F:
234  return K_KP_SLASH;
235  case 0xAF:
236  return K_KP_PLUS;
237  }
238  return result;
239  }
240 }

Referenced by MainWndProc().

◆ VID_CheckChanges()

void VID_CheckChanges ( void  )

Definition at line 641 of file vid_dll.c.

642 {
643  char name[100];
644 
645  if ( win_noalttab->modified )
646  {
647  if ( win_noalttab->value )
648  {
650  }
651  else
652  {
654  }
655  win_noalttab->modified = false;
656  }
657 
658  if ( vid_ref->modified )
659  {
660  cl.force_refdef = true; // can't use a paused refdef
661  S_StopAllSounds();
662  }
663  while (vid_ref->modified)
664  {
665  /*
666  ** refresh has changed
667  */
668  vid_ref->modified = false;
669  vid_fullscreen->modified = true;
670  cl.refresh_prepped = false;
671  cls.disable_screen = true;
672 
673  Com_sprintf( name, sizeof(name), "ref_%s.dll", vid_ref->string );
674  if ( !VID_LoadRefresh( name ) )
675  {
676  if ( strcmp (vid_ref->string, "soft") == 0 )
677  Com_Error (ERR_FATAL, "Couldn't fall back to software refresh!");
678  Cvar_Set( "vid_ref", "soft" );
679 
680  /*
681  ** drop the console if we fail to load a refresh
682  */
683  if ( cls.key_dest != key_console )
684  {
686  }
687  }
688  cls.disable_screen = false;
689  }
690 
691  /*
692  ** update our window position
693  */
694  if ( vid_xpos->modified || vid_ypos->modified )
695  {
696  if (!vid_fullscreen->value)
698 
699  vid_xpos->modified = false;
700  vid_ypos->modified = false;
701  }
702 }

Referenced by CL_Frame(), and VID_Init().

◆ VID_Error()

void VID_Error ( int  err_level,
char *  fmt,
  ... 
)

Definition at line 141 of file vid_dll.c.

142 {
143  va_list argptr;
144  char msg[MAXPRINTMSG];
145  static qboolean inupdate;
146 
147  va_start (argptr,fmt);
148  vsprintf (msg,fmt,argptr);
149  va_end (argptr);
150 
151  Com_Error (err_level,"%s", msg);
152 }

Referenced by VID_LoadRefresh().

◆ VID_FreeReflib()

void VID_FreeReflib ( void  )

Definition at line 544 of file vid_dll.c.

545 {
546  if ( !FreeLibrary( reflib_library ) )
547  Com_Error( ERR_FATAL, "Reflib FreeLibrary failed" );
548  memset (&re, 0, sizeof(re));
550  reflib_active = false;
551 }

Referenced by VID_LoadRefresh(), and VID_Shutdown().

◆ VID_Front_f()

void VID_Front_f ( void  )

Definition at line 468 of file vid_dll.c.

469 {
470  SetWindowLong( cl_hwnd, GWL_EXSTYLE, WS_EX_TOPMOST );
471  SetForegroundWindow( cl_hwnd );
472 }

Referenced by VID_Init().

◆ VID_GetModeInfo()

qboolean VID_GetModeInfo ( int width,
int height,
int  mode 
)

Definition at line 499 of file vid_dll.c.

500 {
501  if ( mode < 0 || mode >= VID_NUM_MODES )
502  return false;
503 
506 
507  return true;
508 }

Referenced by VID_LoadRefresh().

◆ VID_Init()

void VID_Init ( void  )

Definition at line 709 of file vid_dll.c.

710 {
711  /* Create the video variables so we know how to start the graphics drivers */
712  vid_ref = Cvar_Get ("vid_ref", "soft", CVAR_ARCHIVE);
713  vid_xpos = Cvar_Get ("vid_xpos", "3", CVAR_ARCHIVE);
714  vid_ypos = Cvar_Get ("vid_ypos", "22", CVAR_ARCHIVE);
715  vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE);
716  vid_gamma = Cvar_Get( "vid_gamma", "1", CVAR_ARCHIVE );
717  win_noalttab = Cvar_Get( "win_noalttab", "0", CVAR_ARCHIVE );
718 
719  /* Add some console commands that we want to handle */
720  Cmd_AddCommand ("vid_restart", VID_Restart_f);
721  Cmd_AddCommand ("vid_front", VID_Front_f);
722 
723  /*
724  ** this is a gross hack but necessary to clamp the mode for 3Dfx
725  */
726 #if 0
727  {
728  cvar_t *gl_driver = Cvar_Get( "gl_driver", "opengl32", 0 );
729  cvar_t *gl_mode = Cvar_Get( "gl_mode", "3", 0 );
730 
731  if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 )
732  {
733  Cvar_SetValue( "gl_mode", 3 );
734  viddef.width = 640;
735  viddef.height = 480;
736  }
737  }
738 #endif
739 
740  /* Disable the 3Dfx splash screen */
741  putenv("FX_GLIDE_NO_SPLASH=0");
742 
743  /* Start the graphics mode and load refresh DLL */
745 }

Referenced by CL_Init().

◆ VID_LoadRefresh()

qboolean VID_LoadRefresh ( char *  name)

Definition at line 558 of file vid_dll.c.

559 {
560  refimport_t ri;
562 
563  if ( reflib_active )
564  {
565  re.Shutdown();
566  VID_FreeReflib ();
567  }
568 
569  Com_Printf( "------- Loading %s -------\n", name );
570 
571  if ( ( reflib_library = LoadLibrary( name ) ) == 0 )
572  {
573  Com_Printf( "LoadLibrary(\"%s\") failed\n", name );
574 
575  return false;
576  }
577 
580  ri.Cmd_Argc = Cmd_Argc;
581  ri.Cmd_Argv = Cmd_Argv;
588  ri.Cvar_Get = Cvar_Get;
589  ri.Cvar_Set = Cvar_Set;
594 
595  if ( ( GetRefAPI = (void *) GetProcAddress( reflib_library, "GetRefAPI" ) ) == 0 )
596  Com_Error( ERR_FATAL, "GetProcAddress failed on %s", name );
597 
598  re = GetRefAPI( ri );
599 
600  if (re.api_version != API_VERSION)
601  {
602  VID_FreeReflib ();
603  Com_Error (ERR_FATAL, "%s has incompatible api_version", name);
604  }
605 
606  if ( re.Init( global_hInstance, MainWndProc ) == -1 )
607  {
608  re.Shutdown();
609  VID_FreeReflib ();
610  return false;
611  }
612 
613  Com_Printf( "------------------------------------\n");
614  reflib_active = true;
615 
616 //======
617 //PGM
619  if(vid_ref)
620  {
621  if(!strcmp (vid_ref->string, "gl"))
623  else if(!strcmp(vid_ref->string, "soft"))
625  }
626 //PGM
627 //======
628 
629  return true;
630 }

Referenced by VID_CheckChanges().

◆ VID_NewWindow()

void VID_NewWindow ( int  width,
int  height 
)

Definition at line 536 of file vid_dll.c.

537 {
538  viddef.width = width;
539  viddef.height = height;
540 
541  cl.force_refdef = true; // can't use a paused refdef
542 }

Referenced by VID_LoadRefresh().

◆ VID_Printf()

void VID_Printf ( int  print_level,
char *  fmt,
  ... 
)

Definition at line 116 of file vid_dll.c.

117 {
118  va_list argptr;
119  char msg[MAXPRINTMSG];
120  static qboolean inupdate;
121 
122  va_start (argptr,fmt);
123  vsprintf (msg,fmt,argptr);
124  va_end (argptr);
125 
126  if (print_level == PRINT_ALL)
127  {
128  Com_Printf ("%s", msg);
129  }
130  else if ( print_level == PRINT_DEVELOPER )
131  {
132  Com_DPrintf ("%s", msg);
133  }
134  else if ( print_level == PRINT_ALERT )
135  {
136  MessageBox( 0, msg, "PRINT_ALERT", MB_ICONWARNING );
137  OutputDebugString( msg );
138  }
139 }

Referenced by VID_LoadRefresh().

◆ VID_Restart_f()

void VID_Restart_f ( void  )

Definition at line 463 of file vid_dll.c.

464 {
465  vid_ref->modified = true;
466 }

Referenced by VID_Init().

◆ VID_Shutdown()

void VID_Shutdown ( void  )

Definition at line 752 of file vid_dll.c.

753 {
754  if ( reflib_active )
755  {
756  re.Shutdown ();
757  VID_FreeReflib ();
758  }
759 }

Referenced by CL_Shutdown().

◆ VID_UpdateWindowPosAndSize()

void VID_UpdateWindowPosAndSize ( int  x,
int  y 
)

Definition at line 513 of file vid_dll.c.

514 {
515  RECT r;
516  int style;
517  int w, h;
518 
519  r.left = 0;
520  r.top = 0;
521  r.right = viddef.width;
522  r.bottom = viddef.height;
523 
524  style = GetWindowLong( cl_hwnd, GWL_STYLE );
525  AdjustWindowRect( &r, style, FALSE );
526 
527  w = r.right - r.left;
528  h = r.bottom - r.top;
529 
530  MoveWindow( cl_hwnd, vid_xpos->value, vid_ypos->value, w, h, TRUE );
531 }

Referenced by VID_CheckChanges().

◆ WIN_DisableAltTab()

static void WIN_DisableAltTab ( void  )
static

Definition at line 68 of file vid_dll.c.

69 {
70  if ( s_alttab_disabled )
71  return;
72 
73  if ( s_win95 )
74  {
75  BOOL old;
76 
77  SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, &old, 0 );
78  }
79  else
80  {
81  RegisterHotKey( 0, 0, MOD_ALT, VK_TAB );
82  RegisterHotKey( 0, 1, MOD_ALT, VK_RETURN );
83  }
84  s_alttab_disabled = true;
85 }

Referenced by AppActivate(), and VID_CheckChanges().

◆ WIN_EnableAltTab()

static void WIN_EnableAltTab ( void  )
static

Definition at line 87 of file vid_dll.c.

88 {
89  if ( s_alttab_disabled )
90  {
91  if ( s_win95 )
92  {
93  BOOL old;
94 
95  SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0, &old, 0 );
96  }
97  else
98  {
99  UnregisterHotKey( 0, 0 );
100  UnregisterHotKey( 0, 1 );
101  }
102 
103  s_alttab_disabled = false;
104  }
105 }

Referenced by AppActivate(), and VID_CheckChanges().

Variable Documentation

◆ cl_hwnd

◆ MSH_MOUSEWHEEL

UINT MSH_MOUSEWHEEL
static

Definition at line 39 of file vid_dll.c.

Referenced by MainWndProc().

◆ re

◆ reflib_active

qboolean reflib_active = 0

Definition at line 51 of file vid_dll.c.

Referenced by MainWndProc(), VID_FreeReflib(), VID_LoadRefresh(), and VID_Shutdown().

◆ reflib_library

HINSTANCE reflib_library

Definition at line 50 of file vid_dll.c.

Referenced by VID_FreeReflib(), and VID_LoadRefresh().

◆ s_alttab_disabled

qboolean s_alttab_disabled
static

Definition at line 59 of file vid_dll.c.

Referenced by WIN_DisableAltTab(), and WIN_EnableAltTab().

◆ s_win95

qboolean s_win95

Definition at line 39 of file sys_win.c.

Referenced by Sys_Init(), WIN_DisableAltTab(), and WIN_EnableAltTab().

◆ scantokey

byte scantokey[128]
Initial value:
=
{
0 , 27, '1', '2', '3', '4', '5', '6',
'7', '8', '9', '0', '-', '=', K_BACKSPACE, 9,
'q', 'w', 'e', 'r', 't', 'y', 'u', 'i',
'o', 'p', '[', ']', 13 , K_CTRL,'a', 's',
'd', 'f', 'g', 'h', 'j', 'k', 'l', ';',
'\'' , '`', K_SHIFT,'\\', 'z', 'x', 'c', 'v',
'b', 'n', 'm', ',', '.', '/', K_SHIFT,'*',
K_ALT,' ', 0 , K_F1, K_F2, K_F3, K_F4, K_F5,
K_F12,0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
}

Definition at line 156 of file vid_dll.c.

Referenced by MapKey().

◆ sys_msg_time

unsigned sys_msg_time

Definition at line 47 of file sys_win.c.

Referenced by MainWndProc(), Sys_SendKeyEvents(), and WinMain().

◆ vid_fullscreen

cvar_t* vid_fullscreen

Definition at line 46 of file vid_dll.c.

Referenced by MainWndProc(), VID_CheckChanges(), and VID_Init().

◆ vid_gamma

cvar_t* vid_gamma

Definition at line 42 of file vid_dll.c.

Referenced by GL_InitImages(), QGL_Init(), and VID_Init().

◆ vid_modes

vidmode_t vid_modes[]
Initial value:
=
{
{ "Mode 0: 320x240", 320, 240, 0 },
{ "Mode 1: 400x300", 400, 300, 1 },
{ "Mode 2: 512x384", 512, 384, 2 },
{ "Mode 3: 640x480", 640, 480, 3 },
{ "Mode 4: 800x600", 800, 600, 4 },
{ "Mode 5: 960x720", 960, 720, 5 },
{ "Mode 6: 1024x768", 1024, 768, 6 },
{ "Mode 7: 1152x864", 1152, 864, 7 },
{ "Mode 8: 1280x960", 1280, 960, 8 },
{ "Mode 9: 1600x1200", 1600, 1200, 9 },
{ "Mode 10: 2048x1536", 2048, 1536, 10 }
}

Definition at line 484 of file vid_dll.c.

Referenced by VID_GetModeInfo().

◆ vid_ref

cvar_t* vid_ref

Definition at line 43 of file vid_dll.c.

Referenced by VID_CheckChanges(), VID_Init(), VID_LoadRefresh(), and VID_Restart_f().

◆ vid_xpos

cvar_t* vid_xpos

◆ vid_ypos

cvar_t* vid_ypos

◆ viddef

◆ win_noalttab

cvar_t* win_noalttab

Definition at line 33 of file vid_dll.c.

Referenced by AppActivate(), VID_CheckChanges(), and VID_Init().

K_KP_PLUS
@ K_KP_PLUS
Definition: keys.h:74
GetRefAPI
refexport_t GetRefAPI(refimport_t rimp)
Definition: r_main.c:1361
K_END
@ K_END
Definition: keys.h:58
refimport_t::Cmd_RemoveCommand
void(* Cmd_RemoveCommand)(char *name)
Definition: ref.h:223
Cbuf_ExecuteText
void Cbuf_ExecuteText(int exec_when, char *text)
Definition: cmd.c:171
height
GLsizei height
Definition: qgl_win.c:69
VID_Restart_f
void VID_Restart_f(void)
Definition: vid_dll.c:463
K_DOWNARROW
@ K_DOWNARROW
Definition: keys.h:34
MSH_MOUSEWHEEL
static UINT MSH_MOUSEWHEEL
Definition: vid_dll.c:39
vidmode_s::width
int width
Definition: vid_dll.c:480
K_KP_UPARROW
@ K_KP_UPARROW
Definition: keys.h:61
ActiveApp
int ActiveApp
Definition: sys_win.c:42
IN_MouseEvent
void IN_MouseEvent(int mstate)
Definition: in_win.c:240
VID_Front_f
void VID_Front_f(void)
Definition: vid_dll.c:468
client_static_t::disable_screen
float disable_screen
Definition: client.h:232
s_alttab_disabled
static qboolean s_alttab_disabled
Definition: vid_dll.c:59
ri
refimport_t ri
Definition: r_main.c:25
PRINT_DEVELOPER
#define PRINT_DEVELOPER
Definition: qcommon.h:744
reflib_active
qboolean reflib_active
Definition: vid_dll.c:51
Key_Event
void Key_Event(int key, qboolean down, unsigned time)
Definition: keys.c:745
K_KP_PGDN
@ K_KP_PGDN
Definition: keys.h:68
refimport_t::Vid_NewWindow
void(* Vid_NewWindow)(int width, int height)
Definition: ref.h:248
gl_driver
static cvar_t * gl_driver
Definition: vid_menu.c:35
refimport_t::Cmd_ExecuteText
void(* Cmd_ExecuteText)(int exec_when, char *text)
Definition: ref.h:226
cvar_s::modified
qboolean modified
Definition: q_shared.h:323
refexport_t::Init
int(* Init)(void *hinstance, void *wndproc)
Definition: ref.h:157
VID_UpdateWindowPosAndSize
void VID_UpdateWindowPosAndSize(int x, int y)
Definition: vid_dll.c:513
refimport_t::FS_LoadFile
int(* FS_LoadFile)(char *name, void **buf)
Definition: ref.h:235
refimport_t::Cvar_Get
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
Definition: ref.h:242
cvar_s::string
char * string
Definition: q_shared.h:320
qboolean
qboolean
Definition: q_shared.h:56
viddef_t::width
int width
Definition: vid.h:29
API_VERSION
#define API_VERSION
Definition: ref.h:146
K_KP_LEFTARROW
@ K_KP_LEFTARROW
Definition: keys.h:63
K_F12
@ K_F12
Definition: keys.h:52
WM_MOUSEWHEEL
#define WM_MOUSEWHEEL
Definition: vid_dll.c:36
Con_ToggleConsole_f
void Con_ToggleConsole_f(void)
Definition: console.c:75
viddef_t::height
int height
Definition: vid.h:29
K_F7
@ K_F7
Definition: keys.h:47
MapKey
int MapKey(int key)
Definition: vid_dll.c:185
refimport_t::Cvar_Set
cvar_t *(* Cvar_Set)(char *name, char *value)
Definition: ref.h:243
VID_Printf
void VID_Printf(int print_level, char *fmt,...)
Definition: vid_dll.c:116
width
GLint GLsizei width
Definition: qgl_win.c:115
SCR_DirtyScreen
void SCR_DirtyScreen(void)
Definition: cl_scrn.c:687
refexport_t::AppActivate
void(* AppActivate)(qboolean activate)
Definition: ref.h:211
K_MWHEELDOWN
@ K_MWHEELDOWN
Definition: keys.h:130
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
WIN_DisableAltTab
static void WIN_DisableAltTab(void)
Definition: vid_dll.c:68
VID_NewWindow
void VID_NewWindow(int width, int height)
Definition: vid_dll.c:536
K_HOME
@ K_HOME
Definition: keys.h:57
cvar_s
Definition: q_shared.h:317
K_KP_HOME
@ K_KP_HOME
Definition: keys.h:60
client_state_t::force_refdef
qboolean force_refdef
Definition: client.h:120
IN_Activate
void IN_Activate(qboolean active)
Definition: in_win.c:406
refimport_t::FS_FreeFile
void(* FS_FreeFile)(void *buf)
Definition: ref.h:236
viddef
viddef_t viddef
Definition: vid_dll.c:49
K_KP_INS
@ K_KP_INS
Definition: keys.h:70
CDAudio_Activate
void CDAudio_Activate(qboolean active)
K_F8
@ K_F8
Definition: keys.h:48
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
msg
cvar_t * msg
Definition: cl_main.c:98
refimport_t::Vid_GetModeInfo
qboolean(* Vid_GetModeInfo)(int *width, int *height, int mode)
Definition: ref.h:246
PRINT_ALERT
#define PRINT_ALERT
Definition: q_shared.h:103
sys_msg_time
unsigned sys_msg_time
Definition: sys_win.c:47
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
Cmd_RemoveCommand
void Cmd_RemoveCommand(char *cmd_name)
Definition: cmd.c:724
K_LEFTARROW
@ K_LEFTARROW
Definition: keys.h:35
K_KP_MINUS
@ K_KP_MINUS
Definition: keys.h:73
global_hInstance
HINSTANCE global_hInstance
Definition: sys_win.c:594
K_F6
@ K_F6
Definition: keys.h:46
refimport_t::Con_Printf
void(* Con_Printf)(int print_level, char *str,...)
Definition: ref.h:228
PRINT_ALL
#define PRINT_ALL
Definition: qcommon.h:743
r
GLdouble GLdouble r
Definition: qgl_win.c:336
Minimized
qboolean Minimized
Definition: sys_win.c:43
VIDREF_GL
#define VIDREF_GL
Definition: q_shared.h:1226
K_F2
@ K_F2
Definition: keys.h:42
K_PGUP
@ K_PGUP
Definition: keys.h:56
refimport_t
Definition: ref.h:218
refimport_t::Cmd_AddCommand
void(* Cmd_AddCommand)(char *name, void(*cmd)(void))
Definition: ref.h:222
BOOL
CONST COLORREF COLORREF BOOL
Definition: qgl_win.c:60
s_win95
qboolean s_win95
Definition: sys_win.c:39
UINT
CONST PIXELFORMATDESCRIPTOR UINT
Definition: qgl_win.c:35
K_F10
@ K_F10
Definition: keys.h:50
gl_mode
static cvar_t * gl_mode
Definition: vid_menu.c:34
K_KP_RIGHTARROW
@ K_KP_RIGHTARROW
Definition: keys.h:65
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
client_state_t::refresh_prepped
qboolean refresh_prepped
Definition: client.h:118
K_PGDN
@ K_PGDN
Definition: keys.h:55
refimport_t::Sys_Error
void(* Sys_Error)(int err_level, char *str,...)
Definition: ref.h:220
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:394
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:309
K_INS
@ K_INS
Definition: keys.h:53
cvar_s::value
float value
Definition: q_shared.h:324
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
K_F9
@ K_F9
Definition: keys.h:49
refimport_t::FS_Gamedir
char *(* FS_Gamedir)(void)
Definition: ref.h:240
key_console
@ key_console
Definition: client.h:220
scantokey
byte scantokey[128]
Definition: vid_dll.c:156
NULL
#define NULL
Definition: q_shared.h:60
vid_modes
vidmode_t vid_modes[]
Definition: vid_dll.c:484
K_CTRL
@ K_CTRL
Definition: keys.h:39
VIDREF_SOFT
#define VIDREF_SOFT
Definition: q_shared.h:1227
K_KP_END
@ K_KP_END
Definition: keys.h:66
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
VID_FreeReflib
void VID_FreeReflib(void)
Definition: vid_dll.c:544
K_F3
@ K_F3
Definition: keys.h:43
K_KP_ENTER
@ K_KP_ENTER
Definition: keys.h:69
name
cvar_t * name
Definition: cl_main.c:94
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:735
K_KP_DEL
@ K_KP_DEL
Definition: keys.h:71
WIN_EnableAltTab
static void WIN_EnableAltTab(void)
Definition: vid_dll.c:87
re
refexport_t re
Definition: vid_dll.c:31
VID_MenuInit
void VID_MenuInit(void)
Definition: vid_menu.c:209
VID_NUM_MODES
#define VID_NUM_MODES
Definition: vid_dll.c:55
vid_ref
cvar_t * vid_ref
Definition: vid_dll.c:43
VID_CheckChanges
void VID_CheckChanges(void)
Definition: vid_dll.c:641
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:42
AppActivate
void AppActivate(BOOL fActive, BOOL minimize)
Definition: vid_dll.c:242
VID_GetModeInfo
qboolean VID_GetModeInfo(int *width, int *height, int mode)
Definition: vid_dll.c:499
K_F4
@ K_F4
Definition: keys.h:44
refimport_t::Vid_MenuInit
void(* Vid_MenuInit)(void)
Definition: ref.h:247
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:590
K_KP_SLASH
@ K_KP_SLASH
Definition: keys.h:72
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:46
K_UPARROW
@ K_UPARROW
Definition: keys.h:33
K_SHIFT
@ K_SHIFT
Definition: keys.h:40
refexport_t::Shutdown
void(* Shutdown)(void)
Definition: ref.h:160
vid_xpos
cvar_t * vid_xpos
Definition: vid_dll.c:44
K_KP_5
@ K_KP_5
Definition: keys.h:64
K_KP_PGUP
@ K_KP_PGUP
Definition: keys.h:62
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
Com_DPrintf
void Com_DPrintf(char *fmt,...)
Definition: common.c:155
S_StopAllSounds
void S_StopAllSounds(void)
Definition: snd_dma.c:795
reflib_library
HINSTANCE reflib_library
Definition: vid_dll.c:50
refexport_t::api_version
int api_version
Definition: ref.h:154
FS_FreeFile
void FS_FreeFile(void *buffer)
Definition: files.c:433
S_Activate
void S_Activate(qboolean active)
Definition: snd_win.c:844
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:225
K_PAUSE
@ K_PAUSE
Definition: keys.h:133
K_ALT
@ K_ALT
Definition: keys.h:38
VIDREF_OTHER
#define VIDREF_OTHER
Definition: q_shared.h:1228
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
K_F11
@ K_F11
Definition: keys.h:51
refimport_t::Cvar_SetValue
void(* Cvar_SetValue)(char *name, float value)
Definition: ref.h:244
K_RIGHTARROW
@ K_RIGHTARROW
Definition: keys.h:36
K_DEL
@ K_DEL
Definition: keys.h:54
mode
GLenum mode
Definition: qgl_win.c:113
cls
client_static_t cls
Definition: cl_main.c:105
VID_Error
void VID_Error(int err_level, char *fmt,...)
Definition: vid_dll.c:141
Key_ClearStates
void Key_ClearStates(void)
Definition: keys.c:919
vidmode_s::height
int height
Definition: vid_dll.c:480
VID_LoadRefresh
qboolean VID_LoadRefresh(char *name)
Definition: vid_dll.c:558
vid_ypos
cvar_t * vid_ypos
Definition: vid_dll.c:45
K_F5
@ K_F5
Definition: keys.h:45
K_MWHEELUP
@ K_MWHEELUP
Definition: keys.h:131
cl
client_state_t cl
Definition: cl_main.c:106
GetRefAPI_t
refexport_t(* GetRefAPI_t)(refimport_t)
Definition: ref.h:272
cl_hwnd
HWND cl_hwnd
Definition: vid_dll.c:53
K_BACKSPACE
@ K_BACKSPACE
Definition: keys.h:32
MainWndProc
LONG WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: vid_dll.c:285
refimport_t::Cmd_Argc
int(* Cmd_Argc)(void)
Definition: ref.h:224
K_KP_DOWNARROW
@ K_KP_DOWNARROW
Definition: keys.h:67
K_F1
@ K_F1
Definition: keys.h:41
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
vidref_val
int vidref_val
Definition: cl_ents.c:28
refimport_t::Cmd_Argv
char *(* Cmd_Argv)(int i)
Definition: ref.h:225
MAXPRINTMSG
#define MAXPRINTMSG
Definition: vid_dll.c:115
win_noalttab
cvar_t * win_noalttab
Definition: vid_dll.c:33