aboutsummaryrefslogtreecommitdiff
path: root/sources/TZR_Init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sources/TZR_Init.c')
-rw-r--r--sources/TZR_Init.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/sources/TZR_Init.c b/sources/TZR_Init.c
index 5c9241b..ea0eaba 100644
--- a/sources/TZR_Init.c
+++ b/sources/TZR_Init.c
@@ -63,27 +63,9 @@ _TZR_Init(const TZR_Config *config)
if (___tzr_renderer == NULL)
return _sdl_error();
- if (___tzr_config.hd_render) {
- if (SDL_RenderSetLogicalSize(___tzr_renderer,
- ___tzr_config.width,
- ___tzr_config.height) < 0)
- return _sdl_error();
- } else {
- ___tzr_target = SDL_CreateTexture(___tzr_renderer,
- SDL_PIXELFORMAT_RGB888,
- SDL_TEXTUREACCESS_TARGET,
- ___tzr_config.width,
- ___tzr_config.height);
- if (___tzr_target == NULL)
- return _sdl_error();
- if (___tzr_config.interlace) {
- ___tzr_target_pre = SDL_CreateTexture(
- ___tzr_renderer,
- SDL_PIXELFORMAT_RGB888,
- SDL_TEXTUREACCESS_TARGET,
- ___tzr_config.width,
- ___tzr_config.height);
- }
+ if (TZR_SetViewportSize(___tzr_config.width, ___tzr_config.height)) {
+ TZR_Quit();
+ return -1;
}
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY,