summaryrefslogtreecommitdiffhomepage
path: root/main/app.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-20 23:53:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-20 23:53:09 +0200
commit21b306f204a8adfd4bed177914d3e6ce955d58e3 (patch)
treeb0da570d980293bfff82a63d04c27496549ba585 /main/app.cpp
parent696a8f7279c30e6b8e50cea43317794e949ac466 (diff)
properly check for swap control tear
Diffstat (limited to 'main/app.cpp')
-rw-r--r--main/app.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/main/app.cpp b/main/app.cpp
index 5fa7dfb9..45e712de 100644
--- a/main/app.cpp
+++ b/main/app.cpp
@@ -46,11 +46,14 @@ app::app(const Arguments& arguments, app_settings opts):
if (opts.vsync)
{
- if (!setSwapInterval(-1))
- (void)setSwapInterval(1);
+ (void)setSwapInterval(1);
+ if (const auto list = GL::Context::current().extensionStrings();
+ std::find(list.cbegin(), list.cend(), "EXT_swap_control_tear") != list.cbegin())
+ (void)setSwapInterval(-1);
}
else
setSwapInterval(0);
+
set_fp_mask();
reset_camera_offset();