Skip to content

Commit dfdd577

Browse files
committed
WIN32 hack did not work
1 parent ea90832 commit dfdd577

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ if(TARGET_OS STREQUAL "windows")
5959
add_compile_definitions(${target} PRIVATE _WIN32_WINNT=0x0600) # Minimum OS version (old macro, both must be defined)
6060
add_compile_definitions(${target} PRIVATE UNICODE) # Windows headers
6161
add_compile_definitions(${target} PRIVATE _UNICODE) # C-runtime
62-
63-
# twbl specific hack for #ifdef WIN32 checks
64-
# to avoid detect.h on windows systems that dont define WIN32 like mingw
65-
add_compile_definitions(${target} PRIVATE WIN32)
6662
endif()
6763

6864
set(LINK_FLAGS_PLATFORM "")

src/tools/twbl_probe.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// TODO: windows https://github.com/dlfcn-win32/dlfcn-win32
2-
#ifdef WIN32
2+
3+
#include <twbl/teeworlds/base/detect.h>
4+
5+
#ifdef CONF_FAMILY_WINDOWS
36

47
int main() { return 0; }
58

src/twbl/hotreload.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <cstdio>
22
#include <cstdlib>
33

4-
#ifdef WIN32
4+
#include <twbl/teeworlds/base/detect.h>
5+
6+
#ifdef CONF_FAMILY_WINDOWS
57
// TODO: windows api
68
#else
79
#include <dlfcn.h>
@@ -59,7 +61,7 @@ void *CHotreloader::LoadTick(FTwbl_BotTick *ppfnBotTick)
5961

6062
UnloadTick();
6163

62-
#ifdef WIN32
64+
#ifdef CONF_FAMILY_WINDOWS
6365
return nullptr;
6466
#else
6567
char aTickfunc[512];
@@ -106,7 +108,7 @@ void *CHotreloader::LoadTick(FTwbl_BotTick *ppfnBotTick)
106108

107109
int CHotreloader::CloseHandle(void *pHandle)
108110
{
109-
#ifdef WIN32
111+
#ifdef CONF_FAMILY_WINDOWS
110112
return 0;
111113
#else
112114
return dlclose(pHandle);

0 commit comments

Comments
 (0)