diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:46:32 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:46:32 +0200 |
commit | 5447ddd896eb49ea9fd9f9191a277fd1d5730aa3 (patch) | |
tree | 96e09b8fb5d757aafef33da50a93204bae54ba9f /src/crepe/SDLApp.cpp | |
parent | 0b08b742fffa63188c89d760a5aecd55d585403b (diff) |
add PR #9 comments as code comments
Diffstat (limited to 'src/crepe/SDLApp.cpp')
-rw-r--r-- | src/crepe/SDLApp.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crepe/SDLApp.cpp b/src/crepe/SDLApp.cpp index f408595..c6ddeaa 100644 --- a/src/crepe/SDLApp.cpp +++ b/src/crepe/SDLApp.cpp @@ -6,10 +6,12 @@ SDLApp::SDLApp(int window_width, int window_height) : window_width(window_width), window_height(window_height), window(nullptr), renderer(nullptr) {} +// FIXME: why is there clean_up and ~SDLApp? SDLApp::~SDLApp() { clean_up(); } bool SDLApp::initialize() { if (SDL_Init(SDL_INIT_VIDEO) != 0) { + // FIXME: throw exception std::cerr << "SDL Initialization Error: " << SDL_GetError() << std::endl; return false; @@ -19,12 +21,14 @@ bool SDLApp::initialize() { SDL_WINDOWPOS_CENTERED, window_width, window_height, SDL_WINDOW_SHOWN); if (!window) { + // FIXME: throw exception std::cerr << "Window Creation Error: " << SDL_GetError() << std::endl; return false; } renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); if (!renderer) { + // FIXME: throw exception std::cerr << "Renderer Creation Error: " << SDL_GetError() << std::endl; return false; } |