diff --git a/CMakeLists.txt b/CMakeLists.txt index 549d470..3dd60d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,3 +272,4 @@ target_include_directories(${EXECUTABLE_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS}) target_link_libraries(${EXECUTABLE_NAME} ${SDL2_LIBRARIES}) target_include_directories(${EXECUTABLE_NAME} PRIVATE ${SDL2_INCLUDE_DIRS}) +add_definitions(-DSDL_MAIN_HANDLED) diff --git a/src/dsound_compat.h b/src/dsound_compat.h index e484d60..b24a4b2 100644 --- a/src/dsound_compat.h +++ b/src/dsound_compat.h @@ -9,6 +9,7 @@ #include #include +#include #define DIRECTSOUND_VERSION 0x0300 #include diff --git a/src/file_find.cc b/src/file_find.cc index 59c3f13..5bf72de 100644 --- a/src/file_find.cc +++ b/src/file_find.cc @@ -47,7 +47,7 @@ bool fileFindNext(DirectoryFileFindData* findData) // 0x4E63CC bool findFindClose(DirectoryFileFindData* findData) { -#if defined(_MSC_VER) +#if defined(_WIN32) FindClose(findData->hFind); #else if (closedir(findData->dir) != 0) { diff --git a/src/mmx.cc b/src/mmx.cc index d469fd5..d0bda0b 100644 --- a/src/mmx.cc +++ b/src/mmx.cc @@ -13,7 +13,7 @@ bool mmxIsSupported() // TODO: There are other ways to determine MMX using FLAGS register. -#ifdef _WIN32 +#if defined (_MSC_VER) __asm { mov eax, 1