diff options
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 33 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 7 | ||||
| -rw-r--r-- | src/core/hle/service/aoc/aoc_u.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/aoc/aoc_u.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/audio/audren_u.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 32 |
7 files changed, 90 insertions, 8 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index cbd5b69aa..533787ce2 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -761,6 +761,16 @@ static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permiss | |||
| 761 | return RESULT_SUCCESS; | 761 | return RESULT_SUCCESS; |
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | static ResultCode ClearEvent(Handle handle) { | ||
| 765 | LOG_TRACE(Kernel_SVC, "called, event=0xX", handle); | ||
| 766 | |||
| 767 | SharedPtr<Event> evt = g_handle_table.Get<Event>(handle); | ||
| 768 | if (evt == nullptr) | ||
| 769 | return ERR_INVALID_HANDLE; | ||
| 770 | evt->Clear(); | ||
| 771 | return RESULT_SUCCESS; | ||
| 772 | } | ||
| 773 | |||
| 764 | namespace { | 774 | namespace { |
| 765 | struct FunctionDef { | 775 | struct FunctionDef { |
| 766 | using Func = void(); | 776 | using Func = void(); |
| @@ -790,7 +800,7 @@ static const FunctionDef SVC_Table[] = { | |||
| 790 | {0x0F, SvcWrap<SetThreadCoreMask>, "SetThreadCoreMask"}, | 800 | {0x0F, SvcWrap<SetThreadCoreMask>, "SetThreadCoreMask"}, |
| 791 | {0x10, SvcWrap<GetCurrentProcessorNumber>, "GetCurrentProcessorNumber"}, | 801 | {0x10, SvcWrap<GetCurrentProcessorNumber>, "GetCurrentProcessorNumber"}, |
| 792 | {0x11, nullptr, "SignalEvent"}, | 802 | {0x11, nullptr, "SignalEvent"}, |
| 793 | {0x12, nullptr, "ClearEvent"}, | 803 | {0x12, SvcWrap<ClearEvent>, "ClearEvent"}, |
| 794 | {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"}, | 804 | {0x13, SvcWrap<MapSharedMemory>, "MapSharedMemory"}, |
| 795 | {0x14, nullptr, "UnmapSharedMemory"}, | 805 | {0x14, nullptr, "UnmapSharedMemory"}, |
| 796 | {0x15, SvcWrap<CreateTransferMemory>, "CreateTransferMemory"}, | 806 | {0x15, SvcWrap<CreateTransferMemory>, "CreateTransferMemory"}, |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d36d37089..d3a674cf6 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -34,7 +34,38 @@ void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) | |||
| 34 | rb.Push(RESULT_SUCCESS); | 34 | rb.Push(RESULT_SUCCESS); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | IAudioController::IAudioController() : ServiceFramework("IAudioController") {} | 37 | IAudioController::IAudioController() : ServiceFramework("IAudioController") { |
| 38 | static const FunctionInfo functions[] = { | ||
| 39 | {0, &IAudioController::SetExpectedMasterVolume, "SetExpectedMasterVolume"}, | ||
| 40 | {1, &IAudioController::GetMainAppletExpectedMasterVolume, | ||
| 41 | "GetMainAppletExpectedMasterVolume"}, | ||
| 42 | {2, &IAudioController::GetLibraryAppletExpectedMasterVolume, | ||
| 43 | "GetLibraryAppletExpectedMasterVolume"}, | ||
| 44 | {3, nullptr, "ChangeMainAppletMasterVolume"}, | ||
| 45 | {4, nullptr, "SetTransparentVolumeRate"}, | ||
| 46 | }; | ||
| 47 | RegisterHandlers(functions); | ||
| 48 | } | ||
| 49 | |||
| 50 | void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | ||
| 51 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 52 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 53 | rb.Push(RESULT_SUCCESS); | ||
| 54 | } | ||
| 55 | |||
| 56 | void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | ||
| 57 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 58 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 59 | rb.Push(RESULT_SUCCESS); | ||
| 60 | rb.Push(volume); | ||
| 61 | } | ||
| 62 | |||
| 63 | void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) { | ||
| 64 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 65 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 66 | rb.Push(RESULT_SUCCESS); | ||
| 67 | rb.Push(volume); | ||
| 68 | } | ||
| 38 | 69 | ||
| 39 | IDisplayController::IDisplayController() : ServiceFramework("IDisplayController") {} | 70 | IDisplayController::IDisplayController() : ServiceFramework("IDisplayController") {} |
| 40 | 71 | ||
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index a6740fb29..27dbd8c95 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -36,6 +36,13 @@ private: | |||
| 36 | class IAudioController final : public ServiceFramework<IAudioController> { | 36 | class IAudioController final : public ServiceFramework<IAudioController> { |
| 37 | public: | 37 | public: |
| 38 | IAudioController(); | 38 | IAudioController(); |
| 39 | |||
| 40 | private: | ||
| 41 | void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx); | ||
| 42 | void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); | ||
| 43 | void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx); | ||
| 44 | |||
| 45 | u32 volume{100}; | ||
| 39 | }; | 46 | }; |
| 40 | 47 | ||
| 41 | class IDisplayController final : public ServiceFramework<IDisplayController> { | 48 | class IDisplayController final : public ServiceFramework<IDisplayController> { |
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 430b2a7ad..8b55d2fcb 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -13,7 +13,7 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u") { | |||
| 13 | static const FunctionInfo functions[] = { | 13 | static const FunctionInfo functions[] = { |
| 14 | {0, nullptr, "CountAddOnContentByApplicationId"}, | 14 | {0, nullptr, "CountAddOnContentByApplicationId"}, |
| 15 | {1, nullptr, "ListAddOnContentByApplicationId"}, | 15 | {1, nullptr, "ListAddOnContentByApplicationId"}, |
| 16 | {2, nullptr, "CountAddOnContent"}, | 16 | {2, &AOC_U::CountAddOnContent, "CountAddOnContent"}, |
| 17 | {3, &AOC_U::ListAddOnContent, "ListAddOnContent"}, | 17 | {3, &AOC_U::ListAddOnContent, "ListAddOnContent"}, |
| 18 | {4, nullptr, "GetAddOnContentBaseIdByApplicationId"}, | 18 | {4, nullptr, "GetAddOnContentBaseIdByApplicationId"}, |
| 19 | {5, nullptr, "GetAddOnContentBaseId"}, | 19 | {5, nullptr, "GetAddOnContentBaseId"}, |
| @@ -23,6 +23,13 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u") { | |||
| 23 | RegisterHandlers(functions); | 23 | RegisterHandlers(functions); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) { | ||
| 27 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 28 | rb.Push(RESULT_SUCCESS); | ||
| 29 | rb.Push<u64>(0); | ||
| 30 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | ||
| 31 | } | ||
| 32 | |||
| 26 | void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { | 33 | void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { |
| 27 | IPC::ResponseBuilder rb{ctx, 4}; | 34 | IPC::ResponseBuilder rb{ctx, 4}; |
| 28 | rb.Push(RESULT_SUCCESS); | 35 | rb.Push(RESULT_SUCCESS); |
diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h index 4d6720a9d..6e0ba15a5 100644 --- a/src/core/hle/service/aoc/aoc_u.h +++ b/src/core/hle/service/aoc/aoc_u.h | |||
| @@ -15,6 +15,7 @@ public: | |||
| 15 | ~AOC_U() = default; | 15 | ~AOC_U() = default; |
| 16 | 16 | ||
| 17 | private: | 17 | private: |
| 18 | void CountAddOnContent(Kernel::HLERequestContext& ctx); | ||
| 18 | void ListAddOnContent(Kernel::HLERequestContext& ctx); | 19 | void ListAddOnContent(Kernel::HLERequestContext& ctx); |
| 19 | }; | 20 | }; |
| 20 | 21 | ||
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 4efc789ac..dda135d18 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp | |||
| @@ -178,10 +178,10 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) { | |||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void AudRenU::GetAudioRenderersProcessMasterVolume(Kernel::HLERequestContext& ctx) { | 180 | void AudRenU::GetAudioRenderersProcessMasterVolume(Kernel::HLERequestContext& ctx) { |
| 181 | IPC::ResponseBuilder rb{ctx, 2}; | 181 | IPC::ResponseBuilder rb{ctx, 3}; |
| 182 | 182 | ||
| 183 | rb.Push(RESULT_SUCCESS); | 183 | rb.Push(RESULT_SUCCESS); |
| 184 | 184 | rb.Push<u32>(100); | |
| 185 | LOG_WARNING(Service_Audio, "(STUBBED) called"); | 185 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 186 | } | 186 | } |
| 187 | 187 | ||
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 290a2ee74..e6f05eae5 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/ipc_helpers.h" | 5 | #include "core/hle/ipc_helpers.h" |
| 6 | #include "core/hle/kernel/event.h" | ||
| 6 | #include "core/hle/service/nifm/nifm.h" | 7 | #include "core/hle/service/nifm/nifm.h" |
| 7 | #include "core/hle/service/nifm/nifm_a.h" | 8 | #include "core/hle/service/nifm/nifm_a.h" |
| 8 | #include "core/hle/service/nifm/nifm_s.h" | 9 | #include "core/hle/service/nifm/nifm_s.h" |
| @@ -28,9 +29,9 @@ class IRequest final : public ServiceFramework<IRequest> { | |||
| 28 | public: | 29 | public: |
| 29 | explicit IRequest() : ServiceFramework("IRequest") { | 30 | explicit IRequest() : ServiceFramework("IRequest") { |
| 30 | static const FunctionInfo functions[] = { | 31 | static const FunctionInfo functions[] = { |
| 31 | {0, nullptr, "GetRequestState"}, | 32 | {0, &IRequest::GetRequestState, "GetRequestState"}, |
| 32 | {1, nullptr, "GetResult"}, | 33 | {1, &IRequest::GetResult, "GetResult"}, |
| 33 | {2, nullptr, "GetSystemEventReadableHandles"}, | 34 | {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, |
| 34 | {3, nullptr, "Cancel"}, | 35 | {3, nullptr, "Cancel"}, |
| 35 | {4, nullptr, "Submit"}, | 36 | {4, nullptr, "Submit"}, |
| 36 | {5, nullptr, "SetRequirement"}, | 37 | {5, nullptr, "SetRequirement"}, |
| @@ -55,7 +56,32 @@ public: | |||
| 55 | {25, nullptr, "UnregisterSocketDescriptor"}, | 56 | {25, nullptr, "UnregisterSocketDescriptor"}, |
| 56 | }; | 57 | }; |
| 57 | RegisterHandlers(functions); | 58 | RegisterHandlers(functions); |
| 59 | |||
| 60 | event1 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event1"); | ||
| 61 | event2 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event2"); | ||
| 62 | } | ||
| 63 | |||
| 64 | private: | ||
| 65 | void GetRequestState(Kernel::HLERequestContext& ctx) { | ||
| 66 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 67 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 68 | rb.Push(RESULT_SUCCESS); | ||
| 69 | rb.Push<u32>(0); | ||
| 58 | } | 70 | } |
| 71 | void GetResult(Kernel::HLERequestContext& ctx) { | ||
| 72 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 73 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 74 | rb.Push(RESULT_SUCCESS); | ||
| 75 | rb.Push<u32>(0); | ||
| 76 | } | ||
| 77 | void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) { | ||
| 78 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 79 | IPC::ResponseBuilder rb{ctx, 2, 2}; | ||
| 80 | rb.Push(RESULT_SUCCESS); | ||
| 81 | rb.PushCopyObjects(event1, event2); | ||
| 82 | } | ||
| 83 | |||
| 84 | Kernel::SharedPtr<Kernel::Event> event1, event2; | ||
| 59 | }; | 85 | }; |
| 60 | 86 | ||
| 61 | class INetworkProfile final : public ServiceFramework<INetworkProfile> { | 87 | class INetworkProfile final : public ServiceFramework<INetworkProfile> { |