Repository navigation
Conversation
Goober5000
left a comment
There was a problem hiding this comment.
Mostly good, but the new option doesn't have a parser. A .parser() option is needed for default_settings.tbl support.
I just added that. |
dustinspace217
left a comment
There was a problem hiding this comment.
I built this with Vulkan on and played SM1-01 with MediaVPs 5.0.2 under both OpenGL and -vulkan. The slider works live: setting 30, 45 and 15 capped the game at those rates right away, and a saved 30 was still applied after a restart. With -no_fps_capping the slider is greyed out and reads "Unlimited", the saved value is left alone, and the game runs uncapped. An old MaxFPS=30 in fs2_open.ini still caps at 30 the same as master does, and a value in default_settings.tbl is picked up by the new parser.
The branch conflicts with master now, and the string IDs need to change when that's fixed (inline). I couldn't check how it interacts with vsync, since the test runs on a virtual display with no refresh rate.
| // but internal strings should still increment XSTR_SIZE to avoid collisions. | ||
| // retail XSTR_SIZE = 1570 | ||
| // #define XSTR_SIZE 1936 // This is the next available ID | ||
| // #define XSTR_SIZE 1939 // This is the next available ID |
There was a problem hiding this comment.
This line conflicts with master now. The Android build (#6992) took 1936-1939 for the touch overlay options in osapi.cpp, so the next free ID on master is 1940. With the three strings below moved to 1940-1942 this becomes:
| // #define XSTR_SIZE 1939 // This is the next available ID | |
| // #define XSTR_SIZE 1943 // This is the next available ID |
Heads up: my #7998 also claims 1940-1945, so whichever of the two lands second will need to renumber.
| std::pair<const char*, int>{"Frame Rate Limit", 1936}, | ||
| std::pair<const char*, int>{"Maximum frames per second. Vertical sync may lower the actual frame rate.", 1937}) |
There was a problem hiding this comment.
1936 and 1937 are "Touch Overlay" and its description on master, so a translation would show the wrong text here. Fixing the merge conflict on the localize.cpp comment alone would keep these duplicates without any warning.
| std::pair<const char*, int>{"Frame Rate Limit", 1936}, | |
| std::pair<const char*, int>{"Maximum frames per second. Vertical sync may lower the actual frame rate.", 1937}) | |
| std::pair<const char*, int>{"Frame Rate Limit", 1940}, | |
| std::pair<const char*, int>{"Maximum frames per second. Vertical sync may lower the actual frame rate.", 1941}) |
| // Clamp saved out-of-range values | ||
| return std::clamp(saved, MIN_FRAMERATE_CAP, MAX_FRAMERATE_CAP); | ||
| }) | ||
| .display([](int value) { return Cmdline_NoFPSCap ? SCP_string(XSTR("Unlimited", 1938)) : std::to_string(value); }) |
There was a problem hiding this comment.
1938 is "Touch Overlay Opacity" on master.
| .display([](int value) { return Cmdline_NoFPSCap ? SCP_string(XSTR("Unlimited", 1938)) : std::to_string(value); }) | |
| .display([](int value) { return Cmdline_NoFPSCap ? SCP_string(XSTR("Unlimited", 1942)) : std::to_string(value); }) |
|
|
||
| mod_table_init(); // load in all the mod dependent settings | ||
|
|
||
| // Keep the old MaxFPS setting as the default when no Graphics.FramerateCap value is saved. |
There was a problem hiding this comment.
Small thing, not blocking: when a mod sets this option in default_settings.tbl, the parser runs after this and replaces the player's MaxFPS. MaxFPS=30 plus a mod default of 45 ran at 45. If MaxFPS is meant to win, as this comment says, reading it between default_settings_init() and loadInitialValues() would do that.
|
Right, yes ill fix that and the localization after #7708 |
Brings the MaxFPS control from the ini file to the option system. When -no_fps_capping is used the option is disabled and displays "unlimited".