mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
fjhgfoig
This commit is contained in:
parent
fa016d495b
commit
661ce21503
3 changed files with 8 additions and 10 deletions
|
|
@ -29,12 +29,10 @@
|
|||
#include "ruby/intern.h"
|
||||
|
||||
static void
|
||||
fileIntFreeInstance(void *inst)
|
||||
{
|
||||
fileIntFreeInstance(void *inst){
|
||||
SDL_IOStream *ops = static_cast<SDL_IOStream*>(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<SDL_IOStream>(self);
|
||||
SDL_RWclose(ops);
|
||||
SDL_CloseIO(ops);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue