mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 05:35:35 +03:00
Merge pull request #223 from YLahin/master
Fixed Windows x86 build crash on startup
This commit is contained in:
commit
fba1986812
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
@ -18,6 +15,11 @@ public static void ForUnity( string platform )
|
||||
//
|
||||
if ( platform == "WindowsEditor" || platform == "WindowsPlayer" )
|
||||
{
|
||||
//
|
||||
// 32bit windows unity uses a stdcall
|
||||
//
|
||||
if (IntPtr.Size == 4) UseThisCall = false;
|
||||
|
||||
ForcePlatform( OperatingSystem.Windows, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||
}
|
||||
|
||||
@ -31,8 +33,6 @@ public static void ForUnity( string platform )
|
||||
ForcePlatform( OperatingSystem.Linux, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||
}
|
||||
|
||||
UseThisCall = true;
|
||||
|
||||
Console.WriteLine( "Facepunch.Steamworks Unity: " + platform );
|
||||
Console.WriteLine( "Facepunch.Steamworks Os: " + SteamNative.Platform.Os );
|
||||
Console.WriteLine( "Facepunch.Steamworks Arch: " + SteamNative.Platform.Arch );
|
||||
@ -47,7 +47,7 @@ public static void ForUnity( string platform )
|
||||
/// for releasing his shit open source under the MIT license so we can all learn and iterate.
|
||||
///
|
||||
/// </summary>
|
||||
public static bool UseThisCall { get; set; } = SteamNative.Platform.Os == OperatingSystem.Windows;
|
||||
public static bool UseThisCall { get; set; } = true;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user