Skip to content

Display and control your Android device

Define SDL_MAIN_HANDLED in all tests

Romain Vimontba1b36758e8a
diff --git a/app/meson.build b/app/meson.build
index 7aaf936a..b3d30458 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -174,6 +174,7 @@ tests = [
foreach t : tests
exe = executable(t[0], t[1],
include_directories: src_dir,
- dependencies: dependencies)
+ dependencies: dependencies,
+ c_args: ['-DSDL_MAIN_HANDLED'])
test(t[0], exe)
endforeach
diff --git a/app/tests/test_strutil.c b/app/tests/test_strutil.c
index baa2fd38..200e0f63 100644
--- a/app/tests/test_strutil.c
+++ b/app/tests/test_strutil.c
@@ -2,7 +2,6 @@
#include <limits.h>
#include <stdio.h>
#include <string.h>
-#define SDL_MAIN_HANDLED // avoid to redefine main to SDL_main
#include <SDL2/SDL.h>
#include "util/str_util.h"