mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Throw exception if trying to initialize multiple times
This commit is contained in:
parent
b45ac59a21
commit
59eabc1302
@ -17,6 +17,9 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static void Init( uint appid, bool asyncCallbacks = true )
|
||||
{
|
||||
if ( initialized )
|
||||
throw new System.Exception( "Calling SteamClient.Init but is already initialized" );
|
||||
|
||||
System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() );
|
||||
System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() );
|
||||
|
||||
|
@ -61,6 +61,9 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = true )
|
||||
{
|
||||
if ( IsValid )
|
||||
throw new System.Exception( "Calling SteamServer.Init but is already initialized" );
|
||||
|
||||
uint ipaddress = 0; // Any Port
|
||||
|
||||
if ( init.SteamPort == 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user