v0.12.0.2
This commit is contained in:
@@ -43,21 +43,44 @@ namespace Steamworks.Data
|
||||
#region String key/value filter
|
||||
internal Dictionary<string, string> stringFilters;
|
||||
|
||||
|
||||
internal Dictionary<string, List<string>> stringFiltersExclude;
|
||||
|
||||
/// <summary>
|
||||
/// Filter by specified key/value pair; string parameters
|
||||
/// </summary>
|
||||
public LobbyQuery WithKeyValue( string key, string value )
|
||||
public LobbyQuery WithKeyValue(string key, string value)
|
||||
{
|
||||
if ( string.IsNullOrEmpty( key ) )
|
||||
throw new System.ArgumentException( "Key string provided for LobbyQuery filter is null or empty", nameof( key ) );
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new System.ArgumentException("Key string provided for LobbyQuery filter is null or empty", nameof(key));
|
||||
|
||||
if ( key.Length > SteamMatchmaking.MaxLobbyKeyLength )
|
||||
throw new System.ArgumentException( $"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof( key ) );
|
||||
if (key.Length > SteamMatchmaking.MaxLobbyKeyLength)
|
||||
throw new System.ArgumentException($"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof(key));
|
||||
|
||||
if ( stringFilters == null )
|
||||
if (stringFilters == null)
|
||||
stringFilters = new Dictionary<string, string>();
|
||||
|
||||
stringFilters.Add( key, value );
|
||||
stringFilters.Add(key, value);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public LobbyQuery WithoutKeyValue(string key, string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new System.ArgumentException("Key string provided for LobbyQuery filter is null or empty", nameof(key));
|
||||
|
||||
if (key.Length > SteamMatchmaking.MaxLobbyKeyLength)
|
||||
throw new System.ArgumentException($"Key length is longer than {SteamMatchmaking.MaxLobbyKeyLength}", nameof(key));
|
||||
|
||||
if (stringFiltersExclude == null)
|
||||
stringFiltersExclude = new Dictionary<string, List<string>>();
|
||||
|
||||
if (!stringFiltersExclude.ContainsKey(key))
|
||||
{
|
||||
stringFiltersExclude.Add(key, new List<string>());
|
||||
}
|
||||
stringFiltersExclude[key].Add(value);
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -184,20 +207,26 @@ namespace Steamworks.Data
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListFilterSlotsAvailable( slotsAvailable.Value );
|
||||
}
|
||||
|
||||
if ( maxResults.HasValue )
|
||||
if (stringFilters != null)
|
||||
{
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter( maxResults.Value );
|
||||
}
|
||||
|
||||
if ( stringFilters != null )
|
||||
{
|
||||
foreach ( var k in stringFilters )
|
||||
foreach (var k in stringFilters)
|
||||
{
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListStringFilter( k.Key, k.Value, LobbyComparison.Equal );
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListStringFilter(k.Key, k.Value, LobbyComparison.Equal);
|
||||
}
|
||||
}
|
||||
|
||||
if( numericalFilters != null )
|
||||
if (stringFiltersExclude != null)
|
||||
{
|
||||
foreach (var k in stringFiltersExclude)
|
||||
{
|
||||
foreach (var v in k.Value)
|
||||
{
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListStringFilter(k.Key, v, LobbyComparison.NotEqual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( numericalFilters != null )
|
||||
{
|
||||
foreach ( var n in numericalFilters )
|
||||
{
|
||||
@@ -212,6 +241,11 @@ namespace Steamworks.Data
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListNearValueFilter( v.Key, v.Value );
|
||||
}
|
||||
}
|
||||
|
||||
if (maxResults.HasValue)
|
||||
{
|
||||
SteamMatchmaking.Internal.AddRequestLobbyListResultCountFilter(maxResults.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -163,7 +163,7 @@ index 30d363af..f759a484 100644
|
||||
return;
|
||||
}
|
||||
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
|
||||
index 8e43aa7c..0f313dea 100644
|
||||
index 8e43aa7c..45950062 100644
|
||||
--- a/alc/backends/wasapi.cpp
|
||||
+++ b/alc/backends/wasapi.cpp
|
||||
@@ -54,6 +54,12 @@
|
||||
@@ -356,15 +356,24 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to reactivate audio client: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
}
|
||||
@@ -1521,6 +1548,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
@@ -1521,8 +1548,14 @@ HRESULT WasapiCapture::resetProxy()
|
||||
hr = mClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, &OutputType.Format, &wfx);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
+ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset failed: failed to check format support (HRESULT ")+toStringHex(hr)+")");
|
||||
ERR("Failed to check format support: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
- ERR("Failed to check format support: 0x%08lx\n", hr);
|
||||
- return hr;
|
||||
+ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset error: failed to check format support (HRESULT ")+toStringHex(hr)+")");
|
||||
+ hr = mClient->GetMixFormat(&wfx);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ alcCallErrorReasonCallback(std::string("WASAPI capture proxy reset failed: failed to get mix format (HRESULT ")+toStringHex(hr)+")");
|
||||
+ ERR("Failed to check format support: 0x%08lx\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
}
|
||||
@@ -1619,6 +1647,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
|
||||
mSampleConv = nullptr;
|
||||
@@ -1619,6 +1652,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
buf_time.count(), 0, &OutputType.Format, nullptr);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@@ -372,7 +381,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to initialize audio client: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
}
|
||||
@@ -1630,6 +1659,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
@@ -1630,6 +1664,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
hr = mClient->GetBufferSize(&buffer_len);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@@ -380,7 +389,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to get buffer size: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
}
|
||||
@@ -1641,6 +1671,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
@@ -1641,6 +1676,7 @@ HRESULT WasapiCapture::resetProxy()
|
||||
hr = mClient->SetEventHandle(mNotifyEvent);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@@ -388,7 +397,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to set event handle: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
}
|
||||
@@ -1653,7 +1684,10 @@ void WasapiCapture::start()
|
||||
@@ -1653,7 +1689,10 @@ void WasapiCapture::start()
|
||||
{
|
||||
const HRESULT hr{pushMessage(MsgType::StartDevice).get()};
|
||||
if(FAILED(hr))
|
||||
@@ -399,7 +408,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
}
|
||||
|
||||
HRESULT WasapiCapture::startProxy()
|
||||
@@ -1663,6 +1697,7 @@ HRESULT WasapiCapture::startProxy()
|
||||
@@ -1663,6 +1702,7 @@ HRESULT WasapiCapture::startProxy()
|
||||
HRESULT hr{mClient->Start()};
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@@ -407,7 +416,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to start audio client: 0x%08lx\n", hr);
|
||||
return hr;
|
||||
}
|
||||
@@ -1676,9 +1711,17 @@ HRESULT WasapiCapture::startProxy()
|
||||
@@ -1676,9 +1716,17 @@ HRESULT WasapiCapture::startProxy()
|
||||
mKillNow.store(false, std::memory_order_release);
|
||||
mThread = std::thread{std::mem_fn(&WasapiCapture::recordProc), this};
|
||||
}
|
||||
@@ -425,7 +434,7 @@ index 8e43aa7c..0f313dea 100644
|
||||
ERR("Failed to start thread\n");
|
||||
hr = E_FAIL;
|
||||
}
|
||||
@@ -1737,6 +1780,12 @@ bool WasapiBackendFactory::init()
|
||||
@@ -1737,6 +1785,12 @@ bool WasapiBackendFactory::init()
|
||||
InitResult = future.get();
|
||||
}
|
||||
catch(...) {
|
||||
|
||||
@@ -526,6 +526,29 @@ namespace Microsoft.Xna.Framework
|
||||
result.Width = Math.Max(value1.Right, value2.Right) - result.X;
|
||||
result.Height = Math.Max(value1.Bottom, value2.Bottom) - result.Y;
|
||||
}
|
||||
|
||||
public void AddPoint(Point point)
|
||||
{
|
||||
if (point.X < X)
|
||||
{
|
||||
Width += X - point.X;
|
||||
X = point.X;
|
||||
}
|
||||
else if (point.X > Right)
|
||||
{
|
||||
Width += point.X - Right;
|
||||
}
|
||||
|
||||
if (point.Y < Y)
|
||||
{
|
||||
Height += Y - point.Y;
|
||||
Y = point.Y;
|
||||
}
|
||||
else if (point.Y > Bottom)
|
||||
{
|
||||
Height += point.Y - Bottom;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user