fix black screenshot when returning to menu issue

This commit is contained in:
dborth 2009-05-25 06:45:42 +00:00
parent 176c4c95bd
commit b9c609408e
4 changed files with 11 additions and 2 deletions

View File

@ -894,7 +894,7 @@ u32 GetJoy(int pad)
(DownUsbKeys[KB_ESC]) (DownUsbKeys[KB_ESC])
) )
{ {
ConfigRequested = 1; ScreenshotRequested = 1;
updateRumbleFrame(); updateRumbleFrame();
return 0; return 0;
} }

View File

@ -39,6 +39,7 @@
#include "wiiusbsupport.h" #include "wiiusbsupport.h"
extern int emulating; extern int emulating;
int ScreenshotRequested = 0;
int ConfigRequested = 0; int ConfigRequested = 0;
int ShutdownRequested = 0; int ShutdownRequested = 0;
int ResetRequested = 0; int ResetRequested = 0;
@ -290,7 +291,6 @@ int main(int argc, char *argv[])
if(ConfigRequested) if(ConfigRequested)
{ {
TakeScreenshot();
ResetVideo_Menu(); ResetVideo_Menu();
break; // leave emulation loop break; // leave emulation loop
} }

View File

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

View File

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