allow save screenshot on eval screen with MenuLeft-MenuRight-Start

This commit is contained in:
Chris Danford
2004-02-12 09:44:16 +00:00
parent e7cb8353cc
commit 646f67a3d2
11 changed files with 62 additions and 26 deletions
+26
View File
@@ -33,6 +33,9 @@
#include "song.h"
#include "StageStats.h"
#include "Grade.h"
#include "CodeDetector.h"
#include "RageDisplay.h"
#include "StepMania.h"
const int NUM_SCORE_DIGITS = 9;
@@ -139,6 +142,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
m_bFailed = false; // the evaluation is not showing failed results by default
ZERO( m_bSavedScreenshot );
m_sName = sClassName;
if( !TYPE.CompareNoCase("stage") )
m_Type = stage;
@@ -1304,6 +1310,26 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t
if( m_Menu.IsTransitioning() )
return;
if( GameI.IsValid() )
{
PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller );
if( CodeDetector::EnteredCode(GameI.controller, CodeDetector::CODE_SAVE_SCREENSHOT) )
{
if( !m_bSavedScreenshot[pn] && // only allow one screenshot
PROFILEMAN->IsUsingProfile(pn) )
{
/* XXX: What's the difference between this and StyleI.player? */
/* StyleI won't be valid if it's a menu button that's pressed.
* There's got to be a better way of doing this. -Chris */
CString sDir = PROFILEMAN->GetProfileDir((ProfileSlot)pn);
SaveScreenshot( sDir );
m_bSavedScreenshot[pn] = true;
return; // handled
}
}
}
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
}