early-access version 1730
This commit is contained in:
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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 {
|
||||
|
@@ -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"
|
||||
|
@@ -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() {
|
||||
|
@@ -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
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user