diff options
| author | aura <nw@moneybot.cc> | 2026-08-11 19:10:16 +0200 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-08-11 19:10:16 +0200 |
| commit | 17c07b5f884453130d8be3a6d91d730d80d4f8ae (patch) | |
| tree | 6ec11e5e5f7f0be9ed899196c2897aa76a907de2 /src/game/assets.cpp | |
| parent | 1aa17de9188790f049c0edc4281597cb4e535627 (diff) | |
| parent | 0a9d7ce6a0764a87766ebb23cc1ece4c26c8c678 (diff) | |
Merge remote-tracking branch 'origin/day'
Diffstat (limited to 'src/game/assets.cpp')
| -rw-r--r-- | src/game/assets.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp index 62663a9..6ee7aff 100644 --- a/src/game/assets.cpp +++ b/src/game/assets.cpp @@ -9,6 +9,18 @@ void assets_init( GAME_DATA *game ) { game->assets.test = gl_texture_from_file( game->gl, "uvtest.png" ); game->assets.fonts_init = 0; + + for( I32 idx = 0; idx < SDL_NUM_SYSTEM_CURSORS; ++idx ) + game->assets.cursors[idx] = SDL_CreateSystemCursor( (SDL_SystemCursor)idx ); +} + +void assets_destroy( GAME_DATA* game ) { + for( I32 idx = 0; idx < SDL_NUM_SYSTEM_CURSORS; ++idx ) { + if( !game->assets.cursors[idx] ) + continue; + SDL_FreeCursor( game->assets.cursors[idx] ); + game->assets.cursors[idx] = 0; + } } void assets_create_fonts( struct GAME_DATA *game ) { |
