Moved gamepad Qt check to 5.8.

This commit is contained in:
Leonardo Zide 2018-05-13 17:37:02 -07:00
parent 1cb4db54b0
commit f6cbbe9636

View file

@ -24,7 +24,7 @@
#include "lc_colors.h" #include "lc_colors.h"
#include <functional> #include <functional>
#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
#include <QtGamepad/QGamepad> #include <QtGamepad/QGamepad>
#endif #endif
@ -85,7 +85,7 @@ lcMainWindow::lcMainWindow()
for (int FileIdx = 0; FileIdx < LC_MAX_RECENT_FILES; FileIdx++) for (int FileIdx = 0; FileIdx < LC_MAX_RECENT_FILES; FileIdx++)
mRecentFiles[FileIdx] = lcGetProfileString((LC_PROFILE_KEY)(LC_PROFILE_RECENT_FILE1 + FileIdx)); mRecentFiles[FileIdx] = lcGetProfileString((LC_PROFILE_KEY)(LC_PROFILE_RECENT_FILE1 + FileIdx));
#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
connect(&mGamepadTimer, &QTimer::timeout, this, &lcMainWindow::UpdateGamepads); connect(&mGamepadTimer, &QTimer::timeout, this, &lcMainWindow::UpdateGamepads);
mLastGamepadUpdate = QDateTime::currentDateTime(); mLastGamepadUpdate = QDateTime::currentDateTime();
mGamepadTimer.start(33); mGamepadTimer.start(33);
@ -789,7 +789,7 @@ QMenu* lcMainWindow::createPopupMenu()
void lcMainWindow::UpdateGamepads() void lcMainWindow::UpdateGamepads()
{ {
#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
QDateTime Now = QDateTime::currentDateTime(); QDateTime Now = QDateTime::currentDateTime();
quint64 Elapsed = mLastGamepadUpdate.msecsTo(Now); quint64 Elapsed = mLastGamepadUpdate.msecsTo(Now);
mLastGamepadUpdate = Now; mLastGamepadUpdate = Now;