From b640791963ea0bbecf4cf700bc05348f45fb9126 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Sun, 27 Sep 2026 21:31:34 +0200 Subject: [PATCH] Dropped need for getdelim GNU c function. Running on wine. --- core/host/windows/display.c | 8 ++++---- core/host/windows/texture.c | 6 +++--- core/host/windows/texture.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/host/windows/display.c b/core/host/windows/display.c index 37ce96b..66008a0 100644 --- a/core/host/windows/display.c +++ b/core/host/windows/display.c @@ -46,25 +46,25 @@ inline int display_init(void) error_printf("Failed to create renderer : %s", SDL_GetError()); return EXIT_FAILURE; } - +/* if(!SDL_SetRenderVSync(game.display.renderer, SDL_RENDERER_VSYNC_ADAPTIVE)) { error_printf("Failed to activate adaptative vsync : %s", SDL_GetError()); return EXIT_FAILURE; } - +*/ if(!SDL_SetRenderDrawBlendMode(game.display.renderer, SDL_BLENDMODE_BLEND)) { error_printf("Failed to set renderer draw blend mode : %s", SDL_GetError()); return EXIT_FAILURE; } -/* + if(!SDL_SetDefaultTextureScaleMode(game.display.renderer, SDL_SCALEMODE_NEAREST)) { error_printf("Failed to set default texture scale mode : %s", SDL_GetError()); return EXIT_FAILURE; } -*/ + debug_printf("Initialized display."); return EXIT_SUCCESS; diff --git a/core/host/windows/texture.c b/core/host/windows/texture.c index b159a19..0616975 100644 --- a/core/host/windows/texture.c +++ b/core/host/windows/texture.c @@ -11,13 +11,13 @@ texture_t *load_texture(void) if(fread(&width, sizeof(width), 1, game.asset_manager.asset_file) != 1) { - error_printf("Failed to read in asset file."); + error_printf("Failed to read in asset file : %d", ferror(game.asset_manager.asset_file)); return NULL; } if(fread(&height, sizeof(height), 1, game.asset_manager.asset_file) != 1) { - error_printf("Failed to read in asset file."); + error_printf("Failed to read in asset file : %d", ferror(game.asset_manager.asset_file)); return NULL; } @@ -36,7 +36,7 @@ texture_t *load_texture(void) if(fread(tmp_surface->pixels, sizeof(uint16_t), width * height, game.asset_manager.asset_file) != (size_t)width * (size_t)height) { - error_printf("Failed to read asset file."); + error_printf("Failed to read asset file : %d", ferror(game.asset_manager.asset_file)); goto_failure; } diff --git a/core/host/windows/texture.h b/core/host/windows/texture.h index b61aabf..5901509 100644 --- a/core/host/windows/texture.h +++ b/core/host/windows/texture.h @@ -7,8 +7,8 @@ typedef SDL_Texture texture_t; -#define get_width(T) T->w -#define get_height(T) T->h +#define texture_get_width(T) T->w +#define texture_get_height(T) T->h texture_t *load_texture(void); void destroy_texture(texture_t *texture);