mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Merge pull request #920 from RogueMacro/master
Some minor fixes for the SDL2 lib
This commit is contained in:
commit
cdb78eec69
2 changed files with 33 additions and 4 deletions
|
@ -444,7 +444,7 @@ namespace SDL2
|
|||
[LinkName("SDL_ShowMessageBox")]
|
||||
public static extern int32 ShowMessageBox(ref MessageBoxData messageboxdata, out int32 buttonid);
|
||||
|
||||
[LinkName("ShowSimpleMessageBox")]
|
||||
[LinkName("SDL_ShowSimpleMessageBox")]
|
||||
public static extern int SimpleMessageBox(
|
||||
MessageBoxFlags flags,
|
||||
char8* title,
|
||||
|
@ -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,7 +675,7 @@ namespace SDL2
|
|||
WindowFlags flags
|
||||
);
|
||||
|
||||
[LinkName("SDL_CreateWindowAndRenderer")]
|
||||
[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,
|
||||
|
@ -664,6 +684,15 @@ namespace SDL2
|
|||
out Renderer* renderer
|
||||
);
|
||||
|
||||
[LinkName("SDL_CreateWindowAndRenderer")]
|
||||
public static extern int CreateWindowAndRenderer(
|
||||
int32 width,
|
||||
int32 height,
|
||||
WindowFlags window_flags,
|
||||
out Window* window,
|
||||
out Renderer* renderer
|
||||
);
|
||||
|
||||
/* data refers to some native window type, IntPtr to an SDL_Window* */
|
||||
[LinkName("SDL_CreateWindowFrom")]
|
||||
public static extern Window* SDL_CreateWindowFrom(void* data);
|
||||
|
|
|
@ -190,7 +190,7 @@ namespace SDL2
|
|||
[LinkName("TTF_RenderText_Solid")]
|
||||
public static extern SDL.Surface* RenderText_Solid(
|
||||
Font* font,
|
||||
char8 text,
|
||||
char8* text,
|
||||
SDL.Color fg
|
||||
);
|
||||
|
||||
|
@ -315,4 +315,4 @@ namespace SDL2
|
|||
int index
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue