mirror of https://github.com/ppy/SDL3-CS.git
Load SDL3 when using `SDL_image` or `SDL_ttf` members
This commit is contained in:
parent
66fc81f489
commit
ce5cb5da0e
|
|
@ -2,6 +2,7 @@
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
|
|
@ -21,5 +22,13 @@ namespace SDL
|
||||||
{
|
{
|
||||||
[Constant]
|
[Constant]
|
||||||
public static readonly int SDL_IMAGE_VERSION = SDL3.SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION);
|
public static readonly int SDL_IMAGE_VERSION = SDL3.SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION);
|
||||||
|
|
||||||
|
#pragma warning disable CA2255
|
||||||
|
[ModuleInitializer]
|
||||||
|
internal static void ModuleInitializer()
|
||||||
|
{
|
||||||
|
SDL3.SDL_Init(0);
|
||||||
|
}
|
||||||
|
#pragma warning restore CA2255
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
|
|
@ -19,5 +20,13 @@ namespace SDL
|
||||||
{
|
{
|
||||||
[Constant]
|
[Constant]
|
||||||
public static readonly int SDL_TTF_VERSION = SDL3.SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_MICRO_VERSION);
|
public static readonly int SDL_TTF_VERSION = SDL3.SDL_VERSIONNUM(SDL_TTF_MAJOR_VERSION, SDL_TTF_MINOR_VERSION, SDL_TTF_MICRO_VERSION);
|
||||||
|
|
||||||
|
#pragma warning disable CA2255
|
||||||
|
[ModuleInitializer]
|
||||||
|
internal static void ModuleInitializer()
|
||||||
|
{
|
||||||
|
SDL3.SDL_Init(0);
|
||||||
|
}
|
||||||
|
#pragma warning restore CA2255
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue