Skip to content

Commit 9b29ab1

Browse files
committed
remove locks on hw_screen
Signed-off-by: Vincent-FK <[email protected]>
1 parent f84f2fc commit 9b29ab1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

sal/linux/sal.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@ u32 sal_VideoInit(u32 bpp)
347347
//SDL_WM_SetCaption("Game", NULL);
348348

349349
// lock surface if needed
350-
if (SDL_MUSTLOCK(hw_screen))
350+
/*if (SDL_MUSTLOCK(hw_screen))
351351
{
352352
if (SDL_LockSurface(hw_screen) < 0)
353353
{
354354
sal_LastErrorSet("unable to lock surface");
355355
return SAL_ERROR;
356356
}
357-
}
357+
}*/
358358

359359
return SAL_OK;
360360
}
@@ -534,13 +534,15 @@ void SDL_Rotate_270_StandardSurfaces(){
534534

535535
void sal_VideoFlip(s32 vsync)
536536
{
537-
if (SDL_MUSTLOCK(hw_screen)) {
537+
/*if (SDL_MUSTLOCK(hw_screen)) {
538538
SDL_UnlockSurface(hw_screen);
539539
SDL_Flip(hw_screen);
540540
SDL_LockSurface(hw_screen);
541541
} else{
542542
SDL_Flip(hw_screen);
543-
}
543+
}*/
544+
545+
SDL_Flip(hw_screen);
544546

545547
/*if(SDL_GetVideoSurface()->flags & SDL_HWSURFACE ){
546548
printf("hard\n");
@@ -554,16 +556,16 @@ void sal_VideoFlip(s32 vsync)
554556

555557
void sal_VideoLock()
556558
{
557-
if (SDL_MUSTLOCK(hw_screen)) {
559+
/*if (SDL_MUSTLOCK(hw_screen)) {
558560
SDL_LockSurface(hw_screen);
559-
}
561+
}*/
560562
}
561563

562564
void sal_VideoUnlock()
563565
{
564-
if (SDL_MUSTLOCK(hw_screen)) {
566+
/*if (SDL_MUSTLOCK(hw_screen)) {
565567
SDL_UnlockSurface(hw_screen);
566-
}
568+
}*/
567569
}
568570

569571

0 commit comments

Comments
 (0)