Author Topic: Failed Hardware and my res  (Read 1907 times)

Phenax

  • PGP
  • Posts: 17
Failed Hardware and my res
« on: June 21, 2007, 07:51:03 PM »
1440x900 does not work. All others work.
Code: [Select]
...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:

Code: [Select]
--- 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:
« Last Edit: June 21, 2007, 09:27:25 PM by Phenax »

KiLo

  • Autococker
  • Posts: 2086
Re: Failed Hardware and my res
« Reply #1 on: June 21, 2007, 09:21:14 PM »
Strange my 1440x900 worked. I was thinking it could be the build but mine worked with 18 & 19. I think Xbain had a similar problem try shootin him a PM or search for his thread.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Failed Hardware and my res
« Reply #2 on: June 21, 2007, 10:28:56 PM »
What build are you using?  You need to use official binaries when you play on public servers (to prevent cheating).

Edit: I'll look into adding that patch to build 20.

Edit 2: Just thought about this - the Linux video code may not have been updated to add the new modes.
« Last Edit: June 21, 2007, 11:12:43 PM by jitspoe »

Phenax

  • PGP
  • Posts: 17
Re: Failed Hardware and my res
« Reply #3 on: June 21, 2007, 11:27:01 PM »
I'm using build 18 vanilla with x86 emulation on amd64, failed hardware is my biggest issue

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Failed Hardware and my res
« Reply #4 on: June 25, 2007, 02:19:21 PM »
Try build 19: http://dplogin.com/files/clients/linux/paintball2_build019_linux_full_pretest1.tar.gz

If that doesn't work, I guess I'll have to get a 64bit livecd and see if I can figure out what's wrong.

Phenax

  • PGP
  • Posts: 17
Re: Failed Hardware and my res
« Reply #5 on: June 26, 2007, 09:03:40 PM »
Doesn't work.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Failed Hardware and my res
« Reply #6 on: June 27, 2007, 04:30:23 PM »
K, I'll look into testing with 64 bit linux after the build 19 release.