]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
fix a severe texture corruption and crash case when using vid_dx9 1 is used with...
[xonotic/darkplaces.git] / vid_wgl.c
index 167e6ea7573dae6d708b0da50cd3e492396c8eed..ffa665891a6bc5b7ce9d65ad4f9eefebff379129 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -1508,6 +1508,7 @@ qboolean VID_InitModeDX(viddef_mode_t *mode, int version)
        vid.support.ext_blend_subtract = true;
        vid.support.ext_draw_range_elements = true;
        vid.support.ext_framebuffer_object = true;
+
        vid.support.ext_texture_3d = true;
        vid.support.ext_texture_compression_s3tc = true;
        vid.support.ext_texture_filter_anisotropic = true;
@@ -1900,8 +1901,8 @@ void VID_Shutdown (void)
                if (vid_begunscene)
                        IDirect3DDevice9_EndScene(vid_d3d9dev);
                vid_begunscene = false;
-//             Cmd_ExecuteString("r_texturestats", src_command);
-//             Cmd_ExecuteString("memlist", src_command);
+//             Cmd_ExecuteString("r_texturestats", src_command, true);
+//             Cmd_ExecuteString("memlist", src_command, true);
                IDirect3DDevice9_Release(vid_d3d9dev);
        }
        vid_d3d9dev = NULL;
@@ -2028,7 +2029,8 @@ void VID_EnableJoystick(qboolean enable)
        if (joy_detected.integer != sharedcount)
                Cvar_SetValueQuick(&joy_detected, sharedcount);
 
-       Cvar_SetValueQuick(&joy_active, success ? 1 : 0);
+       if (joy_active.integer != (success ? 1 : 0))
+               Cvar_SetValueQuick(&joy_active, success ? 1 : 0);
 }
 
 #ifdef SUPPORTDIRECTX