From c42bad55a2401621c6d1d35604e9ffb6f3c91650 Mon Sep 17 00:00:00 2001 From: Adam Heinermann Date: Thu, 14 Nov 2024 21:59:05 -0800 Subject: [PATCH] fix(build): build fix for msvc --- .gitignore | 5 +++++ storm/thread/S_Thread.hpp | 2 +- storm/thread/win/S_Thread.cpp | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5976665..f5d7ef3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ .DS_Store .idea .vscode +CMakeSettings.json /build /dist +/out +/.vs + + diff --git a/storm/thread/S_Thread.hpp b/storm/thread/S_Thread.hpp index ac05d14..acd900c 100644 --- a/storm/thread/S_Thread.hpp +++ b/storm/thread/S_Thread.hpp @@ -42,7 +42,7 @@ class S_Thread { // Static functions #if defined(WHOA_SYSTEM_WIN) - static DWORD s_SLaunchThread(void* threadParam); + static DWORD WINAPI s_SLaunchThread(void* threadParam); #endif #if defined(WHOA_SYSTEM_MAC) diff --git a/storm/thread/win/S_Thread.cpp b/storm/thread/win/S_Thread.cpp index af4a778..345ac0d 100644 --- a/storm/thread/win/S_Thread.cpp +++ b/storm/thread/win/S_Thread.cpp @@ -1,7 +1,11 @@ #include "storm/thread/S_Thread.hpp" #include "storm/Memory.hpp" -DWORD S_Thread::s_SLaunchThread(void* threadParam) { +#ifndef WINAPI +#define WINAPI +#endif + +DWORD WINAPI S_Thread::s_SLaunchThread(void* threadParam) { auto params = static_cast(threadParam); auto proc = params->threadProc; auto param = params->threadParam;