MinGW fixes
CMakeLists.txt * Added definition of SDL_MAIN_HANDLED to solve linking error src/dsound_compat.h * Included mmsystem.h for LPCWAVEFORMATEX struct definition src/file_find.cc * FindClose is within Win32 API src/mmx.cc * __asm keyword is restricted to MSVC
This commit is contained in:
parent
501ae1161d
commit
2cb79fef5a
|
@ -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)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <windows.h>
|
||||
|
||||
#include <mmreg.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#define DIRECTSOUND_VERSION 0x0300
|
||||
#include <dsound.h>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue