mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-30 14:34:22 +01:00
fix black screenshot when returning to menu issue, variables cleanup
This commit is contained in:
parent
f422631a79
commit
b9258a7b0a
@ -582,7 +582,7 @@ void NGCReportButtons ()
|
|||||||
(userInput[i].wpad.btns_h & WPAD_CLASSIC_BUTTON_HOME)
|
(userInput[i].wpad.btns_h & WPAD_CLASSIC_BUTTON_HOME)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ConfigRequested = 1; // go to the menu
|
ScreenshotRequested = 1; // go to the menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,10 +37,8 @@
|
|||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
|
||||||
extern u32 FrameTimer;
|
static long long prev;
|
||||||
|
static long long now;
|
||||||
long long prev;
|
|
||||||
long long now;
|
|
||||||
|
|
||||||
/*** Miscellaneous Functions ***/
|
/*** Miscellaneous Functions ***/
|
||||||
void
|
void
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
static lwp_t mainthread = LWP_THREAD_NULL;
|
static lwp_t mainthread = LWP_THREAD_NULL;
|
||||||
|
int ScreenshotRequested = 0;
|
||||||
int ConfigRequested = 0;
|
int ConfigRequested = 0;
|
||||||
int ShutdownRequested = 0;
|
int ShutdownRequested = 0;
|
||||||
int ResetRequested = 0;
|
int ResetRequested = 0;
|
||||||
@ -65,11 +66,6 @@ int ExitRequested = 0;
|
|||||||
char appPath[1024];
|
char appPath[1024];
|
||||||
FreeTypeGX *fontSystem;
|
FreeTypeGX *fontSystem;
|
||||||
|
|
||||||
extern int FrameTimer;
|
|
||||||
|
|
||||||
extern long long prev;
|
|
||||||
extern unsigned int timediffallowed;
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Shutdown / Reboot / Exit
|
* Shutdown / Reboot / Exit
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -190,8 +186,6 @@ void ipl_set_config(unsigned char c)
|
|||||||
* setFrameTimerMethod()
|
* setFrameTimerMethod()
|
||||||
* change frametimer method depending on whether ROM is NTSC or PAL
|
* change frametimer method depending on whether ROM is NTSC or PAL
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
extern u8 vmode_60hz;
|
|
||||||
int timerstyle;
|
|
||||||
|
|
||||||
void setFrameTimerMethod()
|
void setFrameTimerMethod()
|
||||||
{
|
{
|
||||||
@ -283,7 +277,6 @@ emulate ()
|
|||||||
if((GCSettings.render != 0 && videoReset == -1) || videoReset == 0)
|
if((GCSettings.render != 0 && videoReset == -1) || videoReset == 0)
|
||||||
{
|
{
|
||||||
FreeGfxMem();
|
FreeGfxMem();
|
||||||
TakeScreenshot();
|
|
||||||
ResetVideo_Menu();
|
ResetVideo_Menu();
|
||||||
ConfigRequested = 0;
|
ConfigRequested = 0;
|
||||||
GCSettings.render = currentMode;
|
GCSettings.render = currentMode;
|
||||||
|
@ -94,10 +94,12 @@ 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;
|
||||||
extern char appPath[];
|
extern char appPath[];
|
||||||
extern FreeTypeGX *fontSystem;
|
extern FreeTypeGX *fontSystem;
|
||||||
|
extern int timerstyle;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,6 +67,7 @@ u8 * gameScreenTex2 = NULL; // a GX texture screen capture of the game (copy)
|
|||||||
u32 FrameTimer = 0;
|
u32 FrameTimer = 0;
|
||||||
|
|
||||||
u8 vmode_60hz = 0;
|
u8 vmode_60hz = 0;
|
||||||
|
int timerstyle = 0;
|
||||||
bool progressive = 0;
|
bool progressive = 0;
|
||||||
|
|
||||||
#define HASPECT 320
|
#define HASPECT 320
|
||||||
@ -318,6 +319,13 @@ 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;
|
||||||
|
@ -38,5 +38,8 @@ extern int screenwidth;
|
|||||||
extern bool progressive;
|
extern bool progressive;
|
||||||
extern u8 * gameScreenTex;
|
extern u8 * gameScreenTex;
|
||||||
extern u8 * gameScreenTex2;
|
extern u8 * gameScreenTex2;
|
||||||
|
extern u32 FrameTimer;
|
||||||
|
extern u8 vmode_60hz;
|
||||||
|
extern int timerstyle;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user