diff options
| -rw-r--r-- | src/common/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/common/assert.cpp | 11 | ||||
| -rw-r--r-- | src/common/assert.h | 14 | ||||
| -rw-r--r-- | src/core/hle/kernel/process_capability.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/kernel/process_capability.h | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 132 | ||||
| -rw-r--r-- | src/core/hle/service/acc/acc.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/acc/acc_su.cpp | 36 | ||||
| -rw-r--r-- | src/core/hle/service/acc/acc_u1.cpp | 28 | ||||
| -rw-r--r-- | src/core/hle/service/audio/hwopus.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 19 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 6 | ||||
| -rw-r--r-- | src/core/settings.h | 1 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 1 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.ui | 22 |
19 files changed, 267 insertions, 61 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 788516ded..66931ac97 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -97,6 +97,7 @@ add_custom_command(OUTPUT scm_rev.cpp | |||
| 97 | add_library(common STATIC | 97 | add_library(common STATIC |
| 98 | algorithm.h | 98 | algorithm.h |
| 99 | alignment.h | 99 | alignment.h |
| 100 | assert.cpp | ||
| 100 | assert.h | 101 | assert.h |
| 101 | atomic_ops.h | 102 | atomic_ops.h |
| 102 | detached_tasks.cpp | 103 | detached_tasks.cpp |
diff --git a/src/common/assert.cpp b/src/common/assert.cpp new file mode 100644 index 000000000..d7d91b96b --- /dev/null +++ b/src/common/assert.cpp | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/assert.h" | ||
| 6 | |||
| 7 | #include "common/common_funcs.h" | ||
| 8 | |||
| 9 | void assert_handle_failure() { | ||
| 10 | Crash(); | ||
| 11 | } | ||
diff --git a/src/common/assert.h b/src/common/assert.h index 06d7b5612..b3ba35c0f 100644 --- a/src/common/assert.h +++ b/src/common/assert.h | |||
| @@ -4,10 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <cstdlib> | ||
| 8 | #include "common/common_funcs.h" | ||
| 9 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 10 | 8 | ||
| 9 | // Sometimes we want to try to continue even after hitting an assert. | ||
| 10 | // However touching this file yields a global recompilation as this header is included almost | ||
| 11 | // everywhere. So let's just move the handling of the failed assert to a single cpp file. | ||
| 12 | void assert_handle_failure(); | ||
| 13 | |||
| 11 | // For asserts we'd like to keep all the junk executed when an assert happens away from the | 14 | // For asserts we'd like to keep all the junk executed when an assert happens away from the |
| 12 | // important code in the function. One way of doing this is to put all the relevant code inside a | 15 | // important code in the function. One way of doing this is to put all the relevant code inside a |
| 13 | // lambda and force the compiler to not inline it. Unfortunately, MSVC seems to have no syntax to | 16 | // lambda and force the compiler to not inline it. Unfortunately, MSVC seems to have no syntax to |
| @@ -17,15 +20,14 @@ | |||
| 17 | // enough for our purposes. | 20 | // enough for our purposes. |
| 18 | template <typename Fn> | 21 | template <typename Fn> |
| 19 | #if defined(_MSC_VER) | 22 | #if defined(_MSC_VER) |
| 20 | [[msvc::noinline, noreturn]] | 23 | [[msvc::noinline]] |
| 21 | #elif defined(__GNUC__) | 24 | #elif defined(__GNUC__) |
| 22 | [[gnu::cold, gnu::noinline, noreturn]] | 25 | [[gnu::cold, gnu::noinline]] |
| 23 | #endif | 26 | #endif |
| 24 | static void | 27 | static void |
| 25 | assert_noinline_call(const Fn& fn) { | 28 | assert_noinline_call(const Fn& fn) { |
| 26 | fn(); | 29 | fn(); |
| 27 | Crash(); | 30 | assert_handle_failure(); |
| 28 | exit(1); // Keeps GCC's mouth shut about this actually returning | ||
| 29 | } | 31 | } |
| 30 | 32 | ||
| 31 | #define ASSERT(_a_) \ | 33 | #define ASSERT(_a_) \ |
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp index 3fc326eab..1006ee50c 100644 --- a/src/core/hle/kernel/process_capability.cpp +++ b/src/core/hle/kernel/process_capability.cpp | |||
| @@ -281,11 +281,6 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) | |||
| 281 | continue; | 281 | continue; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | if (svc_number >= svc_capabilities.size()) { | ||
| 285 | LOG_ERROR(Kernel, "Process svc capability is out of range! svc_number={}", svc_number); | ||
| 286 | return ResultOutOfRange; | ||
| 287 | } | ||
| 288 | |||
| 289 | svc_capabilities[svc_number] = true; | 284 | svc_capabilities[svc_number] = true; |
| 290 | } | 285 | } |
| 291 | 286 | ||
diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h index 73ad197fa..b7a9b2e45 100644 --- a/src/core/hle/kernel/process_capability.h +++ b/src/core/hle/kernel/process_capability.h | |||
| @@ -68,7 +68,7 @@ enum class ProgramType { | |||
| 68 | class ProcessCapabilities { | 68 | class ProcessCapabilities { |
| 69 | public: | 69 | public: |
| 70 | using InterruptCapabilities = std::bitset<1024>; | 70 | using InterruptCapabilities = std::bitset<1024>; |
| 71 | using SyscallCapabilities = std::bitset<128>; | 71 | using SyscallCapabilities = std::bitset<192>; |
| 72 | 72 | ||
| 73 | ProcessCapabilities() = default; | 73 | ProcessCapabilities() = default; |
| 74 | ProcessCapabilities(const ProcessCapabilities&) = delete; | 74 | ProcessCapabilities(const ProcessCapabilities&) = delete; |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 326d3b9ec..fcffc746d 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -2455,6 +2455,74 @@ static const FunctionDef SVC_Table_32[] = { | |||
| 2455 | {0x79, nullptr, "Unknown"}, | 2455 | {0x79, nullptr, "Unknown"}, |
| 2456 | {0x7A, nullptr, "Unknown"}, | 2456 | {0x7A, nullptr, "Unknown"}, |
| 2457 | {0x7B, nullptr, "TerminateProcess32"}, | 2457 | {0x7B, nullptr, "TerminateProcess32"}, |
| 2458 | {0x7C, nullptr, "GetProcessInfo32"}, | ||
| 2459 | {0x7D, nullptr, "CreateResourceLimit32"}, | ||
| 2460 | {0x7E, nullptr, "SetResourceLimitLimitValue32"}, | ||
| 2461 | {0x7F, nullptr, "CallSecureMonitor32"}, | ||
| 2462 | {0x80, nullptr, "Unknown"}, | ||
| 2463 | {0x81, nullptr, "Unknown"}, | ||
| 2464 | {0x82, nullptr, "Unknown"}, | ||
| 2465 | {0x83, nullptr, "Unknown"}, | ||
| 2466 | {0x84, nullptr, "Unknown"}, | ||
| 2467 | {0x85, nullptr, "Unknown"}, | ||
| 2468 | {0x86, nullptr, "Unknown"}, | ||
| 2469 | {0x87, nullptr, "Unknown"}, | ||
| 2470 | {0x88, nullptr, "Unknown"}, | ||
| 2471 | {0x89, nullptr, "Unknown"}, | ||
| 2472 | {0x8A, nullptr, "Unknown"}, | ||
| 2473 | {0x8B, nullptr, "Unknown"}, | ||
| 2474 | {0x8C, nullptr, "Unknown"}, | ||
| 2475 | {0x8D, nullptr, "Unknown"}, | ||
| 2476 | {0x8E, nullptr, "Unknown"}, | ||
| 2477 | {0x8F, nullptr, "Unknown"}, | ||
| 2478 | {0x90, nullptr, "Unknown"}, | ||
| 2479 | {0x91, nullptr, "Unknown"}, | ||
| 2480 | {0x92, nullptr, "Unknown"}, | ||
| 2481 | {0x93, nullptr, "Unknown"}, | ||
| 2482 | {0x94, nullptr, "Unknown"}, | ||
| 2483 | {0x95, nullptr, "Unknown"}, | ||
| 2484 | {0x96, nullptr, "Unknown"}, | ||
| 2485 | {0x97, nullptr, "Unknown"}, | ||
| 2486 | {0x98, nullptr, "Unknown"}, | ||
| 2487 | {0x99, nullptr, "Unknown"}, | ||
| 2488 | {0x9A, nullptr, "Unknown"}, | ||
| 2489 | {0x9B, nullptr, "Unknown"}, | ||
| 2490 | {0x9C, nullptr, "Unknown"}, | ||
| 2491 | {0x9D, nullptr, "Unknown"}, | ||
| 2492 | {0x9E, nullptr, "Unknown"}, | ||
| 2493 | {0x9F, nullptr, "Unknown"}, | ||
| 2494 | {0xA0, nullptr, "Unknown"}, | ||
| 2495 | {0xA1, nullptr, "Unknown"}, | ||
| 2496 | {0xA2, nullptr, "Unknown"}, | ||
| 2497 | {0xA3, nullptr, "Unknown"}, | ||
| 2498 | {0xA4, nullptr, "Unknown"}, | ||
| 2499 | {0xA5, nullptr, "Unknown"}, | ||
| 2500 | {0xA6, nullptr, "Unknown"}, | ||
| 2501 | {0xA7, nullptr, "Unknown"}, | ||
| 2502 | {0xA8, nullptr, "Unknown"}, | ||
| 2503 | {0xA9, nullptr, "Unknown"}, | ||
| 2504 | {0xAA, nullptr, "Unknown"}, | ||
| 2505 | {0xAB, nullptr, "Unknown"}, | ||
| 2506 | {0xAC, nullptr, "Unknown"}, | ||
| 2507 | {0xAD, nullptr, "Unknown"}, | ||
| 2508 | {0xAE, nullptr, "Unknown"}, | ||
| 2509 | {0xAF, nullptr, "Unknown"}, | ||
| 2510 | {0xB0, nullptr, "Unknown"}, | ||
| 2511 | {0xB1, nullptr, "Unknown"}, | ||
| 2512 | {0xB2, nullptr, "Unknown"}, | ||
| 2513 | {0xB3, nullptr, "Unknown"}, | ||
| 2514 | {0xB4, nullptr, "Unknown"}, | ||
| 2515 | {0xB5, nullptr, "Unknown"}, | ||
| 2516 | {0xB6, nullptr, "Unknown"}, | ||
| 2517 | {0xB7, nullptr, "Unknown"}, | ||
| 2518 | {0xB8, nullptr, "Unknown"}, | ||
| 2519 | {0xB9, nullptr, "Unknown"}, | ||
| 2520 | {0xBA, nullptr, "Unknown"}, | ||
| 2521 | {0xBB, nullptr, "Unknown"}, | ||
| 2522 | {0xBC, nullptr, "Unknown"}, | ||
| 2523 | {0xBD, nullptr, "Unknown"}, | ||
| 2524 | {0xBE, nullptr, "Unknown"}, | ||
| 2525 | {0xBF, nullptr, "Unknown"}, | ||
| 2458 | }; | 2526 | }; |
| 2459 | 2527 | ||
| 2460 | static const FunctionDef SVC_Table_64[] = { | 2528 | static const FunctionDef SVC_Table_64[] = { |
| @@ -2586,6 +2654,70 @@ static const FunctionDef SVC_Table_64[] = { | |||
| 2586 | {0x7D, SvcWrap64<CreateResourceLimit>, "CreateResourceLimit"}, | 2654 | {0x7D, SvcWrap64<CreateResourceLimit>, "CreateResourceLimit"}, |
| 2587 | {0x7E, SvcWrap64<SetResourceLimitLimitValue>, "SetResourceLimitLimitValue"}, | 2655 | {0x7E, SvcWrap64<SetResourceLimitLimitValue>, "SetResourceLimitLimitValue"}, |
| 2588 | {0x7F, nullptr, "CallSecureMonitor"}, | 2656 | {0x7F, nullptr, "CallSecureMonitor"}, |
| 2657 | {0x80, nullptr, "Unknown"}, | ||
| 2658 | {0x81, nullptr, "Unknown"}, | ||
| 2659 | {0x82, nullptr, "Unknown"}, | ||
| 2660 | {0x83, nullptr, "Unknown"}, | ||
| 2661 | {0x84, nullptr, "Unknown"}, | ||
| 2662 | {0x85, nullptr, "Unknown"}, | ||
| 2663 | {0x86, nullptr, "Unknown"}, | ||
| 2664 | {0x87, nullptr, "Unknown"}, | ||
| 2665 | {0x88, nullptr, "Unknown"}, | ||
| 2666 | {0x89, nullptr, "Unknown"}, | ||
| 2667 | {0x8A, nullptr, "Unknown"}, | ||
| 2668 | {0x8B, nullptr, "Unknown"}, | ||
| 2669 | {0x8C, nullptr, "Unknown"}, | ||
| 2670 | {0x8D, nullptr, "Unknown"}, | ||
| 2671 | {0x8E, nullptr, "Unknown"}, | ||
| 2672 | {0x8F, nullptr, "Unknown"}, | ||
| 2673 | {0x90, nullptr, "Unknown"}, | ||
| 2674 | {0x91, nullptr, "Unknown"}, | ||
| 2675 | {0x92, nullptr, "Unknown"}, | ||
| 2676 | {0x93, nullptr, "Unknown"}, | ||
| 2677 | {0x94, nullptr, "Unknown"}, | ||
| 2678 | {0x95, nullptr, "Unknown"}, | ||
| 2679 | {0x96, nullptr, "Unknown"}, | ||
| 2680 | {0x97, nullptr, "Unknown"}, | ||
| 2681 | {0x98, nullptr, "Unknown"}, | ||
| 2682 | {0x99, nullptr, "Unknown"}, | ||
| 2683 | {0x9A, nullptr, "Unknown"}, | ||
| 2684 | {0x9B, nullptr, "Unknown"}, | ||
| 2685 | {0x9C, nullptr, "Unknown"}, | ||
| 2686 | {0x9D, nullptr, "Unknown"}, | ||
| 2687 | {0x9E, nullptr, "Unknown"}, | ||
| 2688 | {0x9F, nullptr, "Unknown"}, | ||
| 2689 | {0xA0, nullptr, "Unknown"}, | ||
| 2690 | {0xA1, nullptr, "Unknown"}, | ||
| 2691 | {0xA2, nullptr, "Unknown"}, | ||
| 2692 | {0xA3, nullptr, "Unknown"}, | ||
| 2693 | {0xA4, nullptr, "Unknown"}, | ||
| 2694 | {0xA5, nullptr, "Unknown"}, | ||
| 2695 | {0xA6, nullptr, "Unknown"}, | ||
| 2696 | {0xA7, nullptr, "Unknown"}, | ||
| 2697 | {0xA8, nullptr, "Unknown"}, | ||
| 2698 | {0xA9, nullptr, "Unknown"}, | ||
| 2699 | {0xAA, nullptr, "Unknown"}, | ||
| 2700 | {0xAB, nullptr, "Unknown"}, | ||
| 2701 | {0xAC, nullptr, "Unknown"}, | ||
| 2702 | {0xAD, nullptr, "Unknown"}, | ||
| 2703 | {0xAE, nullptr, "Unknown"}, | ||
| 2704 | {0xAF, nullptr, "Unknown"}, | ||
| 2705 | {0xB0, nullptr, "Unknown"}, | ||
| 2706 | {0xB1, nullptr, "Unknown"}, | ||
| 2707 | {0xB2, nullptr, "Unknown"}, | ||
| 2708 | {0xB3, nullptr, "Unknown"}, | ||
| 2709 | {0xB4, nullptr, "Unknown"}, | ||
| 2710 | {0xB5, nullptr, "Unknown"}, | ||
| 2711 | {0xB6, nullptr, "Unknown"}, | ||
| 2712 | {0xB7, nullptr, "Unknown"}, | ||
| 2713 | {0xB8, nullptr, "Unknown"}, | ||
| 2714 | {0xB9, nullptr, "Unknown"}, | ||
| 2715 | {0xBA, nullptr, "Unknown"}, | ||
| 2716 | {0xBB, nullptr, "Unknown"}, | ||
| 2717 | {0xBC, nullptr, "Unknown"}, | ||
| 2718 | {0xBD, nullptr, "Unknown"}, | ||
| 2719 | {0xBE, nullptr, "Unknown"}, | ||
| 2720 | {0xBF, nullptr, "Unknown"}, | ||
| 2589 | }; | 2721 | }; |
| 2590 | 2722 | ||
| 2591 | static const FunctionDef* GetSVCInfo32(u32 func_num) { | 2723 | static const FunctionDef* GetSVCInfo32(u32 func_num) { |
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 615e20a54..52535ecc0 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -610,12 +610,17 @@ public: | |||
| 610 | explicit DAUTH_O(Core::System& system_, Common::UUID) : ServiceFramework{system_, "dauth:o"} { | 610 | explicit DAUTH_O(Core::System& system_, Common::UUID) : ServiceFramework{system_, "dauth:o"} { |
| 611 | // clang-format off | 611 | // clang-format off |
| 612 | static const FunctionInfo functions[] = { | 612 | static const FunctionInfo functions[] = { |
| 613 | {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, // [5.0.0-5.1.0] GeneratePostData | 613 | {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, |
| 614 | {1, nullptr, "LoadAuthenticationTokenCache"}, // 6.0.0+ | 614 | {1, nullptr, "LoadAuthenticationTokenCache"}, |
| 615 | {2, nullptr, "InvalidateAuthenticationTokenCache"}, // 6.0.0+ | 615 | {2, nullptr, "InvalidateAuthenticationTokenCache"}, |
| 616 | {10, nullptr, "EnsureEdgeTokenCacheAsync"}, // 6.0.0+ | 616 | {10, nullptr, "EnsureEdgeTokenCacheAsync"}, |
| 617 | {11, nullptr, "LoadEdgeTokenCache"}, // 6.0.0+ | 617 | {11, nullptr, "LoadEdgeTokenCache"}, |
| 618 | {12, nullptr, "InvalidateEdgeTokenCache"}, // 6.0.0+ | 618 | {12, nullptr, "InvalidateEdgeTokenCache"}, |
| 619 | {20, nullptr, "EnsureApplicationAuthenticationCacheAsync"}, | ||
| 620 | {21, nullptr, "LoadApplicationAuthenticationTokenCache"}, | ||
| 621 | {22, nullptr, "LoadApplicationNetworkServiceClientConfigCache"}, | ||
| 622 | {23, nullptr, "IsApplicationAuthenticationCacheAvailable"}, | ||
| 623 | {24, nullptr, "InvalidateApplicationAuthenticationCache"}, | ||
| 619 | }; | 624 | }; |
| 620 | // clang-format on | 625 | // clang-format on |
| 621 | 626 | ||
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 49b22583e..bb6118abf 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp | |||
| @@ -17,28 +17,30 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 17 | {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, | 17 | {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, |
| 18 | {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, | 18 | {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, |
| 19 | {5, &ACC_SU::GetProfile, "GetProfile"}, | 19 | {5, &ACC_SU::GetProfile, "GetProfile"}, |
| 20 | {6, nullptr, "GetProfileDigest"}, // 3.0.0+ | 20 | {6, nullptr, "GetProfileDigest"}, |
| 21 | {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, | 21 | {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, |
| 22 | {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, | 22 | {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, |
| 23 | {60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0 | 23 | {60, &ACC_SU::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, |
| 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+ | 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, |
| 25 | {100, nullptr, "GetUserRegistrationNotifier"}, | 25 | {100, nullptr, "GetUserRegistrationNotifier"}, |
| 26 | {101, nullptr, "GetUserStateChangeNotifier"}, | 26 | {101, nullptr, "GetUserStateChangeNotifier"}, |
| 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, | 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, |
| 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, | 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, |
| 29 | {104, nullptr, "GetProfileUpdateNotifier"}, | 29 | {104, nullptr, "GetProfileUpdateNotifier"}, |
| 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ | 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, |
| 31 | {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+ | 31 | {106, nullptr, "GetProfileSyncNotifier"}, |
| 32 | {110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, | 32 | {110, &ACC_SU::StoreSaveDataThumbnailSystem, "StoreSaveDataThumbnail"}, |
| 33 | {111, nullptr, "ClearSaveDataThumbnail"}, | 33 | {111, nullptr, "ClearSaveDataThumbnail"}, |
| 34 | {112, nullptr, "LoadSaveDataThumbnail"}, | 34 | {112, nullptr, "LoadSaveDataThumbnail"}, |
| 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+ | 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, |
| 36 | {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+ | 36 | {120, nullptr, "ListOpenUsersInApplication"}, |
| 37 | {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+ | 37 | {130, nullptr, "ActivateOpenContextRetention"}, |
| 38 | {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+ | 38 | {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, |
| 39 | {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+ | 39 | {150, nullptr, "AuthenticateApplicationAsync"}, |
| 40 | {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0 | 40 | {151, nullptr, "Unknown151"}, |
| 41 | {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+ | 41 | {152, nullptr, "Unknown152"}, |
| 42 | {190, nullptr, "GetUserLastOpenedApplication"}, | ||
| 43 | {191, nullptr, "ActivateOpenContextHolder"}, | ||
| 42 | {200, nullptr, "BeginUserRegistration"}, | 44 | {200, nullptr, "BeginUserRegistration"}, |
| 43 | {201, nullptr, "CompleteUserRegistration"}, | 45 | {201, nullptr, "CompleteUserRegistration"}, |
| 44 | {202, nullptr, "CancelUserRegistration"}, | 46 | {202, nullptr, "CancelUserRegistration"}, |
| @@ -46,15 +48,15 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 46 | {204, nullptr, "SetUserPosition"}, | 48 | {204, nullptr, "SetUserPosition"}, |
| 47 | {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"}, | 49 | {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"}, |
| 48 | {206, nullptr, "CompleteUserRegistrationForcibly"}, | 50 | {206, nullptr, "CompleteUserRegistrationForcibly"}, |
| 49 | {210, nullptr, "CreateFloatingRegistrationRequest"}, // 3.0.0+ | 51 | {210, nullptr, "CreateFloatingRegistrationRequest"}, |
| 50 | {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+ | 52 | {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, |
| 51 | {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+ | 53 | {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, |
| 52 | {230, nullptr, "AuthenticateServiceAsync"}, | 54 | {230, nullptr, "AuthenticateServiceAsync"}, |
| 53 | {250, nullptr, "GetBaasAccountAdministrator"}, | 55 | {250, nullptr, "GetBaasAccountAdministrator"}, |
| 54 | {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, | 56 | {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, |
| 55 | {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, // 3.0.0+ | 57 | {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, |
| 56 | {299, nullptr, "SuspendBackgroundDaemon"}, | 58 | {299, nullptr, "SuspendBackgroundDaemon"}, |
| 57 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+ | 59 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, |
| 58 | {998, nullptr, "DebugSetUserStateClose"}, | 60 | {998, nullptr, "DebugSetUserStateClose"}, |
| 59 | {999, nullptr, "DebugSetUserStateOpen"}, | 61 | {999, nullptr, "DebugSetUserStateOpen"}, |
| 60 | }; | 62 | }; |
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index 951081cd0..71982ad5a 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp | |||
| @@ -17,29 +17,31 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 17 | {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, | 17 | {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, |
| 18 | {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, | 18 | {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, |
| 19 | {5, &ACC_U1::GetProfile, "GetProfile"}, | 19 | {5, &ACC_U1::GetProfile, "GetProfile"}, |
| 20 | {6, nullptr, "GetProfileDigest"}, // 3.0.0+ | 20 | {6, nullptr, "GetProfileDigest"}, |
| 21 | {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, | 21 | {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, |
| 22 | {51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, | 22 | {51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, |
| 23 | {60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0 | 23 | {60, &ACC_U1::ListOpenContextStoredUsers, "ListOpenContextStoredUsers"}, |
| 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+ | 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, |
| 25 | {100, nullptr, "GetUserRegistrationNotifier"}, | 25 | {100, nullptr, "GetUserRegistrationNotifier"}, |
| 26 | {101, nullptr, "GetUserStateChangeNotifier"}, | 26 | {101, nullptr, "GetUserStateChangeNotifier"}, |
| 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, | 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, |
| 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, | 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, |
| 29 | {104, nullptr, "GetProfileUpdateNotifier"}, | 29 | {104, nullptr, "GetProfileUpdateNotifier"}, |
| 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ | 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, |
| 31 | {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+ | 31 | {106, nullptr, "GetProfileSyncNotifier"}, |
| 32 | {110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, | 32 | {110, &ACC_U1::StoreSaveDataThumbnailApplication, "StoreSaveDataThumbnail"}, |
| 33 | {111, nullptr, "ClearSaveDataThumbnail"}, | 33 | {111, nullptr, "ClearSaveDataThumbnail"}, |
| 34 | {112, nullptr, "LoadSaveDataThumbnail"}, | 34 | {112, nullptr, "LoadSaveDataThumbnail"}, |
| 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+ | 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, |
| 36 | {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+ | 36 | {120, nullptr, "ListOpenUsersInApplication"}, |
| 37 | {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+ | 37 | {130, nullptr, "ActivateOpenContextRetention"}, |
| 38 | {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+ | 38 | {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, |
| 39 | {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+ | 39 | {150, nullptr, "AuthenticateApplicationAsync"}, |
| 40 | {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0 | 40 | {151, nullptr, "Unknown151"}, |
| 41 | {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+ | 41 | {152, nullptr, "Unknown152"}, |
| 42 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+ | 42 | {190, nullptr, "GetUserLastOpenedApplication"}, |
| 43 | {191, nullptr, "ActivateOpenContextHolder"}, | ||
| 44 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, | ||
| 43 | {998, nullptr, "DebugSetUserStateClose"}, | 45 | {998, nullptr, "DebugSetUserStateClose"}, |
| 44 | {999, nullptr, "DebugSetUserStateOpen"}, | 46 | {999, nullptr, "DebugSetUserStateOpen"}, |
| 45 | }; | 47 | }; |
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index ea3414fd2..19c578b3a 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp | |||
| @@ -297,6 +297,10 @@ HwOpus::HwOpus(Core::System& system_) : ServiceFramework{system_, "hwopus"} { | |||
| 297 | {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, | 297 | {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, |
| 298 | {2, nullptr, "OpenOpusDecoderForMultiStream"}, | 298 | {2, nullptr, "OpenOpusDecoderForMultiStream"}, |
| 299 | {3, nullptr, "GetWorkBufferSizeForMultiStream"}, | 299 | {3, nullptr, "GetWorkBufferSizeForMultiStream"}, |
| 300 | {4, nullptr, "OpenHardwareOpusDecoderEx"}, | ||
| 301 | {5, nullptr, "GetWorkBufferSizeEx"}, | ||
| 302 | {6, nullptr, "OpenHardwareOpusDecoderForMultiStreamEx"}, | ||
| 303 | {7, nullptr, "GetWorkBufferSizeForMultiStreamEx"}, | ||
| 300 | }; | 304 | }; |
| 301 | RegisterHandlers(functions); | 305 | RegisterHandlers(functions); |
| 302 | } | 306 | } |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 9cc260515..a0215c4d7 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -118,9 +118,13 @@ public: | |||
| 118 | explicit IFile(Core::System& system_, FileSys::VirtualFile backend_) | 118 | explicit IFile(Core::System& system_, FileSys::VirtualFile backend_) |
| 119 | : ServiceFramework{system_, "IFile"}, backend(std::move(backend_)) { | 119 | : ServiceFramework{system_, "IFile"}, backend(std::move(backend_)) { |
| 120 | static const FunctionInfo functions[] = { | 120 | static const FunctionInfo functions[] = { |
| 121 | {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"}, | 121 | {0, &IFile::Read, "Read"}, |
| 122 | {2, &IFile::Flush, "Flush"}, {3, &IFile::SetSize, "SetSize"}, | 122 | {1, &IFile::Write, "Write"}, |
| 123 | {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"}, | 123 | {2, &IFile::Flush, "Flush"}, |
| 124 | {3, &IFile::SetSize, "SetSize"}, | ||
| 125 | {4, &IFile::GetSize, "GetSize"}, | ||
| 126 | {5, nullptr, "OperateRange"}, | ||
| 127 | {6, nullptr, "OperateRangeWithBuffer"}, | ||
| 124 | }; | 128 | }; |
| 125 | RegisterHandlers(functions); | 129 | RegisterHandlers(functions); |
| 126 | } | 130 | } |
| @@ -708,7 +712,10 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 708 | {84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"}, | 712 | {84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"}, |
| 709 | {85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"}, | 713 | {85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"}, |
| 710 | {86, nullptr, "OpenSaveDataMover"}, | 714 | {86, nullptr, "OpenSaveDataMover"}, |
| 715 | {87, nullptr, "OpenSaveDataTransferManagerForRepair"}, | ||
| 711 | {100, nullptr, "OpenImageDirectoryFileSystem"}, | 716 | {100, nullptr, "OpenImageDirectoryFileSystem"}, |
| 717 | {101, nullptr, "OpenBaseFileSystem"}, | ||
| 718 | {102, nullptr, "FormatBaseFileSystem"}, | ||
| 712 | {110, nullptr, "OpenContentStorageFileSystem"}, | 719 | {110, nullptr, "OpenContentStorageFileSystem"}, |
| 713 | {120, nullptr, "OpenCloudBackupWorkStorageFileSystem"}, | 720 | {120, nullptr, "OpenCloudBackupWorkStorageFileSystem"}, |
| 714 | {130, nullptr, "OpenCustomStorageFileSystem"}, | 721 | {130, nullptr, "OpenCustomStorageFileSystem"}, |
| @@ -764,10 +771,12 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 764 | {1008, nullptr, "OpenRegisteredUpdatePartition"}, | 771 | {1008, nullptr, "OpenRegisteredUpdatePartition"}, |
| 765 | {1009, nullptr, "GetAndClearMemoryReportInfo"}, | 772 | {1009, nullptr, "GetAndClearMemoryReportInfo"}, |
| 766 | {1010, nullptr, "SetDataStorageRedirectTarget"}, | 773 | {1010, nullptr, "SetDataStorageRedirectTarget"}, |
| 767 | {1011, &FSP_SRV::GetAccessLogVersionInfo, "GetAccessLogVersionInfo"}, | 774 | {1011, &FSP_SRV::GetProgramIndexForAccessLog, "GetProgramIndexForAccessLog"}, |
| 768 | {1012, nullptr, "GetFsStackUsage"}, | 775 | {1012, nullptr, "GetFsStackUsage"}, |
| 769 | {1013, nullptr, "UnsetSaveDataRootPath"}, | 776 | {1013, nullptr, "UnsetSaveDataRootPath"}, |
| 770 | {1014, nullptr, "OutputMultiProgramTagAccessLog"}, | 777 | {1014, nullptr, "OutputMultiProgramTagAccessLog"}, |
| 778 | {1016, nullptr, "FlushAccessLogOnSdCard"}, | ||
| 779 | {1017, nullptr, "OutputApplicationInfoAccessLog"}, | ||
| 771 | {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, | 780 | {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, |
| 772 | {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, | 781 | {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, |
| 773 | {1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"}, | 782 | {1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"}, |
| @@ -1051,7 +1060,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | |||
| 1051 | rb.Push(RESULT_SUCCESS); | 1060 | rb.Push(RESULT_SUCCESS); |
| 1052 | } | 1061 | } |
| 1053 | 1062 | ||
| 1054 | void FSP_SRV::GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx) { | 1063 | void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { |
| 1055 | LOG_DEBUG(Service_FS, "called"); | 1064 | LOG_DEBUG(Service_FS, "called"); |
| 1056 | 1065 | ||
| 1057 | IPC::ResponseBuilder rb{ctx, 4}; | 1066 | IPC::ResponseBuilder rb{ctx, 4}; |
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index 8ed933279..b01b924eb 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h | |||
| @@ -53,7 +53,7 @@ private: | |||
| 53 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 53 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); |
| 54 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 54 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); |
| 55 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); | 55 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); |
| 56 | void GetAccessLogVersionInfo(Kernel::HLERequestContext& ctx); | 56 | void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx); |
| 57 | void OpenMultiCommitManager(Kernel::HLERequestContext& ctx); | 57 | void OpenMultiCommitManager(Kernel::HLERequestContext& ctx); |
| 58 | 58 | ||
| 59 | FileSystemController& fsc; | 59 | FileSystemController& fsc; |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 933d42f3f..2edd803f3 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | |||
| @@ -248,7 +248,13 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(const std::vector<u8>& input, std::vector< | |||
| 248 | IoctlZbcSetTable params{}; | 248 | IoctlZbcSetTable params{}; |
| 249 | std::memcpy(¶ms, input.data(), input.size()); | 249 | std::memcpy(¶ms, input.data(), input.size()); |
| 250 | // TODO(ogniK): What does this even actually do? | 250 | // TODO(ogniK): What does this even actually do? |
| 251 | std::memcpy(output.data(), ¶ms, output.size()); | 251 | |
| 252 | // Prevent null pointer being passed as arg 1 | ||
| 253 | if (output.empty()) { | ||
| 254 | LOG_WARNING(Service_NVDRV, "Avoiding passing null pointer to memcpy"); | ||
| 255 | } else { | ||
| 256 | std::memcpy(output.data(), ¶ms, output.size()); | ||
| 257 | } | ||
| 252 | return NvResult::Success; | 258 | return NvResult::Success; |
| 253 | } | 259 | } |
| 254 | 260 | ||
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 4898dc27a..c2f152190 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | |||
| @@ -23,17 +23,22 @@ namespace { | |||
| 23 | template <typename T> | 23 | template <typename T> |
| 24 | std::size_t SpliceVectors(const std::vector<u8>& input, std::vector<T>& dst, std::size_t count, | 24 | std::size_t SpliceVectors(const std::vector<u8>& input, std::vector<T>& dst, std::size_t count, |
| 25 | std::size_t offset) { | 25 | std::size_t offset) { |
| 26 | std::memcpy(dst.data(), input.data() + offset, count * sizeof(T)); | 26 | if (!dst.empty()) { |
| 27 | offset += count * sizeof(T); | 27 | std::memcpy(dst.data(), input.data() + offset, count * sizeof(T)); |
| 28 | return offset; | 28 | } |
| 29 | return 0; | ||
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | // Write vectors will write data to the output buffer | 32 | // Write vectors will write data to the output buffer |
| 32 | template <typename T> | 33 | template <typename T> |
| 33 | std::size_t WriteVectors(std::vector<u8>& dst, const std::vector<T>& src, std::size_t offset) { | 34 | std::size_t WriteVectors(std::vector<u8>& dst, const std::vector<T>& src, std::size_t offset) { |
| 34 | std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T)); | 35 | if (src.empty()) { |
| 35 | offset += src.size() * sizeof(T); | 36 | return 0; |
| 36 | return offset; | 37 | } else { |
| 38 | std::memcpy(dst.data() + offset, src.data(), src.size() * sizeof(T)); | ||
| 39 | offset += src.size() * sizeof(T); | ||
| 40 | return offset; | ||
| 41 | } | ||
| 37 | } | 42 | } |
| 38 | } // Anonymous namespace | 43 | } // Anonymous namespace |
| 39 | 44 | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 1da56bc27..aec399076 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -70,6 +70,7 @@ | |||
| 70 | #include "core/hle/service/vi/vi.h" | 70 | #include "core/hle/service/vi/vi.h" |
| 71 | #include "core/hle/service/wlan/wlan.h" | 71 | #include "core/hle/service/wlan/wlan.h" |
| 72 | #include "core/reporter.h" | 72 | #include "core/reporter.h" |
| 73 | #include "core/settings.h" | ||
| 73 | 74 | ||
| 74 | namespace Service { | 75 | namespace Service { |
| 75 | 76 | ||
| @@ -146,6 +147,11 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext | |||
| 146 | system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, | 147 | system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, |
| 147 | service_name); | 148 | service_name); |
| 148 | UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf)); | 149 | UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf)); |
| 150 | if (Settings::values.use_auto_stub) { | ||
| 151 | LOG_WARNING(Service, "Using auto stub fallback!"); | ||
| 152 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 153 | rb.Push(RESULT_SUCCESS); | ||
| 154 | } | ||
| 149 | } | 155 | } |
| 150 | 156 | ||
| 151 | void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { | 157 | void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { |
diff --git a/src/core/settings.h b/src/core/settings.h index d849dded3..a81016b23 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -222,6 +222,7 @@ struct Values { | |||
| 222 | bool quest_flag; | 222 | bool quest_flag; |
| 223 | bool disable_macro_jit; | 223 | bool disable_macro_jit; |
| 224 | bool extended_logging; | 224 | bool extended_logging; |
| 225 | bool use_auto_stub; | ||
| 225 | 226 | ||
| 226 | // Miscellaneous | 227 | // Miscellaneous |
| 227 | std::string log_filter; | 228 | std::string log_filter; |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 1bac57bb2..1d6155999 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -641,6 +641,7 @@ void Config::ReadDebuggingValues() { | |||
| 641 | ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); | 641 | ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); |
| 642 | Settings::values.extended_logging = | 642 | Settings::values.extended_logging = |
| 643 | ReadSetting(QStringLiteral("extended_logging"), false).toBool(); | 643 | ReadSetting(QStringLiteral("extended_logging"), false).toBool(); |
| 644 | Settings::values.use_auto_stub = ReadSetting(QStringLiteral("use_auto_stub"), false).toBool(); | ||
| 644 | 645 | ||
| 645 | qt_config->endGroup(); | 646 | qt_config->endGroup(); |
| 646 | } | 647 | } |
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 121873f95..2a5b3f5e7 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -34,6 +34,7 @@ void ConfigureDebug::SetConfiguration() { | |||
| 34 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); | 34 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); |
| 35 | ui->reporting_services->setChecked(Settings::values.reporting_services); | 35 | ui->reporting_services->setChecked(Settings::values.reporting_services); |
| 36 | ui->quest_flag->setChecked(Settings::values.quest_flag); | 36 | ui->quest_flag->setChecked(Settings::values.quest_flag); |
| 37 | ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); | ||
| 37 | ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 38 | ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 38 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); | 39 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); |
| 39 | ui->disable_macro_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 40 | ui->disable_macro_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| @@ -47,6 +48,7 @@ void ConfigureDebug::ApplyConfiguration() { | |||
| 47 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); | 48 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); |
| 48 | Settings::values.reporting_services = ui->reporting_services->isChecked(); | 49 | Settings::values.reporting_services = ui->reporting_services->isChecked(); |
| 49 | Settings::values.quest_flag = ui->quest_flag->isChecked(); | 50 | Settings::values.quest_flag = ui->quest_flag->isChecked(); |
| 51 | Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); | ||
| 50 | Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); | 52 | Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); |
| 51 | Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); | 53 | Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); |
| 52 | Settings::values.extended_logging = ui->extended_logging->isChecked(); | 54 | Settings::values.extended_logging = ui->extended_logging->isChecked(); |
diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index 9186aa732..ae48b728c 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui | |||
| @@ -185,6 +185,28 @@ | |||
| 185 | </property> | 185 | </property> |
| 186 | </widget> | 186 | </widget> |
| 187 | </item> | 187 | </item> |
| 188 | <item> | ||
| 189 | <widget class="QCheckBox" name="use_auto_stub"> | ||
| 190 | <property name="text"> | ||
| 191 | <string>Enable Auto-Stub</string> | ||
| 192 | </property> | ||
| 193 | </widget> | ||
| 194 | </item> | ||
| 195 | <item> | ||
| 196 | <widget class="QLabel" name="label_3"> | ||
| 197 | <property name="font"> | ||
| 198 | <font> | ||
| 199 | <italic>true</italic> | ||
| 200 | </font> | ||
| 201 | </property> | ||
| 202 | <property name="text"> | ||
| 203 | <string>This will be reset automatically when yuzu closes.</string> | ||
| 204 | </property> | ||
| 205 | <property name="indent"> | ||
| 206 | <number>20</number> | ||
| 207 | </property> | ||
| 208 | </widget> | ||
| 209 | </item> | ||
| 188 | </layout> | 210 | </layout> |
| 189 | </widget> | 211 | </widget> |
| 190 | </item> | 212 | </item> |