Merge branch 'master' into dev

This commit is contained in:
Juan Pablo Arce
2021-02-25 12:59:20 -03:00
14 changed files with 112 additions and 37 deletions
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
Binary file not shown.
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.1100.0.4</Version>
<Version>0.1300.0.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>
+4 -1
View File
@@ -3,11 +3,14 @@
Welcome to Barotrauma's GitHub repository! If you're here to report an issue or to contribute to the development, please read the instructions below before you do.
## I have a question!
Please check [our FAQ](https://barotraumagame.com/faq/) in case the question has already been answered. If not, you can post the question on the [Barotrauma discussion forum](https://undertowgames.com/forum/viewforum.php?f=17) or stop by at our [Discord Server](discord.gg/undertow).
Please check [our FAQ](https://barotraumagame.com/faq/) in case the question has already been answered. If not, you should stop by at our [Discord Server](discord.gg/undertow) and [Steam forums](https://steamcommunity.com/app/602960/discussions/).
## Reporting a bug
If you've encountered a bug, you can report it in the [issue tracker](https://github.com/Regalis11/Barotrauma/issues). Please follow the instructions in the issue template to make it easier for us to diagnose and fix the issue.
## Sharing ideas and suggestions
To keep the number of tickets in the issue tracker manageable, please do not post feature requests as tickets. Instead, you can use the [Discussions section](https://github.com/Regalis11/Barotrauma/discussions) to share and discuss feedback, ideas and suggestions for future development.
## Code contributions
Before you start doing modifications to the code or submitting pull requests to the repository, it is important that you've read and understood (at least the human-readable summary part) of [our EULA](https://github.com/Regalis11/Barotrauma/blob/master/EULA.txt). To sum it up, Barotrauma is not an open source project in the sense of free, open source software that you can freely distribute or reuse. Even though the early versions of the game have been available for free, current versions of the game have a price tag. If you're not comfortable with your contributions potentially being used in a commercial product, do not submit pull requests to the repository.
@@ -12,4 +12,9 @@
<PackageProjectUrl>https://github.com/lostromb/concentus</PackageProjectUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
</Project>
@@ -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>
@@ -219,6 +253,7 @@ namespace Steamworks.Data
/// </summary>
public async Task<Lobby[]> RequestAsync()
{
await Task.Yield();
ApplyFilters();
LobbyMatchList_t? list = await SteamMatchmaking.Internal.RequestLobbyList();
@@ -24,7 +24,7 @@ namespace Microsoft.Xna.Framework.Graphics
/// <para>The value is an implementation detail and may change between application launches or MonoGame versions.
/// It is only guaranteed to stay consistent during application lifetime.</para>
/// </remarks>
internal int SortingKey
public int SortingKey
{
get { return _sortingKey; }
}
+21 -12
View File
@@ -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(...) {
+23
View File
@@ -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
}
+1 -1
View File
@@ -14,7 +14,7 @@ If you're interested in working on the code, either to develop mods or to contri
**Forums:** http://undertowgames.com/forum/
**Wiki:** http://barotrauma.gamepedia.com/Barotrauma_Wiki
**Wiki:** https://barotraumagame.com/wiki/Main_Page
## Prerequisities:
### Windows