Display the complete SDL version.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
f8c20a0f8d
commit
d6af55bc04
@@ -168,7 +168,7 @@ namespace OpenRA.Platforms.Default
|
||||
Log.Write("graphics", $"SDL initialisation failed: {SDL.SDL_GetError()}");
|
||||
|
||||
SetSDLAttributes(profile);
|
||||
Console.WriteLine($"Using SDL 2 with OpenGL ({profile}) renderer");
|
||||
Console.WriteLine($"Using SDL {GetSDLVersion()} with OpenGL ({profile}) renderer");
|
||||
if (videoDisplay < 0 || videoDisplay >= DisplayCount)
|
||||
videoDisplay = 0;
|
||||
|
||||
@@ -525,6 +525,12 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
static string GetSDLVersion()
|
||||
{
|
||||
SDL.SDL_GetVersion(out var version);
|
||||
return version.major + "." + version.minor + "." + version.patch;
|
||||
}
|
||||
|
||||
static void SetSDLAttributes(GLProfile profile)
|
||||
{
|
||||
SDL.SDL_GL_ResetAttributes();
|
||||
|
||||
Reference in New Issue
Block a user