bool Resize(const int32 width, const int32 height, const bool centering) { const auto& state = Siv3DEngine::GetWindow()->getState(); if (state.fullScreen) { return false; } const s3d::Size newSize(width, height); bool result = true; if (state.clientSize != newSize) { result = Graphics::SetFullScreen(false, newSize, System::GetCurrentMonitorIndex()); } if (centering) { Centering(); } return result; }
void RageDisplay::ChangeCentering( int iTranslateX, int iTranslateY, int iAddWidth, int iAddHeight ) { g_CenteringStack.back() = Centering( iTranslateX, iTranslateY, iAddWidth, iAddHeight ); UpdateCentering(); }
PickVarInfo::Centering PickVarInfo::GetCentering() const { return Centering(centering); }
g_iVertsRenderedSinceLastCheck, g_iNumChecksSinceLastReset; static RageTimer g_LastFrameEndedAt( RageZeroTimer ); struct Centering { Centering( int iTranslateX = 0, int iTranslateY = 0, int iAddWidth = 0, int iAddHeight = 0 ): m_iTranslateX( iTranslateX ), m_iTranslateY( iTranslateY ), m_iAddWidth( iAddWidth ), m_iAddHeight( iAddHeight ) { } int m_iTranslateX, m_iTranslateY, m_iAddWidth, m_iAddHeight; }; static vector<Centering> g_CenteringStack( 1, Centering(0, 0, 0, 0) ); RageDisplay* DISPLAY = NULL; // global and accessible from anywhere in our program Preference<bool> LOG_FPS( "LogFPS", true ); Preference<float> g_fFrameLimitPercent( "FrameLimitPercent", 0.0f ); static const char *RagePixelFormatNames[] = { "RGBA8", "BGRA8", "RGBA4", "RGB5A1", "RGB5", "RGB8", "PAL", "BGR8",