mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-02 16:23:57 +03:00
fix interpolation issue
This commit is contained in:
parent
bcf12744d2
commit
1f58393532
@ -385,7 +385,7 @@ void GameEngine::ProcessGfxCommands(Gfx* commands) {
|
||||
|
||||
uint32_t GameEngine::GetInterpolationFPS() {
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
|
||||
return CVarGetInteger("gInterpolationFPS", 20);
|
||||
return CVarGetInteger("gInterpolationFPS", 60);
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||
@ -393,7 +393,7 @@ uint32_t GameEngine::GetInterpolationFPS() {
|
||||
}
|
||||
|
||||
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(),
|
||||
CVarGetInteger("gInterpolationFPS", 20));
|
||||
CVarGetInteger("gInterpolationFPS", 60));
|
||||
}
|
||||
|
||||
extern "C" uint32_t GameEngine_GetSampleRate() {
|
||||
|
@ -484,7 +484,7 @@ void FrameInterpolation_RecordMarker(const char* file, int line) {
|
||||
if (!is_recording)
|
||||
return;
|
||||
|
||||
append(Op::Marker).marker = { file, line };
|
||||
// append(Op::Marker).marker = { file, line };
|
||||
}
|
||||
|
||||
void FrameInterpolation_RecordMatrixPop(Matrix** matrix) {
|
||||
|
@ -282,7 +282,7 @@ void DrawSettingsMenu(){
|
||||
#else
|
||||
bool matchingRefreshRate =
|
||||
CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::FAST3D_DXGI_DX11;
|
||||
UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 30, {
|
||||
UIWidgets::CVarSliderInt((currentFps == 30) ? "FPS: Original (30)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 60, {
|
||||
.disabled = matchingRefreshRate
|
||||
});
|
||||
#endif
|
||||
|
@ -59,7 +59,7 @@ namespace AdvancedResolutionSettings {
|
||||
for (unsigned short i = 0; i < sizeof(setting); i++)
|
||||
update[i] = false;
|
||||
static short updateCountdown = 0;
|
||||
short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 20) / 2; // half of a second, in frames.
|
||||
short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 60) / 2; // half of a second, in frames.
|
||||
|
||||
// Initialise integer scale bounds.
|
||||
short max_integerScaleFactor = default_maxIntegerScaleFactor; // default value, which may or may not get
|
||||
@ -408,7 +408,7 @@ namespace AdvancedResolutionSettings {
|
||||
bool AdvancedResolutionSettingsWindow::IsDroppingFrames() {
|
||||
// a rather imprecise way of checking for frame drops.
|
||||
// but it's mostly there to inform the player of large drops.
|
||||
const short targetFPS = CVarGetInteger("gInterpolationFPS", 20);
|
||||
const short targetFPS = CVarGetInteger("gInterpolationFPS", 60);
|
||||
const float threshold = targetFPS / 20.0f + 4.1f;
|
||||
return ImGui::GetIO().Framerate < targetFPS - threshold;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user