1440x900 does not work. All others work.
...setting mode 21: invalid mode
ref_gl::R_SetMode() - invalid mode
I get failed hardware check when I join a server. I have the latest + searched forums for answer.
No amd64 game + I'll get banned for playing with mods but using 1440x900 with this custom resolution patch it works:
--- vid_so.c 2007-03-13 03:37:08.000000000 -0400
+++ vid_so.c 2007-06-21 20:58:49.347740190 -0400
@@ -41,6 +41,8 @@
cvar_t *vid_xpos; // X coordinate of window position
cvar_t *vid_ypos; // Y coordinate of window position
cvar_t *vid_fullscreen;
+cvar_t *vid_width;
+cvar_t *vid_height;
// Global variables used internally by this module
viddef_t viddef; // global video state; used by other modules
@@ -48,8 +50,6 @@
qboolean reflib_active = 0;
void *testlib;
-#define VID_NUM_MODES (sizeof(vid_modes) / sizeof(vid_modes[0]))
-
/** KEYBOARD **************************************************************/
void Do_Key_Event(int key, qboolean down);
@@ -164,15 +164,42 @@
// jitodo, custom resolution
};
-qboolean VID_GetModeInfo(int *width, int *height, int mode)
-{
- if (mode < 0 || mode >= VID_NUM_MODES)
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
- return true;
+static int s_numVidModes = (sizeof(vid_modes) / sizeof(vid_modes[0]));
+qboolean VID_GetModeInfo( int *width, int *height, int mode )
+{
+ vidmode_t *vm;
+
+ if (mode < -1){
+ return false;
+ }
+
+ if (mode >= s_numVidModes){
+ return false;
+ }
+
+ if(mode == -1) {
+ *width = vid_width->value;
+ *height = vid_height->value;
+ return true;
+ }
+
+ vm = &vid_modes[mode];
+
+ *width = vm->width;
+ *height = vm->height;
+
+ return true;
+}
+
+void VID_ModeList_f(void)
+{
+ int i;
+
+ for( i=0; i < s_numVidModes; i++) {
+ Com_Printf("%s\n",vid_modes[i].description);
+ }
+ Com_Printf("For custom resolutions, set 'gl_mode' to -1 and use 'vid_width' / 'vid_height'\n");
}
/*
@@ -448,6 +475,9 @@
vid_ypos = Cvar_Get("vid_ypos", "22", CVAR_ARCHIVE);
vid_fullscreen = Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
vid_gamma = Cvar_Get("vid_gamma", "1", CVAR_ARCHIVE);
+ vid_width= Cvar_Get ( "vid_width", "640", CVAR_ARCHIVE);
+ vid_height= Cvar_Get ( "vid_height", "480", CVAR_ARCHIVE);
+ Cmd_AddCommand ("vid_modelist", VID_ModeList_f);
/* Add some console commands that we want to handle */
Cmd_AddCommand ("vid_restart", VID_Restart_f);
Owell thx D: