diff options
| -rw-r--r-- | ext/ruby2d/ruby2d.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 7c17bac..6df2a20 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -167,26 +167,6 @@ static R_VAL ruby2d_ext_base_path(R_VAL self) { /* - * Ruby2D#self.ext_screenshot - */ -#if MRUBY -static R_VAL ruby2d_ext_screenshot(mrb_state* mrb, R_VAL self) { - mrb_value path; - mrb_get_args(mrb, "o", &path); -#else -static R_VAL ruby2d_ext_screenshot(R_VAL self, R_VAL path) { -#endif - if (window) { - S2D_Screenshot(window, RSTRING_PTR(path)); - return path; - } else { - S2D_Log(S2D_WARN, "Cannot take screenshot before window is shown"); - return R_FALSE; - } -} - - -/* * Ruby2D::Triangle#ext_render */ #if MRUBY @@ -1089,6 +1069,26 @@ static R_VAL ruby2d_window_ext_show(R_VAL self) { /* + * Ruby2D::Window#ext_screenshot + */ +#if MRUBY +static R_VAL ruby2d_ext_screenshot(mrb_state* mrb, R_VAL self) { + mrb_value path; + mrb_get_args(mrb, "o", &path); +#else +static R_VAL ruby2d_ext_screenshot(R_VAL self, R_VAL path) { +#endif + if (window) { + S2D_Screenshot(window, RSTRING_PTR(path)); + return path; + } else { + S2D_Log(S2D_WARN, "Cannot take screenshot before window is shown"); + return R_FALSE; + } +} + + +/* * Ruby2D::Window#ext_close */ static R_VAL ruby2d_window_ext_close() { |
