Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Electronicks committed Jun 2, 2021
1 parent 239372f commit c6fe645
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Jibb added the new GYRO_SPACE setting for more one-size-fits-all gyro aiming. De
* GYRO_SPACE can be set to LOCAL (default), WORLD_TURN (recommended), or WORLD_LEAN.
* AUTO_CALIBRATE_GYRO can be set to ON to activate automatic calibration, which will try and detect when the controller is held still or put down and recalibrate automatically.

### Bugfixes

* Fixed crash when SDL ignores a connected controller
* Fixed crash when ZRF gets pressed

## 3.1.1

Fix linux build (Thanks TauAkiou)
Expand Down
68 changes: 34 additions & 34 deletions JoyShockMapper/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <cuchar>

#ifdef _WIN32
#include <shellapi.h>
#include <shellapi.h>
#else
#define UCHAR unsigned char
#define UCHAR unsigned char
#endif

#pragma warning(disable : 4996) // Disable deprecated API warnings
Expand Down Expand Up @@ -164,14 +164,14 @@ class TouchStick
};

KeyCode::KeyCode()
: code()
, name()
: code()
, name()
{
}

KeyCode::KeyCode(in_string keyName)
: code(nameToKey(keyName))
, name()
: code(nameToKey(keyName))
, name()
{
if (code == COMMAND_ACTION)
name = keyName.substr(1, keyName.size() - 2); // Remove opening and closing quotation marks
Expand Down Expand Up @@ -240,7 +240,7 @@ class ScrollAxis
float pressedTime = 0;
if (_pressedBtn == _negativeButton->_id)
{
GetDuration dur{ now };
GetDuration dur{ now };
pressedTime = _negativeButton->sendEvent(dur).out_duration;
if (pressedTime < MAGIC_TAP_DURATION)
{
Expand All @@ -251,8 +251,8 @@ class ScrollAxis
}
else // _pressedBtn == _positiveButton->_id
{
GetDuration dur{ now };
pressedTime = _positiveButton->sendEvent(dur).out_duration;
GetDuration dur{ now };
pressedTime = _positiveButton->sendEvent(dur).out_duration;
if (pressedTime < MAGIC_TAP_DURATION)
{
_negativeButton->sendEvent(isReleased);
Expand Down Expand Up @@ -1121,7 +1121,7 @@ class JoyShock
}
else
{
GetDuration dur{ time_now };
GetDuration dur{ time_now };
if (buttons[int(softIndex)].sendEvent(dur).out_duration >= getSetting(SettingID::TRIGGER_SKIP_DELAY))
{
if (mode == TriggerMode::MUST_SKIP)
Expand Down Expand Up @@ -1153,7 +1153,7 @@ class JoyShock
}
else
{
GetDuration dur{ time_now };
GetDuration dur{ time_now };
if (buttons[int(softIndex)].sendEvent(dur).out_duration >= getSetting(SettingID::TRIGGER_SKIP_DELAY))
{
if (mode == TriggerMode::MUST_SKIP_R)
Expand Down Expand Up @@ -2155,30 +2155,30 @@ void TouchCallback(int jcHandle, TOUCH_STATE newState, TOUCH_STATE prevState, fl
else if (mode == TouchpadMode::MOUSE)
{
// Disable gestures
/*if (point0.isDown() && point1.isDown())
{*/
//if (js->prevTouchState.t0Down && js->prevTouchState.t1Down)
//if (point0.isDown() && point1.isDown())
//{
// float x = fabsf(newState.t0X - newState.t1X);
// float y = fabsf(newState.t0Y - newState.t1Y);
// float angle = atan2f(y, x) / PI * 360;
// float dist = sqrt(x * x + y * y);
// x = fabsf(js->prevTouchState.t0X - js->prevTouchState.t1X);
// y = fabsf(js->prevTouchState.t0Y - js->prevTouchState.t1Y);
// float oldAngle = atan2f(y, x) / PI * 360;
// float oldDist = sqrt(x * x + y * y);
// if (angle != oldAngle)
// DEBUG_LOG << "Angle went from " << oldAngle << " degrees to " << angle << " degress. Diff is " << angle - oldAngle << " degrees. ";
// js->touch_scroll_x.ProcessScroll(angle - oldAngle, js->getSetting<FloatXY>(SettingID::SCROLL_SENS).x(), js->time_now);
// if (dist != oldDist)
// DEBUG_LOG << "Dist went from " << oldDist << " points to " << dist << " points. Diff is " << dist - oldDist << " points. ";
// js->touch_scroll_y.ProcessScroll(dist - oldDist, js->getSetting<FloatXY>(SettingID::SCROLL_SENS).y(), js->time_now);
//}
//else
//{
// js->touch_scroll_x.Reset(js->time_now);
// js->touch_scroll_y.Reset(js->time_now);
//}
//if (js->prevTouchState.t0Down && js->prevTouchState.t1Down)
//{
// float x = fabsf(newState.t0X - newState.t1X);
// float y = fabsf(newState.t0Y - newState.t1Y);
// float angle = atan2f(y, x) / PI * 360;
// float dist = sqrt(x * x + y * y);
// x = fabsf(js->prevTouchState.t0X - js->prevTouchState.t1X);
// y = fabsf(js->prevTouchState.t0Y - js->prevTouchState.t1Y);
// float oldAngle = atan2f(y, x) / PI * 360;
// float oldDist = sqrt(x * x + y * y);
// if (angle != oldAngle)
// DEBUG_LOG << "Angle went from " << oldAngle << " degrees to " << angle << " degress. Diff is " << angle - oldAngle << " degrees. ";
// js->touch_scroll_x.ProcessScroll(angle - oldAngle, js->getSetting<FloatXY>(SettingID::SCROLL_SENS).x(), js->time_now);
// if (dist != oldDist)
// DEBUG_LOG << "Dist went from " << oldDist << " points to " << dist << " points. Diff is " << dist - oldDist << " points. ";
// js->touch_scroll_y.ProcessScroll(dist - oldDist, js->getSetting<FloatXY>(SettingID::SCROLL_SENS).y(), js->time_now);
//}
//else
//{
// js->touch_scroll_x.Reset(js->time_now);
// js->touch_scroll_y.Reset(js->time_now);
//}
//}
//else
//{
Expand Down

0 comments on commit c6fe645

Please sign in to comment.