$OpenBSD: patch-src_video_x11_SDL_x11video_h,v 1.1 2011/05/13 07:57:24 jasper Exp $

Add support for XRandR and VidMode gamma ramps.
From upstream bz: http://bugzilla.libsdl.org/show_bug.cgi?id=971

Will not be part of SDL 1.3 to gamma API removal.

--- src/video/x11/SDL_x11video.h.orig	Mon Dec 31 05:48:13 2007
+++ src/video/x11/SDL_x11video.h	Tue May  3 15:12:12 2011
@@ -122,12 +122,16 @@ struct SDL_PrivateVideoData {
     XRRScreenConfiguration* screen_config;
     int saved_size_id;
     Rotation saved_rotation;
+    XRRCrtcGamma** gamma_ramp_saved_xrr;
+    int gamma_ramp_saved_xrr_size;
 #endif
 #if SDL_VIDEO_DRIVER_X11_VIDMODE
     SDL_NAME(XF86VidModeModeInfo) saved_mode;
     struct {
         int x, y;
     } saved_view;
+    int gamma_ramp_size;
+    Uint16* gamma_ramp_saved_vm;
 #endif
 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */
     XiGMiscResolutionInfo saved_res;
@@ -188,6 +192,10 @@ struct SDL_PrivateVideoData {
 #define mouse_accel		(this->hidden->mouse_accel)
 #define mouse_relative		(this->hidden->mouse_relative)
 #define SDL_modelist		(this->hidden->modelist)
+#define gamma_ramp_size		(this->hidden->gamma_ramp_size)
+#define gamma_ramp_saved_vm	(this->hidden->gamma_ramp_saved_vm)
+#define gamma_ramp_saved_xrr	(this->hidden->gamma_ramp_saved_xrr)
+#define gamma_ramp_saved_xrr_size	(this->hidden->gamma_ramp_saved_xrr_size)
 #define xinerama_info		(this->hidden->xinerama_info)
 #define saved_mode		(this->hidden->saved_mode)
 #define saved_view		(this->hidden->saved_view)
