mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 06:05:15 -04:00
game: fix refresh rate filtering comparison (#3984)
It helps to compare in the right direction -- was having the inverse effect.
This commit is contained in:
@@ -138,6 +138,9 @@ int main(int argc, char** argv) {
|
||||
app.allow_extras();
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
// Log the version the game is compiled against so we don't have to guess
|
||||
lg::info("Compiled Version: {}", build_revision());
|
||||
|
||||
// Override the user's config dir, potentially (either because it was explicitly provided
|
||||
// or because it's portable mode)
|
||||
if (enable_portable) {
|
||||
|
||||
@@ -495,10 +495,13 @@ void DisplayManager::update_resolutions() {
|
||||
// Skip resolutions that aren't using the current refresh rate, they won't work.
|
||||
// For example if your monitor is currently set to `60hz` and the monitor _could_ support
|
||||
// resolution X but only at `30hz`...then there's no reason for us to consider it as an option.
|
||||
if (std::abs(display_mode->refresh_rate - active_refresh_rate) < 1.0) {
|
||||
const auto comparison = std::abs(display_mode->refresh_rate - active_refresh_rate);
|
||||
if (comparison > 1.0) {
|
||||
lg::debug(
|
||||
"[DISPLAY]: Skipping {}x{} as it requires {}hz but the monitor is currently set to {}hz",
|
||||
display_mode->w, display_mode->h, display_mode->refresh_rate, active_refresh_rate);
|
||||
"[DISPLAY]: Skipping {}x{} as it requires {:f}hz but the monitor is currently set to "
|
||||
"{:f}hz. Difference: {:f}",
|
||||
display_mode->w, display_mode->h, display_mode->refresh_rate, active_refresh_rate,
|
||||
comparison);
|
||||
// Allow it for windowed mode though
|
||||
m_available_window_sizes.push_back(new_res);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user