blob: 73cbebd17c76f58942ce14b4885d0ceb61e71f48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
namespace Steamworks;
public static class SteamAPI
{
public static bool Init()
{
InteropHelp.TestIfPlatformSupported();
bool flag = NativeMethods.SteamAPI_Init();
if (flag)
{
flag = CSteamAPIContext.Init();
}
if (flag)
{
CallbackDispatcher.Initialize();
}
return flag;
}
public static void Shutdown()
{
InteropHelp.TestIfPlatformSupported();
NativeMethods.SteamAPI_Shutdown();
CSteamAPIContext.Clear();
CallbackDispatcher.Shutdown();
}
public static bool RestartAppIfNecessary(AppId_t unOwnAppID)
{
InteropHelp.TestIfPlatformSupported();
return NativeMethods.SteamAPI_RestartAppIfNecessary(unOwnAppID);
}
public static void ReleaseCurrentThreadMemory()
{
InteropHelp.TestIfPlatformSupported();
NativeMethods.SteamAPI_ReleaseCurrentThreadMemory();
}
public static void RunCallbacks()
{
CallbackDispatcher.RunFrame(isGameServer: false);
}
public static bool IsSteamRunning()
{
InteropHelp.TestIfPlatformSupported();
return NativeMethods.SteamAPI_IsSteamRunning();
}
public static HSteamPipe GetHSteamPipe()
{
InteropHelp.TestIfPlatformSupported();
return (HSteamPipe)NativeMethods.SteamAPI_GetHSteamPipe();
}
public static HSteamUser GetHSteamUser()
{
InteropHelp.TestIfPlatformSupported();
return (HSteamUser)NativeMethods.SteamAPI_GetHSteamUser();
}
}
|