summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2018-02-22 15:28:15 +0100
committermailwl <mailwl@gmail.com>2018-02-22 15:28:15 +0100
commite4f94ee30bce782eb9a02cd988a9325a9f97e0d6 (patch)
tree9aff20e8bc3f135eb4df6275347ec5ec43923d7d /src/core/hle/service
parentStub am::SetScreenShotPermission, and bsd::StartMonitoring functions (diff)
downloadyuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.gz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.bz2
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.lz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.xz
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.tar.zst
yuzu-e4f94ee30bce782eb9a02cd988a9325a9f97e0d6.zip
Diffstat (limited to 'src/core/hle/service')
-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
6 files changed, 79 insertions, 7 deletions
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)
rb.Push(RESULT_SUCCESS);
}
-IAudioController::IAudioController() : ServiceFramework("IAudioController") {}
+IAudioController::IAudioController() : ServiceFramework("IAudioController") {
+ static const FunctionInfo functions[] = {
+ {0, &IAudioController::SetExpectedMasterVolume, "SetExpectedMasterVolume"},
+ {1, &IAudioController::GetMainAppletExpectedMasterVolume,
+ "GetMainAppletExpectedMasterVolume"},
+ {2, &IAudioController::GetLibraryAppletExpectedMasterVolume,
+ "GetLibraryAppletExpectedMasterVolume"},
+ {3, nullptr, "ChangeMainAppletMasterVolume"},
+ {4, nullptr, "SetTransparentVolumeRate"},
+ };
+ RegisterHandlers(functions);
+}
+
+void IAudioController::SetExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_AM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+}
+
+void IAudioController::GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_AM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(volume);
+}
+
+void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_AM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(volume);
+}
IDisplayController::IDisplayController() : ServiceFramework("IDisplayController") {}
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:
class IAudioController final : public ServiceFramework<IAudioController> {
public:
IAudioController();
+
+private:
+ void SetExpectedMasterVolume(Kernel::HLERequestContext& ctx);
+ void GetMainAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
+ void GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestContext& ctx);
+
+ u32 volume{100};
};
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") {
static const FunctionInfo functions[] = {
{0, nullptr, "CountAddOnContentByApplicationId"},
{1, nullptr, "ListAddOnContentByApplicationId"},
- {2, nullptr, "CountAddOnContent"},
+ {2, &AOC_U::CountAddOnContent, "CountAddOnContent"},
{3, &AOC_U::ListAddOnContent, "ListAddOnContent"},
{4, nullptr, "GetAddOnContentBaseIdByApplicationId"},
{5, nullptr, "GetAddOnContentBaseId"},
@@ -23,6 +23,13 @@ AOC_U::AOC_U() : ServiceFramework("aoc:u") {
RegisterHandlers(functions);
}
+void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 4};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u64>(0);
+ LOG_WARNING(Service_AOC, "(STUBBED) called");
+}
+
void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 4};
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:
~AOC_U() = default;
private:
+ void CountAddOnContent(Kernel::HLERequestContext& ctx);
void ListAddOnContent(Kernel::HLERequestContext& ctx);
};
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) {
}
void AudRenU::GetAudioRenderersProcessMasterVolume(Kernel::HLERequestContext& ctx) {
- IPC::ResponseBuilder rb{ctx, 2};
+ IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
-
+ rb.Push<u32>(100);
LOG_WARNING(Service_Audio, "(STUBBED) called");
}
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 @@
// Refer to the license.txt file included.
#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/event.h"
#include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/nifm/nifm_a.h"
#include "core/hle/service/nifm/nifm_s.h"
@@ -28,9 +29,9 @@ class IRequest final : public ServiceFramework<IRequest> {
public:
explicit IRequest() : ServiceFramework("IRequest") {
static const FunctionInfo functions[] = {
- {0, nullptr, "GetRequestState"},
- {1, nullptr, "GetResult"},
- {2, nullptr, "GetSystemEventReadableHandles"},
+ {0, &IRequest::GetRequestState, "GetRequestState"},
+ {1, &IRequest::GetResult, "GetResult"},
+ {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"},
{3, nullptr, "Cancel"},
{4, nullptr, "Submit"},
{5, nullptr, "SetRequirement"},
@@ -55,7 +56,32 @@ public:
{25, nullptr, "UnregisterSocketDescriptor"},
};
RegisterHandlers(functions);
+
+ event1 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event1");
+ event2 = Kernel::Event::Create(Kernel::ResetType::OneShot, "IRequest:Event2");
+ }
+
+private:
+ void GetRequestState(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(0);
}
+ void GetResult(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(0);
+ }
+ void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_NIFM, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 2, 2};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushCopyObjects(event1, event2);
+ }
+
+ Kernel::SharedPtr<Kernel::Event> event1, event2;
};
class INetworkProfile final : public ServiceFramework<INetworkProfile> {