cmake build fixes

this brings the cmake branch in line with commit
8e551bb287 from the main branch.

This adds a few boons, most notably it allows compiling on Linux with
SDL2 instead of SDL.

That also allows for mouse support and can now be run without X, which
is mostly interesting in case you want to play some Wagic on say, a
Raspberry Pi.
This commit is contained in:
fogobogo
2022-01-11 20:51:49 +01:00
parent f3bb5ccef9
commit d566524499
2 changed files with 3 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ set(MTG_generic_src
src/WFont.cpp
src/WGui.cpp
src/WResourceManager.cpp
src/WParsedInt.cpp
)
set(MTG_network_src src/NetworkPlayer.cpp)

View File

@@ -155,9 +155,8 @@ public:
return -1;
}
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(SdlApp::OneIter, 60, 1);
#else
SDL_Event Event;
while(Running)
{
if (g_engine)
@@ -180,7 +179,6 @@ public:
}
}
OnCleanup();
#endif
return 0;
}