sdl: Get_Screen_pixel_ptr() improve debug log...

This commit is contained in:
Thomas Bernard 2019-01-04 23:24:53 +01:00
parent 5a4ae06720
commit d556df556d
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -99,7 +99,7 @@ byte* Get_Screen_pixel_ptr(int x, int y)
{ {
if (y < 0 || x < 0 || y >= Screen_SDL->h || x >= Screen_SDL->w) if (y < 0 || x < 0 || y >= Screen_SDL->h || x >= Screen_SDL->w)
{ {
Warning("Get_Screen_pixel_ptr() coordinates out of bound"); GFX2_Log(GFX2_WARNING, "Get_Screen_pixel_ptr(%d, %d): coordinates out of bound\n", x, y);
return NULL; return NULL;
} }
return (byte *)Screen_SDL->pixels + x + y*(Screen_SDL->pitch); return (byte *)Screen_SDL->pixels + x + y*(Screen_SDL->pitch);