forked from libsdl-org/SDL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* Contributed by Piotr Usewicz (https://github.com/pusewicz) */ | ||
|
||
import SDL3 | ||
|
||
guard SDL_Init(Uint32(SDL_INIT_VIDEO)) == 0 else { | ||
fatalError("SDL_Init error: \(String(cString: SDL_GetError()))") | ||
} | ||
|
||
var sdlVersion = SDL_GetVersion() | ||
|
||
print("SDL version: \(SDL_VERSIONNUM_MAJOR(sdlVersion)).\(SDL_VERSIONNUM_MINOR(sdlVersion)).\(SDL_VERSIONNUM_MICRO(sdlVersion))") | ||
|
||
SDL_Quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module SDL3 [extern_c] { | ||
header "shim.h" | ||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* Contributed by Piotr Usewicz (https://github.com/pusewicz) */ | ||
|
||
#include <SDL3/SDL.h> |