mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-23 19:19:22 +01:00
fix screen flicker when going back to menu
This commit is contained in:
parent
f8caf2e9df
commit
36b33a261c
@ -3782,12 +3782,7 @@ MainMenu (int menu)
|
||||
gameScreenImg = new GuiImage(gameScreen);
|
||||
gameScreenImg->SetAlpha(192);
|
||||
gameScreenImg->ColorStripe(30);
|
||||
|
||||
if (GCSettings.render > 0 && !GCSettings.widescreen)
|
||||
gameScreenImg->SetScaleX(screenwidth/(vmode->fbWidth*0.8));
|
||||
else
|
||||
gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth);
|
||||
|
||||
gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth);
|
||||
gameScreenImg->SetScaleY(screenheight/(float)vmode->efbHeight);
|
||||
}
|
||||
else
|
||||
|
@ -569,6 +569,21 @@ InitGCVideo ()
|
||||
vheight = 100;
|
||||
}
|
||||
|
||||
void ResetFbWidth(int width, GXRModeObj *rmode)
|
||||
{
|
||||
if(rmode->fbWidth == width)
|
||||
return;
|
||||
|
||||
rmode->fbWidth = width;
|
||||
|
||||
if(rmode != vmode)
|
||||
return;
|
||||
|
||||
GX_InvVtxCache();
|
||||
VIDEO_Configure(rmode);
|
||||
VIDEO_Flush();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* ResetVideo_Emu
|
||||
*
|
||||
@ -617,12 +632,10 @@ ResetVideo_Emu ()
|
||||
{
|
||||
rmode = FindVideoMode();
|
||||
|
||||
if (!GCSettings.widescreen)
|
||||
{
|
||||
memcpy(&TV_Custom, rmode, sizeof(TV_Custom));
|
||||
rmode = &TV_Custom;
|
||||
rmode->fbWidth = 512;
|
||||
}
|
||||
if (GCSettings.widescreen)
|
||||
ResetFbWidth(640, rmode);
|
||||
else
|
||||
ResetFbWidth(512, rmode);
|
||||
|
||||
Settings.SoundInputRate = 31953;
|
||||
UpdatePlaybackRate();
|
||||
|
Loading…
Reference in New Issue
Block a user