Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the correct version check for SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE #607

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

Lundis
Copy link
Contributor

@Lundis Lundis commented Jul 27, 2024

SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE was added in 2.28.3, but they forgot to mention it in the release notes.
You can see it here in 2.28.3: https://github.com/libsdl-org/SDL/blob/release-2.28.3/include/SDL_hints.h#L1486

If compiling go-sdl2 on a system with 2.28.3-2.28.5 (such as ubuntu 23.10), you get 6 sets of these warnings:

# github.com/veandco/go-sdl2/sdl
In file included from system.c:1:
hints.go:11: warning: "SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE" redefined
   11 | #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE ""
      | 
In file included from /usr/include/SDL2/SDL.h:47,
                 from /home/lundis/go/pkg/mod/github.com/veandco/go-sdl2@v0.5.0-alpha.6/sdl/sdl_wrapper.h:5,
                 from events.go:4:
/usr/include/SDL2/SDL_hints.h:1486: note: this is the location of the previous definition
 1486 | #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…WER_DEVICE
@veeableful veeableful merged commit b4de621 into veandco:master Jul 28, 2024
1 check passed
@veeableful
Copy link
Contributor

Thank you very much @Lundis!

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.

None yet

2 participants