Fix the scaling and add nonthreaded
This commit is contained in:
@@ -72,15 +72,15 @@ void init_switches(Switches *switches, SDL_Renderer *renderer, int x, int y, int
|
||||
|
||||
switches->rect->x = 0;
|
||||
switches->rect->y = 0;
|
||||
switches->rect->w = width;
|
||||
switches->rect->h = height;
|
||||
switches->rect->w = width + 2;
|
||||
switches->rect->h = height + 2;
|
||||
|
||||
switches->outRect->x = x;
|
||||
switches->outRect->y = y;
|
||||
switches->outRect->w = width;
|
||||
switches->outRect->h = height;
|
||||
switches->outRect->w = width + 2;
|
||||
switches->outRect->h = height + 2;
|
||||
|
||||
switches->texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, width, height);
|
||||
switches->texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, width + 2, height + 2);
|
||||
if (!switches->texture) {
|
||||
fprintf(stderr, "Failed to create texture: %s\n", SDL_GetError());
|
||||
exit(EXIT_FAILURE);
|
||||
|
Reference in New Issue
Block a user