]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
migrated cls.message and client->message buffers into netconn_t struct
[xonotic/darkplaces.git] / vid_sdl.c
index e5c844e5362718c3aeb0ae943bc47e05716a77cb..9f86830566634d44d0f5cb832a1ea5cb6c7682f0 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -254,11 +254,13 @@ static int Sys_EventFilter( SDL_Event *event )
 #endif
 }
 
-static keynum_t buttonremap[16] =
+static keynum_t buttonremap[18] =
 {
        K_MOUSE1,
        K_MOUSE3,
        K_MOUSE2,
+       K_MWHEELUP,
+       K_MWHEELDOWN,
        K_MOUSE4,
        K_MOUSE5,
        K_MOUSE6,
@@ -297,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;
                }
@@ -344,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()