30 lines
617 B
C
30 lines
617 B
C
|
|
#include <stdio.h>
|
||
|
|
#include <stdbool.h>
|
||
|
|
#include <SDL3/SDL.h>
|
||
|
|
|
||
|
|
int main(int argc, char **argv) {
|
||
|
|
if (!SDL_Init(SDL_INIT_VIDEO)) {
|
||
|
|
printf("[Error] :: Failed to initialise SDL3 (%s)\n", SDL_GetError());
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
SDL_Window *window = SDL_CreateWindow("Ludum", 1280, 720, SDL_WINDOW_HIGH_PIXEL_DENSITY);
|
||
|
|
if (!window) {
|
||
|
|
printf("[Error] :: Failed to create window (%s)\n", SDL_GetError());
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
bool running = true;
|
||
|
|
while (running) {
|
||
|
|
SDL_Event e;
|
||
|
|
while (SDL_PollEvent(&e)) {
|
||
|
|
if (e.type == SDL_EVENT_QUIT) { running = false; }
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
SDL_DestroyWindow(window);
|
||
|
|
SDL_Quit();
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|