diff options
Diffstat (limited to 'sources/TZR_Init.c')
-rw-r--r-- | sources/TZR_Init.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sources/TZR_Init.c b/sources/TZR_Init.c index 25d0272..b6163c5 100644 --- a/sources/TZR_Init.c +++ b/sources/TZR_Init.c @@ -59,21 +59,18 @@ _TZR_Init(const TZR_Config *config) if (___tzr_renderer == NULL) return _sdl_error(); - ___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.light_system) { - ___tzr_target_light = SDL_CreateTexture(___tzr_renderer, - SDL_PIXELFORMAT_RGB888, - SDL_TEXTUREACCESS_TARGET, - ___tzr_config.width, - ___tzr_config.height); - if (___tzr_target_light == NULL) + 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(); } |