Ver código fonte

Adjusted formatting to comply with contribution guidelines

Diogo Diniz 1 mês atrás
pai
commit
3ef5ee878c
1 arquivos alterados com 15 adições e 14 exclusões
  1. 15 14
      src/platforms/rcore_desktop_glfw.c

+ 15 - 14
src/platforms/rcore_desktop_glfw.c

@@ -75,25 +75,24 @@
     #include <sys/time.h>               // Required for: timespec, nanosleep(), select() - POSIX
     #include <sys/time.h>               // Required for: timespec, nanosleep(), select() - POSIX
 
 
 #if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
 #if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
-    // Set appropriate expose macros based on available backends
+                                        // Set appropriate expose macros based on available backends
     #if defined(_GLFW_X11)
     #if defined(_GLFW_X11)
         #define GLFW_EXPOSE_NATIVE_X11
         #define GLFW_EXPOSE_NATIVE_X11
-        #define Font X11Font                // Hack to fix 'Font' name collision
-                                            // The definition and references to the X11 Font type will be replaced by 'X11Font'
-                                            // Works as long as the current file consistently references any X11 Font as X11Font
-                                            // Since it is never referenced (as of writting), this does not pose an issue
+            #define Font X11Font        // Hack to fix 'Font' name collision
+                                        // The definition and references to the X11 Font type will be replaced by 'X11Font'
+                                        // Works as long as the current file consistently references any X11 Font as X11Font
+                                        // Since it is never referenced (as of writting), this does not pose an issue
     #endif
     #endif
     
     
     #if defined(_GLFW_WAYLAND)
     #if defined(_GLFW_WAYLAND)
         #define GLFW_EXPOSE_NATIVE_WAYLAND
         #define GLFW_EXPOSE_NATIVE_WAYLAND
     #endif
     #endif
-
-    // Include native header only once, regardless of how many backends are defined
-    #include "GLFW/glfw3native.h"       // Required for: glfwGetX11Window() and glfwGetWaylandWindow()
-
-    // Clean up X11-specific hacks
-    #if defined(_GLFW_X11)
-        #undef Font                         // Revert hack and allow normal raylib Font usage
+                                        
+    #include "GLFW/glfw3native.h"       // Include native header only once, regardless of how many backends are defined
+                                        // Required for: glfwGetX11Window() and glfwGetWaylandWindow()
+    
+    #if defined(_GLFW_X11)              // Clean up X11-specific hacks
+        #undef Font                     // Revert hack and allow normal raylib Font usage
     #endif
     #endif
 #endif
 #endif
 #endif
 #endif
@@ -741,10 +740,12 @@ void *GetWindowHandle(void)
     #if defined(_GLFW_WAYLAND)
     #if defined(_GLFW_WAYLAND)
         #if defined(_GLFW_X11)
         #if defined(_GLFW_X11)
             int platformID = glfwGetPlatform();
             int platformID = glfwGetPlatform();
-            if (platformID == GLFW_PLATFORM_WAYLAND) {
+            if (platformID == GLFW_PLATFORM_WAYLAND)
+            {
                 return glfwGetWaylandWindow(platform.handle);
                 return glfwGetWaylandWindow(platform.handle);
             }
             }
-            else {
+            else
+            {
                 X11WindowHandle = glfwGetX11Window(platform.handle);
                 X11WindowHandle = glfwGetX11Window(platform.handle);
                 return &X11WindowHandle;
                 return &X11WindowHandle;
             }
             }