Skip to content

Commit

Permalink
Z80_WITH_WINDOWS_DLL_MAINZ80_WITH_WINDOWS_DLL_MAIN_CRT_STARTUP
Browse files Browse the repository at this point in the history
  • Loading branch information
redcode committed Oct 27, 2024
1 parent 7e9314f commit 23abb5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ else()

if(${PROJECT_NAME}_NOSTDLIB_FLAGS STREQUAL "Auto")
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE Z80_WITH_WINDOWS_DLL_MAIN)
target_compile_definitions(${PROJECT_NAME} PRIVATE Z80_WITH_WINDOWS_DLL_MAIN_CRT_STARTUP)
target_link_options(${PROJECT_NAME} PRIVATE "/NODEFAULTLIB")
elseif(APPLE)
if(CMAKE_C_COMPILER_ID MATCHES "^(AppleClang|Clang|GNU)$")
Expand Down
2 changes: 1 addition & 1 deletion sources/Z80.c
Original file line number Diff line number Diff line change
Expand Up @@ -2932,7 +2932,7 @@ Z80_API zusize z80_run(Z80 *self, zusize cycles)
}


#ifdef Z80_WITH_WINDOWS_DLL_MAIN
#ifdef Z80_WITH_WINDOWS_DLL_MAIN_CRT_STARTUP
int Z_MICROSOFT_STD_CALL _DllMainCRTStartup(void *hDllHandle, unsigned long dwReason, void *lpReserved)
{return 1;}
#endif
Expand Down

0 comments on commit 23abb5a

Please sign in to comment.