2016-01-11 20:07:57 +01:00
|
|
|
// BlitzSteam - Steam wrapper for Blitz
|
2016-01-11 16:56:07 +01:00
|
|
|
// Copyright (C) 2015 Xaymar (Michael Fabian Dirks)
|
2015-06-06 18:46:10 +02:00
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
#include "BlitzSteam.h"
|
2015-06-06 14:33:52 +02:00
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(uint32_t) BS_Steam_Init() {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_Init=_BS_Steam_Init@0")
|
2015-06-06 14:33:52 +02:00
|
|
|
return SteamAPI_Init();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_Shutdown() {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_Shutdown=_BS_Steam_Shutdown@0")
|
2015-06-06 14:33:52 +02:00
|
|
|
SteamAPI_Shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(uint32_t) BS_Steam_IsSteamRunning() {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_IsSteamRunning=_BS_Steam_IsSteamRunning@0")
|
2015-06-06 14:33:52 +02:00
|
|
|
return SteamAPI_IsSteamRunning();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(uint32_t) BS_Steam_RestartAppIfNecessary(uint32_t unOwnAppID) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_RestartAppIfNecessary=_BS_Steam_RestartAppIfNecessary@4")
|
2015-06-06 14:33:52 +02:00
|
|
|
return SteamAPI_RestartAppIfNecessary(unOwnAppID);
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_SetMiniDumpComment(const char* pchMsg) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_SetMiniDumpComment=_BS_Steam_SetMiniDumpComment@4")
|
2015-06-06 14:33:52 +02:00
|
|
|
SteamAPI_SetMiniDumpComment(pchMsg);
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_WriteMiniDump(uint32_t uStructuredExceptionCode, void* pvExceptionInfo, uint32_t uBuildID) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_WriteMiniDump=_BS_Steam_WriteMiniDump@12")
|
2015-06-06 14:33:52 +02:00
|
|
|
SteamAPI_WriteMiniDump(uStructuredExceptionCode, pvExceptionInfo, uBuildID);
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
// -- Callbacks
|
|
|
|
|
DLL_FUNCTION(void) BS_Steam_RunCallbacks() {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_RunCallbacks=_BS_Steam_RunCallbacks@0")
|
2015-06-06 18:46:10 +02:00
|
|
|
SteamAPI_RunCallbacks();
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_RegisterCallback(class CCallbackBase *pCallback, uint32_t iCallback) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_RegisterCallback=_BS_Steam_RegisterCallback@8")
|
2015-06-06 18:46:10 +02:00
|
|
|
SteamAPI_RegisterCallback(pCallback, iCallback);
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_UnregisterCallback(class CCallbackBase *pCallback) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_UnregisterCallback=_BS_Steam_UnregisterCallback@4")
|
2015-06-06 18:46:10 +02:00
|
|
|
SteamAPI_UnregisterCallback(pCallback);
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_RegisterCallResult(class CCallbackBase *pCallback, uint64_t* phAPICall) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_RegisterCallResult=_BS_Steam_RegisterCallResult@8")
|
2016-02-06 00:17:29 +01:00
|
|
|
SteamAPI_RegisterCallResult(pCallback, *phAPICall);
|
2015-06-06 18:46:10 +02:00
|
|
|
}
|
|
|
|
|
|
2016-02-06 00:17:29 +01:00
|
|
|
DLL_FUNCTION(void) BS_Steam_UnregisterCallResult(class CCallbackBase *pCallback, uint64_t* phAPICall) {
|
2016-02-23 13:25:34 +01:00
|
|
|
#pragma comment(linker, "/EXPORT:BS_Steam_UnregisterCallResult=_BS_Steam_UnregisterCallResult@8")
|
2016-02-06 00:17:29 +01:00
|
|
|
SteamAPI_UnregisterCallResult(pCallback, *phAPICall);
|
2015-06-06 18:46:10 +02:00
|
|
|
}
|