Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sdlvideo.inc to SDL 2.28 #132

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion units/sdl2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
{$ELSE}
SDL_LibName = 'libSDL2.so.0';
{$ENDIF}
{$MESSAGE HINT 'Known MESA bug may generate float-point exception in software graphics mode! See https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/56 for reference.'}

Check notice on line 112 in units/sdl2.pas

View workflow job for this annotation

GitHub Actions / ubuntu-20-04

sdl2.pas(112,8): Hint (user defined)

Known MESA bug may generate float-point exception in software graphics mode! See https://github.com/PascalGameDevelopment/SDL2-for-Pascal/issues/56 for reference.
{$ENDIF}
{$ENDIF}

Expand Down Expand Up @@ -141,7 +141,7 @@
{$I sdlaudio.inc} // 2.26.3
{$I sdlblendmode.inc} // 2.0.14
{$I sdlsurface.inc} // 2.0.14
{$I sdlvideo.inc} // 2.24.0
{$I sdlvideo.inc} // 2.28.0
{$I sdlshape.inc} // 2.24.0
{$I sdlhints.inc} // 2.26.0
{$I sdlloadso.inc} // 2.24.1
Expand Down
49 changes: 49 additions & 0 deletions units/sdlvideo.inc
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,27 @@ procedure SDL_GetWindowSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
function SDL_GetWindowBordersSize(window: PSDL_Window; top, left, bottom, right: pcint): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowBordersSize' {$ENDIF} {$ENDIF};

{**
* Get the size of a window in pixels.
*
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
* drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
* platform with high-DPI support (Apple calls this "Retina"), and not
* disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
*
* \param window the window from which the drawable size should be queried
* \param w a pointer to variable for storing the width in pixels, may be NIL
* \param h a pointer to variable for storing the height in pixels, may be
* NIL
*
* \since This function is available since SDL 2.26.0.
*
* \sa SDL_CreateWindow
* \sa SDL_GetWindowSize
*}
procedure SDL_GetWindowSizeInPixels(window: PSDL_Window; w, h: pcuint); cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSizeInPixels' {$ENDIF} {$ENDIF};

{**
* Set the minimum size of a window's client area.
*
Expand Down Expand Up @@ -914,6 +935,19 @@ procedure SDL_RestoreWindow(window: PSDL_Window); cdecl;
function SDL_SetWindowFullscreen(window: PSDL_Window; flags: TSDL_WindowFlags): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowFullscreen' {$ENDIF} {$ENDIF};

{**
* Return whether the window has a surface associated with it.
*
* \returns SDL_TRUE if there is a surface associated with the window, or
* SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.28.0.
*
* \sa SDL_GetWindowSurface
*}
function SDL_HasWindowSurface(window: PSDL_Window): TSDL_Bool; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasWindowSurface' {$ENDIF} {$ENDIF};

{**
* Get the SDL surface associated with the window.
*
Expand Down Expand Up @@ -955,6 +989,21 @@ function SDL_UpdateWindowSurface(window: PSDL_Window): cint; cdecl;
function SDL_UpdateWindowSurfaceRects(window: PSDL_Window; rects: PSDL_Rect; numrects: cint): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateWindowSurfaceRects' {$ENDIF} {$ENDIF};

{**
* Destroy the surface associated with the window.
*
* \param window the window to update
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.28.0.
*
* \sa SDL_GetWindowSurface
* \sa SDL_HasWindowSurface
*}
function SDL_DestroyWindowSurface(window: PSDL_Window): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyWindowSurface' {$ENDIF} {$ENDIF};

{**
* Set a window's input grab mode.
*
Expand Down
Loading