summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar mailwl2018-02-22 17:28:15 +0300
committerGravatar mailwl2018-02-22 17:28:15 +0300
commite4f94ee30bce782eb9a02cd988a9325a9f97e0d6 (patch)
tree9aff20e8bc3f135eb4df6275347ec5ec43923d7d /src
parentStub am::SetScreenShotPermission, and bsd::StartMonitoring functions (diff)
downloadyuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.gz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.xz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.zip
Stub more functions
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp12
-rw-r--r--src/core/hle/service/am/am.cpp33
-rw-r--r--src/core/hle/service/am/am.h7
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp9
-rw-r--r--src/core/hle/service/aoc/aoc_u.h1
-rw-r--r--src/core/hle/service/audio/audren_u.cpp4
-rw-r--r--src/core/hle/service/nifm/nifm.cpp32
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
764static 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
764namespace { 774namespace {
765struct FunctionDef { 775struct 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
37IAudioController::IAudioController() : ServiceFramework("IAudioController") {} 37IAudioController::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
50void 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
56void 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
63void 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
39IDisplayController::IDisplayController() : ServiceFramework("IDisplayController") {} 70IDisplayController::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:
36class IAudioController final : public ServiceFramework<IAudioController> { 36class IAudioController final : public ServiceFramework<IAudioController> {
37public: 37public:
38 IAudioController(); 38 IAudioController();
39
40private:
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
41class IDisplayController final : public ServiceFramework<IDisplayController> { 48class 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
26void 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
26void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { 33void 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
17private: 17private:
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
180void AudRenU::GetAudioRenderersProcessMasterVolume(Kernel::HLERequestContext& ctx) { 180void 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> {
28public: 29public:
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
64private:
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
61class INetworkProfile final : public ServiceFramework<INetworkProfile> { 87class INetworkProfile final : public ServiceFramework<INetworkProfile> {