Couple of fixes

- Ensure diagonal movement is not faster than in a straight line
- Ensure config file saves on exit
This commit is contained in:
Simon 2023-01-18 20:35:55 +00:00
parent f0843f9508
commit c67d34354c
3 changed files with 11 additions and 7 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.quakequest" package="com.drbeef.quakequest"
android:versionCode="21" android:versionCode="22"
android:versionName="1.5.2" android:versionName="1.5.3"
android:installLocation="auto" > android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. --> <!-- Tell the system this app requires OpenGL ES 3.1. -->

View file

@ -310,6 +310,9 @@ void * AppThreadFunction(void * parm ) {
} }
{ {
//Ensure all exit stuff happens
Host_Shutdown();
TBXR_LeaveVR(); TBXR_LeaveVR();
//Ask Java to shut down //Ask Java to shut down
VR_Shutdown(); VR_Shutdown();
@ -570,14 +573,14 @@ float nonLinearFilter(float in)
float val = 0.0f; float val = 0.0f;
if (in > NLF_DEADZONE) if (in > NLF_DEADZONE)
{ {
val = in; val = in > 1.0f ? 1.0f : in;
val -= NLF_DEADZONE; val -= NLF_DEADZONE;
val /= (1.0f - NLF_DEADZONE); val /= (1.0f - NLF_DEADZONE);
val = powf(val, NLF_POWER); val = powf(val, NLF_POWER);
} }
else if (in < -NLF_DEADZONE) else if (in < -NLF_DEADZONE)
{ {
val = in; val = in < -1.0f ? -1.0f : in;
val += NLF_DEADZONE; val += NLF_DEADZONE;
val /= (1.0f - NLF_DEADZONE); val /= (1.0f - NLF_DEADZONE);
val = -powf(fabsf(val), NLF_POWER); val = -powf(fabsf(val), NLF_POWER);
@ -931,8 +934,9 @@ static void HandleInput_Default( )
//and we don't get movement jitter when the joystick doesn't quite center properly //and we don't get movement jitter when the joystick doesn't quite center properly
float dist = length(leftTrackedRemoteState_new.Joystick.x, leftTrackedRemoteState_new.Joystick.y); float dist = length(leftTrackedRemoteState_new.Joystick.x, leftTrackedRemoteState_new.Joystick.y);
float nlf = nonLinearFilter(dist); float nlf = nonLinearFilter(dist);
float x = nlf * leftTrackedRemoteState_new.Joystick.x; dist = (dist > 1.0f) ? dist : 1.0f;
float y = nlf * leftTrackedRemoteState_new.Joystick.y; float x = nlf * (leftTrackedRemoteState_new.Joystick.x / dist);
float y = nlf * (leftTrackedRemoteState_new.Joystick.y / dist);
//Adjust to be off-hand controller oriented //Adjust to be off-hand controller oriented
vec2_t v; vec2_t v;

View file

@ -3597,7 +3597,7 @@ static void M_Credits_Draw (void)
" QQQQQQQQ QQQQQQQQ ", " QQQQQQQQ QQQQQQQQ ",
" QQQ QQQ ", " QQQ QQQ ",
" Q Q ", " Q Q ",
" Q Q v1.5.2"); " Q Q v1.5.3");
int i, l, linelength, firstline, lastline, lines; int i, l, linelength, firstline, lastline, lines;
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++) for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)