Convert Input Count to Frame Count (#5954)
* Convert Input Count to Frame Count While recording or playing a movie file, the left side of the status bar currently displays an input counter which shows how many times the emulator has polled for button inputs during the movie. This information is far less easily understandable and less useful for TASing compared to a frame count. The frame count has a linear relationship with input count that can be expressed with Frame Count = 0.255689103308912 * Input Count. Simply put, instead of having a counter that goes up by 3 or 4 every frame, this makes it a counter that goes up by exactly 1 every frame. * Update movie.cpp * Update movie.cpp * Fixing clang-format errors * Update movie.cpp Did not realize that the frame rate was defined as a constant somewhere in the source code. This makes this conversion far less sketchy. * Update movie.cpp
This commit is contained in:
parent
25ad002e6e
commit
c8a7185444
1 changed files with 3 additions and 2 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include "core/hle/service/hid/hid.h"
|
#include "core/hle/service/hid/hid.h"
|
||||||
#include "core/hle/service/ir/extra_hid.h"
|
#include "core/hle/service/ir/extra_hid.h"
|
||||||
#include "core/hle/service/ir/ir_rst.h"
|
#include "core/hle/service/ir/ir_rst.h"
|
||||||
|
#include "core/hw/gpu.h"
|
||||||
#include "core/movie.h"
|
#include "core/movie.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
@ -222,10 +223,10 @@ Movie::PlayMode Movie::GetPlayMode() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 Movie::GetCurrentInputIndex() const {
|
u64 Movie::GetCurrentInputIndex() const {
|
||||||
return current_input;
|
return nearbyint(current_input / 234.0 * GPU::SCREEN_REFRESH_RATE);
|
||||||
}
|
}
|
||||||
u64 Movie::GetTotalInputCount() const {
|
u64 Movie::GetTotalInputCount() const {
|
||||||
return total_input;
|
return nearbyint(total_input / 234.0 * GPU::SCREEN_REFRESH_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Movie::CheckInputEnd() {
|
void Movie::CheckInputEnd() {
|
||||||
|
|
Loading…
Reference in a new issue