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 |
|||
05-10-2013, 12:15 AM
Post: #2
|
|||
|
|||
RE: Working on an custom FPS Limiter
great!!
|
|||
05-10-2013, 02:20 AM
Post: #3
|
|||
|
|||
RE: Working on an custom FPS Limiter
This feature already have on ffmpeg builds. Soon will added to master build.
Phones: Poco F3 8GB/256GB (Snapdragon 870 5G) and Redmi Note 6 Pro 4/64GB (Snapdragon 636) PC: AMD Ryzen 5 3600 / 16GB RAM DDR4 3600MHz / NVIDIA GTX 1660 Ti 6GB / Windows 10 Pro |
|||
05-10-2013, 03:47 AM
Post: #4
|
|||
|
|||
RE: Working on an custom FPS Limiter | |||
05-10-2013, 05:43 AM
(This post was last modified: 05-10-2013 05:45 AM by livisor.)
Post: #5
|
|||
|
|||
RE: Working on an custom FPS Limiter
I will still rep you for your effort!It's a great way to improve your skills:-)
|
|||
05-10-2013, 05:59 AM
Post: #6
|
|||
|
|||
RE: Working on an custom FPS Limiter
I think the way you implemented it is different, though.
-[Unknown] |
|||
05-10-2013, 06:00 AM
Post: #7
|
|||
|
|||
RE: Working on an custom FPS Limiter | |||
05-10-2013, 07:00 AM
(This post was last modified: 05-10-2013 07:01 AM by [Unknown].)
Post: #8
|
|||
|
|||
RE: Working on an custom FPS Limiter
I think the other way was a fixed option. For example, you could go and select "90 vps" as "the speed the game ought to run at."
This is togglable. So, you basically set a max speed for fast forward to go at, and press the button to toggle it on/off/etc. This can actually be a nice feature for using it to play games - set it to 90 vps or 120 vps to get through slow sequences, and toggle back to regular speed for action sequences, etc. Without having to go back and forth through the menu. That said, I'm kinda used to holding the tab button religiously while testing most games, so it'd take a lot of getting used to for me, heh. But I do think it's probably a good change for *playing* games. -[Unknown] |
|||
05-10-2013, 08:22 AM
Post: #9
|
|||
|
|||
RE: Working on an custom FPS Limiter
I made an issue on GitHub 11 days ago about this : https://github.com/hrydgard/ppsspp/issues/1581
♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing ♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing ♦ PSP-3004 | 6.60 PRO-C2 |
|||
05-10-2013, 01:50 PM
Post: #10
|
|||
|
|||
RE: Working on an custom FPS Limiter
So whats the difference between the two implementations? Should i continue developing mine? I tried to make mine like epsxe's implementation, which gives the 3 states, one to play fmvs and hard battles, second to play most of the game at, and third to just blast through everything as fast as possible
|
|||
05-10-2013, 02:22 PM
Post: #11
|
|||
|
|||
RE: Working on an custom FPS Limiter
The unlocked vps will be the best friend for psx-p emulator(and not only),i can run einhander and many other ps1 games without holding tab at a decent speed(over 30-45 vps) on windows
|
|||
05-10-2013, 02:57 PM
Post: #12
|
|||
|
|||
RE: Working on an custom FPS Limiter | |||
05-10-2013, 03:27 PM
Post: #13
|
|||
|
|||
RE: Working on an custom FPS Limiter
Probably windows only. I think i recall someone saying that android has locked vsync.
|
|||
05-10-2013, 03:35 PM
Post: #14
|
|||
|
|||
RE: Working on an custom FPS Limiter
so is impossible?
|
|||
« Next Oldest | Next Newest »
|