diff libmlk-core/mlk/core/texture.c @ 485:3ff1fe64d0cd

core: window -> mlk_window
author David Demelier <markand@malikania.fr>
date Tue, 28 Feb 2023 08:40:35 +0100
parents bc5483849614
children d6757c30658e
line wrap: on
line diff
--- a/libmlk-core/mlk/core/texture.c	Mon Feb 27 19:47:09 2023 +0100
+++ b/libmlk-core/mlk/core/texture.c	Tue Feb 28 08:40:35 2023 +0100
@@ -34,7 +34,7 @@
 	assert(w);
 	assert(h);
 
-	tex->handle = SDL_CreateTexture(RENDERER(),
+	tex->handle = SDL_CreateTexture(MLK__RENDERER(),
 	    SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h);
 
 	if (!tex->handle) {
@@ -108,7 +108,7 @@
 		.h = tex->h
 	};
 
-	if (SDL_RenderCopy(RENDERER(), tex->handle, NULL, &dst) < 0)
+	if (SDL_RenderCopy(MLK__RENDERER(), tex->handle, NULL, &dst) < 0)
 		return errorf("%s", SDL_GetError());
 
 	return 0;
@@ -139,7 +139,7 @@
 		.h = dst_h
 	};
 
-	if (SDL_RenderCopyEx(RENDERER(), tex->handle, &src, &dst, angle, NULL, SDL_FLIP_NONE) < 0)
+	if (SDL_RenderCopyEx(MLK__RENDERER(), tex->handle, &src, &dst, angle, NULL, SDL_FLIP_NONE) < 0)
 		return errorf("%s", SDL_GetError());
 
 	return 0;
@@ -164,7 +164,7 @@
 	assert(tex);
 	assert(surface);
 
-	if (!(tex->handle = SDL_CreateTextureFromSurface(RENDERER(), surface))) {
+	if (!(tex->handle = SDL_CreateTextureFromSurface(MLK__RENDERER(), surface))) {
 		tex->w = tex->h = 0;
 		return MLK_ERR_SDL;
 	}