瀏覽代碼

add brace for contitional

Co-authored-by: Sam Lantinga <[email protected]>
expikr 10 月之前
父節點
當前提交
f8468d580d
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/events/SDL_mouse.c

+ 3 - 1
src/events/SDL_mouse.c

@@ -847,7 +847,9 @@ static void SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL
     // Post the event, if desired
     // Post the event, if desired
     if (SDL_EventEnabled(SDL_EVENT_MOUSE_MOTION)) {
     if (SDL_EventEnabled(SDL_EVENT_MOUSE_MOTION)) {
         if (!relative && window_is_relative) {
         if (!relative && window_is_relative) {
-            if (!mouse->relative_mode_warp_motion) return;
+            if (!mouse->relative_mode_warp_motion) {
+                return;
+            }
             xrel = 0.0f;
             xrel = 0.0f;
             yrel = 0.0f;
             yrel = 0.0f;
         }
         }