]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
disable hardware gamma if XF86VidModeGetGammaRampSize reports a size other than 256...
[xonotic/darkplaces.git] / vid_sdl.c
index 9047dd36e5176ab34ddaf507eb18c2e7004a87ca..9f86830566634d44d0f5cb832a1ea5cb6c7682f0 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -23,6 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 // Tell startup code that we have a client
 int cl_available = true;
+
+qboolean vid_supportrefreshrate = false;
+
 static qboolean vid_usingmouse;
 static qboolean vid_isfullscreen;
 
@@ -251,11 +254,13 @@ static int Sys_EventFilter( SDL_Event *event )
 #endif
 }
 
-static int buttonremap[16] =
+static keynum_t buttonremap[18] =
 {
        K_MOUSE1,
        K_MOUSE3,
        K_MOUSE2,
+       K_MWHEELUP,
+       K_MWHEELDOWN,
        K_MOUSE4,
        K_MOUSE5,
        K_MOUSE6,
@@ -294,11 +299,11 @@ void Sys_SendKeyEvents( void )
                                }
                                break;
                        case SDL_MOUSEBUTTONDOWN:
-                               if (event.button.button <= 16)
+                               if (event.button.button <= 18)
                                        Key_Event( buttonremap[event.button.button - 1], 0, true );
                                break;
                        case SDL_MOUSEBUTTONUP:
-                               if (event.button.button <= 16)
+                               if (event.button.button <= 18)
                                        Key_Event( buttonremap[event.button.button - 1], 0, false );
                                break;
                }
@@ -341,7 +346,11 @@ static void VID_SetCaption()
                return;
 
        icon = LoadIcon( GetModuleHandle( NULL ), MAKEINTRESOURCE( IDI_ICON1 ) );
+#ifndef WIN64
        SetClassLong( info.window, GCL_HICON, (LONG) icon );
+#else
+       SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon );
+#endif
 }
 #else
 static void VID_SetCaption()
@@ -360,7 +369,7 @@ static void VID_OutputVersion()
                                        version->major, version->minor, version->patch );
 }
 
-int VID_InitMode(int fullscreen, int width, int height, int bpp)
+int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate)
 {
        int i;
        int flags = SDL_OPENGL;