resizable window
authorTomas Mudrunka <tomas@mudrunka.cz>
Thu, 16 Jul 2020 14:29:06 +0000 (16:29 +0200)
committerTomas Mudrunka <tomas@mudrunka.cz>
Thu, 16 Jul 2020 14:29:06 +0000 (16:29 +0200)
c/SDL2_putpixel_click/main.c

index a1955edca17e074934f2dcc1e7c8c96621eb4d29..72adf70da734f157730f68127eb0d1824bb1c0f2 100644 (file)
@@ -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;
This page took 0.259513 seconds and 4 git commands to generate.