readme.md
This commit is contained in:
@@ -7,17 +7,17 @@
|
||||
void SdlRenderer::initialize(RendererParams params) {
|
||||
if(SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("SDL vide oinit failed: %s\n", SDL_GetError());
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
auto img_flags = IMG_INIT_PNG;
|
||||
if(!(IMG_Init(img_flags) & img_flags)) {
|
||||
printf("Failed to init image loading: %s", IMG_GetError());
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
SDL_Window* sdl_window = SDL_CreateWindow(params.title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, params.width, params.height, SDL_WINDOW_SHOWN);
|
||||
if(sdl_window == nullptr) {
|
||||
printf("error making window: %s\n", SDL_GetError());
|
||||
return;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else {
|
||||
this->window = sdl_window;
|
||||
|
||||
Reference in New Issue
Block a user