diff --git a/main.cpp b/main.cpp index fa8ba93..5c6d88b 100644 --- a/main.cpp +++ b/main.cpp @@ -90,22 +90,13 @@ auto poll_events(bool& continu) { } // namespace int main() try { - if (SDL_Init(SDL_INIT_VIDEO) < 0) { - std::println("fuck"); - return EXIT_FAILURE; - } + sdl_check(SDL_Init(SDL_INIT_VIDEO)); Defer defer_SDL_Quit; window_t window{SDL_CreateWindow( "random walk", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, - height, SDL_WINDOW_FULLSCREEN + height, 0//SDL_WINDOW_FULLSCREEN )}; - if (!window) { - std::println( - "Window could not be created! SDL_Error: {}", SDL_GetError() - ); - return EXIT_FAILURE; - } // owned by window auto* window_surface = sdl_check(SDL_GetWindowSurface(window));