14#define JNGL_MAIN_BEGIN int SDL_main(int argc, char** argv) { \
15 jngl::Finally _ZtzNg47T5XSjogv(jngl::hideWindow);
16#define JNGL_MAIN_END return 0; }
22#include "TargetConditionals.h"
25#if !defined(JNGL_MAIN_BEGIN)
27 #include <android_native_app_glue.h>
30 extern android_app* androidApp;
32 #define JNGL_MAIN_BEGIN void android_main(android_app* __androidApp) { \
33 jngl::androidApp = __androidApp;
34 #define JNGL_MAIN_END }
35 #elif defined(__APPLE__) && TARGET_OS_IPHONE
36 #define JNGL_MAIN_BEGIN void shouldNotBeCalled() {
37 #define JNGL_MAIN_END }
40 #define JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE try {
42 #define JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE
44 #define JNGL_MAIN_BEGIN int main(int argc, char** argv) { \
45 JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE \
47 std::vector<std::string> tmp(argc - 1); \
48 for (int i = 1; i < argc; ++i) { \
49 tmp[i - 1] = argv[i]; \
53 jngl::Finally _ZtzNg47T5XSjogv(jngl::hideWindow);
55 #define JNGL_MAIN_END } catch (std::exception& e) { \
56 jngl::errorMessage(e.what()); \
57 return EXIT_FAILURE; \
61 #define JNGL_MAIN_END }
Contains jngl::Finally class.
Functions related to the main window.