Skip to content

Commit

Permalink
fix logical render size on model 02
Browse files Browse the repository at this point in the history
  • Loading branch information
laamaa committed Jun 13, 2024
1 parent 5e6c4d4 commit 65c7627
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ check_and_adjust_window_and_texture_size(const unsigned int new_width,
SDL_SetWindowSize(win, (texture_width * 2), (texture_height * 2));
}

SDL_DestroyTexture(maintexture);

SDL_RenderSetLogicalSize(rend, texture_width, texture_height);

SDL_DestroyTexture(maintexture);
maintexture = SDL_CreateTexture(rend, SDL_PIXELFORMAT_ARGB8888,
SDL_TEXTUREACCESS_TARGET, texture_width,
texture_height);
Expand Down

0 comments on commit 65c7627

Please sign in to comment.