From 5f5d5d07c3ea8bead4241d6cce9ee14be226610b Mon Sep 17 00:00:00 2001 From: vimene Date: Tue, 21 Nov 2023 02:26:46 +0100 Subject: started working on windows support --- src/main.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/main.cpp') 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 -//#include +#ifdef ENABLE_NCURSES +#include +#endif -#if VIMENE_OS==VIMENE_WINDOWS +#ifdef __WINDOWS__ #include #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 } -- cgit v1.2.3