PR/Commit Owner: CamilleLaVey
This PR contains changes complementary to the MSAA refactor from some weeks ago, adds proper shader convert to depth, stencil for msaa and non msaa convertions; removes redundant helpers and unify paths on the resolve functions, just to make the readability and maintainability better; includes fixes for the blit operations on Nvidia, Intel/Windows (previously banned) and ensures Linux retain the fix without extra burden; fixes the QCOM driver bug on resolution upscaling on any games above x1 (includes turnip on A8xx series) and fixes crashes/ resolution upscaled bugs on certain games that used to have wrong viewporting effect on screen or directly device loss on Vulkan. Adds fixes for regressions caused by previous MSAA refactor on games as Fire Emblem: Engage.
Special Thanks
1.- Big Smolio (@Gidoly)
Co-authored-by: CamilleLaVey <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4287
Reviewed-by: CamilleLaVey <[email protected]>
Reviewed-by: Samuel <[email protected]>
Closeseden-emulator/Issue-Reports#8Closeseden-emulator/Issue-Reports#428
Currently, [Android's input layer](https://android.googlesource.com/platform/frameworks/base.git/+/refs/heads/android16-release/data/keyboards/Vendor_057e_Product_2009.kl#54) doesn't return `KEYCODE_DPAD_*` for the left Joy-Con, we fall back to the scan code in this case, this will also fix most third party Joy-Con controllers.
- The scan codes are not reliable and may vary from device to another. I searched for (0x220-0x223) values in the [android repo](https://android.googlesource.com/platform/frameworks/base.git/+/refs/heads/android16-release/data/keyboards) and they all have the same DPAD_* key mapping, so not a big issue just might cause future issues if Google change the mapping in another vendor. I could simply limit the fix to the [left Joy-Con](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-ids.h#L1096-L1105) `if (event.keyCode == 0 && event.device.vendorId == 0x057e && event.device.productId == 0x2006)`.
- Auto mapping doesn't work, I'm not very familiar with the JNI Specification, I managed to implement the below workaround, it basically checks if it's the left Joy-Con and add the first four DPAD_* keycodes
```cpp
// ./src/input_common/drivers/android.cpp
ButtonMapping Android::GetButtonMappingForDevice(const Common::ParamPackage& params) {
// ...
const char *yuzu_device_name = env->GetStringUTFChars((jstring) env->CallObjectMethod(j_device, Common::Android::GetYuzuDeviceGetName()), &isCopy);
const char *switch_left_string_name = "Nintendo Switch Left Joy-Con";
bool is_switch_left = strncmp(yuzu_device_name, switch_left_string_name, strlen(switch_left_string_name)) == 0;
std::set<s32> available_keys;
for (size_t i = 0; i < keycode_ids.size(); ++i) {
if (j_has_keys[i] || (is_switch_left && i <= 3)) {
available_keys.insert(keycode_ids[i]);
}
}
// ...
}
```
Signed-off-by: crueter <[email protected]>
Authored-by: Anas Bouzid <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4225
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Adds a basic carousel view, or essentially a horizontal list a la Android/Qt Quick.
Lacks a lot of niceties like autoscroll, smooth shifts, etc. Will work on those later
Also fixed a bug introduced recently that capped game icon size to 8 at the low end, breaking the None option
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4112
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Shinmegumi <[email protected]>
Reviewed-by: Lizzie <[email protected]>
- Remove unnecessary icon update code (the UI reloads this stuff anyways); test on Windows please
- Cleaned up a bunch of duplicated/unused code within the game list
- Fix the game list constantly reloading on macOS
* When you reconstruct the entire directory list on the watcher the directoryChanged signal fires on macOS--seems like a behavioral change that occurred somewhere in the 6.8 release cycle--and it would enter an infinite loop very quickly
* To fix this, only the differences between the current and old watch list are accounted for on both ends.
* Since this bug is now fixed, macOS uses Qt 6.11.1 now. Should theoretically improve our situation.
- Fix the external content watcher crashing; the worker would attempt to read files that didn't exist without any bounds since its cache was still pointing to that file.
This supersedes and replaces #4099.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4106
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Something weird is happening with the CI that causes frequent build errors. For reasons I am not entirely certain of, Ninja fails to properly spawn a POSIX shell instance during the Make phase.
More investigation is in order, but for now fix it with the grand power of shelling out to CMake script
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4047
Reviewed-by: Lizzie <[email protected]>
Closes#3480
moves the game list model/worker/private stuff to qt_common for later
use in QML
- `qt_common/game_list/model.{cpp,h}` is the model
- `yuzu/game/game_{grid,tree}.*` are the views
- `yuzu/game/game_list.cpp` is the presenter
This was done very lazily in a manner that "works" while largely
maintaining existing structure as much as possible. Most of it is
copy-paste, with some bonus reworks/cleanups thrown in.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4042
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
e.g. Serfrost's Defogger will now be named "Serfrosts Defogger" by
default, instead of "serfrosts_base_defogger_v2-4"
Note that for atmosphere mods it still uses the zip folder name, since otherwise their default name will just be the game's Title ID.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4043
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: MaranBr <[email protected]>
If YUZU_USE_BUNDLED_OPENSSL is off and OpenSSL is *not* installed to the
system, pulls in OpenSSL and Jimmy Park's CMake wrapper, then configures + builds from source.
Some patches were made on top of OpenSSL and openssl-cmake:
- USE_CCACHE is respected from UseCcache.cmake
- CXX/CFLAGS are passed from CMake to the configure script, which sends
those to the compiler
- Uses a bundled cert.h akin to the bundled OpenSSL build
Closes#3614
~~Before merge: remove verbose stuff~~ actually useful so nvm
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4032
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
Matches the build ID and compiler now.
Note that this could still use some work on the Windows side of things.
Ideally, it would just replace the executables in place; however, I
think using the setup files will be better.
Most of my concerns w.r.t this issue is that users will want to install
multiple in the same place; however, I think it's fair to just not
support the older versions at all for now. If users really want to do
that, they can use the portable versions and cry about it.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4019
Reviewed-by: CamilleLaVey <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Lizzie <[email protected]>
R8 minifies the UpdateResult's data class to remove the `Set...`
methods, as it's technically not used in Kotlin/Java land.
Just force the minifier to keep it
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3909
Checks latest release and opens a dialog containing the changelog, and
allow the user to select a specific build to download. After
downloading, it prompts the user to open it.
On Windows, this just opens up the zip in File Explorer. In the future setup files will be available. On macOS this opens up the DMG in Finder so the user can drag it to the Applications folder. Android retains the auto-update functionality from before, but updated to the new scheme. Body/View on Forgejo are not implemented, that should be in a future PR.
Additionally, moved some common httplib incantations to `Common::Net`. This will serve as the common network accessor and JSON parser from here on out.
TODO:
- [x] android :(
- [x] Search for builds based on keywords, with weights towards certain builds (e.g. macOS will search for dmg then tar.gz, windows msvc then mingw/exe then zip, etc.)
- [x] remove linux leftovers
- [x] don't allow asset selection on platforms w/o assets
- [x] nightly changelog should be in the real
FUTURE IMPLEMENTATION:
- [ ] Body/View on Forgejo for Android
- [ ] Setup files for Windows (Eden/nightly are separate) -- maybe portable/setup selector?
- [ ] Something else I'm forgetting
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3845
Related: [RFC3870](https://git.eden-emu.dev/eden-emu/eden/issues/3870)
Nightly and stable releases are now served through
`nightly.eden-emu.dev` and `stable.eden-emu.dev`, respectively. These
are stored using Backblaze, and served and cached through the Cloudflare
CDN. Ideally this will reduce costs, though I'll have to wait for my
first invoice to be certain.
These will serve as the new download locations going forward. Since we
have full control over this API, we can make any adjustments we want as
needed. For now, all it does is provide `tag_name`, `name`, and `body`,
the latter of which will be used for the upcoming updater PR.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3879
Reviewed-by: CamilleLaVey <[email protected]>
Reviewed-by: MaranBr <[email protected]>
For some unknown reason, bundled OpenSSL likes the `https` scheme,
whereas system OpenSSL (on Gentoo at least) does not... even when the
bundled OpenSSL is built exactly like the Gentoo one, certificate and
all...
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3843
Closes#3707
All this does is anchor the left and right-most cards to their
respective edges, and then equally distributes the gaps between cards
thereafter.
Don't even bother trying to figure out what the hell I just wrote. I'm a
UI designer, not a mathematician.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3829
- The Xcode generator /mandates/ that you pass in the `.icon` directory
into the build system, where it can then compose the asset itself.
- Assets.car and eden.icns were improperly handled; they are now
automatically generated and should properly be applied as needed. I
will need someone on Tahoe to confirm, however, as I am on Sequoia.
- Added some missing frameworks, ported from the KosmicKrisp branch.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3782
Original text, per the emailed patch:
---------------
Hello,
I am submitting a small fix to prevent an unintended abort when _GLIBCXX_ASSERTIONS is enabled, caused by out-of-bounds access in debug logging.
Background / Issue
In the server-side implementations of ITimeZoneService::ToPosixTime and ToPosixTimeWithMyRule, the SCOPE_EXIT debug logging previously accessed out_times[0] and out_times[1] unconditionally.
However, out_times is an IPC-provided output buffer (OutArray, which inherits from std::span). Its length depends on the caller-provided buffer capacity. During debugging, I encountered a case where out_times.size() == 1.
Under _GLIBCXX_ASSERTIONS, accessing out_times[1] triggers a std::span::operator[] assertion failure (std::__glibcxx_assert_fail) and aborts the process, causing the service thread to crash. This results in an unintended crash caused solely by debug logging.
Change Description
In the SCOPE_EXIT logging blocks of both ToPosixTime and ToPosixTimeWithMyRule, I added bounds checks before accessing out_times[0] and out_times[1]:
Access out_times[0] only if out_times.size() > 0
Access out_times[1] only if out_times.size() > 1
Print 0 when the corresponding element is unavailable
This change only affects debug log output. It does not modify IPC semantics or the time conversion logic itself.
Reproduction Context (for reference)
I encountered this issue while running 13 Sentinels: Aegis Rim (title ID: 01008D7016438000). During the “Load Game” flow, ToPosixTimeWithMyRule is invoked with an out_times buffer of length 1, which previously led to the out-of-bounds access in the logging code.
Thank you for your time and review.
Best regards,
darkpaper
Environment: Arch Linux / KDE / X11
This email and the accompanying patch were prepared with assistance from
an LLM.
Authored-by: darkpaper <[email protected]>
Signed-off-by: crueter <[email protected]>
Co-authored-by: darkpaper <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3668
Shows a short driver identification string in the Graphics Device combo box (desktop only, Android doesn't need this at all)
Largely meant for debugging, especially macOS. Maybe Windows in the future once MESA begins working on FOSS drivers over there. Linux on ARM platforms too maybe? And Nvidia
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3636
Reviewed-by: DraVee <[email protected]>
Reviewed-by: MaranBr <[email protected]>
Adds a location param to the Patch struct which can be used to delete
any installed mods at the user's request. You can delete multiple at
once too, or just one by right-clicking
You are not able to delete game updates, DLC, or SDMC mods.
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3626
Reviewed-by: DraVee <[email protected]>
Reviewed-by: Maufeat <[email protected]>
For reasons I am not knowledgeable enough to answer, NACP language and
nn::settings::Language don't match.
PR #3587 however erroneously matched language_index directly to NACP
language which caused those weird mismatches (since idx 2 = French
actually matches up to an NACP language of Japanese). So to get around
that just go back to the mapping of language idx -> nacp language
Signed-off-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3629
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: DraVee <[email protected]>