Przeglądaj źródła

Corrected html5 glfw3 bug

Mouse button values are inverted!
Ray 9 lat temu
rodzic
commit
c17c1ccaea
1 zmienionych plików z 7 dodań i 2 usunięć
  1. 7 2
      src/raylib.h

+ 7 - 2
src/raylib.h

@@ -157,8 +157,13 @@
 
 // Mouse Buttons
 #define MOUSE_LEFT_BUTTON     0
-#define MOUSE_RIGHT_BUTTON    1
-#define MOUSE_MIDDLE_BUTTON   2
+#if defined(PLATFORM_WEB)
+    #define MOUSE_RIGHT_BUTTON    2
+    #define MOUSE_MIDDLE_BUTTON   1
+#else
+    #define MOUSE_RIGHT_BUTTON    1
+    #define MOUSE_MIDDLE_BUTTON   2
+#endif
 
 // Gamepad Number
 #define GAMEPAD_PLAYER1       0