mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-23 15:23:44 +02:00
Add MKXP.platform
This commit is contained in:
parent
6a563ba31c
commit
eadb093b12
1 changed files with 9 additions and 0 deletions
|
@ -94,6 +94,7 @@ RB_METHOD(mkxpDataDirectory);
|
|||
RB_METHOD(mkxpPuts);
|
||||
RB_METHOD(mkxpRawKeyStates);
|
||||
RB_METHOD(mkxpMouseInWindow);
|
||||
RB_METHOD(mkxpPlatform);
|
||||
|
||||
RB_METHOD(mriRgssMain);
|
||||
RB_METHOD(mriRgssStop);
|
||||
|
@ -163,6 +164,7 @@ static void mriBindingInit()
|
|||
_rb_define_module_function(mod, "puts", mkxpPuts);
|
||||
_rb_define_module_function(mod, "raw_key_states", mkxpRawKeyStates);
|
||||
_rb_define_module_function(mod, "mouse_in_window", mkxpMouseInWindow);
|
||||
_rb_define_module_function(mod, "platform", mkxpPlatform);
|
||||
|
||||
/* Load global constants */
|
||||
rb_gv_set("MKXP", Qtrue);
|
||||
|
@ -257,6 +259,13 @@ RB_METHOD(mkxpMouseInWindow)
|
|||
return rb_bool_new(EventThread::mouseState.inWindow);
|
||||
}
|
||||
|
||||
RB_METHOD(mkxpPlatform)
|
||||
{
|
||||
RB_UNUSED_PARAM;
|
||||
|
||||
return rb_str_new_cstr(SDL_GetPlatform());
|
||||
}
|
||||
|
||||
static VALUE rgssMainCb(VALUE block)
|
||||
{
|
||||
rb_funcall2(block, rb_intern("call"), 0, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue