diff --git a/binding/filesystem-binding.cpp b/binding/filesystem-binding.cpp index 6362165f..a114909d 100644 --- a/binding/filesystem-binding.cpp +++ b/binding/filesystem-binding.cpp @@ -34,7 +34,7 @@ #include "intern.h" #endif -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 #include #endif @@ -74,7 +74,7 @@ static VALUE fileIntForPath(const char *path, bool rubyExc) { return obj; } -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 typedef struct { SDL_RWops *ops; void *dst; @@ -114,13 +114,13 @@ RB_METHOD(fileIntRead) { -#if RAPI_MAJOR > 2 +#if RAPI_MAJOR >= 2 fileIntReadCbArgs cbargs {ops, RSTRING_PTR(data), length}; rb_thread_call_without_gvl([](void* args) -> void* { call_RWread_cb((fileIntReadCbArgs*)args); return 0; }, (void*)&cbargs, 0, 0); -#elif +#else SDL_RWread(ops, RSTRING_PTR(data), 1, length); #endif