Skip to content

Commit 604f9bd

Browse files
committed
add SDL_DOUBLEBUF to video init and remove locks for hw_screen
Signed-off-by: Vincent-FK <[email protected]>
1 parent 41e1cae commit 604f9bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sys/sdl/sdl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void vid_init()
204204
putenv(strdup("SDL_NOMOUSE=1"));
205205

206206
//flags = SDL_ANYFORMAT | SDL_HWPALETTE | SDL_HWSURFACE;
207-
flags = SDL_HWPALETTE | SDL_HWSURFACE;
207+
flags = SDL_HWPALETTE | SDL_HWSURFACE | SDL_DOUBLEBUF;
208208

209209
if (fullscreen)
210210
flags |= SDL_FULLSCREEN;
@@ -747,11 +747,11 @@ void vid_end()
747747

748748

749749
//If the surface must be locked
750-
if( SDL_MUSTLOCK( hw_screen ) )
750+
/*if( SDL_MUSTLOCK( hw_screen ) )
751751
{
752752
// Lock the surface
753753
SDL_LockSurface( hw_screen );
754-
}
754+
}*/
755755

756756
/* Clear screen if necessary */
757757
static ENUM_ASPECT_RATIOS_TYPES prev_aspect_ratio = NB_ASPECT_RATIOS_TYPES;
@@ -779,11 +779,11 @@ void vid_end()
779779
}
780780

781781
//If the surface must be unlocked
782-
if( SDL_MUSTLOCK( hw_screen ) )
782+
/*if( SDL_MUSTLOCK( hw_screen ) )
783783
{
784784
// Lock the surface
785785
SDL_UnlockSurface( hw_screen );
786-
}
786+
}*/
787787

788788
if (fb.enabled) vid_flip();
789789
}

0 commit comments

Comments
 (0)