-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add frameskip setting by percent of current FPS #11523
Conversation
…ing the # of frames to skip, one for setting the % of frames to skip based off fps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, so this means I can only set frameskip up to 8%?
-[Unknown]
Yes, that would use 8% as the max, unless you want to consider expanding frame skip max dynamically, which seemed like overkill to create interrelated fields. Thoughts about just increasing the static max from 8 to 10 for both types? It's a nice round number and a relatively easy change. But that's probably worthy of its own PR.
Good suggestion on the variable rename. I'll try and make time to update the commit this weekend at some point. Feel free to submit any changes you'd like to the PR!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've committed the changes you've requested.
Should be all resolved, let me know if you have any other changes! Thanks! |
Core/HLE/sceDisplay.cpp
Outdated
@@ -503,6 +503,17 @@ static void DoFrameDropLogging(float scaledTimestep) { | |||
} | |||
} | |||
|
|||
static int CalculateFrameSkip() { | |||
// Used to calculate the FPS to skip if the user sets the type to percent of fps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be moved into the right clause of the if statement below.
Besides, does this mean that since you can only set it up to 8, frameskip% can only be up to 8%?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed that this was already discussed above. But what's the point of such a low frameskip percentage limit? Shouldn't we change the scale entirely when the type is set to percentage?
I didn't know of an easy way to dynamically change that scale when percent is selected. and wasn't sure the added complexity would be worth the added effort. Although the current max frame skip at 8 frames, I'm not sure how many users set it to max. at 60fps, 8% will come out as 5 frames, which i expect will meet the needs of 90% of the users.
Just my opinion, but I think the PR as it is could be committed and then if someone sees a need to add the code to dynamically change the options for frame numbers when percent is selected then that can be an enhancement as a new PR.
I'll move that comment you pointed out shortly.
|
I really don't see this making any difference conpared to the previous setting. Even a value as low as 1% gives the same FPS as the previous 1 Frame setting. Edit: Never mind. It's because you calculate the ceiling. I didn't realize that FPS has to be an int! |
That's not the point actually :) the idea is that setting a percent frameskip allows different number of frames to be skipped automatically depending on the game's fps. For example, a game that runs at 30 fps may only need 1 frame skipped to be playable, but a game running at 60 might need 2 frames. Now you don't need to set this per rom, it will calculate it automatically.
|
means I don't need to set frameskip 1 or 2 on the game, is that so? |
That's the idea, yes :)
|
This PR adds a frameskip type setting that allows the user to select how the frameskip number is used. The default being skip the specified number of frames, but it adds the option to skip a calculated percentage of FPS. The number of frames to skip is then dynamically calculated off the current FPS and adjusted as the game's FPS changes.