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
-mwindows doesn't work with Clang. tpoechtrager/wclang resolves this by
just using MinGW-GCC to link the executable, however this prevents us
from using LLVM-exclusive tools when building yuzu.
Solution is to send the linker argument we need from -mwindows directly
to the linker.
From https://gcc-help.gcc.gnu.narkive.com/FogklN5J/gcc-wl-subsystem-windows-mwindows-options
Clang (rightfully) warns that we are checking for the existence of
pointer to something just allocated on the stack, which is always true.
Instead, check whether GetModuleFileNameW failed.
Co-authored-by: Mai M <mathew1800@gmail.com>
A bug occurs in yuzu when VK_KHR_workgroup_memory_explicit_layout is
available but 16-bit integers are not supported in the host driver.
Disable usage of the extension when this case arises.
Recent AMD Vulkan drivers (22.5.2 or 2.0.226 for specifically Vulkan)
have a broken VK_KHR_push_descriptor implementation that causes a crash
in yuzu. Disable it for the time being.
Another request from GillianMC.
The translated strings have been placed in a separate "Hotkeys" context as an alternative
to having to add the tr function to the Config class, or adding them to ConfigureHotkeys
context which is quite long. The English strings get attached to the items in the Action
column as "data", and are used for RetranslateUI and saving the hotkey configuration.
Use auto and a more descriptive variable name.
Secondly, fix some C++ misconceptions or constructing too many objects.
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
Co-authored-by: Lioncash <mathew1800@gmail.com>