summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.ci/templates/build-msvc.yml2
m---------externals/dynarmic0
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_32.cpp6
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_32.h6
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.cpp4
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.h2
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_cp15.h2
-rw-r--r--src/core/arm/dynarmic/arm_exclusive_monitor.h2
-rw-r--r--src/core/hle/kernel/k_client_port.h6
-rw-r--r--src/core/hle/kernel/k_client_session.h4
-rw-r--r--src/core/hle/kernel/k_event.h14
-rw-r--r--src/core/hle/kernel/k_port.h3
-rw-r--r--src/core/hle/kernel/k_process.h8
-rw-r--r--src/core/hle/kernel/k_readable_event.h4
-rw-r--r--src/core/hle/kernel/k_resource_limit.h4
-rw-r--r--src/core/hle/kernel/k_server_port.h12
-rw-r--r--src/core/hle/kernel/k_server_session.h6
-rw-r--r--src/core/hle/kernel/k_session.h10
-rw-r--r--src/core/hle/kernel/k_shared_memory.h4
-rw-r--r--src/core/hle/kernel/k_synchronization_object.h4
-rw-r--r--src/core/hle/kernel/k_thread.cpp10
-rw-r--r--src/core/hle/kernel/k_thread.h10
-rw-r--r--src/core/hle/kernel/k_transfer_memory.h10
-rw-r--r--src/core/hle/kernel/k_writable_event.h2
-rw-r--r--src/core/hle/service/am/applets/software_keyboard.cpp25
-rw-r--r--src/core/hle/service/ldn/ldn.cpp141
-rw-r--r--src/yuzu/applets/software_keyboard.cpp25
27 files changed, 232 insertions, 94 deletions
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml
index 74e688c12..f6e7557b2 100644
--- a/.ci/templates/build-msvc.yml
+++ b/.ci/templates/build-msvc.yml
@@ -8,7 +8,7 @@ steps:
displayName: 'Install vulkan-sdk'
- script: python -m pip install --upgrade pip conan
displayName: 'Install conan'
-- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 16 2019" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} .. && cmake --install . --config Release && cd ..
+- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 16 2019" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'
diff --git a/externals/dynarmic b/externals/dynarmic
-Subproject b2a4da5e65985e6b0a20ac8ac37d14425a2a39d
+Subproject 36c3b289a090aaf59a24346f57ebe1b13efb36c
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
index 50dc82382..e5b78210a 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp
@@ -4,9 +4,9 @@
#include <cinttypes>
#include <memory>
-#include <dynarmic/A32/a32.h>
-#include <dynarmic/A32/config.h>
-#include <dynarmic/A32/context.h>
+#include <dynarmic/interface/A32/a32.h>
+#include <dynarmic/interface/A32/config.h>
+#include <dynarmic/interface/A32/context.h>
#include "common/assert.h"
#include "common/logging/log.h"
#include "common/page_table.h"
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.h b/src/core/arm/dynarmic/arm_dynarmic_32.h
index fa6f4f430..063605b46 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_32.h
+++ b/src/core/arm/dynarmic/arm_dynarmic_32.h
@@ -7,9 +7,9 @@
#include <memory>
#include <unordered_map>
-#include <dynarmic/A32/a32.h>
-#include <dynarmic/A64/a64.h>
-#include <dynarmic/exclusive_monitor.h>
+#include <dynarmic/interface/A32/a32.h>
+#include <dynarmic/interface/A64/a64.h>
+#include <dynarmic/interface/exclusive_monitor.h>
#include "common/common_types.h"
#include "common/hash.h"
#include "core/arm/arm_interface.h"
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
index 4f5a58b38..dd439f55e 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp
@@ -4,8 +4,8 @@
#include <cinttypes>
#include <memory>
-#include <dynarmic/A64/a64.h>
-#include <dynarmic/A64/config.h>
+#include <dynarmic/interface/A64/a64.h>
+#include <dynarmic/interface/A64/config.h>
#include "common/assert.h"
#include "common/logging/log.h"
#include "common/page_table.h"
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.h b/src/core/arm/dynarmic/arm_dynarmic_64.h
index 5214a8147..0c4e46c64 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.h
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.h
@@ -7,7 +7,7 @@
#include <memory>
#include <unordered_map>
-#include <dynarmic/A64/a64.h>
+#include <dynarmic/interface/A64/a64.h>
#include "common/common_types.h"
#include "common/hash.h"
#include "core/arm/arm_interface.h"
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.h b/src/core/arm/dynarmic/arm_dynarmic_cp15.h
index 8597beddf..7c7ede79e 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_cp15.h
+++ b/src/core/arm/dynarmic/arm_dynarmic_cp15.h
@@ -7,7 +7,7 @@
#include <memory>
#include <optional>
-#include <dynarmic/A32/coprocessor.h>
+#include <dynarmic/interface/A32/coprocessor.h>
#include "common/common_types.h"
namespace Core {
diff --git a/src/core/arm/dynarmic/arm_exclusive_monitor.h b/src/core/arm/dynarmic/arm_exclusive_monitor.h
index f9f056a59..73d41f223 100644
--- a/src/core/arm/dynarmic/arm_exclusive_monitor.h
+++ b/src/core/arm/dynarmic/arm_exclusive_monitor.h
@@ -7,7 +7,7 @@
#include <memory>
#include <unordered_map>
-#include <dynarmic/exclusive_monitor.h>
+#include <dynarmic/interface/exclusive_monitor.h>
#include "common/common_types.h"
#include "core/arm/dynarmic/arm_dynarmic_32.h"
diff --git a/src/core/hle/kernel/k_client_port.h b/src/core/hle/kernel/k_client_port.h
index 8501156e8..f2fff3b01 100644
--- a/src/core/hle/kernel/k_client_port.h
+++ b/src/core/hle/kernel/k_client_port.h
@@ -22,7 +22,7 @@ class KClientPort final : public KSynchronizationObject {
public:
explicit KClientPort(KernelCore& kernel_);
- virtual ~KClientPort() override;
+ ~KClientPort() override;
void Initialize(KPort* parent_, s32 max_sessions_, std::string&& name_);
void OnSessionFinalized();
@@ -49,8 +49,8 @@ public:
bool IsServerClosed() const;
// Overridden virtual functions.
- virtual void Destroy() override;
- virtual bool IsSignaled() const override;
+ void Destroy() override;
+ bool IsSignaled() const override;
ResultCode CreateSession(KClientSession** out);
diff --git a/src/core/hle/kernel/k_client_session.h b/src/core/hle/kernel/k_client_session.h
index 720a8c243..b11d5b4e3 100644
--- a/src/core/hle/kernel/k_client_session.h
+++ b/src/core/hle/kernel/k_client_session.h
@@ -34,7 +34,7 @@ class KClientSession final
public:
explicit KClientSession(KernelCore& kernel_);
- virtual ~KClientSession();
+ ~KClientSession() override;
void Initialize(KSession* parent_, std::string&& name_) {
// Set member variables.
@@ -42,7 +42,7 @@ public:
name = std::move(name_);
}
- virtual void Destroy() override;
+ void Destroy() override;
static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
KSession* GetParent() const {
diff --git a/src/core/hle/kernel/k_event.h b/src/core/hle/kernel/k_event.h
index 9a59ffb70..3d3ec99e2 100644
--- a/src/core/hle/kernel/k_event.h
+++ b/src/core/hle/kernel/k_event.h
@@ -20,23 +20,21 @@ class KEvent final : public KAutoObjectWithSlabHeapAndContainer<KEvent, KAutoObj
public:
explicit KEvent(KernelCore& kernel_);
- virtual ~KEvent();
+ ~KEvent() override;
void Initialize(std::string&& name);
- virtual void Finalize() override;
+ void Finalize() override;
- virtual bool IsInitialized() const override {
+ bool IsInitialized() const override {
return initialized;
}
- virtual uintptr_t GetPostDestroyArgument() const override {
+ uintptr_t GetPostDestroyArgument() const override {
return reinterpret_cast<uintptr_t>(owner);
}
- static void PostDestroy(uintptr_t arg);
-
- virtual KProcess* GetOwner() const override {
+ KProcess* GetOwner() const override {
return owner;
}
@@ -48,6 +46,8 @@ public:
return writable_event;
}
+ static void PostDestroy(uintptr_t arg);
+
private:
KReadableEvent readable_event;
KWritableEvent writable_event;
diff --git a/src/core/hle/kernel/k_port.h b/src/core/hle/kernel/k_port.h
index 960f1f3a3..4018ea2df 100644
--- a/src/core/hle/kernel/k_port.h
+++ b/src/core/hle/kernel/k_port.h
@@ -22,7 +22,7 @@ class KPort final : public KAutoObjectWithSlabHeapAndContainer<KPort, KAutoObjec
public:
explicit KPort(KernelCore& kernel_);
- virtual ~KPort();
+ ~KPort() override;
static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
@@ -59,7 +59,6 @@ private:
ServerClosed = 3,
};
-private:
KServerPort server;
KClientPort client;
State state{State::Invalid};
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h
index 123d71cd3..c0656b9af 100644
--- a/src/core/hle/kernel/k_process.h
+++ b/src/core/hle/kernel/k_process.h
@@ -331,19 +331,19 @@ public:
void LoadModule(CodeSet code_set, VAddr base_addr);
- virtual bool IsInitialized() const override {
+ bool IsInitialized() const override {
return is_initialized;
}
static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
- virtual void Finalize();
+ void Finalize() override;
- virtual u64 GetId() const override final {
+ u64 GetId() const override {
return GetProcessID();
}
- virtual bool IsSignaled() const override;
+ bool IsSignaled() const override;
void PinCurrentThread();
void UnpinCurrentThread();
diff --git a/src/core/hle/kernel/k_readable_event.h b/src/core/hle/kernel/k_readable_event.h
index 33cd1dd3e..b2850ac7b 100644
--- a/src/core/hle/kernel/k_readable_event.h
+++ b/src/core/hle/kernel/k_readable_event.h
@@ -31,8 +31,8 @@ public:
return parent;
}
- virtual bool IsSignaled() const override;
- virtual void Destroy() override;
+ bool IsSignaled() const override;
+ void Destroy() override;
ResultCode Signal();
ResultCode Clear();
diff --git a/src/core/hle/kernel/k_resource_limit.h b/src/core/hle/kernel/k_resource_limit.h
index 0debbbb51..fab6005ff 100644
--- a/src/core/hle/kernel/k_resource_limit.h
+++ b/src/core/hle/kernel/k_resource_limit.h
@@ -37,10 +37,10 @@ class KResourceLimit final
public:
explicit KResourceLimit(KernelCore& kernel_);
- virtual ~KResourceLimit();
+ ~KResourceLimit() override;
void Initialize(const Core::Timing::CoreTiming* core_timing_);
- virtual void Finalize() override;
+ void Finalize() override;
s64 GetLimitValue(LimitableResource which) const;
s64 GetCurrentValue(LimitableResource which) const;
diff --git a/src/core/hle/kernel/k_server_port.h b/src/core/hle/kernel/k_server_port.h
index d1a757ec3..55481d63f 100644
--- a/src/core/hle/kernel/k_server_port.h
+++ b/src/core/hle/kernel/k_server_port.h
@@ -25,12 +25,9 @@ class SessionRequestHandler;
class KServerPort final : public KSynchronizationObject {
KERNEL_AUTOOBJECT_TRAITS(KServerPort, KSynchronizationObject);
-private:
- using SessionList = boost::intrusive::list<KServerSession>;
-
public:
explicit KServerPort(KernelCore& kernel_);
- virtual ~KServerPort() override;
+ ~KServerPort() override;
void Initialize(KPort* parent_, std::string&& name_);
@@ -63,13 +60,14 @@ public:
bool IsLight() const;
// Overridden virtual functions.
- virtual void Destroy() override;
- virtual bool IsSignaled() const override;
+ void Destroy() override;
+ bool IsSignaled() const override;
private:
+ using SessionList = boost::intrusive::list<KServerSession>;
+
void CleanupSessions();
-private:
SessionList session_list;
SessionRequestHandlerPtr session_handler;
KPort* parent{};
diff --git a/src/core/hle/kernel/k_server_session.h b/src/core/hle/kernel/k_server_session.h
index dd4de2904..27b757ad2 100644
--- a/src/core/hle/kernel/k_server_session.h
+++ b/src/core/hle/kernel/k_server_session.h
@@ -42,9 +42,9 @@ class KServerSession final : public KSynchronizationObject,
public:
explicit KServerSession(KernelCore& kernel_);
- virtual ~KServerSession() override;
+ ~KServerSession() override;
- virtual void Destroy() override;
+ void Destroy() override;
void Initialize(KSession* parent_, std::string&& name_);
@@ -56,7 +56,7 @@ public:
return parent;
}
- virtual bool IsSignaled() const override;
+ bool IsSignaled() const override;
void OnClientClosed();
diff --git a/src/core/hle/kernel/k_session.h b/src/core/hle/kernel/k_session.h
index a981fd1f6..4ddd080d2 100644
--- a/src/core/hle/kernel/k_session.h
+++ b/src/core/hle/kernel/k_session.h
@@ -18,17 +18,17 @@ class KSession final : public KAutoObjectWithSlabHeapAndContainer<KSession, KAut
public:
explicit KSession(KernelCore& kernel_);
- virtual ~KSession() override;
+ ~KSession() override;
void Initialize(KClientPort* port_, const std::string& name_);
- virtual void Finalize() override;
+ void Finalize() override;
- virtual bool IsInitialized() const override {
+ bool IsInitialized() const override {
return initialized;
}
- virtual uintptr_t GetPostDestroyArgument() const override {
+ uintptr_t GetPostDestroyArgument() const override {
return reinterpret_cast<uintptr_t>(process);
}
@@ -78,7 +78,6 @@ private:
ServerClosed = 3,
};
-private:
void SetState(State state) {
atomic_state = static_cast<u8>(state);
}
@@ -87,7 +86,6 @@ private:
return static_cast<State>(atomic_state.load(std::memory_order_relaxed));
}
-private:
KServerSession server;
KClientSession client;
std::atomic<std::underlying_type_t<State>> atomic_state{
diff --git a/src/core/hle/kernel/k_shared_memory.h b/src/core/hle/kernel/k_shared_memory.h
index 553a56327..e9815f90b 100644
--- a/src/core/hle/kernel/k_shared_memory.h
+++ b/src/core/hle/kernel/k_shared_memory.h
@@ -68,9 +68,9 @@ public:
return device_memory->GetPointer(physical_address + offset);
}
- virtual void Finalize() override;
+ void Finalize() override;
- virtual bool IsInitialized() const override {
+ bool IsInitialized() const override {
return is_initialized;
}
static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
diff --git a/src/core/hle/kernel/k_synchronization_object.h b/src/core/hle/kernel/k_synchronization_object.h
index a41dd1220..3d4ce1fbc 100644
--- a/src/core/hle/kernel/k_synchronization_object.h
+++ b/src/core/hle/kernel/k_synchronization_object.h
@@ -29,7 +29,7 @@ public:
KSynchronizationObject** objects, const s32 num_objects,
s64 timeout);
- virtual void Finalize() override;
+ void Finalize() override;
[[nodiscard]] virtual bool IsSignaled() const = 0;
@@ -37,7 +37,7 @@ public:
protected:
explicit KSynchronizationObject(KernelCore& kernel);
- virtual ~KSynchronizationObject();
+ ~KSynchronizationObject() override;
virtual void OnFinalizeSynchronizationObject() {}
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index e3f08f256..3cf43d290 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -168,13 +168,13 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
std::memset(static_cast<void*>(std::addressof(GetStackParameters())), 0,
sizeof(StackParameters));
- // Setup the TLS, if needed.
- if (type == ThreadType::User) {
- tls_address = owner->CreateTLSRegion();
- }
-
// Set parent, if relevant.
if (owner != nullptr) {
+ // Setup the TLS, if needed.
+ if (type == ThreadType::User) {
+ tls_address = owner->CreateTLSRegion();
+ }
+
parent = owner;
parent->Open();
parent->IncrementThreadCount();
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h
index 4abfc2b49..01eebb165 100644
--- a/src/core/hle/kernel/k_thread.h
+++ b/src/core/hle/kernel/k_thread.h
@@ -358,21 +358,21 @@ public:
return termination_requested || GetRawState() == ThreadState::Terminated;
}
- [[nodiscard]] virtual u64 GetId() const override final {
+ [[nodiscard]] u64 GetId() const override {
return this->GetThreadID();
}
- [[nodiscard]] virtual bool IsInitialized() const override {
+ [[nodiscard]] bool IsInitialized() const override {
return initialized;
}
- [[nodiscard]] virtual uintptr_t GetPostDestroyArgument() const override {
+ [[nodiscard]] uintptr_t GetPostDestroyArgument() const override {
return reinterpret_cast<uintptr_t>(parent) | (resource_limit_release_hint ? 1 : 0);
}
- virtual void Finalize() override;
+ void Finalize() override;
- [[nodiscard]] virtual bool IsSignaled() const override;
+ [[nodiscard]] bool IsSignaled() const override;
static void PostDestroy(uintptr_t arg);
diff --git a/src/core/hle/kernel/k_transfer_memory.h b/src/core/hle/kernel/k_transfer_memory.h
index c2d0f1eaf..31029a5c2 100644
--- a/src/core/hle/kernel/k_transfer_memory.h
+++ b/src/core/hle/kernel/k_transfer_memory.h
@@ -27,23 +27,23 @@ class KTransferMemory final
public:
explicit KTransferMemory(KernelCore& kernel_);
- virtual ~KTransferMemory() override;
+ ~KTransferMemory() override;
ResultCode Initialize(VAddr address_, std::size_t size_, Svc::MemoryPermission owner_perm_);
- virtual void Finalize() override;
+ void Finalize() override;
- virtual bool IsInitialized() const override {
+ bool IsInitialized() const override {
return is_initialized;
}
- virtual uintptr_t GetPostDestroyArgument() const override {
+ uintptr_t GetPostDestroyArgument() const override {
return reinterpret_cast<uintptr_t>(owner);
}
static void PostDestroy(uintptr_t arg);
- KProcess* GetOwner() const {
+ KProcess* GetOwner() const override {
return owner;
}
diff --git a/src/core/hle/kernel/k_writable_event.h b/src/core/hle/kernel/k_writable_event.h
index 607b0eadb..858d982c4 100644
--- a/src/core/hle/kernel/k_writable_event.h
+++ b/src/core/hle/kernel/k_writable_event.h
@@ -21,7 +21,7 @@ public:
explicit KWritableEvent(KernelCore& kernel_);
~KWritableEvent() override;
- virtual void Destroy() override;
+ void Destroy() override;
static void PostDestroy([[maybe_unused]] uintptr_t arg) {}
diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp
index b05a5da04..b1a81810b 100644
--- a/src/core/hle/service/am/applets/software_keyboard.cpp
+++ b/src/core/hle/service/am/applets/software_keyboard.cpp
@@ -273,8 +273,13 @@ void SoftwareKeyboard::ProcessTextCheck() {
std::memcpy(&swkbd_text_check, text_check_data.data(), sizeof(SwkbdTextCheck));
- std::u16string text_check_message = Common::UTF16StringFromFixedZeroTerminatedBuffer(
- swkbd_text_check.text_check_message.data(), swkbd_text_check.text_check_message.size());
+ std::u16string text_check_message =
+ swkbd_text_check.text_check_result == SwkbdTextCheckResult::Failure ||
+ swkbd_text_check.text_check_result == SwkbdTextCheckResult::Confirm
+ ? Common::UTF16StringFromFixedZeroTerminatedBuffer(
+ swkbd_text_check.text_check_message.data(),
+ swkbd_text_check.text_check_message.size())
+ : u"";
LOG_INFO(Service_AM, "\nTextCheckResult: {}\nTextCheckMessage: {}",
GetTextCheckResultName(swkbd_text_check.text_check_result),
@@ -285,10 +290,10 @@ void SoftwareKeyboard::ProcessTextCheck() {
SubmitNormalOutputAndExit(SwkbdResult::Ok, current_text);
break;
case SwkbdTextCheckResult::Failure:
- ShowTextCheckDialog(SwkbdTextCheckResult::Failure, text_check_message);
+ ShowTextCheckDialog(SwkbdTextCheckResult::Failure, std::move(text_check_message));
break;
case SwkbdTextCheckResult::Confirm:
- ShowTextCheckDialog(SwkbdTextCheckResult::Confirm, text_check_message);
+ ShowTextCheckDialog(SwkbdTextCheckResult::Confirm, std::move(text_check_message));
break;
case SwkbdTextCheckResult::Silent:
default:
@@ -482,7 +487,7 @@ void SoftwareKeyboard::InitializeFrontendKeyboard() {
max_text_length <= 32 ? SwkbdTextDrawType::Line : SwkbdTextDrawType::Box;
Core::Frontend::KeyboardInitializeParameters initialize_parameters{
- .ok_text{ok_text},
+ .ok_text{std::move(ok_text)},
.header_text{},
.sub_text{},
.guide_text{},
@@ -558,10 +563,10 @@ void SoftwareKeyboard::InitializeFrontendKeyboard() {
: false;
Core::Frontend::KeyboardInitializeParameters initialize_parameters{
- .ok_text{ok_text},
- .header_text{header_text},
- .sub_text{sub_text},
- .guide_text{guide_text},
+ .ok_text{std::move(ok_text)},
+ .header_text{std::move(header_text)},
+ .sub_text{std::move(sub_text)},
+ .guide_text{std::move(guide_text)},
.initial_text{initial_text},
.max_text_length{max_text_length},
.min_text_length{min_text_length},
@@ -590,7 +595,7 @@ void SoftwareKeyboard::ShowNormalKeyboard() {
void SoftwareKeyboard::ShowTextCheckDialog(SwkbdTextCheckResult text_check_result,
std::u16string text_check_message) {
- frontend.ShowTextCheckDialog(text_check_result, text_check_message);
+ frontend.ShowTextCheckDialog(text_check_result, std::move(text_check_message));
}
void SoftwareKeyboard::ShowInlineKeyboard() {
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp
index d160ffe87..c709a8028 100644
--- a/src/core/hle/service/ldn/ldn.cpp
+++ b/src/core/hle/service/ldn/ldn.cpp
@@ -215,10 +215,151 @@ public:
}
};
+class INetworkService final : public ServiceFramework<INetworkService> {
+public:
+ explicit INetworkService(Core::System& system_) : ServiceFramework{system_, "INetworkService"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "Initialize"},
+ {256, nullptr, "AttachNetworkInterfaceStateChangeEvent"},
+ {264, nullptr, "GetNetworkInterfaceLastError"},
+ {272, nullptr, "GetRole"},
+ {280, nullptr, "GetAdvertiseData"},
+ {288, nullptr, "GetGroupInfo"},
+ {296, nullptr, "GetGroupInfo2"},
+ {304, nullptr, "GetGroupOwner"},
+ {312, nullptr, "GetIpConfig"},
+ {320, nullptr, "GetLinkLevel"},
+ {512, nullptr, "Scan"},
+ {768, nullptr, "CreateGroup"},
+ {776, nullptr, "DestroyGroup"},
+ {784, nullptr, "SetAdvertiseData"},
+ {1536, nullptr, "SendToOtherGroup"},
+ {1544, nullptr, "RecvFromOtherGroup"},
+ {1552, nullptr, "AddAcceptableGroupId"},
+ {1560, nullptr, "ClearAcceptableGroupId"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
+class INetworkServiceMonitor final : public ServiceFramework<INetworkServiceMonitor> {
+public:
+ explicit INetworkServiceMonitor(Core::System& system_)
+ : ServiceFramework{system_, "INetworkServiceMonitor"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, &INetworkServiceMonitor::Initialize, "Initialize"},
+ {256, nullptr, "AttachNetworkInterfaceStateChangeEvent"},
+ {264, nullptr, "GetNetworkInterfaceLastError"},
+ {272, nullptr, "GetRole"},
+ {280, nullptr, "GetAdvertiseData"},
+ {281, nullptr, "GetAdvertiseData2"},
+ {288, nullptr, "GetGroupInfo"},
+ {296, nullptr, "GetGroupInfo2"},
+ {304, nullptr, "GetGroupOwner"},
+ {312, nullptr, "GetIpConfig"},
+ {320, nullptr, "GetLinkLevel"},
+ {328, nullptr, "AttachJoinEvent"},
+ {336, nullptr, "GetMembers"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+
+ void Initialize(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_LDN, "(STUBBED) called");
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ERROR_DISABLED);
+ }
+};
+
+class LP2PAPP final : public ServiceFramework<LP2PAPP> {
+public:
+ explicit LP2PAPP(Core::System& system_) : ServiceFramework{system_, "lp2p:app"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, &LP2PAPP::CreateMonitorService, "CreateNetworkService"},
+ {8, &LP2PAPP::CreateMonitorService, "CreateNetworkServiceMonitor"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+
+ void CreateNetworkervice(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const u64 reserved_input = rp.Pop<u64>();
+ const u32 input = rp.Pop<u32>();
+
+ LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={} input={}", reserved_input,
+ input);
+
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<INetworkService>(system);
+ }
+
+ void CreateMonitorService(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const u64 reserved_input = rp.Pop<u64>();
+
+ LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
+
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<INetworkServiceMonitor>(system);
+ }
+};
+
+class LP2PSYS final : public ServiceFramework<LP2PSYS> {
+public:
+ explicit LP2PSYS(Core::System& system_) : ServiceFramework{system_, "lp2p:sys"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, &LP2PSYS::CreateMonitorService, "CreateNetworkService"},
+ {8, &LP2PSYS::CreateMonitorService, "CreateNetworkServiceMonitor"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+
+ void CreateNetworkervice(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const u64 reserved_input = rp.Pop<u64>();
+ const u32 input = rp.Pop<u32>();
+
+ LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={} input={}", reserved_input,
+ input);
+
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<INetworkService>(system);
+ }
+
+ void CreateMonitorService(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const u64 reserved_input = rp.Pop<u64>();
+
+ LOG_WARNING(Service_LDN, "(STUBBED) called reserved_input={}", reserved_input);
+
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<INetworkServiceMonitor>(system);
+ }
+};
+
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
std::make_shared<LDNM>(system)->InstallAsService(sm);
std::make_shared<LDNS>(system)->InstallAsService(sm);
std::make_shared<LDNU>(system)->InstallAsService(sm);
+ std::make_shared<LP2PAPP>(system)->InstallAsService(sm);
+ std::make_shared<LP2PSYS>(system)->InstallAsService(sm);
}
} // namespace Service::LDN
diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp
index a9a095d58..aa453a79f 100644
--- a/src/yuzu/applets/software_keyboard.cpp
+++ b/src/yuzu/applets/software_keyboard.cpp
@@ -1101,12 +1101,11 @@ void QtSoftwareKeyboardDialog::NormalKeyboardButtonClicked(QPushButton* button)
}
if (button == ui->button_ok || button == ui->button_ok_shift || button == ui->button_ok_num) {
- if (ui->topOSK->currentIndex() == 1) {
- emit SubmitNormalText(SwkbdResult::Ok,
- ui->text_edit_osk->toPlainText().toStdU16String());
- } else {
- emit SubmitNormalText(SwkbdResult::Ok, ui->line_edit_osk->text().toStdU16String());
- }
+ auto text = ui->topOSK->currentIndex() == 1
+ ? ui->text_edit_osk->toPlainText().toStdU16String()
+ : ui->line_edit_osk->text().toStdU16String();
+
+ emit SubmitNormalText(SwkbdResult::Ok, std::move(text));
return;
}
@@ -1265,13 +1264,11 @@ void QtSoftwareKeyboardDialog::TranslateButtonPress(HIDButton button) {
if (is_inline) {
emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position);
} else {
- if (ui->topOSK->currentIndex() == 1) {
- emit SubmitNormalText(SwkbdResult::Cancel,
- ui->text_edit_osk->toPlainText().toStdU16String());
- } else {
- emit SubmitNormalText(SwkbdResult::Cancel,
- ui->line_edit_osk->text().toStdU16String());
- }
+ auto text = ui->topOSK->currentIndex() == 1
+ ? ui->text_edit_osk->toPlainText().toStdU16String()
+ : ui->line_edit_osk->text().toStdU16String();
+
+ emit SubmitNormalText(SwkbdResult::Cancel, std::move(text));
}
break;
case HIDButton::Y:
@@ -1563,7 +1560,7 @@ void QtSoftwareKeyboard::ShowNormalKeyboard() const {
void QtSoftwareKeyboard::ShowTextCheckDialog(
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
std::u16string text_check_message) const {
- emit MainWindowShowTextCheckDialog(text_check_result, text_check_message);
+ emit MainWindowShowTextCheckDialog(text_check_result, std::move(text_check_message));
}
void QtSoftwareKeyboard::ShowInlineKeyboard(