Last change
on this file since ff8d800 was ff8d800, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added SDL2 support.
|
-
Property mode
set to
100644
|
File size:
412 bytes
|
Rev | Line | |
---|
[ff8d800] | 1 | #include <all.h>
|
---|
| 2 |
|
---|
| 3 | bool sdl_verbose = false;
|
---|
| 4 |
|
---|
| 5 | #define ver(...) { \
|
---|
| 6 | if (sdl_verbose) { \
|
---|
| 7 | SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
|
---|
| 8 | } \
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | void sdl_init(void)
|
---|
| 12 | {
|
---|
| 13 | if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
---|
| 14 | fprintf(stderr, "SDL_Init() failed: %s\n", SDL_GetError());
|
---|
| 15 | exit(1);
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE);
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | void sdl_quit(void)
|
---|
| 22 | {
|
---|
| 23 | SDL_Quit();
|
---|
| 24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.