mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-05-07 21:12:15 -04:00
Switch to DLL_MAIN helper
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
#include <koalabox/win.hpp>
|
||||
|
||||
#include "smoke_api/smoke_api.hpp"
|
||||
|
||||
// This header will be populated at build time
|
||||
#include "linker_exports_for_steam_api.h"
|
||||
#include "linker_exports_for_version.h"
|
||||
|
||||
EXTERN_C [[maybe_unused]] BOOL WINAPI
|
||||
DllMain(const HMODULE module_handle, const DWORD reason, LPVOID) {
|
||||
DLL_MAIN(void* handle, const uint32_t reason, void*) {
|
||||
if(reason == DLL_PROCESS_ATTACH) {
|
||||
smoke_api::init(module_handle);
|
||||
smoke_api::init(handle);
|
||||
} else if(reason == DLL_PROCESS_DETACH) {
|
||||
smoke_api::shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user