diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42717c496d..74365e2edb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,26 @@ if (YUZU_STATIC_ROOM)
set(fmt_FORCE_BUNDLED ON)
endif()
+# my unity/jumbo build
+option(ENABLE_UNITY_BUILD "Enable Unity/Jumbo build" OFF)
+
+# 0 compiles all files in
+# not ideal, but if you're going gung-ho with a unity build, expect failure
+# MSVC physically can't compile that many files into one TU, so we limit it to 100.
+if (MSVC)
+ set(_unity_default 100)
+else()
+ set(_unity_default 0)
+endif()
+
+set(UNITY_BATCH_SIZE ${_unity_default} CACHE STRING "Unity build batch size")
+
+if(MSVC AND ENABLE_UNITY_BUILD)
+ message(STATUS "Unity build")
+ # Unity builds need big objects for MSVC...
+ add_compile_options(/bigobj)
+endif()
+
# qt stuff
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
diff --git a/dist/dev.eden_emu.eden.svg b/dist/dev.eden_emu.eden.svg
index 7711945aa4..f88b52f625 100644
--- a/dist/dev.eden_emu.eden.svg
+++ b/dist/dev.eden_emu.eden.svg
@@ -1,21 +1,203 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ inkscape:current-layer="svg7" />
+
+
diff --git a/dist/eden.bmp b/dist/eden.bmp
index cffc04b308..888138ccf7 100644
Binary files a/dist/eden.bmp and b/dist/eden.bmp differ
diff --git a/dist/eden.ico b/dist/eden.ico
index 106742c9ba..45120ef312 100644
Binary files a/dist/eden.ico and b/dist/eden.ico differ
diff --git a/dist/qt_themes/default/icons/256x256/eden.png b/dist/qt_themes/default/icons/256x256/eden.png
index d7286ac4c6..3c4bd566a1 100644
Binary files a/dist/qt_themes/default/icons/256x256/eden.png and b/dist/qt_themes/default/icons/256x256/eden.png differ
diff --git a/docs/Deps.md b/docs/Deps.md
index a34e838534..80caf1685f 100644
--- a/docs/Deps.md
+++ b/docs/Deps.md
@@ -334,7 +334,7 @@ pacman -Syuu --needed --noconfirm $packages
HaikuOS
```sh
-pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.89_devel vulkan_devel qt6_base_devel qt6_declarative_devel libsdl2_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt5_devel qt6_5compat_devel glslang qt6_devel qt6_charts_devel
+pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.90_devel vulkan_devel qt6_base_devel qt6_declarative_devel libsdl2_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt5_devel qt6_5compat_devel glslang qt6_devel qt6_charts_devel
```
[Caveats](./Caveats.md#haikuos).
diff --git a/docs/Options.md b/docs/Options.md
index 3eb6effe92..adb401eaf1 100644
--- a/docs/Options.md
+++ b/docs/Options.md
@@ -40,6 +40,7 @@ These options control dependencies.
- This option is subject for removal.
- `YUZU_TESTS` (ON) Compile tests - requires Catch2
- `ENABLE_LTO` (OFF) Enable link-time optimization
+- `ENABLE_UNITY_BUILD` (OFF) Enables "Unity/Jumbo" builds
- Not recommended on Windows
- UNIX may be better off appending `-flto=thin` to compiler args
- `USE_FASTER_LINKER` (OFF) Check if a faster linker is available
diff --git a/docs/README.md b/docs/README.md
index 4ea532be8e..68775f99d8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -16,6 +16,7 @@ This contains documentation created by developers. This contains build instructi
- **[Dynarmic](./dynarmic)**
- **[Cross compilation](./CrossCompile.md)**
- **[Driver Bugs](./DriverBugs.md)**
+- **[Building Older Commits](./build/OlderCommits.md)**
## Policies
diff --git a/docs/build/OlderCommits.md b/docs/build/OlderCommits.md
new file mode 100644
index 0000000000..91e267213e
--- /dev/null
+++ b/docs/build/OlderCommits.md
@@ -0,0 +1,40 @@
+# Building Older Commits
+
+Bisecting and debugging older versions of Eden can be difficult, as many of our submodules have been deleted or removed. However, work has been done to make this process as simple as possible for users.
+
+## Script
+
+Copy the following script and store it in `fix.sh`:
+
+```sh
+#!/bin/sh -e
+
+git -C externals/discord-rpc checkout 0d8b2d6a37c6e47d62b37caa14708bf747c883bb
+git add externals/discord-rpc
+
+git -C externals/dynarmic checkout 05b7ba50588d1004e23ef91f1bda8be234be68f4
+git add externals/dynarmic
+
+git -C externals/mbedtls checkout ce4f81f4a926a0e0dcadd0128e016baba416e8ea
+git add externals/mbedtls
+
+git -C externals/oboe checkout e4f06f2143eb0173bf4a2bd15aae5e8cc3179405
+git add externals/oboe
+
+git -C externals/sirit checkout b870b062998244231a4f08004d3b25151732c5c5
+git add externals/sirit
+```
+
+Then, run `chmod +x fix.sh`
+
+## Submodules
+
+To check out submodules successfully, use this order of operations:
+
+```sh
+git submodule update --init --recursive --depth 1 --jobs 8 --progress
+./fix.sh
+git submodule update --init --recursive --depth 1 --jobs 8 --progress
+```
+
+And you should be good to go! If you check out a different commit that changes submodule commits, run the above command list again.
diff --git a/docs/user/Multiplayer.md b/docs/user/Multiplayer.md
index a501ba1d02..57c4495f46 100644
--- a/docs/user/Multiplayer.md
+++ b/docs/user/Multiplayer.md
@@ -56,7 +56,7 @@ Use this when you need to connect to a multiplayer room for LDN functionality in
- Multiplayer Options Configured in Eden Settings
- Network Access
-## Steps
+### Steps
There are 2 primary methods that you can use to connect to an existing room, depending on how the room is hosted.
- Joining a Public Lobby
@@ -70,7 +70,7 @@ There are 2 primary methods that you can use to connect to an existing room, dep
-### Joining a Public Lobby
+## Joining a Public Lobby
1. Open Eden and navigate to *Multiplayer → Browse Public Game Lobby*.
2. The **Public Room Browser** will now open and display a list of publicly accessible rooms. Find one you want to connect to and double click it.
@@ -90,7 +90,7 @@ If the hoster has not made the lobby public, or you don't want to find it in the
---
-# Hosting a Multiplayer Room
+## Hosting a Multiplayer Room
Use this guide for when you want to host a multiplayer lobby to play with others in Eden. In order to have someone access the room from outside your local network, see the *Access Your Multiplayer Room Externally* section for next steps.
**Click [Here](https://evilperson1337.notion.site/Hosting-a-Multiplayer-Room-2c357c2edaf6819481dbe8a99926cea2) for a version of this guide with images & visual elements.**
@@ -100,7 +100,7 @@ Use this guide for when you want to host a multiplayer lobby to play with others
- Network Access
- Ability to allow programs through the firewall on your device.
-## Steps
+### Steps
1. Open Eden and navigate to *Emulation → Multiplayer → Create Room.*
2. Fill out the following information in the popup dialog box.
@@ -120,7 +120,7 @@ Use this guide for when you want to host a multiplayer lobby to play with others
---
-# Access Your Multiplayer Room Externally
+## Access Your Multiplayer Room Externally
Quite often the person with whom you want to play is located off of your internal network (LAN). If you want to host a room and play with them you will need to get your devices to communicate with each other. This guide will go over your options on how to do this so that you can play together.
**Click [Here](https://evilperson1337.notion.site/Access-Your-Multiplayer-Room-Externally-2c357c2edaf681c0ab2ce2ee624d809d) for a version of this guide with images & visual elements.**
@@ -129,9 +129,9 @@ Quite often the person with whom you want to play is located off of your interna
- Eden set up and Functioning
- Network Access
-## Options
+### Options
-### Port Forwarding
+#### Port Forwarding
- **Difficulty Level**: High
@@ -148,8 +148,9 @@ The process works by creating a static mapping—often called a “port-forward
For our purposes we would pick the port we want to expose (*e.g. 24872*) and we would access our router's configuration and create a port-forward rule to send the traffic from an external connection to your local machine over our specified port (*24872)*. The exact way to do so, varies greatly by router manufacturer - and sometimes require contacting your ISP to do so depending on your agreement. You can look up your router on [*portforward.com*](https://portforward.com/router.htm) which may have instructions on how to do so for your specific equipment. If it is not there, you will have to use Google/ChatGPT to determine the steps for your equipment.
+Remember you can't have one port open for multiple devices at the same time - you must only host from one device (or do more convoluted networking which we will not cover here).
-### Use a Tunnelling Service
+#### Use a Tunnelling Service
- **Difficulty Level**: Easy
@@ -167,7 +168,7 @@ For our purposes we would spawn the listener for the port that way chose when ho
- [*Playit.GG*](https://playit.gg/)
-### Use a VPN Service
+#### Use a VPN Service
- **Difficulty**: Easy
@@ -189,7 +190,7 @@ The VPN solution is a good compromise between the tunnelling solution and port f
---
-# Finding the Server Information for a Multiplayer Room
+## Finding the Server Information for a Multiplayer Room
Use this guide when you need to determine the connection information for the Public Multiplayer Lobby you are connected to.
**Click [Here](https://evilperson1337.notion.site/Finding-the-Server-Information-for-a-Multiplayer-Room-2c557c2edaf6809e94e8ed3429b9eb26) for a version of this guide with images & visual elements.**
@@ -198,7 +199,7 @@ Use this guide when you need to determine the connection information for the Pub
- Eden set up and configured
- Internet Access
-## Steps
+### Steps
### Method 1: Grabbing the Address from the Log File
1. Open Eden and Connect to the room you want to identify.
@@ -222,7 +223,7 @@ Use this guide when you need to determine the connection information for the Pub
2. Open the terminal supported by your operating system.
3. Run one of the following commands, replacing ** with the name of the server from step 1.
- ### PowerShell Command [Windows Users]
+ #### PowerShell Command [Windows Users]
```powershell
# Calls the API to get the address and port information
@@ -235,7 +236,7 @@ Use this guide when you need to determine the connection information for the Pub
#}
```
- ### CURL Command [MacOS/Linux Users] **Requires jq*
+ #### CURL Command [MacOS/Linux Users] **Requires jq*
```bash
# Calls the API to get the address and port information
@@ -252,7 +253,7 @@ Use this guide when you need to determine the connection information for the Pub
---
-# Multiplayer for Local Co-Op Games
+## Multiplayer for Local Co-Op Games
Use this guide when you want to play with a friend on a different system for games that only support local co-op.
**Click [Here](https://evilperson1337.notion.site/Multiplayer-for-Local-Co-Op-Games-2c657c2edaf680c59975ec6b52022a2d) for a version of this guide with images & visual elements.**
@@ -271,7 +272,7 @@ In either situation at its core, we are emulating an input device on the host ma
- Parsec is free to use for personal, non-commercial use. For instructions on how to set up an account and install the client you should refer to the Parsec documentation on it's site.
- Parsec client installed on your machine and remote (friend's) machine
-## Steps
+### Steps
@@ -294,3 +295,22 @@ This guide will assume you are the one hosting the game and go over things *Pars
10. Set up the remote player's controller.
11. Hit **OK** to apply the changes.
12. Launch the game you want to play and enter the co-op mode. How this works depends on the game, so you will have to look in the menus or online to find out.
+
+## Metaserver troubleshooting
+
+If you can't connect to the metaserver, it's likely your ISP is blocking the requests.
+
+### Linux and Steamdeck
+
+Most Linux systems and Steamdeck should allow to modify the base `/etc/hosts` file, this should fix the DNS lookup issue; hence add the following to said file:
+```
+28.165.181.135 api.ynet-fun.xyz api.ynet-fun.xyz
+```
+
+### Zapret
+
+In `lists/list-general.txt` add the following:
+```
+api.ynet-fun.xyz
+ynet-fun.xyz
+```
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 00bdf10a4f..ba0545b7a7 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -62,6 +62,12 @@ endif()
# unordered_dense
AddJsonPackage(unordered-dense)
+# httplib
+if (IOS)
+ set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
+endif()
+AddJsonPackage(httplib)
+
if (YUZU_STATIC_ROOM)
return()
endif()
@@ -227,9 +233,6 @@ if (VulkanMemoryAllocator_ADDED)
endif()
endif()
-# httplib
-AddJsonPackage(httplib)
-
# cpp-jwt
if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
AddJsonPackage(cpp-jwt)
diff --git a/externals/cpmfile.json b/externals/cpmfile.json
index f849426a4d..03303a5896 100644
--- a/externals/cpmfile.json
+++ b/externals/cpmfile.json
@@ -36,7 +36,8 @@
"0002-fix-zstd.patch"
],
"options": [
- "HTTPLIB_REQUIRE_OPENSSL ON"
+ "HTTPLIB_REQUIRE_OPENSSL ON",
+ "HTTPLIB_DISABLE_MACOSX_AUTOMATIC_ROOT_CERTIFICATES ON"
]
},
"cpp-jwt": {
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 600b985609..c478bb33a7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,8 +7,13 @@
# Enable modules to include each other's files
include_directories(.)
+if (ENABLE_UNITY_BUILD)
+ set(CMAKE_UNITY_BUILD ON)
+ set(CMAKE_UNITY_BUILD_BATCH_SIZE ${UNITY_BATCH_SIZE})
+endif()
+
# Dynarmic
-if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 AND NOT YUZU_STATIC_ROOM)
+if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64) AND NOT YUZU_STATIC_ROOM)
add_subdirectory(dynarmic)
add_library(dynarmic::dynarmic ALIAS dynarmic)
endif()
diff --git a/src/android/app/src/main/res/drawable/ic_launcher_foreground.png b/src/android/app/src/main/res/drawable/ic_launcher_foreground.png
index 8b970cd4cc..53f1cace9b 100644
Binary files a/src/android/app/src/main/res/drawable/ic_launcher_foreground.png and b/src/android/app/src/main/res/drawable/ic_launcher_foreground.png differ
diff --git a/src/android/app/src/main/res/drawable/ic_yuzu.png b/src/android/app/src/main/res/drawable/ic_yuzu.png
index 7e2461ba24..fce02afa1f 100644
Binary files a/src/android/app/src/main/res/drawable/ic_yuzu.png and b/src/android/app/src/main/res/drawable/ic_yuzu.png differ
diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_splash.png b/src/android/app/src/main/res/drawable/ic_yuzu_splash.png
index c9404d9937..0e43cb9374 100644
Binary files a/src/android/app/src/main/res/drawable/ic_yuzu_splash.png and b/src/android/app/src/main/res/drawable/ic_yuzu_splash.png differ
diff --git a/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index 74c6677dd9..23bc2897c3 100644
Binary files a/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 31a01461b4..f630e793e3 100644
Binary files a/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 3f0023f573..1daa3c624f 100644
Binary files a/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 6e28b3d598..7fc64e1393 100644
Binary files a/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 39f583b630..53ed9b9914 100644
Binary files a/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/src/android/app/src/main/res/values/colors.xml b/src/android/app/src/main/res/values/colors.xml
index ad3412ed27..472567b323 100644
--- a/src/android/app/src/main/res/values/colors.xml
+++ b/src/android/app/src/main/res/values/colors.xml
@@ -1 +1 @@
-#43fcfcff
+#1F143C
diff --git a/src/audio_core/adsp/apps/opus/opus_decode_object.cpp b/src/audio_core/adsp/apps/opus/opus_decode_object.cpp
index e2b9eb566c..006d2741cc 100644
--- a/src/audio_core/adsp/apps/opus/opus_decode_object.cpp
+++ b/src/audio_core/adsp/apps/opus/opus_decode_object.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -5,17 +8,11 @@
#include "common/assert.h"
namespace AudioCore::ADSP::OpusDecoder {
-namespace {
-bool IsValidChannelCount(u32 channel_count) {
- return channel_count == 1 || channel_count == 2;
-}
-} // namespace
u32 OpusDecodeObject::GetWorkBufferSize(u32 channel_count) {
- if (!IsValidChannelCount(channel_count)) {
+ if (channel_count == 1 || channel_count == 2)
return 0;
- }
- return static_cast(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count);
+ return u32(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count);
}
OpusDecodeObject& OpusDecodeObject::Initialize(u64 buffer, u64 buffer2) {
diff --git a/src/audio_core/adsp/apps/opus/opus_decoder.cpp b/src/audio_core/adsp/apps/opus/opus_decoder.cpp
index 8a009c04c7..f0e8341e80 100644
--- a/src/audio_core/adsp/apps/opus/opus_decoder.cpp
+++ b/src/audio_core/adsp/apps/opus/opus_decoder.cpp
@@ -22,10 +22,6 @@ namespace AudioCore::ADSP::OpusDecoder {
namespace {
constexpr size_t OpusStreamCountMax = 255;
-bool IsValidChannelCount(u32 channel_count) {
- return channel_count == 1 || channel_count == 2;
-}
-
bool IsValidMultiStreamChannelCount(u32 channel_count) {
return channel_count <= OpusStreamCountMax;
}
@@ -90,7 +86,7 @@ void OpusDecoder::Main(std::stop_token stop_token) {
case GetWorkBufferSize: {
auto channel_count = static_cast(shared_memory->host_send_data[0]);
- ASSERT(IsValidChannelCount(channel_count));
+ ASSERT(channel_count == 1 || channel_count == 2);
shared_memory->dsp_return_data[0] = OpusDecodeObject::GetWorkBufferSize(channel_count);
Send(Direction::Host, Message::GetWorkBufferSizeOK);
@@ -103,7 +99,7 @@ void OpusDecoder::Main(std::stop_token stop_token) {
auto channel_count = static_cast(shared_memory->host_send_data[3]);
ASSERT(sample_rate >= 0);
- ASSERT(IsValidChannelCount(channel_count));
+ ASSERT(channel_count == 1 || channel_count == 2);
ASSERT(buffer_size >= OpusDecodeObject::GetWorkBufferSize(channel_count));
auto& decoder_object = OpusDecodeObject::Initialize(buffer, buffer);
diff --git a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp
index 05cf3975db..6ff1ac430a 100644
--- a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp
+++ b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -7,13 +10,10 @@
namespace AudioCore::ADSP::OpusDecoder {
namespace {
-bool IsValidChannelCount(u32 channel_count) {
- return channel_count == 1 || channel_count == 2;
-}
-
bool IsValidStreamCounts(u32 total_stream_count, u32 stereo_stream_count) {
- return total_stream_count > 0 && static_cast(stereo_stream_count) >= 0 &&
- stereo_stream_count <= total_stream_count && IsValidChannelCount(total_stream_count);
+ return total_stream_count > 0 && s32(stereo_stream_count) >= 0
+ && stereo_stream_count <= total_stream_count
+ && (total_stream_count == 1 || total_stream_count == 2);
}
} // namespace
diff --git a/src/audio_core/in/audio_in.cpp b/src/audio_core/in/audio_in.cpp
index df8c44d1f2..fecdddc603 100644
--- a/src/audio_core/in/audio_in.cpp
+++ b/src/audio_core/in/audio_in.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
diff --git a/src/audio_core/in/audio_in_system.cpp b/src/audio_core/in/audio_in_system.cpp
index ec1f565736..9a5e0cea7f 100644
--- a/src/audio_core/in/audio_in_system.cpp
+++ b/src/audio_core/in/audio_in_system.cpp
@@ -14,14 +14,16 @@
#include "core/core_timing.h"
#include "core/hle/kernel/k_event.h"
+namespace AudioCore::AudioIn {
+
// See texture_cache/util.h
template
#if BOOST_VERSION >= 108100 || __GNUC__ > 12
-[[nodiscard]] boost::container::static_vector FixStaticVectorADL(const boost::container::static_vector& v) {
+[[nodiscard]] static inline boost::container::static_vector FixStaticVectorADL(const boost::container::static_vector& v) {
return v;
}
#else
-[[nodiscard]] std::vector FixStaticVectorADL(const boost::container::static_vector& v) {
+[[nodiscard]] static inline std::vector FixStaticVectorADL(const boost::container::static_vector& v) {
std::vector u;
for (auto const& e : v)
u.push_back(e);
@@ -29,8 +31,6 @@ template
}
#endif
-namespace AudioCore::AudioIn {
-
System::System(Core::System& system_, Kernel::KEvent* event_, const size_t session_id_)
: system{system_}, buffer_event{event_},
session_id{session_id_}, session{std::make_unique(system_)} {}
diff --git a/src/audio_core/out/audio_out_system.cpp b/src/audio_core/out/audio_out_system.cpp
index dcb0d0694e..f0ee2386e6 100644
--- a/src/audio_core/out/audio_out_system.cpp
+++ b/src/audio_core/out/audio_out_system.cpp
@@ -14,14 +14,15 @@
#include "core/core_timing.h"
#include "core/hle/kernel/k_event.h"
+namespace AudioCore::AudioOut {
// See texture_cache/util.h
template
#if BOOST_VERSION >= 108100 || __GNUC__ > 12
-[[nodiscard]] boost::container::static_vector FixStaticVectorADL(const boost::container::static_vector& v) {
+[[nodiscard]] static inline boost::container::static_vector FixStaticVectorADL(const boost::container::static_vector& v) {
return v;
}
#else
-[[nodiscard]] std::vector FixStaticVectorADL(const boost::container::static_vector& v) {
+[[nodiscard]] static inline std::vector FixStaticVectorADL(const boost::container::static_vector& v) {
std::vector u;
for (auto const& e : v)
u.push_back(e);
@@ -29,8 +30,6 @@ template
}
#endif
-namespace AudioCore::AudioOut {
-
System::System(Core::System& system_, Kernel::KEvent* event_, size_t session_id_)
: system{system_}, buffer_event{event_},
session_id{session_id_}, session{std::make_unique(system_)} {}
diff --git a/src/audio_core/renderer/command/effect/capture.cpp b/src/audio_core/renderer/command/effect/capture.cpp
index 4267580128..01a5b5e844 100644
--- a/src/audio_core/renderer/command/effect/capture.cpp
+++ b/src/audio_core/renderer/command/effect/capture.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
@@ -16,7 +16,7 @@ namespace AudioCore::Renderer {
* @param memory - Core memory for writing.
* @param aux_info - Memory address pointing to the AuxInfo to reset.
*/
-static void ResetAuxBufferDsp(Core::Memory::Memory& memory, const CpuAddr aux_info) {
+static void CaptureResetAuxBufferDsp(Core::Memory::Memory& memory, const CpuAddr aux_info) {
if (aux_info == 0) {
LOG_ERROR(Service_Audio, "Aux info is 0!");
return;
@@ -134,7 +134,7 @@ void CaptureCommand::Process(const AudioRenderer::CommandListProcessor& processo
WriteAuxBufferDsp(*processor.memory, send_buffer_info, send_buffer, count_max, input_buffer,
processor.sample_count, write_offset, update_count);
} else {
- ResetAuxBufferDsp(*processor.memory, send_buffer_info);
+ CaptureResetAuxBufferDsp(*processor.memory, send_buffer_info);
}
}
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 98c1688441..2846058df9 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -146,7 +146,8 @@ add_library(
zstd_compression.cpp
zstd_compression.h
fs/ryujinx_compat.h fs/ryujinx_compat.cpp
- fs/symlink.h fs/symlink.cpp)
+ fs/symlink.h fs/symlink.cpp
+ httplib.h)
if(WIN32)
target_sources(common PRIVATE windows/timer_resolution.cpp
@@ -244,7 +245,7 @@ else()
target_link_libraries(common PUBLIC Boost::headers)
endif()
-target_link_libraries(common PUBLIC Boost::filesystem Boost::context)
+target_link_libraries(common PUBLIC Boost::filesystem Boost::context httplib::httplib)
if (lz4_ADDED)
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
diff --git a/src/common/cityhash.cpp b/src/common/cityhash.cpp
index d50ac9e6cf..030f5981ff 100644
--- a/src/common/cityhash.cpp
+++ b/src/common/cityhash.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: 2011 Google, Inc.
// SPDX-FileContributor: Geoff Pike
// SPDX-FileContributor: Jyrki Alakuijala
@@ -27,8 +30,6 @@
#define WORDS_BIGENDIAN 1
#endif
-using namespace std;
-
namespace Common {
static u64 unaligned_load64(const char* p) {
@@ -135,18 +136,18 @@ static u64 HashLen17to32(const char* s, size_t len) {
// Return a 16-byte hash for 48 bytes. Quick and dirty.
// Callers do best to use "random-looking" values for a and b.
-static pair WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) {
+static std::pair WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) {
a += w;
b = Rotate(b + a + z, 21);
u64 c = a;
a += x;
a += y;
b += Rotate(a, 44);
- return make_pair(a + z, b + c);
+ return std::make_pair(a + z, b + c);
}
// Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty.
-static pair WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) {
+static std::pair WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) {
return WeakHashLen32WithSeeds(Fetch64(s), Fetch64(s + 8), Fetch64(s + 16), Fetch64(s + 24), a,
b);
}
@@ -189,8 +190,8 @@ u64 CityHash64(const char* s, size_t len) {
u64 x = Fetch64(s + len - 40);
u64 y = Fetch64(s + len - 16) + Fetch64(s + len - 56);
u64 z = HashLen16(Fetch64(s + len - 48) + len, Fetch64(s + len - 24));
- pair v = WeakHashLen32WithSeeds(s + len - 64, len, z);
- pair w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x);
+ std::pair v = WeakHashLen32WithSeeds(s + len - 64, len, z);
+ std::pair w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x);
x = x * k1 + Fetch64(s);
// Decrease len to the nearest multiple of 64, and operate on 64-byte chunks.
@@ -258,7 +259,7 @@ u128 CityHash128WithSeed(const char* s, size_t len, u128 seed) {
// We expect len >= 128 to be the common case. Keep 56 bytes of state:
// v, w, x, y, and z.
- pair v, w;
+ std::pair v, w;
u64 x = seed[0];
u64 y = seed[1];
u64 z = len * k1;
diff --git a/src/common/httplib.h b/src/common/httplib.h
new file mode 100644
index 0000000000..0da315668d
--- /dev/null
+++ b/src/common/httplib.h
@@ -0,0 +1,20 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
+
+#define CPPHTTPLIB_DISABLE_MACOSX_AUTOMATIC_ROOT_CERTIFICATES 1
+#define CPPHTTPLIB_OPENSSL_SUPPORT 1
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+#endif
+#include
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
+#undef INVALID_SOCKET
diff --git a/src/common/settings.h b/src/common/settings.h
index 8cd55bcdd3..2540282790 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -287,8 +287,6 @@ struct Values {
true,
&use_custom_cpu_ticks};
- SwitchableSetting vtable_bouncing{linkage, true, "vtable_bouncing", Category::Cpu};
-
Setting cpuopt_page_tables{linkage, true, "cpuopt_page_tables", Category::CpuDebug};
Setting cpuopt_block_linking{linkage, true, "cpuopt_block_linking", Category::CpuDebug};
Setting cpuopt_return_stack_buffer{linkage, true, "cpuopt_return_stack_buffer",
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp
index 4cc42ccbd5..a74bda47d7 100644
--- a/src/common/x64/cpu_detect.cpp
+++ b/src/common/x64/cpu_detect.cpp
@@ -77,7 +77,7 @@ CPUCaps::Manufacturer CPUCaps::ParseManufacturer(std::string_view brand_string)
}
// Detects the various CPU features
-static CPUCaps Detect() {
+static CPUCaps DetectCPUCapabilities() {
CPUCaps caps = {};
// Assumes the CPU supports the CPUID instruction. Those that don't would likely not support
@@ -208,7 +208,7 @@ static CPUCaps Detect() {
}
const CPUCaps& GetCPUCaps() {
- static CPUCaps caps = Detect();
+ static CPUCaps caps = DetectCPUCapabilities();
return caps;
}
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 08a2d0e2db..39aebd5f48 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -1246,7 +1246,7 @@ if (HAS_NCE)
target_link_libraries(core PRIVATE merry::oaknut)
endif()
-if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
+if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64)
target_sources(core PRIVATE
arm/dynarmic/arm_dynarmic.h
arm/dynarmic/arm_dynarmic_64.cpp
@@ -1269,7 +1269,6 @@ endif()
target_sources(core PRIVATE hle/service/ssl/ssl_backend_openssl.cpp)
target_link_libraries(core PRIVATE OpenSSL::SSL OpenSSL::Crypto)
-target_compile_definitions(core PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
# TODO
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h
index 46384f7e6d..4fe238efe7 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.h
+++ b/src/core/arm/dynarmic/arm_dynarmic.h
@@ -1,23 +1,24 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include
+#pragma once
+#include
#include "core/arm/arm_interface.h"
namespace Core {
-constexpr Dynarmic::HaltReason StepThread = Dynarmic::HaltReason::Step;
-constexpr Dynarmic::HaltReason DataAbort = Dynarmic::HaltReason::MemoryAbort;
-constexpr Dynarmic::HaltReason BreakLoop = Dynarmic::HaltReason::UserDefined2;
-constexpr Dynarmic::HaltReason SupervisorCall = Dynarmic::HaltReason::UserDefined3;
-constexpr Dynarmic::HaltReason InstructionBreakpoint = Dynarmic::HaltReason::UserDefined4;
-constexpr Dynarmic::HaltReason PrefetchAbort = Dynarmic::HaltReason::UserDefined6;
+inline constexpr Dynarmic::HaltReason StepThread = Dynarmic::HaltReason::Step;
+inline constexpr Dynarmic::HaltReason DataAbort = Dynarmic::HaltReason::MemoryAbort;
+inline constexpr Dynarmic::HaltReason BreakLoop = Dynarmic::HaltReason::UserDefined2;
+inline constexpr Dynarmic::HaltReason SupervisorCall = Dynarmic::HaltReason::UserDefined3;
+inline constexpr Dynarmic::HaltReason InstructionBreakpoint = Dynarmic::HaltReason::UserDefined4;
+inline constexpr Dynarmic::HaltReason PrefetchAbort = Dynarmic::HaltReason::UserDefined6;
-constexpr HaltReason TranslateHaltReason(Dynarmic::HaltReason hr) {
+[[nodiscard]] inline constexpr HaltReason TranslateHaltReason(Dynarmic::HaltReason hr) {
static_assert(u64(HaltReason::StepThread) == u64(StepThread));
static_assert(u64(HaltReason::DataAbort) == u64(DataAbort));
static_assert(u64(HaltReason::BreakLoop) == u64(BreakLoop));
diff --git a/src/core/arm/dynarmic/dynarmic_cp15.cpp b/src/core/arm/dynarmic/dynarmic_cp15.cpp
index 7cb1d58398..28695a1058 100644
--- a/src/core/arm/dynarmic/dynarmic_cp15.cpp
+++ b/src/core/arm/dynarmic/dynarmic_cp15.cpp
@@ -59,14 +59,10 @@ CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1
#if defined(_MSC_VER) && defined(ARCHITECTURE_x86_64)
_mm_mfence();
_mm_lfence();
-#elif defined(ARCHITECTURE_x86_64)
- asm volatile("mfence\n\tlfence\n\t" : : : "memory");
#elif defined(_MSC_VER) && defined(ARCHITECTURE_arm64)
_Memory_barrier();
-#elif defined(ARCHITECTURE_arm64)
- asm volatile("dsb sy\n\t" : : : "memory");
#else
-#error Unsupported architecture
+ __sync_synchronize();
#endif
return 0;
},
@@ -78,14 +74,10 @@ CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1
[](void*, std::uint32_t, std::uint32_t) -> std::uint64_t {
#if defined(_MSC_VER) && defined(ARCHITECTURE_x86_64)
_mm_mfence();
-#elif defined(ARCHITECTURE_x86_64)
- asm volatile("mfence\n\t" : : : "memory");
#elif defined(_MSC_VER) && defined(ARCHITECTURE_arm64)
_Memory_barrier();
-#elif defined(ARCHITECTURE_arm64)
- asm volatile("dmb sy\n\t" : : : "memory");
#else
-#error Unsupported architecture
+ __sync_synchronize();
#endif
return 0;
},
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index b216dc2094..5d2a3485b7 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -25,6 +25,7 @@ namespace Core::Timing {
constexpr s64 MAX_SLICE_LENGTH = 10000;
+#undef CreateEvent
std::shared_ptr CreateEvent(std::string name, TimedCallback&& callback) {
return std::make_shared(std::move(callback), std::move(name));
}
diff --git a/src/core/file_sys/fs_save_data_types.h b/src/core/file_sys/fs_save_data_types.h
index cdefe908d5..f164293544 100644
--- a/src/core/file_sys/fs_save_data_types.h
+++ b/src/core/file_sys/fs_save_data_types.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
@@ -185,13 +185,13 @@ static_assert(sizeof(SaveDataFilter) == 0x48, "SaveDataFilter has invalid size."
static_assert(std::is_trivially_copyable_v,
"Data type must be trivially copyable.");
-struct HashSalt {
+struct SaveDataHashSalt {
static constexpr size_t Size = 32;
std::array value;
};
-static_assert(std::is_trivially_copyable_v, "Data type must be trivially copyable.");
-static_assert(sizeof(HashSalt) == HashSalt::Size);
+static_assert(std::is_trivially_copyable_v, "Data type must be trivially copyable.");
+static_assert(sizeof(SaveDataHashSalt) == SaveDataHashSalt::Size);
struct SaveDataCreationInfo2 {
@@ -210,7 +210,7 @@ struct SaveDataCreationInfo2 {
u8 reserved1;
bool is_hash_salt_enabled;
u8 reserved2;
- HashSalt hash_salt;
+ SaveDataHashSalt hash_salt;
SaveDataMetaType meta_type;
u8 reserved3;
s32 meta_size;
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp
index 8807bbd0f7..fffb8b5f37 100644
--- a/src/core/file_sys/fsmitm_romfsbuild.cpp
+++ b/src/core/file_sys/fsmitm_romfsbuild.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -11,7 +14,7 @@
#include "core/file_sys/vfs/vfs.h"
#include "core/file_sys/vfs/vfs_vector.h"
-namespace FileSys {
+namespace FileSys::RomFSBuilder {
constexpr u64 FS_MAX_PATH = 0x301;
diff --git a/src/core/file_sys/fsmitm_romfsbuild.h b/src/core/file_sys/fsmitm_romfsbuild.h
index dd7ed4a7bf..38bf8749e8 100644
--- a/src/core/file_sys/fsmitm_romfsbuild.h
+++ b/src/core/file_sys/fsmitm_romfsbuild.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -9,7 +12,7 @@
#include "common/common_types.h"
#include "core/file_sys/vfs/vfs.h"
-namespace FileSys {
+namespace FileSys::RomFSBuilder {
struct RomFSBuildDirectoryContext;
struct RomFSBuildFileContext;
diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp
index 9cf4928cd9..120a6fd503 100644
--- a/src/core/file_sys/romfs.cpp
+++ b/src/core/file_sys/romfs.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -38,7 +38,7 @@ struct RomFSHeader {
};
static_assert(sizeof(RomFSHeader) == 0x50, "RomFSHeader has incorrect size.");
-struct DirectoryEntry {
+struct RomFSDirectoryEntry {
u32_le parent;
u32_le sibling;
u32_le child_dir;
@@ -46,9 +46,9 @@ struct DirectoryEntry {
u32_le hash;
u32_le name_length;
};
-static_assert(sizeof(DirectoryEntry) == 0x18, "DirectoryEntry has incorrect size.");
+static_assert(sizeof(RomFSDirectoryEntry) == 0x18, "RomFSDirectoryEntry has incorrect size.");
-struct FileEntry {
+struct RomFSFileEntry {
u32_le parent;
u32_le sibling;
u64_le offset;
@@ -56,7 +56,7 @@ struct FileEntry {
u32_le hash;
u32_le name_length;
};
-static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size.");
+static_assert(sizeof(RomFSFileEntry) == 0x20, "RomFSFileEntry has incorrect size.");
struct RomFSTraversalContext {
RomFSHeader header;
@@ -84,14 +84,14 @@ std::pair GetEntry(const RomFSTraversalContext& ctx, siz
return {entry, std::move(name)};
}
-std::pair GetDirectoryEntry(const RomFSTraversalContext& ctx,
+std::pair GetDirectoryEntry(const RomFSTraversalContext& ctx,
size_t directory_offset) {
- return GetEntry(ctx, directory_offset);
+ return GetEntry(ctx, directory_offset);
}
-std::pair GetFileEntry(const RomFSTraversalContext& ctx,
+std::pair GetFileEntry(const RomFSTraversalContext& ctx,
size_t file_offset) {
- return GetEntry(ctx, file_offset);
+ return GetEntry(ctx, file_offset);
}
void ProcessFile(const RomFSTraversalContext& ctx, u32 this_file_offset,
@@ -163,7 +163,7 @@ VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext) {
if (dir == nullptr)
return nullptr;
- RomFSBuildContext ctx{dir, ext};
+ RomFSBuilder::RomFSBuildContext ctx{dir, ext};
return ConcatenatedVfsFile::MakeConcatenatedFile(0, dir->GetName(), ctx.Build());
}
diff --git a/src/core/file_sys/vfs/vfs.cpp b/src/core/file_sys/vfs/vfs.cpp
index b85b843e3e..19d7be2270 100644
--- a/src/core/file_sys/vfs/vfs.cpp
+++ b/src/core/file_sys/vfs/vfs.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -10,6 +10,12 @@
#include "common/fs/path_util.h"
#include "core/file_sys/vfs/vfs.h"
+#undef CreateFile
+#undef DeleteFile
+#undef CreateDirectory
+#undef CopyFile
+#undef MoveFile
+
namespace FileSys {
VfsFilesystem::VfsFilesystem(VirtualDir root_) : root(std::move(root_)) {}
diff --git a/src/core/file_sys/vfs/vfs_vector.h b/src/core/file_sys/vfs/vfs_vector.h
index 86beed931c..5c4650b08c 100644
--- a/src/core/file_sys/vfs/vfs_vector.h
+++ b/src/core/file_sys/vfs/vfs_vector.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -99,6 +99,10 @@ private:
std::string name;
};
+#undef CreateFile
+#undef DeleteFile
+#undef CreateDirectory
+
// An implementation of VfsDirectory that maintains two vectors for subdirectories and files.
// Vector data is supplied upon construction.
class VectorVfsDirectory : public VfsDirectory {
diff --git a/src/core/hle/kernel/physical_core.cpp b/src/core/hle/kernel/physical_core.cpp
index 77cdab76d7..e4aff43d82 100644
--- a/src/core/hle/kernel/physical_core.cpp
+++ b/src/core/hle/kernel/physical_core.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@@ -103,26 +103,12 @@ void PhysicalCore::RunThread(Kernel::KThread* thread) {
const bool data_abort = True(hr & Core::HaltReason::DataAbort);
const bool interrupt = True(hr & Core::HaltReason::BreakLoop);
- bool may_abort = true; // Ignore aborting virtual functions (for debugging)
- if (prefetch_abort && ::Settings::values.vtable_bouncing) {
- auto& lock = m_kernel.GlobalSchedulerContext().SchedulerLock();
- lock.Lock();
- Kernel::Svc::ThreadContext ctx;
- interface->GetContext(ctx);
- LOG_WARNING(Core_ARM, "vtable bouncing {:016X}", ctx.lr);
- ctx.pc = ctx.lr;
- ctx.r[0] = 0;
- interface->SetContext(ctx);
- lock.Unlock();
- may_abort = false;
- }
-
// Since scheduling may occur here, we cannot use any cached
// state after returning from calls we make.
// Notify the debugger and go to sleep if a breakpoint was hit,
// or if the thread is unable to continue for any reason.
- if (breakpoint || (prefetch_abort && may_abort)) {
+ if (breakpoint || prefetch_abort) {
if (breakpoint) {
interface->RewindBreakpointInstruction();
}
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index faf6a6432d..727a3a5363 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-late
@@ -13,6 +13,10 @@
#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/svc.h"
+#undef OutputDebugString
+#undef GetObject
+#undef CreateProcess
+
namespace Kernel::Svc {
static uint32_t GetArg32(std::span args, int n) {
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp
index 740e11ff87..b79396abba 100644
--- a/src/core/hle/kernel/svc/svc_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_memory.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
@@ -11,7 +11,11 @@
namespace Kernel::Svc {
namespace {
-constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
+[[nodiscard]] inline constexpr bool IsValidSetAddressRange(u64 address, u64 size) {
+ return address + size > address;
+}
+
+[[nodiscard]] inline constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
switch (perm) {
case MemoryPermission::None:
case MemoryPermission::Read:
@@ -22,13 +26,6 @@ constexpr bool IsValidSetMemoryPermission(MemoryPermission perm) {
}
}
-// Checks if address + size is greater than the given address
-// This can return false if the size causes an overflow of a 64-bit type
-// or if the given size is zero.
-constexpr bool IsValidAddressRange(u64 address, u64 size) {
- return address + size > address;
-}
-
// Helper function that performs the common sanity checks for svcMapMemory
// and svcUnmapMemory. This is doable, as both functions perform their sanitizing
// in the same order.
@@ -54,14 +51,17 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
R_THROW(ResultInvalidSize);
}
- if (!IsValidAddressRange(dst_addr, size)) {
+ // Checks if address + size is greater than the given address
+ // This can return false if the size causes an overflow of a 64-bit type
+ // or if the given size is zero.
+ if (!IsValidSetAddressRange(dst_addr, size)) {
LOG_ERROR(Kernel_SVC,
"Destination is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
dst_addr, size);
R_THROW(ResultInvalidCurrentMemory);
}
- if (!IsValidAddressRange(src_addr, size)) {
+ if (!IsValidSetAddressRange(src_addr, size)) {
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
src_addr, size);
R_THROW(ResultInvalidCurrentMemory);
diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp
index 3313118dfa..fe3b14b2ba 100644
--- a/src/core/hle/kernel/svc/svc_process_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_process_memory.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
@@ -11,11 +11,11 @@
namespace Kernel::Svc {
namespace {
-constexpr bool IsValidAddressRange(u64 address, u64 size) {
+[[nodiscard]] inline constexpr bool IsValidAddressRange(u64 address, u64 size) {
return address + size > address;
}
-constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
+[[nodiscard]] inline constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
switch (perm) {
case Svc::MemoryPermission::None:
case Svc::MemoryPermission::Read:
diff --git a/src/core/hle/service/audio/audio_in.cpp b/src/core/hle/service/audio/audio_in.cpp
index 416803acc3..c3f0e6aa57 100644
--- a/src/core/hle/service/audio/audio_in.cpp
+++ b/src/core/hle/service/audio/audio_in.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -6,13 +9,12 @@
#include "core/hle/service/ipc_helpers.h"
namespace Service::Audio {
-using namespace AudioCore::AudioIn;
-IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id,
- const std::string& device_name, const AudioInParameter& in_params,
+IAudioIn::IAudioIn(Core::System& system_, AudioCore::AudioIn::Manager& manager, size_t session_id,
+ const std::string& device_name, const AudioCore::AudioIn::AudioInParameter& in_params,
Kernel::KProcess* handle, u64 applet_resource_user_id)
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"},
- event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_,
+ event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_,
manager, event,
session_id)} {
// clang-format off
@@ -68,12 +70,12 @@ Result IAudioIn::Stop() {
R_RETURN(impl->StopSystem());
}
-Result IAudioIn::AppendAudioInBuffer(InArray buffer,
+Result IAudioIn::AppendAudioInBuffer(InArray buffer,
u64 buffer_client_ptr) {
R_RETURN(this->AppendAudioInBufferAuto(buffer, buffer_client_ptr));
}
-Result IAudioIn::AppendAudioInBufferAuto(InArray buffer,
+Result IAudioIn::AppendAudioInBufferAuto(InArray buffer,
u64 buffer_client_ptr) {
if (buffer.empty()) {
LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioInBuffer!");
diff --git a/src/core/hle/service/audio/audio_in_manager.cpp b/src/core/hle/service/audio/audio_in_manager.cpp
index 2675a57735..497c6eb6bc 100644
--- a/src/core/hle/service/audio/audio_in_manager.cpp
+++ b/src/core/hle/service/audio/audio_in_manager.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -7,7 +10,6 @@
#include "core/hle/service/cmif_serialization.h"
namespace Service::Audio {
-using namespace AudioCore::AudioIn;
IAudioInManager::IAudioInManager(Core::System& system_)
: ServiceFramework{system_, "audin:u"}, impl{std::make_unique(
@@ -34,11 +36,11 @@ Result IAudioInManager::ListAudioIns(
R_RETURN(this->ListAudioInsAutoFiltered(out_audio_ins, out_count));
}
-Result IAudioInManager::OpenAudioIn(Out out_parameter_internal,
+Result IAudioInManager::OpenAudioIn(Out out_parameter_internal,
Out> out_audio_in,
OutArray out_name,
InArray name,
- AudioInParameter parameter,
+ AudioCore::AudioIn::AudioInParameter parameter,
InCopyHandle process_handle,
ClientAppletResourceUserId aruid) {
LOG_DEBUG(Service_Audio, "called");
@@ -53,9 +55,9 @@ Result IAudioInManager::ListAudioInsAuto(
}
Result IAudioInManager::OpenAudioInAuto(
- Out out_parameter_internal, Out> out_audio_in,
+ Out out_parameter_internal, Out> out_audio_in,
OutArray out_name,
- InArray name, AudioInParameter parameter,
+ InArray name, AudioCore::AudioIn::AudioInParameter parameter,
InCopyHandle process_handle, ClientAppletResourceUserId aruid) {
LOG_DEBUG(Service_Audio, "called");
R_RETURN(this->OpenAudioInProtocolSpecified(out_parameter_internal, out_audio_in, out_name,
@@ -70,10 +72,10 @@ Result IAudioInManager::ListAudioInsAutoFiltered(
}
Result IAudioInManager::OpenAudioInProtocolSpecified(
- Out out_parameter_internal, Out> out_audio_in,
+ Out out_parameter_internal, Out> out_audio_in,
OutArray out_name,
InArray name, Protocol protocol,
- AudioInParameter parameter, InCopyHandle process_handle,
+ AudioCore::AudioIn::AudioInParameter parameter, InCopyHandle process_handle,
ClientAppletResourceUserId aruid) {
LOG_DEBUG(Service_Audio, "called");
@@ -104,7 +106,7 @@ Result IAudioInManager::OpenAudioInProtocolSpecified(
auto& out_system = impl->sessions[new_session_id]->GetSystem();
*out_parameter_internal =
- AudioInParameterInternal{.sample_rate = out_system.GetSampleRate(),
+ AudioCore::AudioIn::AudioInParameterInternal{.sample_rate = out_system.GetSampleRate(),
.channel_count = out_system.GetChannelCount(),
.sample_format = static_cast(out_system.GetSampleFormat()),
.state = static_cast(out_system.GetState())};
diff --git a/src/core/hle/service/audio/audio_out.cpp b/src/core/hle/service/audio/audio_out.cpp
index 53009d5d74..f53eeb7814 100644
--- a/src/core/hle/service/audio/audio_out.cpp
+++ b/src/core/hle/service/audio/audio_out.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -10,10 +13,9 @@
#include "core/hle/service/service.h"
namespace Service::Audio {
-using namespace AudioCore::AudioOut;
-IAudioOut::IAudioOut(Core::System& system_, Manager& manager, size_t session_id,
- const std::string& device_name, const AudioOutParameter& in_params,
+IAudioOut::IAudioOut(Core::System& system_, AudioCore::AudioOut::Manager& manager, size_t session_id,
+ const std::string& device_name, const AudioCore::AudioOut::AudioOutParameter& in_params,
Kernel::KProcess* handle, u64 applet_resource_user_id)
: ServiceFramework{system_, "IAudioOut"}, service_context{system_, "IAudioOut"},
event{service_context.CreateEvent("AudioOutEvent")}, process{handle},
@@ -65,12 +67,12 @@ Result IAudioOut::Stop() {
}
Result IAudioOut::AppendAudioOutBuffer(
- InArray audio_out_buffer, u64 buffer_client_ptr) {
+ InArray audio_out_buffer, u64 buffer_client_ptr) {
R_RETURN(this->AppendAudioOutBufferAuto(audio_out_buffer, buffer_client_ptr));
}
Result IAudioOut::AppendAudioOutBufferAuto(
- InArray audio_out_buffer, u64 buffer_client_ptr) {
+ InArray audio_out_buffer, u64 buffer_client_ptr) {
if (audio_out_buffer.empty()) {
LOG_ERROR(Service_Audio, "Input buffer is too small for an AudioOutBuffer!");
R_THROW(Audio::ResultInsufficientBuffer);
diff --git a/src/core/hle/service/audio/audio_out_manager.cpp b/src/core/hle/service/audio/audio_out_manager.cpp
index 0a8e1ec256..bab87094ae 100644
--- a/src/core/hle/service/audio/audio_out_manager.cpp
+++ b/src/core/hle/service/audio/audio_out_manager.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@@ -11,10 +11,9 @@
#include "core/memory.h"
namespace Service::Audio {
-using namespace AudioCore::AudioOut;
IAudioOutManager::IAudioOutManager(Core::System& system_)
- : ServiceFramework{system_, "audout:u"}, impl{std::make_unique(system_)} {
+ : ServiceFramework{system_, "audout:u"}, impl{std::make_unique(system_)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"},
@@ -34,11 +33,11 @@ Result IAudioOutManager::ListAudioOuts(
R_RETURN(this->ListAudioOutsAuto(out_audio_outs, out_count));
}
-Result IAudioOutManager::OpenAudioOut(Out out_parameter_internal,
+Result IAudioOutManager::OpenAudioOut(Out out_parameter_internal,
Out> out_audio_out,
OutArray out_name,
InArray name,
- AudioOutParameter parameter,
+ AudioCore::AudioOut::AudioOutParameter parameter,
InCopyHandle process_handle,
ClientAppletResourceUserId aruid) {
R_RETURN(this->OpenAudioOutAuto(out_parameter_internal, out_audio_out, out_name, name,
@@ -60,10 +59,10 @@ Result IAudioOutManager::ListAudioOutsAuto(
}
Result IAudioOutManager::OpenAudioOutAuto(
- Out out_parameter_internal,
+ Out out_parameter_internal,
Out> out_audio_out,
OutArray out_name,
- InArray name, AudioOutParameter parameter,
+ InArray name, AudioCore::AudioOut::AudioOutParameter parameter,
InCopyHandle process_handle, ClientAppletResourceUserId aruid) {
if (!process_handle) {
LOG_ERROR(Service_Audio, "Failed to get process handle");
@@ -93,7 +92,7 @@ Result IAudioOutManager::OpenAudioOutAuto(
auto& out_system = impl->sessions[new_session_id]->GetSystem();
*out_parameter_internal =
- AudioOutParameterInternal{.sample_rate = out_system.GetSampleRate(),
+ AudioCore::AudioOut::AudioOutParameterInternal{.sample_rate = out_system.GetSampleRate(),
.channel_count = out_system.GetChannelCount(),
.sample_format = static_cast(out_system.GetSampleFormat()),
.state = static_cast(out_system.GetState())};
diff --git a/src/core/hle/service/audio/audio_renderer.cpp b/src/core/hle/service/audio/audio_renderer.cpp
index 21cc742b69..654e70fde2 100644
--- a/src/core/hle/service/audio/audio_renderer.cpp
+++ b/src/core/hle/service/audio/audio_renderer.cpp
@@ -1,24 +1,23 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "audio_core/renderer/audio_renderer.h"
#include "core/hle/service/audio/audio_renderer.h"
#include "core/hle/service/cmif_serialization.h"
namespace Service::Audio {
-using namespace AudioCore::Renderer;
-IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_,
+IAudioRenderer::IAudioRenderer(Core::System& system_, AudioCore::Renderer::Manager& manager_,
AudioCore::AudioRendererParameterInternal& params,
Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
Kernel::KProcess* process_handle_, u64 applet_resource_user_id,
s32 session_id)
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
- impl{std::make_unique(system_, manager, rendered_event)}, process_handle{
- process_handle_} {
+ impl{std::make_unique(system_, manager, rendered_event)}, process_handle{process_handle_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
diff --git a/src/core/hle/service/audio/audio_renderer_manager.cpp b/src/core/hle/service/audio/audio_renderer_manager.cpp
index 6a1345c074..8edc27c469 100644
--- a/src/core/hle/service/audio/audio_renderer_manager.cpp
+++ b/src/core/hle/service/audio/audio_renderer_manager.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -15,7 +18,7 @@ namespace Service::Audio {
using namespace AudioCore::Renderer;
IAudioRendererManager::IAudioRendererManager(Core::System& system_)
- : ServiceFramework{system_, "audren:u"}, impl{std::make_unique(system_)} {
+ : ServiceFramework{system_, "audren:u"}, impl{std::make_unique(system_)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"},
diff --git a/src/core/hle/service/bcat/news/builtin_news.cpp b/src/core/hle/service/bcat/news/builtin_news.cpp
index ed001b056b..d24431cdbc 100644
--- a/src/core/hle/service/bcat/news/builtin_news.cpp
+++ b/src/core/hle/service/bcat/news/builtin_news.cpp
@@ -15,9 +15,7 @@
#include
#include
-#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
-#include
-#endif
+#include "common/httplib.h"
#include
#include
@@ -103,8 +101,6 @@ std::vector TryLoadFromDisk(const std::filesystem::path& path) {
std::vector DownloadImage(const std::string& url_path, const std::filesystem::path& cache_path) {
LOG_INFO(Service_BCAT, "Downloading image: https://eden-emu.dev{}", url_path);
-
-#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
try {
httplib::Client cli("https://eden-emu.dev");
cli.set_follow_location(true);
@@ -128,8 +124,6 @@ std::vector DownloadImage(const std::string& url_path, const std::filesystem
} catch (...) {
LOG_WARNING(Service_BCAT, "Failed to download: {}", url_path);
}
-#endif
-
return {};
}
@@ -232,8 +226,6 @@ void WriteCachedJson(std::string_view json) {
}
std::optional DownloadReleasesJson() {
-
-#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
try {
httplib::SSLClient cli{"api.github.com", 443};
cli.set_connection_timeout(10);
@@ -255,7 +247,6 @@ std::optional DownloadReleasesJson() {
} catch (...) {
LOG_WARNING(Service_BCAT, " failed to download releases");
}
-#endif
return std::nullopt;
}
diff --git a/src/core/hle/service/bcat/news/news_data_service.cpp b/src/core/hle/service/bcat/news/news_data_service.cpp
index 200d00e785..caf09f8be6 100644
--- a/src/core/hle/service/bcat/news/news_data_service.cpp
+++ b/src/core/hle/service/bcat/news/news_data_service.cpp
@@ -14,16 +14,13 @@
#include
namespace Service::News {
-namespace {
-std::string_view ToStringView(std::span buf) {
+[[nodiscard]] inline std::string_view ToStringViewNDS(std::span buf) {
const std::string_view sv{buf.data(), buf.size()};
const auto nul = sv.find('\0');
return nul == std::string_view::npos ? sv : sv.substr(0, nul);
}
-} // namespace
-
INewsDataService::INewsDataService(Core::System& system_)
: ServiceFramework{system_, "INewsDataService"} {
static const FunctionInfo functions[] = {
@@ -55,7 +52,7 @@ bool INewsDataService::TryOpen(std::string_view key, std::string_view user) {
const auto list = NewsStorage::Instance().ListAll();
if (!list.empty()) {
- if (auto found = NewsStorage::Instance().FindByNewsId(ToStringView(list.front().news_id))) {
+ if (auto found = NewsStorage::Instance().FindByNewsId(ToStringViewNDS(list.front().news_id))) {
opened_payload = std::move(found->payload);
return true;
}
@@ -67,7 +64,7 @@ bool INewsDataService::TryOpen(std::string_view key, std::string_view user) {
Result INewsDataService::Open(InBuffer name) {
EnsureBuiltinNewsLoaded();
- const auto key = ToStringView({reinterpret_cast(name.data()), name.size()});
+ const auto key = ToStringViewNDS({reinterpret_cast(name.data()), name.size()});
if (TryOpen(key, {})) {
R_SUCCEED();
@@ -79,8 +76,8 @@ Result INewsDataService::Open(InBuffer name) {
Result INewsDataService::OpenWithNewsRecordV1(NewsRecordV1 record) {
EnsureBuiltinNewsLoaded();
- const auto key = ToStringView(record.news_id);
- const auto user = ToStringView(record.user_id);
+ const auto key = ToStringViewNDS(record.news_id);
+ const auto user = ToStringViewNDS(record.user_id);
if (TryOpen(key, user)) {
R_SUCCEED();
@@ -92,8 +89,8 @@ Result INewsDataService::OpenWithNewsRecordV1(NewsRecordV1 record) {
Result INewsDataService::OpenWithNewsRecord(NewsRecord record) {
EnsureBuiltinNewsLoaded();
- const auto key = ToStringView(record.news_id);
- const auto user = ToStringView(record.user_id);
+ const auto key = ToStringViewNDS(record.news_id);
+ const auto user = ToStringViewNDS(record.user_id);
if (TryOpen(key, user)) {
R_SUCCEED();
diff --git a/src/core/hle/service/bcat/news/news_database_service.cpp b/src/core/hle/service/bcat/news/news_database_service.cpp
index 3580ceb0f7..fa10262e44 100644
--- a/src/core/hle/service/bcat/news/news_database_service.cpp
+++ b/src/core/hle/service/bcat/news/news_database_service.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
@@ -15,13 +15,13 @@
namespace Service::News {
namespace {
-std::string_view ToStringView(std::span buf) {
+[[nodiscard]] inline std::string_view ToStringView(std::span buf) {
if (buf.empty()) return {};
auto data = reinterpret_cast(buf.data());
return {data, strnlen(data, buf.size())};
}
-std::string_view ToStringView(std::span buf) {
+[[nodiscard]] inline std::string_view ToStringView(std::span buf) {
if (buf.empty()) return {};
return {buf.data(), strnlen(buf.data(), buf.size())};
}
diff --git a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp
index 1712971e4d..4802e2769a 100644
--- a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp
+++ b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -6,6 +9,8 @@
namespace Service::News {
+#undef CreateEvent
+
IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_)
: ServiceFramework{system_, "IOverwriteEventHolder"}, service_context{system_,
"IOverwriteEventHolder"} {
diff --git a/src/core/hle/service/caps/caps_manager.cpp b/src/core/hle/service/caps/caps_manager.cpp
index af0b9b16ad..80290c312f 100644
--- a/src/core/hle/service/caps/caps_manager.cpp
+++ b/src/core/hle/service/caps/caps_manager.cpp
@@ -18,6 +18,8 @@
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
+#undef GetCurrentTime
+
namespace Service::Capture {
AlbumManager::AlbumManager(Core::System& system_) : system{system_} {}
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp
index 5b281a725a..88ee9d7e82 100644
--- a/src/core/hle/service/fatal/fatal.cpp
+++ b/src/core/hle/service/fatal/fatal.cpp
@@ -19,6 +19,8 @@
#include "core/hle/service/server_manager.h"
#include "core/reporter.h"
+#undef far
+
namespace Service::Fatal {
Module::Interface::Interface(std::shared_ptr module_, Core::System& system_,
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index c192fea454..7a78cc2dfa 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -32,6 +32,10 @@
#include "core/hle/service/server_manager.h"
#include "core/loader/loader.h"
+#undef CreateFile
+#undef DeleteFile
+#undef CreateDirectory
+
namespace Service::FileSystem {
static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base,
diff --git a/src/core/hle/service/hle_ipc.cpp b/src/core/hle/service/hle_ipc.cpp
index 8569d2bad8..3578c174ff 100644
--- a/src/core/hle/service/hle_ipc.cpp
+++ b/src/core/hle/service/hle_ipc.cpp
@@ -27,6 +27,8 @@
#include "core/hle/service/ipc_helpers.h"
#include "core/memory.h"
+#undef SendMessage
+
namespace Service {
SessionRequestHandler::SessionRequestHandler(Kernel::KernelCore& kernel_, const char* service_name_)
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index a0302a5841..98fcaa3220 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -212,8 +212,9 @@ struct NifmNetworkProfileData {
NifmWirelessSettingData wireless_setting_data{};
IpSettingData ip_setting_data{};
};
+static_assert(sizeof(NifmNetworkProfileData) == 0x18E,
+ "NifmNetworkProfileData has incorrect size.");
#pragma pack(pop)
-static_assert(sizeof(NifmNetworkProfileData) == 0x18E, "NifmNetworkProfileData has incorrect size.");
struct PendingProfile {
std::array ssid{};
diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver.h b/src/core/hle/service/nvnflinger/hos_binder_driver.h
index b7fb07bd2e..6b551c91d2 100644
--- a/src/core/hle/service/nvnflinger/hos_binder_driver.h
+++ b/src/core/hle/service/nvnflinger/hos_binder_driver.h
@@ -1,6 +1,11 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/service/olsc/daemon_controller.h b/src/core/hle/service/olsc/daemon_controller.h
index fc7dd7bbcb..5f978ab153 100644
--- a/src/core/hle/service/olsc/daemon_controller.h
+++ b/src/core/hle/service/olsc/daemon_controller.h
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include
#include "common/uuid.h"
diff --git a/src/core/hle/service/olsc/native_handle_holder.h b/src/core/hle/service/olsc/native_handle_holder.h
index 985c60d1cb..e0eac50c28 100644
--- a/src/core/hle/service/olsc/native_handle_holder.h
+++ b/src/core/hle/service/olsc/native_handle_holder.h
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/service/olsc/olsc_service_for_application.h b/src/core/hle/service/olsc/olsc_service_for_application.h
index 3f9ac7536a..8941659478 100644
--- a/src/core/hle/service/olsc/olsc_service_for_application.h
+++ b/src/core/hle/service/olsc/olsc_service_for_application.h
@@ -1,6 +1,11 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/ns/ns_types.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.h b/src/core/hle/service/olsc/olsc_service_for_system_service.h
index 447e37005e..d16c8b979b 100644
--- a/src/core/hle/service/olsc/olsc_service_for_system_service.h
+++ b/src/core/hle/service/olsc/olsc_service_for_system_service.h
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include
#include "common/uuid.h"
diff --git a/src/core/hle/service/olsc/remote_storage_controller.h b/src/core/hle/service/olsc/remote_storage_controller.h
index bae1e8efb5..21b439013a 100644
--- a/src/core/hle/service/olsc/remote_storage_controller.h
+++ b/src/core/hle/service/olsc/remote_storage_controller.h
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.h b/src/core/hle/service/olsc/transfer_task_list_controller.h
index 72dbf610d8..4ac770b477 100644
--- a/src/core/hle/service/olsc/transfer_task_list_controller.h
+++ b/src/core/hle/service/olsc/transfer_task_list_controller.h
@@ -4,6 +4,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/service/psc/time/clocks/system_clock_core.h b/src/core/hle/service/psc/time/clocks/system_clock_core.h
index 0b928432fb..7d124791df 100644
--- a/src/core/hle/service/psc/time/clocks/system_clock_core.h
+++ b/src/core/hle/service/psc/time/clocks/system_clock_core.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -10,6 +13,8 @@
namespace Service::PSC::Time {
class ContextWriter;
+#undef GetCurrentTime
+
class SystemClockCore {
public:
explicit SystemClockCore(SteadyClockCore& steady_clock) : m_steady_clock{steady_clock} {}
diff --git a/src/core/hle/service/psc/time/system_clock.h b/src/core/hle/service/psc/time/system_clock.h
index 3c11fb2f81..7844bd8bb9 100644
--- a/src/core/hle/service/psc/time/system_clock.h
+++ b/src/core/hle/service/psc/time/system_clock.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -16,6 +19,8 @@ class System;
namespace Service::PSC::Time {
+#undef GetCurrentTime
+
class SystemClock final : public ServiceFramework {
public:
explicit SystemClock(Core::System& system, SystemClockCore& system_clock_core,
diff --git a/src/core/hle/service/ro/ro_results.h b/src/core/hle/service/ro/ro_results.h
index 00f05c5a59..906378bc7f 100644
--- a/src/core/hle/service/ro/ro_results.h
+++ b/src/core/hle/service/ro/ro_results.h
@@ -1,6 +1,11 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
#include "core/hle/result.h"
namespace Service::RO {
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index fd758d4915..4304ee8b76 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -56,11 +56,11 @@ void PutValue(std::span buffer, const T& t) {
} // Anonymous namespace
-void BSD::PollWork::Execute(BSD* bsd) {
+void NetworkBSD::PollWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->PollImpl(write_buffer, read_buffer, nfds, timeout);
}
-void BSD::PollWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::PollWork::Response(HLERequestContext& ctx) {
if (write_buffer.size() > 0) {
ctx.WriteBuffer(write_buffer);
}
@@ -71,11 +71,11 @@ void BSD::PollWork::Response(HLERequestContext& ctx) {
rb.PushEnum(bsd_errno);
}
-void BSD::AcceptWork::Execute(BSD* bsd) {
+void NetworkBSD::AcceptWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->AcceptImpl(fd, write_buffer);
}
-void BSD::AcceptWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::AcceptWork::Response(HLERequestContext& ctx) {
if (write_buffer.size() > 0) {
ctx.WriteBuffer(write_buffer);
}
@@ -87,22 +87,22 @@ void BSD::AcceptWork::Response(HLERequestContext& ctx) {
rb.Push(static_cast(write_buffer.size()));
}
-void BSD::ConnectWork::Execute(BSD* bsd) {
+void NetworkBSD::ConnectWork::Execute(NetworkBSD* bsd) {
bsd_errno = bsd->ConnectImpl(fd, addr);
}
-void BSD::ConnectWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::ConnectWork::Response(HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(ResultSuccess);
rb.Push(bsd_errno == Errno::SUCCESS ? 0 : -1);
rb.PushEnum(bsd_errno);
}
-void BSD::RecvWork::Execute(BSD* bsd) {
+void NetworkBSD::RecvWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->RecvImpl(fd, flags, message);
}
-void BSD::RecvWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::RecvWork::Response(HLERequestContext& ctx) {
ctx.WriteBuffer(message);
IPC::ResponseBuilder rb{ctx, 4};
@@ -111,11 +111,11 @@ void BSD::RecvWork::Response(HLERequestContext& ctx) {
rb.PushEnum(bsd_errno);
}
-void BSD::RecvFromWork::Execute(BSD* bsd) {
+void NetworkBSD::RecvFromWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->RecvFromImpl(fd, flags, message, addr);
}
-void BSD::RecvFromWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::RecvFromWork::Response(HLERequestContext& ctx) {
ctx.WriteBuffer(message, 0);
if (!addr.empty()) {
ctx.WriteBuffer(addr, 1);
@@ -128,29 +128,29 @@ void BSD::RecvFromWork::Response(HLERequestContext& ctx) {
rb.Push(static_cast(addr.size()));
}
-void BSD::SendWork::Execute(BSD* bsd) {
+void NetworkBSD::SendWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->SendImpl(fd, flags, message);
}
-void BSD::SendWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::SendWork::Response(HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(ResultSuccess);
rb.Push(ret);
rb.PushEnum(bsd_errno);
}
-void BSD::SendToWork::Execute(BSD* bsd) {
+void NetworkBSD::SendToWork::Execute(NetworkBSD* bsd) {
std::tie(ret, bsd_errno) = bsd->SendToImpl(fd, flags, message, addr);
}
-void BSD::SendToWork::Response(HLERequestContext& ctx) {
+void NetworkBSD::SendToWork::Response(HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(ResultSuccess);
rb.Push(ret);
rb.PushEnum(bsd_errno);
}
-void BSD::RegisterClient(HLERequestContext& ctx) {
+void NetworkBSD::RegisterClient(HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 3};
@@ -159,7 +159,7 @@ void BSD::RegisterClient(HLERequestContext& ctx) {
rb.Push(0); // bsd errno
}
-void BSD::StartMonitoring(HLERequestContext& ctx) {
+void NetworkBSD::StartMonitoring(HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
@@ -167,7 +167,7 @@ void BSD::StartMonitoring(HLERequestContext& ctx) {
rb.Push(ResultSuccess);
}
-void BSD::Socket(HLERequestContext& ctx) {
+void NetworkBSD::Socket(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u32 domain = rp.Pop();
const u32 type = rp.Pop();
@@ -184,7 +184,7 @@ void BSD::Socket(HLERequestContext& ctx) {
rb.PushEnum(bsd_errno);
}
-void BSD::Select(HLERequestContext& ctx) {
+void NetworkBSD::Select(HLERequestContext& ctx) {
LOG_DEBUG(Service, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 4};
@@ -194,7 +194,7 @@ void BSD::Select(HLERequestContext& ctx) {
rb.Push(0); // bsd errno
}
-void BSD::Poll(HLERequestContext& ctx) {
+void NetworkBSD::Poll(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 nfds = rp.Pop();
const s32 timeout = rp.Pop();
@@ -209,7 +209,7 @@ void BSD::Poll(HLERequestContext& ctx) {
});
}
-void BSD::Accept(HLERequestContext& ctx) {
+void NetworkBSD::Accept(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -221,7 +221,7 @@ void BSD::Accept(HLERequestContext& ctx) {
});
}
-void BSD::Bind(HLERequestContext& ctx) {
+void NetworkBSD::Bind(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -229,7 +229,7 @@ void BSD::Bind(HLERequestContext& ctx) {
BuildErrnoResponse(ctx, BindImpl(fd, ctx.ReadBuffer()));
}
-void BSD::Connect(HLERequestContext& ctx) {
+void NetworkBSD::Connect(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -241,7 +241,7 @@ void BSD::Connect(HLERequestContext& ctx) {
});
}
-void BSD::GetPeerName(HLERequestContext& ctx) {
+void NetworkBSD::GetPeerName(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -259,7 +259,7 @@ void BSD::GetPeerName(HLERequestContext& ctx) {
rb.Push(static_cast(write_buffer.size()));
}
-void BSD::GetSockName(HLERequestContext& ctx) {
+void NetworkBSD::GetSockName(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -277,7 +277,7 @@ void BSD::GetSockName(HLERequestContext& ctx) {
rb.Push(static_cast(write_buffer.size()));
}
-void BSD::GetSockOpt(HLERequestContext& ctx) {
+void NetworkBSD::GetSockOpt(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
const u32 level = rp.Pop();
@@ -299,7 +299,7 @@ void BSD::GetSockOpt(HLERequestContext& ctx) {
rb.Push(static_cast(optval.size()));
}
-void BSD::Listen(HLERequestContext& ctx) {
+void NetworkBSD::Listen(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
const s32 backlog = rp.Pop();
@@ -309,7 +309,7 @@ void BSD::Listen(HLERequestContext& ctx) {
BuildErrnoResponse(ctx, ListenImpl(fd, backlog));
}
-void BSD::Fcntl(HLERequestContext& ctx) {
+void NetworkBSD::Fcntl(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
const s32 cmd = rp.Pop();
@@ -325,7 +325,7 @@ void BSD::Fcntl(HLERequestContext& ctx) {
rb.PushEnum(bsd_errno);
}
-void BSD::SetSockOpt(HLERequestContext& ctx) {
+void NetworkBSD::SetSockOpt(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -339,7 +339,7 @@ void BSD::SetSockOpt(HLERequestContext& ctx) {
BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optval));
}
-void BSD::Shutdown(HLERequestContext& ctx) {
+void NetworkBSD::Shutdown(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -350,7 +350,7 @@ void BSD::Shutdown(HLERequestContext& ctx) {
BuildErrnoResponse(ctx, ShutdownImpl(fd, how));
}
-void BSD::Recv(HLERequestContext& ctx) {
+void NetworkBSD::Recv(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -365,7 +365,7 @@ void BSD::Recv(HLERequestContext& ctx) {
});
}
-void BSD::RecvFrom(HLERequestContext& ctx) {
+void NetworkBSD::RecvFrom(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -382,7 +382,7 @@ void BSD::RecvFrom(HLERequestContext& ctx) {
});
}
-void BSD::Send(HLERequestContext& ctx) {
+void NetworkBSD::Send(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -397,7 +397,7 @@ void BSD::Send(HLERequestContext& ctx) {
});
}
-void BSD::SendTo(HLERequestContext& ctx) {
+void NetworkBSD::SendTo(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
const u32 flags = rp.Pop();
@@ -413,7 +413,7 @@ void BSD::SendTo(HLERequestContext& ctx) {
});
}
-void BSD::Write(HLERequestContext& ctx) {
+void NetworkBSD::Write(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -426,7 +426,7 @@ void BSD::Write(HLERequestContext& ctx) {
});
}
-void BSD::Read(HLERequestContext& ctx) {
+void NetworkBSD::Read(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -438,7 +438,7 @@ void BSD::Read(HLERequestContext& ctx) {
rb.Push(0); // bsd errno
}
-void BSD::Close(HLERequestContext& ctx) {
+void NetworkBSD::Close(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const s32 fd = rp.Pop();
@@ -447,7 +447,7 @@ void BSD::Close(HLERequestContext& ctx) {
BuildErrnoResponse(ctx, CloseImpl(fd));
}
-void BSD::DuplicateSocket(HLERequestContext& ctx) {
+void NetworkBSD::DuplicateSocket(HLERequestContext& ctx) {
struct InputParameters {
s32 fd;
u64 reserved;
@@ -472,7 +472,7 @@ void BSD::DuplicateSocket(HLERequestContext& ctx) {
});
}
-void BSD::EventFd(HLERequestContext& ctx) {
+void NetworkBSD::EventFd(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 initval = rp.Pop();
const u32 flags = rp.Pop();
@@ -483,12 +483,12 @@ void BSD::EventFd(HLERequestContext& ctx) {
}
template
-void BSD::ExecuteWork(HLERequestContext& ctx, Work work) {
+void NetworkBSD::ExecuteWork(HLERequestContext& ctx, Work work) {
work.Execute(this);
work.Response(ctx);
}
-std::pair BSD::SocketImpl(Domain domain, Type type, Protocol protocol) {
+std::pair NetworkBSD::SocketImpl(Domain domain, Type type, Protocol protocol) {
if (type == Type::SEQPACKET) {
UNIMPLEMENTED_MSG("SOCK_SEQPACKET errno management");
@@ -530,7 +530,7 @@ std::pair BSD::SocketImpl(Domain domain, Type type, Protocol protoco
return {fd, Errno::SUCCESS};
}
-std::pair BSD::PollImpl(std::vector& write_buffer, std::span read_buffer,
+std::pair NetworkBSD::PollImpl(std::vector& write_buffer, std::span read_buffer,
s32 nfds, s32 timeout) {
if (nfds <= 0) {
// When no entries are provided, -1 is returned with errno zero
@@ -597,7 +597,7 @@ std::pair BSD::PollImpl(std::vector& write_buffer, std::span BSD::AcceptImpl(s32 fd, std::vector& write_buffer) {
+std::pair NetworkBSD::AcceptImpl(s32 fd, std::vector& write_buffer) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
}
@@ -625,7 +625,7 @@ std::pair BSD::AcceptImpl(s32 fd, std::vector& write_buffer) {
return {new_fd, Errno::SUCCESS};
}
-Errno BSD::BindImpl(s32 fd, std::span addr) {
+Errno NetworkBSD::BindImpl(s32 fd, std::span addr) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -635,7 +635,7 @@ Errno BSD::BindImpl(s32 fd, std::span addr) {
return Translate(file_descriptors[fd]->socket->Bind(Translate(addr_in)));
}
-Errno BSD::ConnectImpl(s32 fd, std::span addr) {
+Errno NetworkBSD::ConnectImpl(s32 fd, std::span addr) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -653,7 +653,7 @@ Errno BSD::ConnectImpl(s32 fd, std::span addr) {
return result;
}
-Errno BSD::GetPeerNameImpl(s32 fd, std::vector& write_buffer) {
+Errno NetworkBSD::GetPeerNameImpl(s32 fd, std::vector& write_buffer) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -670,7 +670,7 @@ Errno BSD::GetPeerNameImpl(s32 fd, std::vector& write_buffer) {
return Translate(bsd_errno);
}
-Errno BSD::GetSockNameImpl(s32 fd, std::vector& write_buffer) {
+Errno NetworkBSD::GetSockNameImpl(s32 fd, std::vector& write_buffer) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -687,14 +687,14 @@ Errno BSD::GetSockNameImpl(s32 fd, std::vector& write_buffer) {
return Translate(bsd_errno);
}
-Errno BSD::ListenImpl(s32 fd, s32 backlog) {
+Errno NetworkBSD::ListenImpl(s32 fd, s32 backlog) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
return Translate(file_descriptors[fd]->socket->Listen(backlog));
}
-std::pair BSD::FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg) {
+std::pair NetworkBSD::FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
}
@@ -720,7 +720,7 @@ std::pair BSD::FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg) {
}
}
-Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& optval) {
+Errno NetworkBSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& optval) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -751,7 +751,7 @@ Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& o
}
}
-Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span optval) {
+Errno NetworkBSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span optval) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -801,7 +801,7 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::spansocket->Shutdown(host_how));
}
-std::pair BSD::RecvImpl(s32 fd, u32 flags, std::vector& message) {
+std::pair NetworkBSD::RecvImpl(s32 fd, u32 flags, std::vector& message) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
}
@@ -836,7 +836,7 @@ std::pair BSD::RecvImpl(s32 fd, u32 flags, std::vector& message)
return {ret, bsd_errno};
}
-std::pair BSD::RecvFromImpl(s32 fd, u32 flags, std::vector& message,
+std::pair NetworkBSD::RecvFromImpl(s32 fd, u32 flags, std::vector& message,
std::vector& addr) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
@@ -883,14 +883,14 @@ std::pair BSD::RecvFromImpl(s32 fd, u32 flags, std::vector& mess
return {ret, bsd_errno};
}
-std::pair BSD::SendImpl(s32 fd, u32 flags, std::span message) {
+std::pair NetworkBSD::SendImpl(s32 fd, u32 flags, std::span message) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
}
return Translate(file_descriptors[fd]->socket->Send(message, flags));
}
-std::pair BSD::SendToImpl(s32 fd, u32 flags, std::span message,
+std::pair NetworkBSD::SendToImpl(s32 fd, u32 flags, std::span message,
std::span addr) {
if (!IsFileDescriptorValid(fd)) {
return {-1, Errno::BADF};
@@ -908,7 +908,7 @@ std::pair BSD::SendToImpl(s32 fd, u32 flags, std::span mes
return Translate(file_descriptors[fd]->socket->SendTo(flags, message, p_addr_in));
}
-Errno BSD::CloseImpl(s32 fd) {
+Errno NetworkBSD::CloseImpl(s32 fd) {
if (!IsFileDescriptorValid(fd)) {
return Errno::BADF;
}
@@ -924,7 +924,7 @@ Errno BSD::CloseImpl(s32 fd) {
return bsd_errno;
}
-Expected