Smooth scaling Graphics option

This commit is contained in:
Mathew Velasquez 2016-12-07 23:53:14 -05:00
parent 9c03d0da02
commit a0ba40916d
4 changed files with 14 additions and 1 deletions

View file

@ -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);

View file

@ -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" );
}

View file

@ -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();

View file

@ -62,6 +62,7 @@ public:
/* Non-standard extension */
DECL_ATTR( Fullscreen, bool )
DECL_ATTR( ShowCursor, bool )
DECL_ATTR( Smooth, bool )
/* <internal> */
Scene *getScreen() const;