mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
28 lines
1.5 KiB
C++
28 lines
1.5 KiB
C++
/* The Game frame rate cap row's "Monitor's rate" (vk_menu.cpp), as plain code: the cap a display's refresh rate gives.
|
|
host/nn_vi.c fps_max asks the renderer for it at the start (HOS_OPT_DISPLAY_CAP, vk_replay.cpp's option), and the row
|
|
says the same number beside its name. After NX2navi's fps_limit = display. No Vulkan, no menu:
|
|
tests/test_fps_cap_monitor.py checks it. */
|
|
#pragma once
|
|
|
|
namespace mkwvk::fps_cap {
|
|
|
|
/// The row's value for Monitor's rate (frame_rate_cap= in the options file): after 60, 90, 120, 144, 165 and 240 (0 to
|
|
/// 5); 45, 40 and 30 are -1 to -3
|
|
constexpr int kMonitor = 6;
|
|
/// The row's value for Uncapped, after Monitor's rate (7): the game runs as fast as the PC makes its frames, still at real
|
|
/// time. The host paces it by kUncappedFps, a millisecond (host/nn_vi.c fps_cap_of)
|
|
constexpr int kUncapped = 7;
|
|
constexpr int kUncappedFps = 1000;
|
|
/// The caps the game's pacing and its time step take (host/nn_vi.c): a display under 30 Hz or over 240 gets the nearest
|
|
constexpr int kLowest = 30, kHighest = 240;
|
|
|
|
/// The cap for a display's refresh rate in mHz (59,940 is 60, 143,856 is 144): its rate rounded to whole frames a
|
|
/// second, kLowest to kHighest. 0 when the rate is not known (mhz 0 or less): the host then keeps the console's 60.
|
|
inline int of_display(int mhz) {
|
|
if (mhz <= 0) return 0;
|
|
const int hz = (int)(((long long)mhz + 500) / 1000);
|
|
return hz < kLowest ? kLowest : hz > kHighest ? kHighest : hz;
|
|
}
|
|
|
|
} // namespace mkwvk::fps_cap
|