12 lines
343 B
C
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);
|