Skip to content

Commit 63b1529

Browse files
Add SDL_platform.inc
1 parent e4369ef commit 63b1529

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

units/SDL3.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ interface
8484
{$I SDL_hints.inc} // 3.2.0
8585
{$I SDL_misc.inc} // 3.2.0
8686
{$I SDL_stdinc.inc} // 3.1.6-prev (unfinished)
87+
{$I SDL_platform.inc} // 3.2.0
8788
{$I SDL_loadso.inc} // 3.2.0
8889
{$I SDL_rect.inc} // 3.1.6-prev
8990
{$I SDL_properties.inc} // 3.1.6-prev

units/SDL_platform.inc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
This file is part of:
3+
4+
SDL3 for Pascal
5+
(https://github.com/PascalGameDevelopment/SDL3-for-Pascal)
6+
SPDX-License-Identifier: Zlib
7+
}
8+
9+
{*
10+
* # CategoryPlatform
11+
*
12+
* SDL provides a means to identify the app's platform, both at compile time
13+
* and runtime.
14+
}
15+
16+
{*
17+
* Get the name of the platform.
18+
*
19+
* Here are the names returned for some (but not all) supported platforms:
20+
*
21+
* - "Windows"
22+
* - "macOS"
23+
* - "Linux"
24+
* - "iOS"
25+
* - "Android"
26+
*
27+
* \returns the name of the platform. If the correct platform name is not
28+
* available, returns a string beginning with the text "Unknown".
29+
*
30+
* \since This function is available since SDL 3.2.0.
31+
}
32+
function SDL_GetPlatform: PAnsiChar; cdecl;
33+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPlatform' {$ENDIF} {$ENDIF};
34+

0 commit comments

Comments
 (0)