Added a fix for fullscreen Qt opengl based windows. This addresses a known Qt issue referenced here: https://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows

This commit is contained in:
mjbudd77 2021-06-03 20:01:22 -04:00
parent 9c6f895e2a
commit d9f10a960f
1 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,10 @@
#include "Qt/ConsoleWindow.h"
#include "Qt/fceuWrapper.h"
#ifdef WIN32
#include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif
consoleWin_t *consoleWindow = NULL;
static void MessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
@ -120,6 +124,12 @@ int main( int argc, char *argv[] )
consoleWindow->videoInit();
#ifdef WIN32
// 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
QWindowsWindowFunctions::setHasBorderInFullScreen( consoleWindow->windowHandle(), true);
#endif
retval = app.exec();
//printf("App Return: %i \n", retval );