Compile fix for <QtPlatformHeaders/QWindowsWindowFunctions> header not existing in Windows Qt 6. Set Qt win64 auto build to build against Qt 6.

This commit is contained in:
harry 2024-02-24 10:35:09 -05:00
parent e2ac013cbb
commit 5f3ce5896a
4 changed files with 10 additions and 10 deletions

View File

@ -2,8 +2,8 @@
set PROJECT_ROOT=%~dp0..
set CWD=%CD%
call "C:\Qt\5.15\msvc2019_64\bin\qtenv2.bat"
REM call "C:\Qt\6.0\msvc2019_64\bin\qtenv2.bat"
REM call "C:\Qt\5.15\msvc2019_64\bin\qtenv2.bat"
call "C:\Qt\6.5\msvc2019_64\bin\qtenv2.bat"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cd /d %CWD%
@ -50,7 +50,7 @@ IF DEFINED FCEU_RELEASE_VERSION (set PUBLIC_RELEASE=1)
REM cmake -h
REM cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% ..
cmake -DQT6=0 -DPUBLIC_RELEASE=%PUBLIC_RELEASE% -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DLIBARCHIVE_INSTALL_PREFIX=%LIBARCHIVE_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" ..
cmake -DQT=6 -DPUBLIC_RELEASE=%PUBLIC_RELEASE% -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DLIBARCHIVE_INSTALL_PREFIX=%LIBARCHIVE_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" ..
REM nmake
msbuild /m fceux.sln /p:Configuration=Release

View File

@ -35,7 +35,7 @@
#include "Qt/ConsoleVideoConf.h"
#include "Qt/nes_shm.h"
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
#include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif
@ -132,7 +132,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
vbox1->addWidget( gl_LF_chkBox );
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
// 1px full screen border - hack fix for QOpenGLWidget fullscreen issues
winFullScreenBorderCbx = new QCheckBox( tr("Fullscreen Border (1px)") );
winFullScreenBorderCbx->setToolTip(tr("Hack fix for QOpenGLWidget fullscreen issue. May not be needed."));
@ -736,7 +736,7 @@ void ConsoleVideoConfDialog_t::openGL_linearFilterChanged( int value )
}
}
//----------------------------------------------------
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
void ConsoleVideoConfDialog_t::winFullScreenBorderChanged(int value)
{
bool opt = (value != Qt::Unchecked);

View File

@ -55,7 +55,7 @@ class ConsoleVideoConfDialog_t : public QDialog
QCheckBox *showFrameCount_cbx;
QCheckBox *showLagCount_cbx;
QCheckBox *showRerecordCount_cbx;
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
QCheckBox *winFullScreenBorderCbx;
#endif
QDoubleSpinBox *xScaleBox;
@ -114,7 +114,7 @@ class ConsoleVideoConfDialog_t : public QDialog
void ntscEndScanLineChanged(int value);
void palStartScanLineChanged(int value);
void palEndScanLineChanged(int value);
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
void winFullScreenBorderChanged(int value);
#endif

View File

@ -29,7 +29,7 @@
#include "Qt/SplashScreen.h"
#include "Qt/QtScriptManager.h"
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
#include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif
@ -159,7 +159,7 @@ int main( int argc, char *argv[] )
// Need to wait for window to initialize before video init can be called.
//consoleWindow->videoInit();
#ifdef WIN32
#if defined(WIN32) && (QT_VERSION_MAJOR < 6)
// This function is needed to fix the issue referenced below. It adds a 1-pixel border
// around the fullscreen window due to some limitation in windows.
// https://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows