I think this may already be addressed in SDL 3.4.0, since you added a new SDL_SCALEMODE_PIXELART. When I change the palette of a pixel art surface that I convert to a texture, in this case a font with an opaque background, based on the colors both the top y and bottom y coordinate of the tiles rendered will change by one pixel. The x coordinates don’t change at all. I think this probably has to do with how SDL_SCALEMODE_NEAREST works. I have my renderer set to 320 by 320 pixels with integer scaling.
Here’s a sample of the function used to render the font, in case my code is the problem:
void testprint( const char *teststring, float printx, float printy )
{
int charcount = 0;
srcrect.x = 0;
srcrect.y = 0;
srcrect.w = 10;
srcrect.h = 20;
dstrect.x = printx;
dstrect.y = printy;
dstrect.w = 10;
dstrect.h = 20;
while ( teststring[charcount] != 0 )
{
srcrect.x = SDL_truncf(teststring[charcount] % 16 * 10);
srcrect.y = SDL_truncf(teststring[charcount] / 16 * 20 - 40);
dstrect.x = SDL_truncf(printx + charcount * 10);
SDL_RenderTexture( renderer, jfontt, &srcrect, &dstrect );
charcount++;
}
}