allow save screenshot on eval screen with MenuLeft-MenuRight-Start
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user