snipplets.dev/code/SDL/Scale2x/scale2x.c
2023-09-26 22:05:13 +03:00

12 lines
343 B
C

#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);