(bcb06cc5c) Unstable v0.9.9.0

This commit is contained in:
Juan Pablo Arce
2020-03-27 15:22:59 -03:00
parent c81486a993
commit b143329701
326 changed files with 9692 additions and 4364 deletions
@@ -31,6 +31,22 @@
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.1|x64'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.1|x64'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.1|AnyCPU'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.1|AnyCPU'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<Import Project="Facepunch.Steamworks.targets" />
</Project>
@@ -39,6 +39,7 @@ namespace Steamworks
ItemInstalled_t.Install(x => {
if (x.AppID == SteamClient.AppId)
{
GlobalOnItemInstalled?.Invoke(x.PublishedFileId);
if (onItemInstalled?.ContainsKey(x.PublishedFileId) ?? false)
{
onItemInstalled[x.PublishedFileId]?.Invoke();
@@ -92,5 +93,9 @@ namespace Steamworks
}
private static Dictionary<PublishedFileId, Action> onItemInstalled;
public static event Action<ulong> GlobalOnItemInstalled;
public static uint NumSubscribedItems { get { return Internal.GetNumSubscribedItems(); } }
}
}
@@ -91,6 +91,13 @@ namespace Steamworks.Ugc
return this;
}
public Editor WithoutTag( string tag )
{
if (Tags != null && Tags.Contains(tag)) Tags.Remove(tag);
return this;
}
public async Task<PublishResult> SubmitAsync( IProgress<float> progress = null )
{
var result = default( PublishResult );
@@ -9,31 +9,36 @@ namespace Steamworks
{
public const int MaxStringSize = 1024 * 32;
private static object mutex = new object();
private static IntPtr[] MemoryPool;
private static int MemoryPoolIndex;
public static unsafe IntPtr TakeMemory()
{
if ( MemoryPool == null )
IntPtr take = IntPtr.Zero;
lock (mutex)
{
//
// The pool has 5 items. This should be safe because we shouldn't really
// ever be using more than 2 memory pools
//
MemoryPool = new IntPtr[5];
if (MemoryPool == null)
{
//
// The pool has 5 items. This should be safe because we shouldn't really
// ever be using more than 2 memory pools
//
MemoryPool = new IntPtr[5];
for ( int i = 0; i < MemoryPool.Length; i++ )
MemoryPool[i] = Marshal.AllocHGlobal( MaxStringSize );
for (int i = 0; i < MemoryPool.Length; i++)
MemoryPool[i] = Marshal.AllocHGlobal(MaxStringSize);
}
MemoryPoolIndex++;
if (MemoryPoolIndex >= MemoryPool.Length)
MemoryPoolIndex = 0;
take = MemoryPool[MemoryPoolIndex];
((byte*)take)[0] = 0;
}
MemoryPoolIndex++;
if ( MemoryPoolIndex >= MemoryPool.Length )
MemoryPoolIndex = 0;
var take = MemoryPool[MemoryPoolIndex];
((byte*)take)[0] = 0;
return take;
}
@@ -10,6 +10,22 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
+2 -2
View File
@@ -76,7 +76,7 @@ namespace Lidgren.Network
MethodInfo[] methods = typeof(NetIncomingMessage).GetMethods(BindingFlags.Instance | BindingFlags.Public);
foreach (MethodInfo mi in methods)
{
if (mi.GetParameters().Length == 0 && mi.Name.StartsWith("Read", StringComparison.InvariantCulture) && mi.Name.Substring(4) == mi.ReturnType.Name)
if (mi.GetParameters().Length == 0 && mi.Name.StartsWith("Read", StringComparison.OrdinalIgnoreCase) && mi.Name.Substring(4) == mi.ReturnType.Name)
{
s_readMethods[mi.ReturnType] = mi;
}
@@ -86,7 +86,7 @@ namespace Lidgren.Network
methods = typeof(NetOutgoingMessage).GetMethods(BindingFlags.Instance | BindingFlags.Public);
foreach (MethodInfo mi in methods)
{
if (mi.Name.Equals("Write", StringComparison.InvariantCulture))
if (mi.Name.Equals("Write", StringComparison.OrdinalIgnoreCase))
{
ParameterInfo[] pis = mi.GetParameters();
if (pis.Length == 1)
+1 -1
View File
@@ -401,7 +401,7 @@ namespace Lidgren.Network
{
if (j >= h)
{
if (string.Compare(list[j - h].Name, tmp.Name, StringComparison.InvariantCulture) > 0)
if (string.Compare(list[j - h].Name, tmp.Name, StringComparison.OrdinalIgnoreCase) > 0)
{
list[j] = list[j - h];
j -= h;
@@ -20,6 +20,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DefineConstants>TRACE;DEBUG;SHARPFONT_PORTABLE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -30,6 +31,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DefineConstants>TRACE;SHARPFONT_PORTABLE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>1701;1702;3021</NoWarn>
</PropertyGroup>
<ItemGroup>
+9
View File
@@ -375,6 +375,15 @@ namespace Microsoft.Xna.Framework
Height += (int)verticalAmount * 2;
}
/// <summary>
/// Adjusts the edges of this <see cref="Rectangle"/> by specified horizontal and vertical amounts.
/// </summary>
/// <param name="amount">Value to adjust the edges.</param>
public void Inflate(Vector2 amount)
{
Inflate(amount.X, amount.Y);
}
/// <summary>
/// Gets whether or not the other <see cref="Rectangle"/> intersects with this rectangle.
/// </summary>
@@ -0,0 +1,7 @@
#include <stdlib.h>
void setLinuxEnv()
{
putenv("SteamAppId=602960");
putenv("SteamGameId=602960");
}
@@ -0,0 +1,15 @@
CXX=clang++
CXXFLAGS= -std=c++11 -O3 -fPIC -Wall -I../libvpx_x64_macos -I../libwebm_x64_macos -I../opus/include
webm_mem_playback_x64: Exports.o AudioDecoder.o Video.o
$(CXX) $(CXXFLAGS) -shared -L../opus_x64_macos/.libs/ -L../libvpx_x64_macos/ -L../libwebm_x64_macos/ -Wl -lopus -lvpx -lwebm -lpthread -Wl -o libwebm_mem_playback_x64.dylib Exports.o AudioDecoder.o Video.o
Exports.o: Exports.cpp Exports.h Video.h
$(CXX) $(CXXFLAGS) -c Exports.cpp
Video.o: Video.cpp AudioDecoder.h Video.h
$(CXX) $(CXXFLAGS) -c Video.cpp
AudioDecoder.o: AudioDecoder.cpp AudioDecoder.h
$(CXX) $(CXXFLAGS) -c AudioDecoder.cpp