winmain: reworked main loop for smoother frame times.
imgui_sdl: added handling for device lost. midi: load PINBALL.MID in uppercase and using absolute path. Added UPS/FPS options, by default 120/60.
This commit is contained in:
1 parent
22ce8ac538
commit
b4cb827d73
9 files changed
+225
-116
No files matched your search
@@ -100,6 +100,11 @@ void options::init()
|
||||
ImGui::GetIO().FontGlobalScale = get_float("UI Scale", 1.0f);
|
||||
Options.Resolution = get_int("Screen Resolution", -1);
|
||||
Options.LinearFiltering = get_int("Linear Filtering", true);
|
||||
Options.FramesPerSecond = std::min(MaxFps, std::max(MinUps, get_int("Frames Per Second", DefFps)));
|
||||
Options.UpdatesPerSecond = std::min(MaxUps, std::max(MinUps, get_int("Updates Per Second", DefUps)));
|
||||
Options.UpdatesPerSecond = std::max(Options.UpdatesPerSecond, Options.FramesPerSecond);
|
||||
|
||||
winmain::UpdateFrameRate();
|
||||
|
||||
Sound::Enable(0, 7, Options.Sounds);
|
||||
|
||||
@@ -125,6 +130,8 @@ void options::uninit()
|
||||
set_int("Uniform scaling", Options.UniformScaling);
|
||||
set_float("UI Scale", ImGui::GetIO().FontGlobalScale);
|
||||
set_int("Linear Filtering", Options.LinearFiltering);
|
||||
set_int("Frames Per Second", Options.FramesPerSecond);
|
||||
set_int("Updates Per Second", Options.UpdatesPerSecond);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user