diff --git a/source/japi/draw.cpp b/source/japi/draw.cpp index fcb7cb0..7572a5a 100644 --- a/source/japi/draw.cpp +++ b/source/japi/draw.cpp @@ -9,7 +9,6 @@ namespace draw SDL_Renderer *sdl_renderer {nullptr}; // El renderer de SDL SDL_Texture *sdl_texture {nullptr}; // La textura a la que ho renderitze tot SDL_Texture *sdl_source {nullptr}; - SDL_FRect window_rect {0,0,0,0}; void init(const char *titol, const uint16_t width, const uint16_t height) { @@ -33,15 +32,12 @@ namespace draw printf("Using: %s\n", SDL_GetRendererName(sdl_renderer)); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, width, height); - - window_rect = {0,0,float(width),float(height)}; } void resizeSystemTexture(const uint16_t width, const uint16_t height) { SDL_DestroyTexture(sdl_texture); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, width, height); - window_rect = {0,0,float(width),float(height)}; } void quit() @@ -209,7 +205,7 @@ namespace draw void render() { SDL_SetRenderTarget(sdl_renderer, nullptr); - SDL_RenderTexture(sdl_renderer, sdl_texture, &window_rect, &window_rect); + SDL_RenderTexture(sdl_renderer, sdl_texture, nullptr, nullptr); SDL_RenderPresent(sdl_renderer); SDL_SetRenderTarget(sdl_renderer, sdl_texture); }