From cb8003e63ff12aa8416c907395ee5a64db7704dc Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Thu, 16 Jul 2020 16:29:06 +0200 Subject: [PATCH] resizable window --- c/SDL2_putpixel_click/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/c/SDL2_putpixel_click/main.c b/c/SDL2_putpixel_click/main.c index a1955ed..72adf70 100644 --- a/c/SDL2_putpixel_click/main.c +++ b/c/SDL2_putpixel_click/main.c @@ -15,8 +15,11 @@ int main(void) { int i; SDL_Init(SDL_INIT_VIDEO); - SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_WIDTH, 0, &window, &renderer); + SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_WIDTH, SDL_WINDOW_RESIZABLE, &window, &renderer); //SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP); + //SDL_RenderSetScale(renderer, 2.0, 2.0); + SDL_SetWindowTitle(window, "Simple SDL paint"); + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0); SDL_RenderClear(renderer); @@ -35,6 +38,8 @@ int main(void) { event.type = 0; if(SDL_PollEvent(&event)) { switch(event.type){ + case SDL_WINDOWEVENT: + break; case SDL_QUIT: running = 0; break; -- 2.30.2