summaryrefslogtreecommitdiff
path: root/tools/nitrogfx/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-04-15 20:20:40 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-04-15 20:20:40 -0400
commit09d866602ecc76fdc5e9be9e3bd1ae0b8547ff13 (patch)
tree312c771cf265503718f3e8c2eb42b92708c55f36 /tools/nitrogfx/global.h
parentb661c7888c57280a19801b320cf7860e6555f1d3 (diff)
ROM titles
Diffstat (limited to 'tools/nitrogfx/global.h')
-rw-r--r--tools/nitrogfx/global.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/nitrogfx/global.h b/tools/nitrogfx/global.h
new file mode 100644
index 00000000..65dd351d
--- /dev/null
+++ b/tools/nitrogfx/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H