mirror of https://github.com/PCSX2/pcsx2.git
Made the GSdx render switch thing a bit cleaner, moved it where it belongs
and changed the hotkey to F9. (Sure hope no plugin uses that yet :p ) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@698 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5d971b5931
commit
9a89523532
|
@ -50,6 +50,7 @@ PcsxConfig Config;
|
||||||
u32 BiosVersion;
|
u32 BiosVersion;
|
||||||
char CdromId[12];
|
char CdromId[12];
|
||||||
static int g_Pcsx2Recording = 0; // true 1 if recording video and sound
|
static int g_Pcsx2Recording = 0; // true 1 if recording video and sound
|
||||||
|
bool renderswitch = 0;
|
||||||
|
|
||||||
const char *LabelAuthors = { N_(
|
const char *LabelAuthors = { N_(
|
||||||
"PCSX2, a PS2 emulator\n\n"
|
"PCSX2, a PS2 emulator\n\n"
|
||||||
|
@ -650,7 +651,25 @@ void ProcessFKeys(int fkey, int shift)
|
||||||
case 8:
|
case 8:
|
||||||
GSmakeSnapshot( SNAPSHOTS_DIR "/" );
|
GSmakeSnapshot( SNAPSHOTS_DIR "/" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 9: //gsdx "on the fly" renderer switching
|
||||||
|
if (!renderswitch) {
|
||||||
|
StateRecovery::MakeGsOnly();
|
||||||
|
g_EmulationInProgress = false;
|
||||||
|
CloseGS();
|
||||||
|
renderswitch = true; //go to dx9 sw
|
||||||
|
StateRecovery::Recover();
|
||||||
|
HostGui::BeginExecution(); //also sets g_EmulationInProgress to true later
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StateRecovery::MakeGsOnly();
|
||||||
|
g_EmulationInProgress = false;
|
||||||
|
CloseGS();
|
||||||
|
renderswitch = false; //return to default renderer
|
||||||
|
StateRecovery::Recover();
|
||||||
|
HostGui::BeginExecution(); //also sets g_EmulationInProgress to true later
|
||||||
|
}
|
||||||
|
break;
|
||||||
#ifdef PCSX2_DEVBUILD
|
#ifdef PCSX2_DEVBUILD
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
|
|
|
@ -849,6 +849,21 @@ void ClosePlugins( bool closegs )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//used to close the GS plugin window and pads, to switch gsdx renderer
|
||||||
|
void CloseGS()
|
||||||
|
{
|
||||||
|
if( CHECK_MULTIGS ) mtgsWaitGS();
|
||||||
|
|
||||||
|
CLOSE_PLUGIN( PAD1 );
|
||||||
|
CLOSE_PLUGIN( PAD2 );
|
||||||
|
|
||||||
|
if( OpenStatus.GS )
|
||||||
|
{
|
||||||
|
gsClose();
|
||||||
|
OpenStatus.GS = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ReleasePlugins()
|
void ReleasePlugins()
|
||||||
{
|
{
|
||||||
if (!loadp) return;
|
if (!loadp) return;
|
||||||
|
|
|
@ -32,6 +32,7 @@ void ReleasePlugins();
|
||||||
|
|
||||||
int OpenPlugins(const char* pTitleFilename);
|
int OpenPlugins(const char* pTitleFilename);
|
||||||
void ClosePlugins( bool closegs );
|
void ClosePlugins( bool closegs );
|
||||||
|
void CloseGS();
|
||||||
|
|
||||||
int InitPlugins();
|
int InitPlugins();
|
||||||
void ShutdownPlugins();
|
void ShutdownPlugins();
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
static bool sinit = false;
|
static bool sinit = false;
|
||||||
bool UseGui = true;
|
bool UseGui = true;
|
||||||
bool nDisableSC = false; // screensaver
|
bool nDisableSC = false; // screensaver
|
||||||
bool renderswitch = 0;
|
|
||||||
|
|
||||||
|
|
||||||
// This instance is not modified by command line overrides so
|
// This instance is not modified by command line overrides so
|
||||||
// that command line plugins and stuff won't be saved into the
|
// that command line plugins and stuff won't be saved into the
|
||||||
|
@ -431,7 +429,7 @@ namespace HostGui
|
||||||
|
|
||||||
case VK_F1: case VK_F2: case VK_F3: case VK_F4:
|
case VK_F1: case VK_F2: case VK_F3: case VK_F4:
|
||||||
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
|
||||||
case VK_F9: case VK_F10: case VK_F12:
|
case VK_F9: case VK_F10: case VK_F11: case VK_F12:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ProcessFKeys(ev->key-VK_F1 + 1, shiftkey);
|
ProcessFKeys(ev->key-VK_F1 + 1, shiftkey);
|
||||||
|
@ -446,24 +444,6 @@ namespace HostGui
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VK_F11: //gsdx "on the fly" renderer switching
|
|
||||||
if (!renderswitch) {
|
|
||||||
StateRecovery::MakeGsOnly();
|
|
||||||
g_EmulationInProgress = false;
|
|
||||||
ClosePlugins( 1 );
|
|
||||||
renderswitch = true; //go to dx9 sw
|
|
||||||
StateRecovery::Recover();
|
|
||||||
HostGui::BeginExecution(); //also sets g_EmulationInProgress to true later
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
StateRecovery::MakeGsOnly();
|
|
||||||
g_EmulationInProgress = false;
|
|
||||||
ClosePlugins( 1 );
|
|
||||||
renderswitch = false; //return to default renderer
|
|
||||||
StateRecovery::Recover();
|
|
||||||
HostGui::BeginExecution(); //also sets g_EmulationInProgress to true later
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case VK_TAB:
|
case VK_TAB:
|
||||||
CycleFrameLimit(0);
|
CycleFrameLimit(0);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue