aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-20 15:32:19 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-20 15:32:19 +0100
commit631975d4a03642271f80baeb4494dd01bda9c76e (patch)
tree027f94ed0ed86e156cf7885b35109cc8c5f47f11 /src/crepe
parentfd09501a1f010126bda5816f17e6e21e204e79cb (diff)
moved sdl hint to draw sprites and added another to text with 0 instead of 2 beacause otherwise its blurry
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/facade/SDLContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 9c45089..672d55a 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -68,7 +68,6 @@ SDLContext::SDLContext(Mediator & mediator) {
throw runtime_error(format("SDL_ttf initialization failed: {}", TTF_GetError()));
}
- SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "2");
mediator.sdl_context = *this;
}
@@ -173,6 +172,7 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const {
}
void SDLContext::draw(const RenderContext & ctx) {
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "2");
const Sprite::Data & data = ctx.sprite.data;
SDL_RendererFlip render_flip
= (SDL_RendererFlip) ((SDL_FLIP_HORIZONTAL * data.flip.flip_x)
@@ -203,6 +203,7 @@ void SDLContext::draw(const RenderContext & ctx) {
}
void SDLContext::draw_text(const RenderText & data) {
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");
const Text & text = data.text;
const Font & font = data.font;