forked from Ports/perfect_dark
Mouse Sensitivity follows Quake/id Tech mouse sens
this changes mouse sensitiivity scale to mirror id Tech's Mouse Sensitivity Scale. This also makes it easier for Steam Input users (Steam Deck and Steam Controller) to use Gyro To Mouse/Flick Stick's Natural Sensitivity Scale
This commit is contained in:
1 parent
0ac5fdd5c3
commit
053f7dc8a5
2 files changed
+8
-8
No files matched your search
+6
-6
@@ -88,8 +88,8 @@ static s32 mouseLockMode = MLOCK_AUTO;
|
||||
static u64 mouseCursorTime = 0;
|
||||
static s32 mouseShowCursor = 1;
|
||||
|
||||
static f32 mouseSensX = 1.5f;
|
||||
static f32 mouseSensY = 1.5f;
|
||||
static f32 mouseSensX = 2.5f;
|
||||
static f32 mouseSensY = 2.5f;
|
||||
|
||||
static s32 lastKey = 0;
|
||||
static char lastChar = 0;
|
||||
@@ -1243,8 +1243,8 @@ void inputMouseGetScaledDelta(f32 *dx, f32 *dy)
|
||||
{
|
||||
f32 mdx, mdy;
|
||||
if (mouseLocked) {
|
||||
mdx = mouseSensX * (f32)mouseDX / 100.0f;
|
||||
mdy = mouseSensY * (f32)mouseDY / 100.0f;
|
||||
mdx = mouseSensX * (f32)mouseDX / 159.2f;
|
||||
mdy = mouseSensY * (f32)mouseDY / 159.2f;
|
||||
} else {
|
||||
mdx = 0.f;
|
||||
mdy = 0.f;
|
||||
@@ -1257,8 +1257,8 @@ void inputMouseGetAbsScaledDelta(f32 *dx, f32 *dy)
|
||||
{
|
||||
f32 mdx, mdy;
|
||||
if (mouseLocked) {
|
||||
mdx = fabsf(mouseSensX) * (f32)mouseDX / 100.0f;
|
||||
mdy = fabsf(mouseSensY) * (f32)mouseDY / 100.0f;
|
||||
mdx = fabsf(mouseSensX) * (f32)mouseDX / 159.2f;
|
||||
mdy = fabsf(mouseSensY) * (f32)mouseDY / 159.2f;
|
||||
} else {
|
||||
mdx = 0.f;
|
||||
mdy = 0.f;
|
||||
|
||||
+2
-2
@@ -3674,8 +3674,8 @@ void playerTick(bool arg0)
|
||||
if (g_Vars.currentplayerstats && !optionsGetForwardPitch(g_Vars.currentplayerstats->mpindex)) {
|
||||
mdy = -mdy;
|
||||
}
|
||||
sp178 += mdy * 0.00025f;
|
||||
sp174 -= mdx * 0.00025f;
|
||||
sp178 += mdy * 0.022f;
|
||||
sp174 -= mdx * 0.022f;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user