aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2023-11-21 02:26:46 +0100
committervimene <vincent.menegaux@gmail.com>2023-11-21 02:26:46 +0100
commit5f5d5d07c3ea8bead4241d6cce9ee14be226610b (patch)
treec7ff40a360cc6fb4096047f3c6bba22ebb349d8a /src/main.cpp
parentccd5e68160be5037782516253cb9a5ffa4b830a6 (diff)
downloadengine-5f5d5d07c3ea8bead4241d6cce9ee14be226610b.tar.gz
started working on windows support
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2ee007f..840d2f9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,9 +1,11 @@
#include "config.h"
#include <iostream>
-//#include <ncurses.h>
+#ifdef ENABLE_NCURSES
+#include <ncurses.h>
+#endif
-#if VIMENE_OS==VIMENE_WINDOWS
+#ifdef __WINDOWS__
#include <windows.h>
#endif
@@ -30,7 +32,7 @@
#define PI 3.1415926535f
-#if ENABLE_NCURSES==1
+#ifdef ENABLE_NCURSES
void main_term() {
// init
setlocale(LC_ALL, "");
@@ -491,18 +493,18 @@ void main_SDL() {
SDL_Quit();
}
-#if VIMENE_OS==VIMENE_LINUX
+#ifdef __WINDOWS__
+int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
+ (void) hInstance;
+ (void) hPrevInstance;
+ (void) pCmdLine;
+ (void) nCmdShow;
+#else
int main(int argc, char *argv[]) {
(void) argc;
(void) argv;
-#elif VIMENE_OS==VIMENE_WINDOWS
-int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
#endif
// main_term();
main_SDL();
-#if VIMENE_OS==VIMENE_LINUX
return EXIT_SUCCESS;
-#elif VIMENE_OS==VIMENE_WINDOWS
- return 0;
-#endif
}