|
Last change
on this file since e41c6b6 was e41c6b6, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Fix Ctrl-C.
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Copyright (C) 2017 The Contributors
|
|---|
| 3 | *
|
|---|
| 4 | * This program is free software: you can redistribute it and/or modify
|
|---|
| 5 | * it under the terms of the GNU General Public License as published by
|
|---|
| 6 | * the Free Software Foundation, either version 3 of the License, or (at
|
|---|
| 7 | * your option) any later version.
|
|---|
| 8 | *
|
|---|
| 9 | * This program is distributed in the hope that it will be useful, but
|
|---|
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 12 | * General Public License for more details.
|
|---|
| 13 | *
|
|---|
| 14 | * A copy of the GNU General Public License can be found in the file
|
|---|
| 15 | * "gpl-v3.txt" in the top directory of this repository.
|
|---|
| 16 | */
|
|---|
| 17 |
|
|---|
| 18 | #include <all.h>
|
|---|
| 19 |
|
|---|
| 20 | bool sdl_verbose = false;
|
|---|
| 21 |
|
|---|
| 22 | #define ver(...) { \
|
|---|
| 23 | if (sdl_verbose) { \
|
|---|
| 24 | SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
|
|---|
| 25 | } \
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | void sdl_init(void)
|
|---|
| 29 | {
|
|---|
| 30 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) < 0) {
|
|---|
| 31 | fprintf(stderr, "SDL_Init() failed: %s\n", SDL_GetError());
|
|---|
| 32 | exit(1);
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE);
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | void sdl_quit(void)
|
|---|
| 39 | {
|
|---|
| 40 | SDL_Quit();
|
|---|
| 41 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.