diff --git a/CMakeLists.txt b/CMakeLists.txt index 5953b4f..351bbba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,13 @@ if(WIN32) INPUT_SOURCES_DIR "" DLL_FILES_GLOB "C:/Windows/System32/version.dll" ) + configure_linker_exports( + TARGET SmokeAPI + HEADER_NAME "linker_exports_for_winmm.h" + FORWARDED_DLL "C:/Windows/System32/winmm.dll" + INPUT_SOURCES_DIR "" + DLL_FILES_GLOB "C:/Windows/System32/winmm.dll" + ) else() # configure_linker_exports( # TARGET SmokeAPI diff --git a/KoalaBox b/KoalaBox index a283897..017dfda 160000 --- a/KoalaBox +++ b/KoalaBox @@ -1 +1 @@ -Subproject commit a2838977f0b6a2933814e301e0a69ad53fdc6bce +Subproject commit 017dfda8db8e10b7d9ec2f88c7770a1cb438fbb7 diff --git a/README.md b/README.md index 17b50e9..88393ca 100644 --- a/README.md +++ b/README.md @@ -83,20 +83,20 @@ If that didn't work, refer to the _Troubleshooting_ section below. - Download the [latest SmokeAPI release zip]. - From this downloaded zip extract `smoke_api32.dll` or `smoke_api64.dll`, depending on a game's bitness. -- Rename the unzipped DLL to `version.dll`. -- Place this `version.dll` next to the game's `.exe` file. +- Rename the unzipped DLL to `version.dll` or `winmm.dll`. +- Place this `version.dll` or `winmm.dll` next to the game's `.exe` file. #### 🪝 Hook mode with Koaloader -If a game doesn't load -`version.dll`, you can use an alternative injector to load SmokeAPI into the game process. +If a game doesn't load `version.dll` or `winmm.dll`, you can use an alternative injector to load +SmokeAPI into the game process. One such injector is [Koaloader], which supports different DLLs that a typical game might load. -For example, assuming that the game loads `winmm.dll`: +For example, assuming that the game loads `d3d11.dll`: - Install Koaloader: - Download the [latest Koaloader release zip]. - - From this downloaded zip extract `winmm.dll` from `winmm-32` or `winmm-64`, depending on a game's bitness. - - Place `winmm.dll` next to the game's `.exe` file. + - From this downloaded zip extract `d3d11.dll` from `d3d11-32` or `d3d11-64`, depending on a game's bitness. + - Place `d3d11.dll` next to the game's `.exe` file. - Install SmokeAPI - Download the [latest SmokeAPI release zip]. - From this downloaded zip extract `smoke_api32.dll` or `smoke_api64.dll`, depending on a game's bitness. diff --git a/src/main_win.cpp b/src/main_win.cpp index 7af96fa..d31e38d 100644 --- a/src/main_win.cpp +++ b/src/main_win.cpp @@ -2,9 +2,10 @@ #include "smoke_api/smoke_api.hpp" -// This header will be populated at build time +// These headers will be populated at build time #include "linker_exports_for_steam_api.h" #include "linker_exports_for_version.h" +#include "linker_exports_for_winmm.h" DLL_MAIN(void* handle, const uint32_t reason, void*) { if(reason == DLL_PROCESS_ATTACH) { diff --git a/sync.json b/sync.json index 716a345..58711b0 100644 --- a/sync.json +++ b/sync.json @@ -14,7 +14,8 @@ "forum_topic_url": "https://cs.rin.ru/forum/viewtopic.php?p=2597932#p2597932", "dlc_database": "SteamDB", "dlc_database_url": "https://steamdb.info/", - "json_schema_path": "./res/SmokeAPI.schema.json" + "json_schema_path": "./res/SmokeAPI.schema.json", + "self_inject_dll": "`version.dll` or `winmm.dll`" }, "tasks": [ {