feature/imgui-sdl
points-test
Last change
on this file since 1c6cd5e was 826df16, checked in by Dmitry Portnoy <dmp1488@…>, 5 years ago |
Make the new Vulkan project work in Linux Mint
|
-
Property mode
set to
100644
|
File size:
654 bytes
|
Line | |
---|
1 | #include "game-gui-sdl.hpp"
|
---|
2 |
|
---|
3 | #include <SDL2/SDL.h>
|
---|
4 |
|
---|
5 | #include <iostream>
|
---|
6 |
|
---|
7 | using namespace std;
|
---|
8 |
|
---|
9 | bool GameGui_SDL::Init() {
|
---|
10 | // may want to define SDL_INIT_NOPARACHUTE when I start handling crashes since it
|
---|
11 | // prevents SDL from setting up its own handlers for SIG_SEGV and stuff like that
|
---|
12 |
|
---|
13 | // If this function fails, I can call SDL_GetError() for more info
|
---|
14 | // I should create a generic error retrieval function, similar to SDL_GetError()
|
---|
15 |
|
---|
16 | // cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << endl;
|
---|
17 |
|
---|
18 | return SDL_Init(SDL_INIT_EVERYTHING) < 0 ? RTWO_ERROR : RTWO_SUCCESS;
|
---|
19 | }
|
---|
20 |
|
---|
21 | void GameGui_SDL::Shutdown() {
|
---|
22 | SDL_Quit();
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.