OS Specific Directives: Find solution to rendering hack.
OptimusPi opened this issue · comments
Nathanial P. Howard commented
There is an OS-specific directive to tell the compiler which chunks of code to use.
This is a nasty hack because I don't know why it works or how exactly to fix it, although it shouldn't be too hard and probably will speed up the game performance anyway.
Look for the string: [#if MY_OS]
Examples:
main.cpp:7869
void physics()
{
# if MY_OS == LINUX_OS
HandleUI();
# endif
main.cpp:7744
while (timestep->Check())
{
#if MY_OS == WINDOWS_OS
HandleUI();
#endif
#if MY_OS == MAC_OS
HandleUI();
#endif
Lee Horobin commented
At the very least I believe the one on main.cpp line 7099 which uses WinMain instead of main on Windows should be unnecessary after upgrading to SDL2.
https://wiki.libsdl.org/MigrationGuide
Nathanial P. Howard commented
I was going to say.. upgrading to SDL2 might hopefully be able to fix this too! I don't like having 2 mains .