projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a1ae39
)
added warning if blitting textures with invalid renderer
author
Holger Schemel
<info@artsoft.org>
Sat, 22 Feb 2025 14:48:56 +0000
(15:48 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 22 Feb 2025 14:48:56 +0000
(15:48 +0100)
src/libgame/sdl.c
patch
|
blob
|
history
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index a8bdf9626e04cba7b9b1b19d99f9cfb474a6d4a6..aef0ea7e635cca676b04d73aa61427e6a1326616 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-1149,6
+1149,10
@@
void SDLBlitTexture(Bitmap *bitmap,
SDL_Rect src_rect;
SDL_Rect dst_rect;
+ // check renderer used to create textures
+ if (bitmap->renderer != sdl_renderer)
+ Warn("trying to blit textures with invalid renderer!");
+
texture =
(mask_mode == BLIT_MASKED ? bitmap->texture_masked : bitmap->texture);