Update SDL
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
|
||||||
<PackageReference Include="OpenRA-Freetype6" Version="1.0.11" />
|
<PackageReference Include="OpenRA-Freetype6" Version="1.0.11" />
|
||||||
<PackageReference Include="OpenRA-OpenAL-CS" Version="1.0.22" />
|
<PackageReference Include="OpenRA-OpenAL-CS" Version="1.0.22" />
|
||||||
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.40" />
|
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.41" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="OpenRA.Platforms.Default.dll.config" Condition="'$(TargetPlatform)' != 'win-x64' And '$(TargetPlatform)' != 'win-x86'">
|
<Content Include="OpenRA.Platforms.Default.dll.config" Condition="'$(TargetPlatform)' != 'win-x64' And '$(TargetPlatform)' != 'win-x86'">
|
||||||
|
|||||||
@@ -271,6 +271,10 @@ namespace OpenRA.Platforms.Default
|
|||||||
SDL.SDL_GL_GetDrawableSize(Window, out var width, out var height);
|
SDL.SDL_GL_GetDrawableSize(Window, out var width, out var height);
|
||||||
surfaceSize = new Size(width, height);
|
surfaceSize = new Size(width, height);
|
||||||
windowScale = width * 1f / windowSize.Width;
|
windowScale = width * 1f / windowSize.Width;
|
||||||
|
|
||||||
|
// SDL expects OpenGL Context to be on the main thread on OSX by default.
|
||||||
|
// If this hint isn't set, window management calls will deadlock.
|
||||||
|
SDL.SDL_SetHint(SDL.SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, "1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
windowSize = new Size((int)(surfaceSize.Width / windowScale), (int)(surfaceSize.Height / windowScale));
|
windowSize = new Size((int)(surfaceSize.Width / windowScale), (int)(surfaceSize.Height / windowScale));
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</AssemblyAttribute>
|
</AssemblyAttribute>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.40" />
|
<PackageReference Include="OpenRA-SDL2-CS" Version="1.0.41" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
|
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj" />
|
||||||
|
|||||||
Reference in New Issue
Block a user