-
Notifications
You must be signed in to change notification settings - Fork 19
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
Compilation fails on native silicon. #21
Comments
Hi! Thank you for suggesting this update. Unfortunately, I do not have an M1 MacBook, so I cannot test anything out in that regard, although I suspect that this replacement does not return an actual double and more of a random bit of memory. If you can test objc_msgSend and it does not work with scrolling, can you try replacing it with objc_msgSend_fpret2 (don't know if it works, just seen it out there). I just want to see if this change actually functions properly. A lot of the information on this stuff online only talks about PowerPC (PPC) macs vs intel (i386) macs, none talk about M1 macs, so I don't have a lot to go off of. Again, thank you for suggesting this! |
I found this: https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html fpret is said to be an x86-64 thing. Maybe casting it will be sufficient? If I ever get to using the scroll wheel, I guess I'll find out. I am happy to test anything you do on an M1. |
Yeah, it would be great if you could test this. Scrolling isn't essential, but it would be very nice if it worked on all Macs. |
The objc_msgSend_fpret function needs to be replaced with the objc_msgSend function for M1 macs.
Compiling on an M1 Macbook pro, the scrollWheelUpdate function (around line 4794) uses a ABI function called objc_msgSend_fpret. This is an x86_64 related function not available on aarch64. On a guess, I tried replacing it with just objc_msgSend and the demo with the colorful boxes seemd to work. I have no idea if the scrollWheelUpdate function works. I then replaced that with this:
and things still seem to work. This was the only change needed to get it to compile. An unrelated warning remains, however:
olcPixelGameEngine.h:3290:14: 'SetDecalMode' overrides a member function but is not marked 'override'
The text was updated successfully, but these errors were encountered: