fix black screenshot when returning to menu issue

This commit is contained in:
dborth 2009-05-25 06:48:28 +00:00
parent 76ef486a07
commit c63dd08461
4 changed files with 11 additions and 3 deletions

View File

@ -55,9 +55,10 @@ static uint8 *xbsave=NULL;
static int fskipc = 0;
static int videoReset = 0;
static int currentMode = 0;
static int ResetRequested = 0;
int ScreenshotRequested = 0;
int ConfigRequested = 0;
int ShutdownRequested = 0;
int ResetRequested = 0;
int ExitRequested = 0;
char appPath[1024];
FreeTypeGX *fontSystem;
@ -341,7 +342,6 @@ int main(int argc, char *argv[])
{
if((GCSettings.render != 0 && videoReset == -1) || videoReset == 0)
{
TakeScreenshot();
ResetVideo_Menu();
ConfigRequested = 0;
GCSettings.render = currentMode;

View File

@ -89,6 +89,7 @@ struct SGCSettings{
void ExitApp();
void ShutdownWii();
extern struct SGCSettings GCSettings;
extern int ScreenshotRequested;
extern int ConfigRequested;
extern int ShutdownRequested;
extern int ExitRequested;

View File

@ -279,6 +279,13 @@ copy_to_xfb (u32 arg)
{
if (copynow == GX_TRUE)
{
if(ScreenshotRequested)
{
TakeScreenshot();
ScreenshotRequested = 0;
ConfigRequested = 1;
}
GX_CopyDisp (xfb[whichfb], GX_TRUE);
GX_Flush ();
copynow = GX_FALSE;

View File

@ -586,7 +586,7 @@ void GetJoy()
(userInput[i].wpad.btns_h & WPAD_CLASSIC_BUTTON_HOME)
)
{
ConfigRequested = 1; // go to the menu
ScreenshotRequested = 1; // go to the menu
}
}