Renderer backend fixes

Surface-to-surface blits were broken (would draw to screen instead),
and the SDLSurface backend wouldn't even compile.

You know, I thought I tested each backend when I made those changes
to the API...
This commit is contained in:
Clownacy 2019-08-11 05:22:02 +00:00
parent 3a10bf57cb
commit e094f2ff68
2 changed files with 4 additions and 4 deletions

View file

@ -130,7 +130,7 @@ static void BlitCommon(Backend_Surface *source_surface, const RECT *rect, Backen
void Backend_BlitToSurface(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y) void Backend_BlitToSurface(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y)
{ {
BlitCommon(source_surface, rect, &framebuffer, x, y, TRUE); BlitCommon(source_surface, rect, destination_surface, x, y, TRUE);
} }
void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, long x, long y, BOOL colour_key) void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, long x, long y, BOOL colour_key)
@ -151,7 +151,7 @@ void Backend_ColourFillToSurface(Backend_Surface *surface, const RECT *rect, uns
void Backend_ColourFillToScreen(const RECT *rect, unsigned char red, unsigned char green, unsigned char blue) void Backend_ColourFillToScreen(const RECT *rect, unsigned char red, unsigned char green, unsigned char blue)
{ {
Backend_ColourFill(&framebuffer, rect, red, green, blue); Backend_ColourFillToSurface(&framebuffer, rect, red, green, blue);
} }
void Backend_ScreenToSurface(Backend_Surface *surface, const RECT *rect) void Backend_ScreenToSurface(Backend_Surface *surface, const RECT *rect)
@ -248,7 +248,7 @@ void Backend_DrawGlyphToSurface(Backend_Surface *surface, Backend_Glyph *glyph,
void Backend_DrawGlyphToScreen(Backend_Glyph *glyph, long x, long y, const unsigned char *colours) void Backend_DrawGlyphToScreen(Backend_Glyph *glyph, long x, long y, const unsigned char *colours)
{ {
Backend_DrawGlyph(&framebuffer, glyph, x, y, colours); Backend_DrawGlyphToSurface(&framebuffer, glyph, x, y, colours);
} }
void Backend_HandleDeviceLoss(void) void Backend_HandleDeviceLoss(void)

View file

@ -200,7 +200,7 @@ static void BlitCommon(Backend_Surface *source_surface, const RECT *rect, Backen
void Backend_BlitToSurface(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y) void Backend_BlitToSurface(Backend_Surface *source_surface, const RECT *rect, Backend_Surface *destination_surface, long x, long y)
{ {
BlitCommon(source_surface, rect, &framebuffer, x, y, TRUE); BlitCommon(source_surface, rect, destination_surface, x, y, TRUE);
} }
void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, long x, long y, BOOL colour_key) void Backend_BlitToScreen(Backend_Surface *source_surface, const RECT *rect, long x, long y, BOOL colour_key)