Closed meganukebmp closed 4 years ago
Thanks for the PR!
That gives the warning "unknown escaping sequence" when using on Linux. I want to make sure it still runs when built from Linux (since romfs:\/thing.png
is not a valid path and would probably crash the homebrew).
Another cleaner approach would be to remove that define in the Makefile and put it in the code instead, as a default value:
#ifndef BOREALIS_RESOURCES
#define BOREALIS_RESOURCES "romfs:/"
#endif
I don't like the notion of having to riddle code with includes generally. Configurations imo should be within the config/makefile. Maybe a better solution would be to have a PC/Switch flag. Since the forward slash is only needed for romfs:/
that can be defined somewhere else and BOREALIS_RESOURCES
would be ignored. Where as flipping the flag to PC takes BOREALIS_RESOURCES
into account.
Sorry it was not clear - when I say "Linux build" I mean build for Switch using Linux as host, as opposed to building for Switch using Windows + MSYS2 as host. The Makefile is only to be used for Switch, actual PC building uses Meson.
My mistake, I have completely misread what you said in your first post and rambled out. Yes, that would indeed be cleaner. I assumed manually defining BOREALIS_RESOURCES
within my own source files and not keeping it as a default. Happy I got this to your attention tho. Cheers!
No worries! Do you want to PR that new fix?
Sure just a sec
Under MSYS2 on Windows the building using the provided Makefile causes a macro expansion problem (probably due to Windows path slash weirdness). Simply escaping the forward slash seems to fix this