mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Deprecate CreateWindowAndRenderer() and add WindowPos helpers
This commit is contained in:
parent
45dd528c7b
commit
a273d514c5
1 changed files with 29 additions and 0 deletions
|
@ -630,6 +630,26 @@ namespace SDL2
|
|||
public const WindowPos Undefined = 0x1FFF0000;
|
||||
public const WindowPos Centered = 0x2FFF0000;
|
||||
}
|
||||
|
||||
public static int WindowPosUndefinedDisplay(int X)
|
||||
{
|
||||
return ((.) WindowPos.Undefined | X);
|
||||
}
|
||||
|
||||
public static bool WindowPosIsUndefined(int X)
|
||||
{
|
||||
return (X & 0xFFFF0000) == (.) WindowPos.Undefined;
|
||||
}
|
||||
|
||||
public static int WindowPosCenteredDisplay(int X)
|
||||
{
|
||||
return ((.) WindowPos.Centered | X);
|
||||
}
|
||||
|
||||
public static bool WindowPosIsCentered(int X)
|
||||
{
|
||||
return (X & 0xFFFF0000) == (.) WindowPos.Centered;
|
||||
}
|
||||
|
||||
[CRepr]
|
||||
public struct SDL_DisplayMode
|
||||
|
@ -655,6 +675,15 @@ namespace SDL2
|
|||
WindowFlags flags
|
||||
);
|
||||
|
||||
[LinkName("SDL_CreateWindowAndRenderer"), Obsolete("This method uses WindowPos as width and height parameter types. Use other method that uses int32 instead.", false)]
|
||||
public static extern int CreateWindowAndRenderer(
|
||||
WindowPos width,
|
||||
WindowPos height,
|
||||
WindowFlags window_flags,
|
||||
out Window* window,
|
||||
out Renderer* renderer
|
||||
);
|
||||
|
||||
[LinkName("SDL_CreateWindowAndRenderer")]
|
||||
public static extern int CreateWindowAndRenderer(
|
||||
int32 width,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue