Browse Source

Review formatting

raysan5 4 năm trước cách đây
mục cha
commit
9aedfbec69
1 tập tin đã thay đổi với 25 bổ sung26 xóa
  1. 25 26
      src/core.c

+ 25 - 26
src/core.c

@@ -191,8 +191,6 @@
                                     // NOTE: Already provided by rlgl implementation (on glad.h)
     #include "GLFW/glfw3.h"         // GLFW3 library: Windows, OpenGL context and Input management
                                     // NOTE: GLFW3 already includes gl.h (OpenGL) headers
-                                    
-//https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/
 
     // Support retrieving native window handlers
     #if defined(_WIN32)
@@ -5845,22 +5843,23 @@ static void PollKeyboardEvents(void)
     // Scancode to keycode mapping for US keyboards
     // TODO: Probably replace this with a keymap from the X11 to get the correct regional map for the keyboard:
     // Currently non US keyboards will have the wrong mapping for some keys
-    static const int keymapUS[] =
-        { 0,256,49,50,51,52,53,54,55,56,57,48,45,61,259,258,81,87,69,82,84,
-        89,85,73,79,80,91,93,257,341,65,83,68,70,71,72,74,75,76,59,39,96,
-        340,92,90,88,67,86,66,78,77,44,46,47,344,332,342,32,280,290,291,
-        292,293,294,295,296,297,298,299,282,281,327,328,329,333,324,325,
-        326,334,321,322,323,320,330,0,85,86,300,301,89,90,91,92,93,94,95,
-        335,345,331,283,346,101,268,265,266,263,262,269,264,267,260,261,
-        112,113,114,115,116,117,118,119,120,121,122,123,124,125,347,127,
-        128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
-        144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
-        160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
-        176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
-        192,193,194,0,0,0,0,0,200,201,202,203,204,205,206,207,208,209,210,
-        211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,
-        227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,
-        243,244,245,246,247,248,0,0,0,0,0,0,0, };
+    static const int keymapUS[] = {
+        0, 256, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 45, 61, 259, 258, 81, 87, 69, 82, 84, 
+        89, 85, 73, 79, 80, 91, 93, 257, 341, 65, 83, 68, 70, 71, 72, 74, 75, 76, 59, 39, 96, 
+        340, 92, 90, 88, 67, 86, 66, 78, 77, 44, 46, 47, 344, 332, 342, 32, 280, 290, 291, 
+        292, 293, 294, 295, 296, 297, 298, 299, 282, 281, 327, 328, 329, 333, 324, 325, 
+        326, 334, 321, 322, 323, 320, 330, 0, 85, 86, 300, 301, 89, 90, 91, 92, 93, 94, 95, 
+        335, 345, 331, 283, 346, 101, 268, 265, 266, 263, 262, 269, 264, 267, 260, 261, 
+        112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 347, 127, 
+        128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 
+        144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 
+        160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 
+        176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 
+        192, 193, 194, 0, 0, 0, 0, 0, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 
+        211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 
+        227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 
+        243, 244, 245, 246, 247, 248, 0, 0, 0, 0, 0, 0, 0
+    };
 
     int fd = CORE.Input.Keyboard.fd;
     if (fd == -1) return;
@@ -5932,10 +5931,10 @@ static void *EventThread(void *arg)
                     CORE.Input.Mouse.currentPosition.x += event.value;
                     CORE.Input.Touch.position[0].x = CORE.Input.Mouse.currentPosition.x;
 
-                    #if defined(SUPPORT_GESTURES_SYSTEM)
-                        touchAction = TOUCH_MOVE;
-                        gestureUpdate = true;
-                    #endif
+                #if defined(SUPPORT_GESTURES_SYSTEM)
+                    touchAction = TOUCH_MOVE;
+                    gestureUpdate = true;
+                #endif
                 }
 
                 if (event.code == REL_Y)
@@ -5943,10 +5942,10 @@ static void *EventThread(void *arg)
                     CORE.Input.Mouse.currentPosition.y += event.value;
                     CORE.Input.Touch.position[0].y = CORE.Input.Mouse.currentPosition.y;
 
-                    #if defined(SUPPORT_GESTURES_SYSTEM)
-                        touchAction = TOUCH_MOVE;
-                        gestureUpdate = true;
-                    #endif
+                #if defined(SUPPORT_GESTURES_SYSTEM)
+                    touchAction = TOUCH_MOVE;
+                    gestureUpdate = true;
+                #endif
                 }
 
                 if (event.code == REL_WHEEL) CORE.Input.Mouse.currentWheelMove += event.value;