Small adjustments to appease the android build

This commit is contained in:
2022-11-14 09:27:32 +00:00
parent 813b94faf5
commit da9afb7e5b
8 changed files with 29 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ Engine engine;
//errors here should be fatal
static void fatalError(char* message) {
fprintf(stderr, message);
fprintf(stderr, "%s", message);
exit(-1);
}
@@ -38,7 +38,7 @@ void initEngine() {
engine.renderer = NULL;
//init SDL
if (SDL_Init(0) != 0) {
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
fatalError("Failed to initialize SDL2");
}

View File

@@ -4,8 +4,6 @@
#include "memory.h"
STATIC_ASSERT(sizeof(EngineNode) == 72);
static void freeMemory(void* ptr) {
EngineNode* node = (EngineNode*)ptr;
//SDL stuff

View File

@@ -8,7 +8,7 @@
//errors here should be fatal
static void fatalError(char* message) {
fprintf(stderr, message);
fprintf(stderr, "%s", message);
exit(-1);
}

View File

@@ -1,7 +1,7 @@
CC=gcc
IDIR+=. ../Toy/source
CFLAGS+=$(addprefix -I,$(IDIR)) -DSDL_MAIN_HANDLED -g -Wall -W -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
CFLAGS+=$(addprefix -I,$(IDIR)) -g -Wall -W -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
LIBS+=-lSDL2 -lSDL2_image -ltoy
ODIR = obj