Don't throw an exception when creating a hardware cursor fails

This commit is contained in:
abcdefg30
2021-08-06 01:11:04 +02:00
committed by Paul Chote
parent f63e15f5de
commit b8ba1b36fe
3 changed files with 11 additions and 16 deletions

View File

@@ -45,9 +45,6 @@ namespace OpenRA.Platforms.Default
// This call very occasionally fails on Windows, but often works when retried.
for (var retries = 0; retries < 3 && Cursor == IntPtr.Zero; retries++)
Cursor = SDL.SDL_CreateColorCursor(surface, hotspot.X, hotspot.Y);
if (Cursor == IntPtr.Zero)
throw new Sdl2HardwareCursorException($"Failed to create cursor: {SDL.SDL_GetError()}");
}
catch
{