Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Known Issue for SFML 2.5.1 built on arm64 platform #2

Open
charmhe opened this issue Mar 16, 2023 · 3 comments
Open

Known Issue for SFML 2.5.1 built on arm64 platform #2

charmhe opened this issue Mar 16, 2023 · 3 comments

Comments

@charmhe
Copy link

charmhe commented Mar 16, 2023

Platform: Mac M1
SFML ver: 2.5.1

When building SMFL 2.5.1 from source code on the arm64 platform (Mac M1, as I used), there are two issues due to the change of constructors.

In MainMenu::initWindow:

const sf::VideoMode videoMode = sf::VideoMode(800, 600);
const sf::Uint32 style = sf::Style::Close | sf::Style::Titlebar;

to

const sf::VideoMode videoMode = sf::VideoMode(sf::Vector2u(800, 600), 32);
const std::uint32_t style = sf::Style::Close | sf::Style::Titlebar;

Similar to in the Game.cpp.

Cheers,
Cha

@charmhe charmhe changed the title Known Issue for SMFL 2.5.1 built on arm64 platform Known Issue for SFML 2.5.1 built on arm64 platform Mar 17, 2023
@mircea-pavel-anton
Copy link
Owner

Hello, @charminh

Unfortunately, there is no way for me to test this as I do not have access to a Mac M1/M2. The strongest arm computer I have is a Raspberry Pi.

If you know what the issue is and managed to test it on your end, do not hesitate to submit a PR for this! I'll make sure it still works as expected on my end and approve it once everything is ok

@charmhe
Copy link
Author

charmhe commented Mar 17, 2023

@mirceanton yea I will do that for sure. The only concern is that it requires cross-compiling support, which is natural to build tools like CMake, but a little bit tricky for Makefile. I will include a CMakelist.txt for your reference as well.

@mircea-pavel-anton
Copy link
Owner

I have no experience with CMake unfortunately, but feel free to propose the changes.

Make sure to add some docs on getting started or something like that to have a guide on how to compile the code using CMake and I'll review it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants