aboutsummaryrefslogtreecommitdiff
path: root/sources/TZR_Init.c
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-05-11 00:40:55 +0200
committerkdx <kikoodx@paranoici.org>2023-05-11 00:42:21 +0200
commit6ab047e30169ebf8f440d87dae68e0fdf6cc239f (patch)
tree333f4947779e2a5223c7b248b3234ac514ef14f0 /sources/TZR_Init.c
parenta4112e4311eb226c4f43cb697aa7f6c34bd7b9a5 (diff)
downloadtzr-6ab047e30169ebf8f440d87dae68e0fdf6cc239f.tar.gz
depreciate light system
Diffstat (limited to 'sources/TZR_Init.c')
-rw-r--r--sources/TZR_Init.c27
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();
}