Changeset d5f2b42 in opengl-game for game-gui-sdl.cpp
- Timestamp:
- Aug 30, 2019, 7:25:55 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- d8cb15e
- Parents:
- d02c25f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
game-gui-sdl.cpp
rd02c25f rd5f2b42 1 1 #include "game-gui-sdl.hpp" 2 3 string GameGui_SDL::s_errorMessage; 4 5 string& GameGui_SDL::GetError() { 6 GameGui_SDL::s_errorMessage = SDL_GetError(); 7 8 return GameGui_SDL::s_errorMessage; 9 } 2 10 3 11 bool GameGui_SDL::Init() { … … 5 13 // prevents SDL from setting up its own handlers for SIG_SEGV and stuff like that 6 14 7 // If this function fails, I can call SDL_GetError() for more info 8 // I should create a generic error retrieval function, similar to SDL_GetError() 15 GameGui_SDL::s_errorMessage = "No error"; 9 16 10 // cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << endl;11 12 // TODO: Print out contextual error messages instead of just returning13 17 if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { 14 18 return RTWO_ERROR;
Note:
See TracChangeset
for help on using the changeset viewer.