fix black screenshot when returning to menu issue, variables cleanup

This commit is contained in:
dborth 2009-05-25 06:47:37 +00:00
parent f422631a79
commit b9258a7b0a
6 changed files with 17 additions and 13 deletions

View File

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

View File

@ -37,10 +37,8 @@
#include "video.h"
#include "audio.h"
extern u32 FrameTimer;
long long prev;
long long now;
static long long prev;
static long long now;
/*** Miscellaneous Functions ***/
void

View File

@ -58,6 +58,7 @@
#include "input.h"
static lwp_t mainthread = LWP_THREAD_NULL;
int ScreenshotRequested = 0;
int ConfigRequested = 0;
int ShutdownRequested = 0;
int ResetRequested = 0;
@ -65,11 +66,6 @@ int ExitRequested = 0;
char appPath[1024];
FreeTypeGX *fontSystem;
extern int FrameTimer;
extern long long prev;
extern unsigned int timediffallowed;
/****************************************************************************
* Shutdown / Reboot / Exit
***************************************************************************/
@ -190,8 +186,6 @@ void ipl_set_config(unsigned char c)
* setFrameTimerMethod()
* change frametimer method depending on whether ROM is NTSC or PAL
***************************************************************************/
extern u8 vmode_60hz;
int timerstyle;
void setFrameTimerMethod()
{
@ -283,7 +277,6 @@ emulate ()
if((GCSettings.render != 0 && videoReset == -1) || videoReset == 0)
{
FreeGfxMem();
TakeScreenshot();
ResetVideo_Menu();
ConfigRequested = 0;
GCSettings.render = currentMode;

View File

@ -94,10 +94,12 @@ struct SGCSettings{
void ExitApp();
void ShutdownWii();
extern struct SGCSettings GCSettings;
extern int ScreenshotRequested;
extern int ConfigRequested;
extern int ShutdownRequested;
extern int ExitRequested;
extern char appPath[];
extern FreeTypeGX *fontSystem;
extern int timerstyle;
#endif

View File

@ -67,6 +67,7 @@ u8 * gameScreenTex2 = NULL; // a GX texture screen capture of the game (copy)
u32 FrameTimer = 0;
u8 vmode_60hz = 0;
int timerstyle = 0;
bool progressive = 0;
#define HASPECT 320
@ -318,6 +319,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

@ -38,5 +38,8 @@ extern int screenwidth;
extern bool progressive;
extern u8 * gameScreenTex;
extern u8 * gameScreenTex2;
extern u32 FrameTimer;
extern u8 vmode_60hz;
extern int timerstyle;
#endif