Skip to content

Commit

Permalink
Ensure renderer is cleared before copying new frame to texture
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 19, 2021
1 parent 781486b commit a09334c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/osdep/amiberry_gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static int display_thread(void* unused)
}
vc_dispmanx_update_submit(updateHandle, nullptr, nullptr);
#else
SDL_RenderClear(sdl_renderer);
SDL_UpdateTexture(amiga_texture, nullptr, sdl_surface->pixels, sdl_surface->pitch);
SDL_RenderCopyEx(sdl_renderer, amiga_texture, nullptr, &renderQuad, amiberry_options.rotation_angle, nullptr, SDL_FLIP_NONE);
#endif
Expand Down Expand Up @@ -869,9 +870,6 @@ static void open_screen(struct uae_prefs* p)
current_vsync_frame = 2;
#else

SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 0xFF);
SDL_RenderClear(sdl_renderer);

int width, height;
if (mon->screen_is_picasso)
{
Expand Down Expand Up @@ -1604,6 +1602,7 @@ void show_screen(int monid, int mode)
else
{
flip_in_progess = true;
SDL_RenderClear(sdl_renderer);
SDL_UpdateTexture(amiga_texture, nullptr, sdl_surface->pixels, sdl_surface->pitch);
SDL_RenderCopyEx(sdl_renderer, amiga_texture, nullptr, &renderQuad, amiberry_options.rotation_angle, nullptr, SDL_FLIP_NONE);
SDL_RenderPresent(sdl_renderer);
Expand Down

0 comments on commit a09334c

Please # to comment.