diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index a6ebbd1..6d3978a 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -102,6 +102,8 @@ public: {150, nullptr, "CreateAuthorizationRequest"}, {160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"}, {161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"}, + {170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+ + {180, nullptr, "GetRequestForNintendoAccountReauthentication"} // 17.0.0+ }; // clang-format on @@ -180,6 +182,7 @@ public: {150, nullptr, "CreateAuthorizationRequest"}, {160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"}, {161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"}, + {170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+ {200, nullptr, "IsRegistered"}, {201, nullptr, "RegisterAsync"}, {202, nullptr, "UnregisterAsync"}, @@ -686,6 +689,11 @@ public: {103, nullptr, "GetProfileImage"}, {110, nullptr, "RegisterUserAsync"}, {111, nullptr, "GetUid"}, + {200, nullptr, "ApplyResponseForUserCreationAsync"}, // 17.0.0+ + {205, nullptr, "SuspendAfterApplyResponse"}, // 17.0.0+ + {210, nullptr, "IsProfileAvailable"}, // 17.0.0+ + {220, nullptr, "RegisterUserAsyncWithoutProfile"}, // 17.0.0+ + {221, nullptr, "RegisterUserWithProfileAsync"} // 17.0.0+ }; // clang-format on diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index b713317..e1f9ab1 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp @@ -50,6 +50,9 @@ ACC_SU::ACC_SU(std::shared_ptr module_, std::shared_ptr {210, nullptr, "CreateFloatingRegistrationRequest"}, {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, + {213, nullptr, "CreateProcedureToCreateUserWithNintendoAccount"}, // 17.0.0+ + {214, nullptr, "ResumeProcedureToCreateUserWithNintendoAccount"}, // 17.0.0+ + {215, nullptr, "ResumeProcedureToCreateUserWithNintendoAccountAfterApplyResponse"}, // 17.0.0+ {230, nullptr, "AuthenticateServiceAsync"}, {250, nullptr, "GetBaasAccountAdministrator"}, {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, diff --git a/src/core/hle/service/am/spsm.cpp b/src/core/hle/service/am/spsm.cpp index 15745c4..3e3d3ef 100644 --- a/src/core/hle/service/am/spsm.cpp +++ b/src/core/hle/service/am/spsm.cpp @@ -20,6 +20,9 @@ SPSM::SPSM(Core::System& system_) : ServiceFramework{system_, "spsm"} { {9, nullptr, "ChangeHomeButtonLongPressingTime"}, {10, nullptr, "PutErrorState"}, {11, nullptr, "InvalidateCurrentHomeButtonPressing"}, + {12, nullptr, "Unknown12"}, // 17.0.0+ + {13, nullptr, "Unknown13"}, // 17.0.0+ + {14, nullptr, "Unknown14"} // 17.0.0+ }; // clang-format on diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp index 963b13a..ea0ac92 100644 --- a/src/core/hle/service/apm/apm_interface.cpp +++ b/src/core/hle/service/apm/apm_interface.cpp @@ -109,6 +109,7 @@ APM_Sys::APM_Sys(Core::System& system_, Controller& controller_) {5, nullptr, "LoadAndApplySettings"}, {6, &APM_Sys::SetCpuBoostMode, "SetCpuBoostMode"}, {7, &APM_Sys::GetCurrentPerformanceConfiguration, "GetCurrentPerformanceConfiguration"}, + {8, nullptr, "GetCurrentPerformanceMode"} // 17.0.0+ }; // clang-format on diff --git a/src/core/hle/service/caps/caps_a.cpp b/src/core/hle/service/caps/caps_a.cpp index 808cf62..80eaca6 100644 --- a/src/core/hle/service/caps/caps_a.cpp +++ b/src/core/hle/service/caps/caps_a.cpp @@ -37,6 +37,10 @@ IAlbumAccessorService::IAlbumAccessorService(Core::System& system_, {19, nullptr, "Unknown19"}, {100, nullptr, "GetAlbumFileCountEx0"}, {101, C<&IAlbumAccessorService::GetAlbumFileListEx0>, "GetAlbumFileListEx0"}, + {120, nullptr, "Unknown120"}, // 17.0.0+ + {130, nullptr, "Unknown130"}, // 17.0.0+ + {140, nullptr, "Unknown140"}, // 17.0.0+ + {150, nullptr, "Unknown150"}, // 17.0.0+ {202, nullptr, "SaveEditedScreenShot"}, {301, nullptr, "GetLastThumbnail"}, {302, nullptr, "GetLastOverlayMovieThumbnail"}, diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 771c43b..77a0f0c 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp @@ -28,6 +28,9 @@ IAlbumApplicationService::IAlbumApplicationService(Core::System& system_, {142, C<&IAlbumApplicationService::GetAlbumFileList3AaeAruid>, "GetAlbumFileList3AaeAruid"}, {143, nullptr, "GetAlbumFileList4AaeUidAruid"}, {144, nullptr, "GetAllAlbumFileList3AaeAruid"}, + {145, nullptr, "Unknown145"}, // 17.0.0+ + {146, nullptr, "Unknown146"}, // 17.0.0+ + {147, nullptr, "Unknown147"}, // 17.0.0+ {60002, nullptr, "OpenAccessorSessionForApplication"}, }; // clang-format on diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp index 4f45aea..4c357b1 100644 --- a/src/core/hle/service/erpt/erpt.cpp +++ b/src/core/hle/service/erpt/erpt.cpp @@ -5,9 +5,11 @@ #include "common/logging/log.h" #include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/cmif_types.h" #include "core/hle/service/erpt/erpt.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" +#include "core/hle/service/set/system_settings_server.h" #include "core/hle/service/sm/sm.h" namespace Service::ERPT { @@ -15,6 +17,16 @@ namespace Service::ERPT { class ErrorReportContext final : public ServiceFramework { public: explicit ErrorReportContext(Core::System& system_) : ServiceFramework{system_, "erpt:c"} { + Service::OutLargeData firmware_version = nullptr; + system.ServiceManager() + .GetService("set:sys", true) + ->GetFirmwareVersion(firmware_version); + + FunctionInfo create_report = {11, C<&ErrorReportContext::CreateReport>, "CreateReport"}; + if (firmware_version->major > 17) + create_report = {11, C<&ErrorReportContext::CreateReportV1>, + "CreateReportV1"}; // 17.0.0+ + // clang-format off static const FunctionInfo functions[] = { {0, C<&ErrorReportContext::SubmitContext>, "SubmitContext"}, @@ -28,8 +40,8 @@ public: {8, nullptr, "ClearApplicationLaunchTime"}, {9, nullptr, "SubmitAttachment"}, {10, nullptr, "CreateReportWithAttachments"}, - {11, C<&ErrorReportContext::CreateReportV1>, "CreateReportV1"}, - {12, C<&ErrorReportContext::CreateReport>, "CreateReport"}, + create_report, + {12, C<&ErrorReportContext::CreateReport>, "CreateReport"}, // 17.0.0+ {20, nullptr, "RegisterRunningApplet"}, {21, nullptr, "UnregisterRunningApplet"}, {22, nullptr, "UpdateAppletSuspendedDuration"}, diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index e6cc750..dc47875 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp @@ -85,6 +85,11 @@ public: {1019, nullptr, "Unknown1019"}, {1020, nullptr, "Unknown1020"}, {1021, nullptr, "Unknown1021"}, + {1023, nullptr, "Unknown1023"}, // 17.0.0+ + {1024, nullptr, "Unknown1024"}, // 17.0.0+ + {1025, nullptr, "Unknown1025"}, // 17.0.0+ + {1026, nullptr, "Unknown1026"}, // 17.0.0+ + {1027, nullptr, "Unknown1027"}, // 17.0.0+ {1501, nullptr, "Unknown1501"}, {1502, nullptr, "Unknown1502"}, {1503, nullptr, "Unknown1503"}, diff --git a/src/core/hle/service/fgm/fgm.cpp b/src/core/hle/service/fgm/fgm.cpp index fe9d30d..4bfeb5e 100644 --- a/src/core/hle/service/fgm/fgm.cpp +++ b/src/core/hle/service/fgm/fgm.cpp @@ -3,10 +3,12 @@ #include +#include "core/hle/service/cmif_types.h" #include "core/hle/service/fgm/fgm.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" +#include "core/hle/service/set/system_settings_server.h" #include "core/hle/service/sm/sm.h" namespace Service::FGM { @@ -70,7 +72,19 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("fgm", std::make_shared(system, "fgm")); server_manager->RegisterNamedService("fgm:0", std::make_shared(system, "fgm:0")); server_manager->RegisterNamedService("fgm:9", std::make_shared(system, "fgm:9")); - server_manager->RegisterNamedService("fgm:dbg", std::make_shared(system)); + + Service::OutLargeData firmware_version = nullptr; + system.ServiceManager() + .GetService("set:sys", true) + ->GetFirmwareVersion(firmware_version); + + LOG_DEBUG(Service_FGM, "major={}, display_version={}", firmware_version->major, + std::string(firmware_version->display_version.begin(), + firmware_version->display_version.end())); + if (firmware_version->major < 17) { + server_manager->RegisterNamedService("fgm:dbg", std::make_shared(system)); + } + ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/mig/mig.cpp b/src/core/hle/service/mig/mig.cpp index 765f6e5..d426ecd 100644 --- a/src/core/hle/service/mig/mig.cpp +++ b/src/core/hle/service/mig/mig.cpp @@ -23,6 +23,7 @@ public: {1010, nullptr, "Unknown1010"}, {1100, nullptr, "Unknown1100"}, {1101, nullptr, "Unknown1101"}, + {1110, nullptr, "Unknown1110"}, // 17.0.0+ {1200, nullptr, "Unknown1200"}, {1201, nullptr, "Unknown1201"} }; diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index 6084e50..32efcee 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp @@ -215,6 +215,11 @@ public: {132, nullptr, "Unknown132"}, {133, nullptr, "Unknown133"}, {134, nullptr, "Unknown134"}, + {142, nullptr, "Unknown142"}, // 17.0.0+ + {143, nullptr, "Unknown143"}, // 17.0.0+ + {144, nullptr, "Unknown144"}, // 17.0.0+ + {3000, nullptr, "Unknown3000"}, // 17.0.0+ + {3001, nullptr, "Unknown3001"} // 17.0.0+ }; // clang-format on @@ -232,6 +237,7 @@ public: {2, nullptr, "ClearDebugResponse"}, {3, nullptr, "RegisterDebugResponse"}, {4, &NIM_ECA::IsLargeResourceAvailable, "IsLargeResourceAvailable"}, + {5, nullptr, "CreateServerInterface2"} // 17.0.0+ }; // clang-format on diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index 08375fe..8064665 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp @@ -39,6 +39,14 @@ public: {32, nullptr, "DestroyTokenForBaaS"}, {33, nullptr, "CreateTokenForBaaS"}, {34, nullptr, "SetBaaSDeviceAccountIdList"}, + {35, nullptr, "LinkNsaId"}, // 17.0.0+ + {36, nullptr, "UnlinkNsaId"}, // 17.0.0+ + {40, nullptr, "GetNetworkServiceAccountIdTokenRequestEvent"}, // 17.0.0+ + {41, nullptr, "TryPopNetworkServiceAccountIdTokenRequestUid"}, // 17.0.0+ + {42, nullptr, "SetNetworkServiceAccountIdTokenSuccess"}, // 17.0.0+ + {43, nullptr, "SetNetworkServiceAccountIdTokenFailure"}, // 17.0.0+ + {44, nullptr, "SetUidList"}, // 17.0.0+ + {45, nullptr, "PutDigitalTwinKeyValue"}, // 17.0.0+ {101, nullptr, "Suspend"}, {102, nullptr, "Resume"}, {103, nullptr, "GetState"}, diff --git a/src/core/hle/service/omm/omm.cpp b/src/core/hle/service/omm/omm.cpp index 6388cff..45f5b96 100644 --- a/src/core/hle/service/omm/omm.cpp +++ b/src/core/hle/service/omm/omm.cpp @@ -16,6 +16,10 @@ void LoopProcess(Core::System& system) { std::make_shared(system)); server_manager->RegisterNamedService("omm", std::make_shared(system)); server_manager->RegisterNamedService("spsm", std::make_shared(system)); + /* + TODO: (jarrodnorwell) ommdisp + https://switchbrew.org/wiki/OMM_services#ommdisp + */ ServerManager::RunServer(std::move(server_manager)); } diff --git a/src/core/hle/service/ptm/ts.cpp b/src/core/hle/service/ptm/ts.cpp index fc3e89e..6e0a124 100644 --- a/src/core/hle/service/ptm/ts.cpp +++ b/src/core/hle/service/ptm/ts.cpp @@ -22,6 +22,9 @@ public: {0, nullptr, "GetTemperatureRange"}, {2, nullptr, "SetMeasurementMode"}, {4, &ISession::GetTemperature, "GetTemperature"}, + {5, nullptr, "Unknown5"}, // 17.0.0+ + {6, nullptr, "Unknown6"}, // 17.0.0+ + {7, nullptr, "Unknown7"} // 17.0.0+ }; // clang-format on diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index ccdfa69..09a0c2b 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -1006,7 +1006,8 @@ BSD::BSD(Core::System& system_, const char* name) {30, nullptr, "SendMMsg"}, {31, &BSD::EventFd, "EventFd"}, {32, nullptr, "RegisterResourceStatisticsName"}, - {33, nullptr, "Initialize2"}, + {33, nullptr, "RegisterClientShared"}, + {35, nullptr, "NifIoctl"} // 17.0.0+ }; // clang-format on @@ -1050,6 +1051,24 @@ BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} { {13, nullptr, "Unknown13"}, {14, nullptr, "Unknown14"}, {15, nullptr, "Unknown15"}, + {16, nullptr, "Unknown16"}, // 17.0.0+ + {17, nullptr, "Unknown17"}, // 17.0.0+ + {18, nullptr, "Unknown18"}, // 17.0.0+ + {19, nullptr, "Unknown19"}, // 17.0.0+ + {20, nullptr, "Unknown20"}, // 17.0.0+ + {21, nullptr, "Unknown21"}, // 17.0.0+ + {22, nullptr, "Unknown22"}, // 17.0.0+ + {23, nullptr, "Unknown23"}, // 17.0.0+ + {50, nullptr, "Unknown50"}, // 17.0.0+ + {51, nullptr, "Unknown51"}, // 17.0.0+ + {52, nullptr, "Unknown52"}, // 17.0.0+ + {53, nullptr, "Unknown53"}, // 17.0.0+ + {54, nullptr, "Unknown54"}, // 17.0.0+ + {55, nullptr, "Unknown55"}, // 17.0.0+ + {56, nullptr, "Unknown56"}, // 17.0.0+ + {57, nullptr, "Unknown57"}, // 17.0.0+ + {58, nullptr, "Unknown58"}, // 17.0.0+ + {100, nullptr, "Unknown100"} // 17.0.0+ }; // clang-format on diff --git a/src/sudachi/bootmanager.cpp b/src/sudachi/bootmanager.cpp index d473602..d96f098 100644 --- a/src/sudachi/bootmanager.cpp +++ b/src/sudachi/bootmanager.cpp @@ -736,35 +736,35 @@ void GRenderWindow::wheelEvent(QWheelEvent* event) { } void GRenderWindow::TouchBeginEvent(const QTouchEvent* event) { - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) QList touch_points = event->points(); - #else +#else QList touch_points = event->touchPoints(); - #endif +#endif for (const auto& touch_point : touch_points) { - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) const auto [x, y] = ScaleTouch(touch_point.position()); - #else +#else const auto [x, y] = ScaleTouch(touch_point.pos()); - #endif +#endif const auto [touch_x, touch_y] = MapToTouchScreen(x, y); input_subsystem->GetTouchScreen()->TouchPressed(touch_x, touch_y, touch_point.id()); } } void GRenderWindow::TouchUpdateEvent(const QTouchEvent* event) { - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) QList touch_points = event->points(); - #else +#else QList touch_points = event->touchPoints(); - #endif +#endif input_subsystem->GetTouchScreen()->ClearActiveFlag(); for (const auto& touch_point : touch_points) { - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) const auto [x, y] = ScaleTouch(touch_point.position()); - #else +#else const auto [x, y] = ScaleTouch(touch_point.pos()); - #endif +#endif const auto [touch_x, touch_y] = MapToTouchScreen(x, y); input_subsystem->GetTouchScreen()->TouchMoved(touch_x, touch_y, touch_point.id()); } diff --git a/src/sudachi/configuration/configure_touch_from_button.cpp b/src/sudachi/configuration/configure_touch_from_button.cpp index ca723a5..9cf7bda 100644 --- a/src/sudachi/configuration/configure_touch_from_button.cpp +++ b/src/sudachi/configuration/configure_touch_from_button.cpp @@ -505,11 +505,11 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) { if (!coord_label) { return; } - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) const auto pos = MapToDeviceCoords(event->position().x(), event->position().y()); - #else +#else const auto pos = MapToDeviceCoords(event->x(), event->y()); - #endif +#endif if (pos) { coord_label->setText(QStringLiteral("X: %1, Y: %2").arg(pos->x()).arg(pos->y())); } else { @@ -527,11 +527,11 @@ void TouchScreenPreview::mousePressEvent(QMouseEvent* event) { if (event->button() != Qt::MouseButton::LeftButton) { return; } - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) const auto pos = MapToDeviceCoords(event->position().x(), event->position().y()); - #else +#else const auto pos = MapToDeviceCoords(event->x(), event->y()); - #endif +#endif if (pos) { emit DotAdded(*pos); } @@ -547,11 +547,11 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) { emit DotSelected(obj->property(PropId).toInt()); drag_state.dot = qobject_cast(obj); - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) drag_state.start_pos = mouse_event->globalPosition().toPoint(); - #else +#else drag_state.start_pos = mouse_event->globalPos(); - #endif +#endif return true; } case QEvent::Type::MouseMove: { @@ -560,22 +560,23 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) { } const auto mouse_event = static_cast(event); if (!drag_state.active) { - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) drag_state.active = (mouse_event->globalPosition().toPoint() - drag_state.start_pos) .manhattanLength() >= QApplication::startDragDistance(); - #else - drag_state.active = (mouse_event->globalPos() - drag_state.start_pos) - .manhattanLength() >= QApplication::startDragDistance(); - #endif +#else + drag_state.active = + (mouse_event->globalPos() - drag_state.start_pos).manhattanLength() >= + QApplication::startDragDistance(); +#endif if (!drag_state.active) { break; } } - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) auto current_pos = mapFromGlobal(mouse_event->globalPosition().toPoint()); - #else +#else auto current_pos = mapFromGlobal(mouse_event->globalPos()); - #endif +#endif current_pos.setX(std::clamp(current_pos.x(), contentsMargins().left(), contentsMargins().left() + contentsRect().width() - 1)); current_pos.setY(std::clamp(current_pos.y(), contentsMargins().top(), diff --git a/src/sudachi/configuration/configure_ui.cpp b/src/sudachi/configuration/configure_ui.cpp index aa35acf..f69c431 100644 --- a/src/sudachi/configuration/configure_ui.cpp +++ b/src/sudachi/configuration/configure_ui.cpp @@ -256,10 +256,10 @@ void ConfigureUi::InitializeLanguageComboBox() { locale.truncate(locale.lastIndexOf(QLatin1Char{'.'})); locale.remove(0, locale.lastIndexOf(QLatin1Char{'/'}) + 1); const QString lang = QLocale::languageToString(QLocale(locale).language()); - #ifdef ENABLE_QT6 +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) const QString territory = QLocale::territoryToString(QLocale(locale).territory()); ui->language_combobox->addItem(QStringLiteral("%1 (%2)").arg(lang, territory), locale); - #else +#else const QString country = QLocale::countryToString(QLocale(locale).country()); ui->language_combobox->addItem(QStringLiteral("%1 (%2)").arg(lang, country), locale); #endif