diff --git a/binding/audio-binding.cpp b/binding/audio-binding.cpp index 59919ad7..00217423 100644 --- a/binding/audio-binding.cpp +++ b/binding/audio-binding.cpp @@ -32,10 +32,7 @@ int volume = 100; \ int pitch = 100; \ double pos = 0.0; \ - if (rgssVer >= 3) \ - rb_get_args(argc, argv, "z|iif", &filename, &volume, &pitch, &pos RB_ARG_END); \ - else \ - rb_get_args(argc, argv, "z|ii", &filename, &volume, &pitch RB_ARG_END); \ + rb_get_args(argc, argv, "z|iif", &filename, &volume, &pitch, &pos RB_ARG_END); \ GUARD_EXC( shState->audio().entity##Play(filename, volume, pitch, pos); ) \ return Qnil; \ } \ diff --git a/binding/graphics-binding.cpp b/binding/graphics-binding.cpp index 235b275b..de2c6e67 100644 --- a/binding/graphics-binding.cpp +++ b/binding/graphics-binding.cpp @@ -265,9 +265,6 @@ void graphicsBindingInit() INIT_GRA_PROP_BIND( FrameRate, "frame_rate" ); INIT_GRA_PROP_BIND( FrameCount, "frame_count" ); - // Typically, these functions are only used in RGSS2+, but - // Essentials really wants them badly - _rb_define_module_function(module, "width", graphicsWidth); _rb_define_module_function(module, "height", graphicsHeight); _rb_define_module_function(module, "wait", graphicsWait); diff --git a/meson.build b/meson.build index e7032af9..6f315745 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,7 @@ project('mkxp-z', 'cpp', 'c', version: '1.0', default_options: ['cpp_std=c++11']) +minimum_macos_version = '10.10' + # The meson build is mostly directly copied from the old CMakeLists, # it still needs to be cleaned up @@ -41,6 +43,9 @@ elif host_system == 'darwin' subdir('macos') if compiler.get_id() == 'clang' add_project_arguments('-stdlib=libc++', language: 'cpp') + add_project_arguments('-mmacosx-version-min='+minimum_macos_version, language: 'cpp') + add_project_arguments('-mmacosx-version-min='+minimum_macos_version, language: 'c') + add_project_link_arguments('-mmacosx-version-min='+minimum_macos_version, language: 'cpp') endif endif diff --git a/src/graphics.cpp b/src/graphics.cpp index 5bfc8c04..b4acc81c 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -934,9 +934,6 @@ int Graphics::height() const void Graphics::resizeScreen(int width, int height) { - // Commented out to allow SpriteResizer to - // resize the screen as much as it likes - //width = clamp(width, 1, 640); //height = clamp(height, 1, 480); @@ -955,6 +952,15 @@ void Graphics::resizeScreen(int width, int height) p->screenQuad.setTexPosRect(screenRect, screenRect); shState->eThread().requestWindowResize(width, height); + + int cur_sz = p->scSize.x; + + // Give things a little time to recalculate before continuing + for (int i = 0; i < p->frameRate; i++) + { + if (cur_sz != p->scSize.x) break; + update(); + } } void Graphics::playMovie(const char *filename)