Idea works as follows, while going fullscreen we compare the current window geometry with
available screens and ask for an intersection rectangle, we go fullscreen where most of
the window is located
GuessCurrentScreen could also potentially be used to see which screen
the window is on for dynamic DPI handling
For people not used to the Yuzu UI it's not always clear if the emulated
console is docked or not. The other items update their text when clicked,
this PR brings the DOCK button in line with this.
DOCK -> DOCKED or HANDHELD
Sometimes when yuzu crashes, it restarts with the games list in fullscreen,
which would be fine, except there isn't an easy way to exit this.
It also doesn't occur often enough for qt-config.ini files to be in good supply.
UILayout\geometry value in qt-config.ini is the culprit,
at least for the one provided.
Proposed fix is to simply check isFullScreen when yuzu is starting up,
and take it out of full screen immediately
This does a few things in order to make the default setting Vulkan
workable.
- When yuzu boots, it just opens the Vulkan library.
- If it works, all good and we continue with Vulkan as the default.
- If something breaks, a new file in the config directory will be left
behind (this is deleted normally).
- If Vulkan is not working, has_broken_vulkan is set to true.
- The first time this happens, a warning is displayed to notify the
user.
- This forces use of OpenGL, and Vulkan cannot be selected.
- The Shader Backend selector is made accessible for use in custom
configurations.
- To disable has_broken_vulkan, the user needs to press a button in
Graphics Configuration to manually run the Vulkan device
enumeration.
Two reasons for this:
1. Out of 7 connections, 6 are in ConfigureMotionTouch::ConnectEvents,
this is the outlier.
2. Qt6 doesn't moc the connection properly
There was some discussion about updating to Qt6 and I figured I would
work on some smaller parts. For Windows platform the WinMain function has moved
from the Qt5::WinMain to a new one called Qt6::EntryPointPrivate
Also Qt5 supports versionless CMake targets
https://www.qt.io/blog/versionless-cmake-targets-qt-5.15
These other changes in this commit are to support Qt6, but in ways that don't mess with Qt5.
src/yuzu/bootmanager.cpp: Qt6 complains about not being able to know to use QPoint or QPointF, picking QPoint
src/yuzu/bootmanager.h: Qt6 prefers that QStringList.h be included rather than an empty class definition
src/yuzu/configuration/configure_system.cpp: toULongLong intends to return unsigned 64 bit integer, but
Settings::values.rng_seed is only 32 bits wide
src/yuzu/game_list.cpp: Qt6 returns a different datatype for QStringList.length than Qt5,
it used to be int, but in Qt6 its now qsizetype
src/yuzu/loading_screen.cpp: Qt5's for QStyleOption.init say to switch to initFrom.
The QStyleOption.init doesn't exist in Qt6
src/yuzu/main.cpp: Another QPointer and QStringList.size, lets standardize on size()
Qt5 and Qt6 don't really do a good job of reporting Windows versions past the 2004 version.
Current: Windows 10 Version 2009
This Patch: Windows 10 Version 21H1 (Build 19043.1706)
Also: Windows 11 Version 21H2 (Build 22000.675)
Fixes: #8362