瀏覽代碼

Note that the cursor clip has been cleared even if we didn't do it

This releases the mouse cursor when bringing up the console on Counter Strike in dev mode.
Sam Lantinga 1 年之前
父節點
當前提交
16e0806ced
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/video/windows/SDL_windowswindow.c

+ 2 - 1
src/video/windows/SDL_windowswindow.c

@@ -1577,8 +1577,9 @@ void WIN_UpdateClipCursor(SDL_Window *window)
         if (PtInRect(&data->cursor_clipped_rect, first) &&
         if (PtInRect(&data->cursor_clipped_rect, first) &&
             PtInRect(&data->cursor_clipped_rect, second)) {
             PtInRect(&data->cursor_clipped_rect, second)) {
             ClipCursor(NULL);
             ClipCursor(NULL);
-            SDL_zero(data->cursor_clipped_rect);
         }
         }
+        /* Note that we don't have the cursor clipped anymore, even if it's not us that reset it */
+        SDL_zero(data->cursor_clipped_rect);
     }
     }
     data->last_updated_clipcursor = SDL_GetTicks();
     data->last_updated_clipcursor = SDL_GetTicks();
 }
 }