fix no GUI build
This commit is contained in:
parent
c577eeafac
commit
17b1a65280
10
src/main.cpp
10
src/main.cpp
|
@ -2,7 +2,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#ifdef HAVE_GUI
|
||||||
#include "SDL_events.h"
|
#include "SDL_events.h"
|
||||||
|
#endif
|
||||||
#include "ta-log.h"
|
#include "ta-log.h"
|
||||||
#include "fileutils.h"
|
#include "fileutils.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
|
@ -358,6 +360,7 @@ int main(int argc, char** argv) {
|
||||||
if (consoleMode) {
|
if (consoleMode) {
|
||||||
logI("playing...\n");
|
logI("playing...\n");
|
||||||
e.play();
|
e.play();
|
||||||
|
#ifdef HAVE_GUI
|
||||||
SDL_Event ev;
|
SDL_Event ev;
|
||||||
while (true) {
|
while (true) {
|
||||||
SDL_WaitEvent(&ev);
|
SDL_WaitEvent(&ev);
|
||||||
|
@ -365,6 +368,13 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
e.quit();
|
e.quit();
|
||||||
return 0;
|
return 0;
|
||||||
|
#else
|
||||||
|
#ifdef _WIN32
|
||||||
|
Sleep(500);
|
||||||
|
#else
|
||||||
|
usleep(500000);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_GUI
|
#ifdef HAVE_GUI
|
||||||
|
|
Loading…
Reference in a new issue