Fix SGB support in SDL’s software rendering. Fixes #208

This commit is contained in:
Lior Halphon 2019-10-17 21:21:10 +03:00
parent dee29c118c
commit 7d6cdf3819
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ void render_texture(void *pixels, void *previous)
{
if (renderer) {
if (pixels) {
SDL_UpdateTexture(texture, NULL, pixels, 160 * sizeof (uint32_t));
SDL_UpdateTexture(texture, NULL, pixels, GB_get_screen_width(&gb) * sizeof (uint32_t));
}
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, texture, NULL, NULL);