diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..32ef547 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,26 @@ +#include +#include + +int main() { + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + std::cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << std::endl; + return -1; + } + + SDL_Window* window = SDL_CreateWindow("SDL Window", + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + 640, 480, SDL_WINDOW_SHOWN); + + if (window == NULL) { + std::cout << "Window could not be created! SDL_Error: " << SDL_GetError() << std::endl; + SDL_Quit(); + return -1; + } + + SDL_Delay(5000); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} +