- Prevent sleep via xdg-desktop-portal after fa7abafa5f
- Pause on suspend after b7642cff36
- Exit on SIGINT/SIGTERM after 9479940a1f
- Improve dark themes after b51db12567
On Windows there are currently two fonts used.
The first, does the Menu, QTreeView and Tooltips
Second is Everything else which is a default font.
From inspecting QApplication::font() at runtime
Windows 10 English: QFont(MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0)
Windows 11 Japanese: MS UI Gothic,9 ,-1,5,50,0,0,0,0,0
Windows 11 Traditional Chinese: PMingLiU,9 ,-1,5,50,0,0,0,0,0
Windows 11 Simplified Chinese: SimSun,9 ,-1,5,50,0,0,0,0,0
Windows 11 Korean: Gulim,9 ,-1,5,50,0,0,0,0,0
I initially investigated dynamically changing the font when
the UI language is English, but this was getting quite messy
Qt6 makes changes to default font in some situations, so this
PR is being narrowed in scope to only effect Chinese font choices.
This change only effects rendering of Latin/Cyrillic characters.
The startup check apparently confuses other programs when yuzu launches
2 processes and then quickly closes one of them. Though this isn't
really our issues it's also not a big deal for me to add an option to
work around that issue.
Uses fmt::print as opposed to std::fprintf. Adds a missing return.
static's a single-use function. Initializes structs as opposed to
std::memset where possible. Fixes CMake linkage.
Co-authored-by: Lioncash <mathew1800@gmail.com>
mini_dump: Use a namespace
Co-authored-by: Lioncash <mathew1800@gmail.com>
Previously, accessing the room_network when it was already freed would crash the emulator on shutdown.
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
* Controller bugfixes in profile select, closes#8265
2 fixes for using a controller in profile select dialog.
Pressing 'B' cancels the launch of the game
Using controller to select a profile now correctly sets the index to use for the launch
* Added brackets to if statements as requested.
yuzu's default theme doesn't specify everything, which is fine for
windows, but in linux anything unspecified is set to the users theme.
Symptoms of this are that a linux user with a dark theme won't think
to change the theme to a dark theme when first using yuzu
Idea here is to try and support arbitrary themes on linux.
preliminary work on a "default_dark" theme, used only as overlay
for any themes that are measured to be dark mode.
Other work done:
FreeDesktop standard icon names:
plus -> list-add
delete refresh, we use view-refresh
remove duplicated icons for qdarkstyle_midnight_blue
referencing icon aliases in the qrc files is the way to go
Note:
Dynamic style changing doesn't appear to work with AppImage
When windows is told to display Standard digits as suzhou, it is showing
incorrect information in yuzu, file sizes and the CPU speed limiter are
effected by this. See #8698 for some screenshots.
Setting number format to Chinese (Simplified, Hong Kong SAR) is one
way to see this issue in action.
Fixes#8698
Turns out that for Qt to properly handle plurals in English a
translation needs to be provided, otherwise the user is left with
messages such as "Building: 2 shader(s)"
Plurals for other all other languages are handled on transifex.
I wrote the README.md to just refer to it as a translation
collaboration site just in case we ever switch.
These translations being out of date won't pose any technical problems
so I believe it is fine to handle them manually on a "best effort"
basis.
The files are generated into the source directory so that the
relative filenames are correct. The generated file is added to
.gitignore
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75
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.
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
Long story short, QT doesn't allow the link colors to be set via their stylesheets.
There are two ways to work with this, specify the color manually for every link (See the About dialog) The other way is to change the default palette.
IsDarkTheme is copy/pasted from src/yuzu/debugger/wait_tree.cpp
The web applet causes multiple issues with the rest of the application.
Disable it by default and add a debug option to re-enable it until a
proper solution can be found.
Adds detection of additional CPU flags to cpu_detect and additions to telemetry output.
This is not exhaustive but guided by features that [dynarmic utilizes](bcfe377aaa/src/dynarmic/backend/x64/host_feature.h (L12-L33)) as well as features that are currently utilized but not reported to telemetry(invariant_tsc). This is intended to guide future optimizations.
AVX512 in particular is broken up into its individual subsets and some other processor features such as [sha](https://en.wikipedia.org/wiki/Intel_SHA_extensions) and [gfni](https://en.wikipedia.org/wiki/AVX-512#GFNI) are added to have some forward-facing data-points.
What used to be a single `CPU_Extension_x64_AVX512` telemetry field
is also broken up into individual `CPU_Extension_x64_AVX512{F,VL,CD,...}` fields.
For unknown reasons, this flag may persist after the application has been closed.
Removing this flag when restoring the UI state ensures that a frameless window will not be shown on startup.