• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Support v
« Previous 1 ... 1153 1154 1155 1156 1157 ... 1192 Next »

Technical question for devs
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Technical question for devs
08-14-2009, 02:40 AM
#1
Unknownforce Offline
X
****
Posts: 519
Threads: 11
Joined: Mar 2009
How can I take "FPS" from the Core.cpp line here:

Code:
float FPS = (float)frames / t;

And make it readable by Render.cpp?

What I'm trying to do is add Overlay Core FPS to the video plugin, because it differs from the Overlay FPS that it is currently in place... but this is what I'm stuck on, I got the option for it and everything else set up, but copying the actual count from Core to Render is a bit beyond me... I don't know all the namespaces and classes available to both...

Any help? Thanks.
[Image: Unknownforcesig.jpg]

[Image: 539486.png]

My Dolphin Builds
Find
Reply
08-15-2009, 02:23 AM
#2
Unknownforce Offline
X
****
Posts: 519
Threads: 11
Joined: Mar 2009
anyone?
[Image: Unknownforcesig.jpg]

[Image: 539486.png]

My Dolphin Builds
Find
Reply
08-15-2009, 03:04 AM (This post was last modified: 08-15-2009, 03:06 AM by Runo.)
#3
Runo Offline
Greeny
*******
Posts: 1,194
Threads: 43
Joined: Mar 2009
Man, you got a bit of problem here, I mean, the devs probably can tell you easly, but I just cant imagine how, since the two .cpp are coded in diferent styles... I would try to transform the fps count into a variable, and direct it to render.cpp but this wouldnt help much cause it would probably stay unreadeble... I'm relatively new to c++ coding, but the only solution I can see is to make a custom library with some comands that would make it possible to make it readeble by render.cpp, but there must be a more simple way. Sorry.
OS: Windows 10 Pro 64bit Creators Update
CPU: AMD Phenom II X4 960 @ 3.6 GHz
Graphics Card: Nvidia GeForce GTX 960 2GB GDDR5
Motherboard: Gigabyte GA-870A-USB3 AM3+ Revision
RAM: HyperX 8GB Dual Channel @ 1600Mhz
Find
Reply
08-15-2009, 07:33 AM
#4
omegadox Offline
Senior Member
****
Posts: 401
Threads: 17
Joined: Mar 2009
To send the variable into the plugin, you could try adding a pointer into the VideoIntialize thing and then have render.cpp access the pointer and read the FPS, problem is syncing issues.
:: System Specs ::
Operating System: Windows 7 Professional x64
Video Card: ATI Radeon HD 5770
CPU: AMD Phenom I X4 9550
RAM: 6GB DDR2
EXP Index: 999999.999999
Find
Reply
08-15-2009, 10:17 AM
#5
mudlord Offline
Member
***
Posts: 61
Threads: 3
Joined: Apr 2009
Ideally, your approach would be better if the emulator did not use plugins.

You could make the FPS a global variable.

The current architecture though, makes that impossible.
Find
Reply
08-15-2009, 11:34 AM
#6
Unknownforce Offline
X
****
Posts: 519
Threads: 11
Joined: Mar 2009
running into walls all over the place. It's frustrating when I don't know C++ that well. I can figure out most errors, but I'm getting unresolved external link errors and when I try to reference them from the plugin. I got everything but the actual pass of the FPS from Core to Render... the option to show up in the config, save in the config properly, and I got both the Video and Core FPS texts to display on the screen. my brain hurts now. takin a break
[Image: Unknownforcesig.jpg]

[Image: 539486.png]

My Dolphin Builds
Find
Reply
08-15-2009, 03:21 PM
#7
omegadox Offline
Senior Member
****
Posts: 401
Threads: 17
Joined: Mar 2009
just look in pluginspecs_dsp.h, it has something called "DSPInitialize", this struct we send to the plugin contains a bunch of pointers that all point to something in the core, you would access the pointer in the plugin to get the value from the core, but for something FPS, that will be updated constantly by the CPU, if the DSP runs on its own thread and you when you read it, you need to yield the CPU thread and get the value, then do w/e, after you finished using the variable, CPU thread can resume. This way you get every FPS read change.
:: System Specs ::
Operating System: Windows 7 Professional x64
Video Card: ATI Radeon HD 5770
CPU: AMD Phenom I X4 9550
RAM: 6GB DDR2
EXP Index: 999999.999999
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode