-
Notifications
You must be signed in to change notification settings - Fork 171
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
Fix cutscene only showing a grey screen on macOS. #533
Fix cutscene only showing a grey screen on macOS. #533
Conversation
This is caused by different handling of formatted input in the C++ standard library on macOS than on a linux box. On linux, characters after a number are ignored (such as 'f' in this case), on macOS this leads to an error on the stream.
Skimmed over code, LGTM. Did not test it yet. I don't fully understand our cmake_configure.cmake (for stdlib, this looks too compiler specific), but I'll assume the changes are good, too. |
LGTM, is the |
That would be nice. Since the topic is Apple. 🍏 |
No, it is For clang installed by Homebrew, it is just (Apple really has some platform-specific weirdness.) |
Thanks for verifying! |
@madebr review sounds like it only reviewed the code, much like mine. I'll probably hit merge once CI passed, if we have confirmed these touched platforms still run fine. |
Just tested it on linux, gcc 8. rwgame still works, rwtests shows no difference in behavior. |
Tested on MacOS 10.13.4 with "Apple LLVM version 9.1.0 (clang-902.0.39.1)"; current master 7061813 indeed has broken initial cutscene, while this patch fixes it 👍 |
[Fixes #378]
Since the author of #509 apparently went MIA, I though I would quickly fix this up since I own a macOS machine.
After some debugging across two machines, I found the root cause.
Basically the issue was caused by a difference how the different C++ standard library implementations process formatted input.
Here is a minimal reproducer of the problem:
On a macOS machine, this returns 0. On a linux box, 1234 (as the previous code assumed).
I also included a small build failure fix when using a combination of gcc/clang and the different filesystem libraries, which I had laying around for a while now.