Simple Directmedia Layer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 24 lines 717 B view raw
1#include <SDL3/SDL.h> 2#include <SDL3/SDL_main.h> 3 4int main(int argc, char *argv[]) 5{ 6 SDL_Window *window = NULL; 7 SDL_Surface *screenSurface = NULL; 8 if (!SDL_Init(SDL_INIT_VIDEO)) { 9 SDL_Log("Could not initialize SDL: %s\n", SDL_GetError()); 10 return 1; 11 } 12 window = SDL_CreateWindow("Hello SDL", 640, 480, 0); 13 if (!window) { 14 SDL_Log("could not create window: %s\n", SDL_GetError()); 15 return 1; 16 } 17 screenSurface = SDL_GetWindowSurface(window); 18 SDL_FillSurfaceRect(screenSurface, NULL, SDL_MapSurfaceRGB(screenSurface, 0xff, 0xff, 0xff)); 19 SDL_UpdateWindowSurface(window); 20 SDL_Delay(100); 21 SDL_DestroyWindow(window); 22 SDL_Quit(); 23 return 0; 24}