mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Fixed Windows x86 build crash
This commit is contained in:
parent
96511dcc64
commit
c0a6a80089
@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Facepunch.Steamworks
|
namespace Facepunch.Steamworks
|
||||||
{
|
{
|
||||||
@ -18,6 +15,11 @@ public static void ForUnity( string platform )
|
|||||||
//
|
//
|
||||||
if ( platform == "WindowsEditor" || platform == "WindowsPlayer" )
|
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 );
|
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 );
|
ForcePlatform( OperatingSystem.Linux, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||||
}
|
}
|
||||||
|
|
||||||
UseThisCall = true;
|
|
||||||
|
|
||||||
Console.WriteLine( "Facepunch.Steamworks Unity: " + platform );
|
Console.WriteLine( "Facepunch.Steamworks Unity: " + platform );
|
||||||
Console.WriteLine( "Facepunch.Steamworks Os: " + SteamNative.Platform.Os );
|
Console.WriteLine( "Facepunch.Steamworks Os: " + SteamNative.Platform.Os );
|
||||||
Console.WriteLine( "Facepunch.Steamworks Arch: " + SteamNative.Platform.Arch );
|
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.
|
/// for releasing his shit open source under the MIT license so we can all learn and iterate.
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool UseThisCall { get; set; } = SteamNative.Platform.Os == OperatingSystem.Windows;
|
public static bool UseThisCall { get; set; } = true;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user