diff options
| author | Tom Black <[email protected]> | 2019-01-06 01:09:34 -0800 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2019-01-06 01:09:34 -0800 |
| commit | d39551a9f72acc928f7886956d8a3e5adedda181 (patch) | |
| tree | ea9696c8c247742380979a78f5e9893f475e803a /ext | |
| parent | 5f7f348ffece2c80663c0f1a002ea25fb0979076 (diff) | |
| download | ruby2d-d39551a9f72acc928f7886956d8a3e5adedda181.tar.gz ruby2d-d39551a9f72acc928f7886956d8a3e5adedda181.zip | |
Move `ext_screenshot` to the right place in the file
Diffstat (limited to 'ext')
| -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() { |
