34 lines
981 B
C++

#include "EventListener.h"
#include "Papyrus.h"
#include "Achievements.h"
#include "Util.h"
using namespace SKSE;
SKSEPluginLoad(const LoadInterface* skse) {
GetLoadInterface(skse);
// Also opens EnderalSteam.log, through SKSE::log::init()
Init(skse);
auto* plugin = PluginDeclaration::GetSingleton();
auto version = plugin->GetVersion();
logger::info("{} {} is loading...", plugin->GetName(), version);
logger::info("Built against Steamworks SDK {}", ENDERAL_STEAM_SDK);
// SDK 1.55: has to happen here, not from a game event: the game opens its own Steam session
// from BSWin32SystemUtility during WinMain, and whichever session is opened first
// decides which AppID the process stays registered as.
if constexpr (!Achievements::OPEN_SESSION_AT_MAIN_MENU) {
Achievements::startSteam();
}
EventListener::Install();
GetPapyrusInterface()->Register(Papyrus::Bind);
logger::info("{} has finished loading.", plugin->GetName());
return true;
}