mirror of
https://github.com/dborth/fceugx.git
synced 2025-02-10 13:58:49 +01:00
fix screen flicker when going back to menu
This commit is contained in:
parent
47badafe67
commit
01aea34ca5
@ -190,8 +190,6 @@ static GXRModeObj NTSC_240p =
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TV_Custom;
|
||||
|
||||
/* TV Modes table */
|
||||
static GXRModeObj *tvmodes[2] = {
|
||||
&NTSC_240p, &PAL_240p
|
||||
@ -607,6 +605,21 @@ InitGCVideo ()
|
||||
GX_SetCullMode (GX_CULL_NONE);
|
||||
}
|
||||
|
||||
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
|
||||
*
|
||||
@ -630,12 +643,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);
|
||||
|
||||
UpdateSampleRate(48130);
|
||||
SetSampleRate();
|
||||
|
@ -3810,12 +3810,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->SetScaleY(screenheight/(float)vmode->efbHeight);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user