sdl 2x scale

This commit is contained in:
Alexander Popov 2023-04-09 11:42:22 +03:00
parent f32007496c
commit ff9032bc22
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
1 changed files with 11 additions and 0 deletions

11
~/SDL/Scale2x/scale2x.c Normal file
View File

@ -0,0 +1,11 @@
#define WIDTH 320
#define HEIGHT 192
#define SCALE 2
SDL_Window * window = SDL_CreateWindow("SDL 2x scale",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, 0);
SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, 0);
SDL_SetWindowSize(window, WIDTH * SCALE, HEIGHT * SCALE);
SDL_RenderSetScale(renderer, SCALE, SCALE);