Skip to content

fix(sdl3-cursor): use SDL_CreateAnimatedCursor#117

Merged
fbraz3 merged 1 commit into
mainfrom
feat/sdl-animated-cursor
Apr 29, 2026
Merged

fix(sdl3-cursor): use SDL_CreateAnimatedCursor#117
fbraz3 merged 1 commit into
mainfrom
feat/sdl-animated-cursor

Conversation

@fbraz3

@fbraz3 fbraz3 commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

Switch SDL cursor animation handling from manual frame switching (SDL_CreateColorCursor + per-frame SDL_SetCursor) to SDL native animated cursors via SDL_CreateAnimatedCursor.

What changed

  • Updated SDL3 cursor loading in both products:
    • GeneralsMD/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Mouse.cpp
    • Generals/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Mouse.cpp
  • Reworked AnimatedCursor storage to keep a single animated SDL_Cursor* plus source surfaces.
  • Removed obsolete manual frame stepping state (m_inputFrame) from:
    • GeneralsMD/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Mouse.h
    • Generals/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Mouse.h
  • Kept fallback behavior to NORMAL/default SDL cursor when animated resources are unavailable.

Validation

  • macOS task [Platform] Build GeneralsXZH completed successfully after the change.

Notes

  • Added dev diary entry for this session in docs/DEV_BLOG/2026-04-DIARY.md as required by project workflow.

@fbraz3 fbraz3 merged commit 723ee69 into main Apr 29, 2026
10 checks passed
@fbraz3 fbraz3 deleted the feat/sdl-animated-cursor branch April 29, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant