Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced lag when hardware acceleration is turned on #3588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/tiledapp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@

#include "commandlineparser.h"
#include "exporthelper.h"
#include "languagemanager.h"
#include "logginginterface.h"
#include "mainwindow.h"
#include "mapdocument.h"
#include "mapformat.h"
#include "mapreader.h"
#include "pluginmanager.h"
#include "preferences.h"
#include "scriptmanager.h"
#ifdef TILED_SENTRY
#include "sentryhelper.h"
#endif
#include "tiledapplication.h"
#include "tileset.h"
#include "tmxmapformat.h"
Expand All @@ -40,6 +39,7 @@
#include <QFileInfo>
#include <QJsonArray>
#include <QJsonDocument>
#include <QSurfaceFormat>
#include <QtPlugin>

#include "qtcompat_p.h"
Expand Down Expand Up @@ -571,6 +571,11 @@ int main(int argc, char *argv[])

Session::initialize();

// Disable vsync to make hardware accelerated mode more responsive
QSurfaceFormat format;
format.setSwapInterval(0);
QSurfaceFormat::setDefaultFormat(format);

MainWindow w;
w.show();

Expand Down