Advertisement
Ancurio

set_window_size.patch

Jul 6th, 2015
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.81 KB | None | 0 0
  1. diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp
  2. index 5cb518e..bebcf59 100644
  3. --- a/binding-mri/binding-mri.cpp
  4. +++ b/binding-mri/binding-mri.cpp
  5. @@ -75,6 +75,18 @@ void graphicsBindingInit();
  6.  
  7.  void fileIntBindingInit();
  8.  
  9. +RB_METHOD(mkxpSetWindowSize)
  10. +{
  11. +   RB_UNUSED_PARAM;
  12. +
  13. +   int w, h;
  14. +   rb_get_args(argc, argv, "ii", &w, &h RB_ARG_END);
  15. +
  16. +   SDL_SetWindowSize(shState->sdlWindow(), w, h);
  17. +
  18. +   return Qnil;
  19. +}
  20. +
  21.  RB_METHOD(mriPrint);
  22.  RB_METHOD(mriP);
  23.  RB_METHOD(mkxpDataDirectory);
  24. @@ -145,6 +157,8 @@ static void mriBindingInit()
  25.     _rb_define_module_function(mod, "puts", mkxpPuts);
  26.     _rb_define_module_function(mod, "raw_key_states", mkxpRawKeyStates);
  27.  
  28. +   _rb_define_module_function(mod, "set_window_size", mkxpSetWindowSize);
  29. +
  30.     rb_gv_set("MKXP", Qtrue);
  31.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement