mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-20 13:59:57 +00:00
Smooth scaling Graphics option
This commit is contained in:
parent
9c03d0da02
commit
a0ba40916d
4 changed files with 14 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ kernelLoadDataInt(const char *filename, bool rubyExc)
|
|||
|
||||
VALUE port = fileIntForPath(filename, rubyExc);
|
||||
|
||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("PureRubyMarshal"));
|
||||
|
||||
// FIXME need to catch exceptions here with begin rescue
|
||||
VALUE result = rb_funcall2(marsh, rb_intern("load"), 1, &port);
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ DEF_GRA_PROP_I(Brightness)
|
|||
|
||||
DEF_GRA_PROP_B(Fullscreen)
|
||||
DEF_GRA_PROP_B(ShowCursor)
|
||||
DEF_GRA_PROP_B(Smooth)
|
||||
|
||||
#define INIT_GRA_PROP_BIND(PropName, prop_name_s) \
|
||||
{ \
|
||||
|
|
@ -242,4 +243,5 @@ void graphicsBindingInit()
|
|||
|
||||
INIT_GRA_PROP_BIND( Fullscreen, "fullscreen" );
|
||||
INIT_GRA_PROP_BIND( ShowCursor, "show_cursor" );
|
||||
INIT_GRA_PROP_BIND( Smooth, "smooth" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1036,6 +1036,16 @@ void Graphics::setFullscreen(bool value)
|
|||
p->threadData->ethread->requestFullscreenMode(value);
|
||||
}
|
||||
|
||||
bool Graphics::getSmooth() const
|
||||
{
|
||||
return p->threadData->config.smoothScaling;
|
||||
}
|
||||
|
||||
void Graphics::setSmooth(bool value)
|
||||
{
|
||||
p->threadData->config.smoothScaling = value;
|
||||
}
|
||||
|
||||
bool Graphics::getShowCursor() const
|
||||
{
|
||||
return p->threadData->ethread->getShowCursor();
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ public:
|
|||
/* Non-standard extension */
|
||||
DECL_ATTR( Fullscreen, bool )
|
||||
DECL_ATTR( ShowCursor, bool )
|
||||
DECL_ATTR( Smooth, bool )
|
||||
|
||||
/* <internal> */
|
||||
Scene *getScreen() const;
|
||||
|
|
|
|||
Loading…
Reference in a new issue