Skip to content

Commit

Permalink
Attempt to resolve fps drops for some users
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Jan 31, 2025
1 parent 8aa9502 commit d32aff1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/d_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void TryRunTics(void)
{
I_StartTic();

if (maketic - gametime > BACKUPTICS / 2)
if (maketic - gametime > 2)
break;

G_BuildTiccmd(&localcmds[maketic++ % BACKUPTICS]);
Expand Down
2 changes: 1 addition & 1 deletion src/d_loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "m_fixed.h"

// Tic handling related.
#define BACKUPTICS 8
#define BACKUPTICS 128

extern fixed_t fractionaltic;

Expand Down
3 changes: 1 addition & 2 deletions src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,7 @@ void I_RestoreMousePointerPosition(void)

static void SmoothMouse(int *x, int *y)
{
const fixed_t tic = ((I_GetTimeMS() * TICRATE) % 1000) * FRACUNIT / 1000;
const fixed_t adjustment = FixedDiv(tic, FRACUNIT + tic);
const fixed_t adjustment = FixedDiv(fractionaltic, FRACUNIT + fractionaltic);
static int xx, yy;

*x += xx;
Expand Down

0 comments on commit d32aff1

Please sign in to comment.