diff --git a/src/main.cpp b/src/main.cpp index 3b7893c..39c8436 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,18 @@ int main(int argc, char** argv) SDL_Init(SDL_INIT_VIDEO); SDL_Window* window = SDL_CreateWindow("Gameboy Emulator", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_SHOWN); + { + std::cerr << "Failed to create window:\n" << SDL_GetError() << std::endl; + return -1; + } + SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); + if(renderer == nullptr) + { + std::cerr << "Failed to create accelerated rendering device:\n" << SDL_GetError() << std::endl; + return -1; + } + SDL_Event e; // Initialize ImGui