snipplets.dev/code/SDL/Scale2x/scale2x.c

12 lines
343 B
C
Raw Normal View History

2023-04-09 11:42:22 +03:00
#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);