Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-05-03 22:27:01 -03:00
39 changed files with 267 additions and 163 deletions
+2 -8
View File
@@ -270,10 +270,7 @@ Message *Event::convertJoystickEvent(const SDL_Event &e) const
arg1 = new Variant(JOYSTICK_JOYSTICK_ID, (void *) &proxy);
arg2 = new Variant((double)(e.jaxis.axis+1));
float value = e.jaxis.value / 32768.0f;
if (fabsf(value) < 0.001f) value = 0.0f;
if (value < -0.99f) value = -1.0f;
if (value > 0.99f) value = 1.0f;
float value = joystick::Joystick::clampval(e.jaxis.value / 32768.0f);
arg3 = new Variant((double) value);
msg = new Message("joystickaxis", arg1, arg2, arg3);
arg1->release();
@@ -332,10 +329,7 @@ Message *Event::convertJoystickEvent(const SDL_Event &e) const
arg1 = new Variant(JOYSTICK_JOYSTICK_ID, (void *) &proxy);
arg2 = new Variant(txt, strlen(txt));
float value = e.jaxis.value / 32768.0f;
if (fabsf(value) < 0.001f) value = 0.0f;
if (value < -0.99f) value = -1.0f;
if (value > 0.99f) value = 1.0f;
float value = joystick::Joystick::clampval(e.caxis.value / 32768.0f);
arg3 = new Variant((double) value);
msg = new Message("gamepadaxis", arg1, arg2, arg3);
arg1->release();
+1 -1
View File
@@ -80,7 +80,7 @@ private:
static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
}; // System
}; // Event
} // sdl
} // event