Graphics: Expose "fixed_aspect_ratio" as attribute
This commit is contained in:
parent
85452bf2cf
commit
ea742be6b0
3 changed files with 20 additions and 0 deletions
|
@ -1024,6 +1024,20 @@ void Graphics::setShowCursor(bool value)
|
|||
p->threadData->ethread->requestShowCursor(value);
|
||||
}
|
||||
|
||||
bool Graphics::getFixedAspectRatio() const
|
||||
{
|
||||
// It's a bit hacky to expose config values as a Graphics
|
||||
// attribute, but there's really no point in state duplication
|
||||
return shState->config().fixedAspectRatio;
|
||||
}
|
||||
|
||||
void Graphics::setFixedAspectRatio(bool value)
|
||||
{
|
||||
shState->config().fixedAspectRatio = value;
|
||||
p->recalculateScreenSize(p->threadData);
|
||||
p->updateScreenResoRatio(p->threadData);
|
||||
}
|
||||
|
||||
Scene *Graphics::getScreen() const
|
||||
{
|
||||
return &p->screen;
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
DECL_ATTR( Fullscreen, bool )
|
||||
DECL_ATTR( ShowCursor, bool )
|
||||
|
||||
DECL_ATTR( FixedAspectRatio, bool )
|
||||
|
||||
/* <internal> */
|
||||
Scene *getScreen() const;
|
||||
/* Repaint screen with static image until exitCond
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue