Skip to content

Commit

Permalink
remove hw_screen locks
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent-FK <[email protected]>
  • Loading branch information
Vincent-FK committed Nov 15, 2020
1 parent 066a50c commit bbaf674
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/plat_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ void plat_init(void)
exit(EXIT_FAILURE);
}

hw_screen = SDL_SetVideoMode(RES_HW_SCREEN_HORIZONTAL, RES_HW_SCREEN_VERTICAL, 16, SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF);
hw_screen = SDL_SetVideoMode(RES_HW_SCREEN_HORIZONTAL, RES_HW_SCREEN_VERTICAL,
16, SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF);
if(hw_screen == NULL)
{
printf("Error SDL_SetVideoMode: %s\n", SDL_GetError());
Expand Down Expand Up @@ -2014,9 +2015,9 @@ void *plat_gvideo_flip(void)
}
else {

if ( SDL_MUSTLOCK(hw_screen) ) {
/*if ( SDL_MUSTLOCK(hw_screen) ) {
SDL_UnlockSurface(hw_screen);
}
}*/

//printf("w:%d,h:%d\n", plat_sdl_screen->w, plat_sdl_screen->h);

Expand Down Expand Up @@ -2113,9 +2114,9 @@ void *plat_gvideo_flip(void)
/// Flip Display
SDL_Flip(hw_screen);

if ( SDL_MUSTLOCK(hw_screen) ) {
/*if ( SDL_MUSTLOCK(hw_screen) ) {
SDL_LockSurface(hw_screen);
}
}*/

return plat_sdl_screen->pixels;
}
Expand Down

0 comments on commit bbaf674

Please sign in to comment.