瀏覽代碼

win32: Set the number of frames correctly when caching a scaled animated cursor

Fixes #14284
Frank Praznik 7 月之前
父節點
當前提交
3669920fdd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/windows/SDL_windowsmouse.c

+ 1 - 1
src/video/windows/SDL_windowsmouse.c

@@ -484,7 +484,7 @@ static SDL_Cursor *WIN_CreateAnimatedCursor(SDL_CursorFrameInfo *frames, int fra
         }
         }
         data->hot_x = hot_x;
         data->hot_x = hot_x;
         data->hot_y = hot_y;
         data->hot_y = hot_y;
-        data->num_frames = 1;
+        data->num_frames = frame_count;
         for (int i = 0; i < frame_count; ++i) {
         for (int i = 0; i < frame_count; ++i) {
             data->frames[i].surface = frames[i].surface;
             data->frames[i].surface = frames[i].surface;
             data->frames[i].duration = frames[i].duration;
             data->frames[i].duration = frames[i].duration;