Skip to content

Conversation

@g0mb4
Copy link

@g0mb4 g0mb4 commented Nov 6, 2024

SDL3 has officially stabilized the API and ABI.

The SDL3 support is only added for Linux (I do not have a Windows PC or a Mac).

SDL3 has officially stabilized the API and ABI.

The SDL3 support is only added for Linux (I do not have a Windows PC or a Mac).

Signed-off-by: Tóth János <gomba007@gmail.com>
@miniupnp miniupnp self-assigned this Nov 17, 2024
@miniupnp
Copy link
Contributor

Trying with SDL 3.1.2 on my FreeBSD 13.4

/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c: In function 'Video_Init':
/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c:379:15: error: too few arguments to function 'SDL_SetRenderLogicalPresentation'
  379 |         err = SDL_SetRenderLogicalPresentation(s_renderer,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/SDL3/SDL.h:69,
                 from /home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c:9:
/usr/local/include/SDL3/SDL_render.h:1299:33: note: declared here
 1299 | extern SDL_DECLSPEC int SDLCALL SDL_SetRenderLogicalPresentation(SDL_Renderer *renderer, int w, int h, SDL_RendererLogicalPresentation mode, SDL_ScaleMode scale_mode);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c: In function 'Video_Tick':
/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c:666:60: error: 'SDL_KeyboardEvent' has no member named 'key'
  666 |                                 SDL_Keycode key = event.key.key;
      |                                                            ^
/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c:667:59: error: 'SDL_KeyboardEvent' has no member named 'mod'
  667 |                                 SDL_Keymod mod = event.key.mod;
      |                                                           ^
/home/nanard/code/git/OpenDUNE/src/video/video_sdl3.c:668:66: error: 'SDL_KeyboardEvent' has no member named 'scancode'
  668 |                                 SDL_Scancode scancode = event.key.scancode;
      |                                                                  ^
gmake[1]: *** [Makefile:185: video/video_sdl3.o] Error 1
gmake[1] : on quitte le répertoire « /home/nanard/code/git/OpenDUNE/objs/debug »
gmake: *** [Makefile:43: all] Error 1

@miniupnp miniupnp added this to the 1.0 milestone Nov 17, 2024
@miniupnp
Copy link
Contributor

I will have a look of what has changed https://github.com/libsdl-org/SDL

@miniupnp
Copy link
Contributor

I can use #if SDL_VERSION_ATLEAST(3, 1, 3)

@miniupnp
Copy link
Contributor

libsdl-org/SDL@54459de

@g0mb4
Copy link
Author

g0mb4 commented Nov 18, 2024

3.1.3 is the version when they locked the API. So this is the required minimum.

@miniupnp
Copy link
Contributor

I'm going to wait for the SDL3 package to be updated on FreeBSD ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants