]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
now supports Mac and Windows newlines everywhere
[xonotic/darkplaces.git] / vid_shared.c
index 788b03e90317a576ad429469adc4b3310eb95d50..350466c35e3f97aa574000cf4a91dea42dec69cc 100644 (file)
@@ -21,7 +21,7 @@ int gl_textureunits = 1;
 int gl_combine_extension = false;
 // GL_EXT_compiled_vertex_array
 int gl_supportslockarrays = false;
-// GLX_SGI_video_sync or WGL_EXT_swap_control
+// GLX_SGI_swap_control or WGL_EXT_swap_control
 int gl_videosyncavailable = false;
 // stencil available
 int gl_stencil = false;
@@ -68,7 +68,7 @@ cvar_t vid_width = {CVAR_SAVE, "vid_width", "640"};
 cvar_t vid_height = {CVAR_SAVE, "vid_height", "480"};
 cvar_t vid_bitsperpixel = {CVAR_SAVE, "vid_bitsperpixel", "32"};
 
-cvar_t vid_vsync = {CVAR_SAVE, "vid_vsync", "1"};
+cvar_t vid_vsync = {CVAR_SAVE, "vid_vsync", "0"};
 cvar_t vid_mouse = {CVAR_SAVE, "vid_mouse", "1"};
 cvar_t gl_combine = {CVAR_SAVE, "gl_combine", "1"};
 cvar_t gl_finish = {0, "gl_finish", "0"};
@@ -778,8 +778,8 @@ void IN_Mouse(float mx, float my)
 
        if (cl_prydoncursor.integer)
        {
-               cl.cmd.cursor_screen[0] += mouse_x / vid.realwidth;
-               cl.cmd.cursor_screen[1] += mouse_y / vid.realheight;
+               cl.cmd.cursor_screen[0] += mouse_x * sensitivity.value / vid.realwidth;
+               cl.cmd.cursor_screen[1] += mouse_y * sensitivity.value / vid.realheight;
                V_StopPitchDrift();
                return;
        }
@@ -918,6 +918,9 @@ void VID_UpdateGamma(qboolean force)
                }
 
                Cvar_SetValueQuick(&vid_hardwaregammasupported, VID_SetGamma(vid_gammaramps));
+               // if custom gamma ramps failed (Windows stupidity), restore to system gamma
+               if(!vid_hardwaregammasupported.integer)
+                       VID_SetGamma(vid_systemgammaramps);
        }
        else
        {