Working on an custom FPS Limiter
|
05-09-2013, 10:42 PM
(This post was last modified: 05-09-2013 10:55 PM by makotech222.)
Post: #1
|
|||
|
|||
Working on an custom FPS Limiter
Started today on my first project for PPSSPP, which is a user-set fps limiter. I'm somewhat of a beginner with C++, and this is my first time contributing to an open source project. So please, give me a lot of feedback on my problem. Here goes:
My first step is to toggle between 3 different states for the fps limiter: #1 is default 60 fps, #2 is user set limit, #3 is unlimited (unthrottle). I re-purposed the code for the unthrottle button (which involved pressing 'tab') to toggle between the states. The problem arises with pressed the tab button and toggling the states. At the moment, it is very unreliable, and i can't figure out why. If i press the tab button, it will SOMETIMES toggle between the states, in a random order. For example, it will switch from 1 to 3, or 2 to 1, when it should be 1 ->2 -> 3. Sometimes, the button doesn't do anything at all. My initial assumption is that every time i press the button, the emulator doesn't necessarily update, or it takes the input once and counts it more than once. So, without furthur ado, here's my code so far: Quote: and also Quote:in sceDisplay.cpp I think if i can change "if (input.pad_buttons & PAD_BUTTON_LEFT_THUMB) " to something that only triggers only once when pressed (this triggers when held) that it might fix it. Edit: Aha yes! I was right, changed input.pad_buttons to input.pad_buttons_down. Works perfect now Next step is to add a UI option to enter an fps limit. Not sure where to start, but i'm sure ill get there eventually. Some help would be nice though |
|||
« Next Oldest | Next Newest »
|