diff options
| author | John Peterson <jpeterson57@gmail.com> | 2009-06-15 04:30:02 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2009-06-15 04:30:02 +0000 |
| commit | 5c04af50a406fe8d81ed5dbd83a691b96d34838d (patch) | |
| tree | ca5c19b3a09d460e03353395430b8e320eca383f /Source/Core/Common/Src/MathUtil.cpp | |
| parent | 3295ec38eb5a314a2a8e3dd18d2e0f4c832f2304 (diff) | |
Attempt to calculate actual refresh rate (i.e. a CPU-GPU synced Mhz), no real success. Anybody have any ideas?
Is there no indication from the game when the screen refresh should occur? No, not what I could find, we currently calculate the refresh rate and m_VBeamPos from the CPU ticks progress. That works perfectly if the CPU and GPU is perfectly synced as in the single core and no-idle skipping mode. So I guess it's possible that the game doesn't indicate when the screen should be refreshed, but rather that the hardware calculate that from the CPU ticks progress. That leaves us with a problem in the dual core and idle skipping modes to calculate a CPU-GPU synced CPU ticks progress.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3447 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/MathUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/MathUtil.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/MathUtil.cpp b/Source/Core/Common/Src/MathUtil.cpp index 88e929ec41..afd1e3e2cb 100644 --- a/Source/Core/Common/Src/MathUtil.cpp +++ b/Source/Core/Common/Src/MathUtil.cpp @@ -111,6 +111,17 @@ void MatrixMul(int n, const float *a, const float *b, float *result) } } +// Calculate sum of a float list +float MathFloatVectorSum(std::vector<float> Vec) +{ + float Sum = 0.0; + for(int i = 0; i < Vec.size(); i++) + { + Sum += Vec.at(i); + } + return Sum; +} + void Matrix33::LoadIdentity(Matrix33 &mtx) { memset(mtx.data, 0, sizeof(mtx.data)); |
