From 661ce215034605689faebd7b9f657e790f44eb11 Mon Sep 17 00:00:00 2001 From: ZakatTeamI2P Date: Mon, 30 Mar 2026 22:51:26 +0400 Subject: [PATCH] fjhgfoig --- binding-mri/filesystem-binding.cpp | 12 +++++------- src/eventthread.cpp | 2 +- src/settingsmenu.cpp | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/binding-mri/filesystem-binding.cpp b/binding-mri/filesystem-binding.cpp index 5433e67..4eb7c57 100644 --- a/binding-mri/filesystem-binding.cpp +++ b/binding-mri/filesystem-binding.cpp @@ -29,12 +29,10 @@ #include "ruby/intern.h" static void -fileIntFreeInstance(void *inst) -{ +fileIntFreeInstance(void *inst){ SDL_IOStream *ops = static_cast(inst); - SDL_RWclose(ops); - SDL_FreeRW(ops); + SDL_CloseIO(ops); } DEF_TYPE_CUSTOMFREE(FileInt, fileIntFreeInstance); @@ -50,7 +48,7 @@ fileIntForPath(const char *path, bool rubyExc) } catch (const Exception &e) { - SDL_FreeRW(ops); + SDL_CloseIO(ops); if (rubyExc) raiseRbExc(e); @@ -88,7 +86,7 @@ RB_METHOD(fileIntRead) VALUE data = rb_str_new(0, length); - SDL_RWread(ops, RSTRING_PTR(data), 1, length); + SDL_ReadIO(ops, RSTRING_PTR(data), length); return data; } @@ -98,7 +96,7 @@ RB_METHOD(fileIntClose) RB_UNUSED_PARAM; SDL_IOStream *ops = getPrivateData(self); - SDL_RWclose(ops); + SDL_CloseIO(ops); return Qnil; } diff --git a/src/eventthread.cpp b/src/eventthread.cpp index 914ce61..3329a2f 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -390,7 +390,7 @@ void EventThread::process(RGSSThreadData &rtData) break; case SDL_EVENT_GAMEPAD_AXIS_MOTION: - gcState.axes[event.caxis.axis] = event.caxis.value; + gcState.axes[event.gaxis.axis] = event.gaxis.value; break; case SDL_EVENT_GAMEPAD_ADDED: diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index e0a6da9..b5c8d10 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -744,14 +744,14 @@ struct SettingsMenuPrivate case SDL_EVENT_GAMEPAD_AXIS_MOTION: { - int v = event.caxis.value; + int v = event.gaxis.value; /* Only register if pushed halfway through */ if (v > -JAXIS_THRESHOLD && v < JAXIS_THRESHOLD) return true; desc.type = CAxis; - desc.d.ja.axis = event.caxis.axis; + desc.d.ja.axis = event.gaxis.axis; desc.d.ja.dir = v < 0 ? Negative : Positive; break; }