forked from chocolate-doom/chocolate-doom
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Introduce fast mouse polling for lower lag interpolation #1194
Draft
mikeday0
wants to merge
11
commits into
master
Choose a base branch
from
fastpoll
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Nice starting point, I tested it briefly. Some issues I noticed:
I'll try to give more feedback later, I know it's WIP right now. |
I can repeat this. It appears to be fixed on my end by moving the Diffdiff --git a/src/i_video.c b/src/i_video.c
index ab3c7bc9..b5f9f6f1 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -544,9 +544,6 @@ void I_StartDisplay(void) // [crispy]
{
SDL_PumpEvents();
- // [AM] Figure out how far into the current tic we're in as a fixed_t.
- fractionaltic = I_GetFracRealTime();
-
if (usemouse && !nomouse && window_focused)
{
I_ReadMouseUncapped();
@@ -941,6 +938,9 @@ void I_FinishUpdate (void)
}
}
}
+ // [AM] Figure out how far into the current tic we're in as a fixed_t.
+ fractionaltic = I_GetFracRealTime();
+
}
// Restore background and undo the disk indicator, if it was drawn.
Does this fix the "pops" for you? |
That seems to work fine, or like Woof: Diff (Alt)diff --git a/src/i_video.c b/src/i_video.c
index ab3c7bc9..328e6b1e 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -542,11 +542,11 @@ void I_StartTic (void)
void I_StartDisplay(void) // [crispy]
{
- SDL_PumpEvents();
-
// [AM] Figure out how far into the current tic we're in as a fixed_t.
fractionaltic = I_GetFracRealTime();
+ SDL_PumpEvents();
+
if (usemouse && !nomouse && window_focused)
{
I_ReadMouseUncapped(); |
Fixes random "pops" when turning using keyboard. Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
When running uncapped, track last gametic's worth (28 ms) of mouse movement to determine if acceleration should be applied.
* Apply mouse acceleration in g_game. * Expand carry_t to include side and vertical movement. Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my humble attempt to port to Crispy the fine work that @ceski-1 did for Woof. It's not ready yet but I thought it might be prudent to go ahead and get it out there for early review and testing.