mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-06-07 17:55:55 +02:00
30 lines
No EOL
1.1 KiB
C++
30 lines
No EOL
1.1 KiB
C++
#include "pdk.h"
|
|
|
|
#define PRINT_DEBUG_PLUGIN(a, ...) do {FILE *t = fopen("example_debug.txt", "a"); fprintf(t, "%u " a, GetCurrentThreadId(), __VA_ARGS__); fclose(t);} while (0)
|
|
|
|
#define EXPORT extern "C" __declspec( dllexport )
|
|
|
|
EXPORT void GBE_Load()
|
|
{
|
|
PRINT_DEBUG_PLUGIN("GBE_Load");
|
|
PRINT_DEBUG_PLUGIN("Version of PDK: %d", PDK::GetPDKVersion());
|
|
// Which one should be good? idk
|
|
//PDK::RegisterInterface(TestCreate, "STEAMAPPLIST_INTERFACE_VERSION001");
|
|
int success = PDK::RegisterInterface(&TestCreate, "STEAMAPPLIST_INTERFACE_VERSION001");
|
|
PRINT_DEBUG_PLUGIN("Finished registering interfaces! Is Success: %d", success);
|
|
}
|
|
|
|
EXPORT void GBE_UnLoad()
|
|
{
|
|
PRINT_DEBUG_PLUGIN("GBE_UnLoad");
|
|
int success = PDK::UnRegisterInterface(&TestCreate);
|
|
PRINT_DEBUG_PLUGIN("Finished registering interfaces! Is Success: %d", success);
|
|
}
|
|
|
|
|
|
void* TestCreate(HSteamUser hSteamUser, HSteamPipe hSteamPipe)
|
|
{
|
|
PRINT_DEBUG_PLUGIN("Test create with STEAMAPPLIST_INTERFACE_VERSION001");
|
|
PRINT_DEBUG_PLUGIN("Args: %d %d", hSteamUser, hSteamPipe);
|
|
return nullptr;
|
|
} |