summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-04 22:50:12 +0200
committerGitHub <noreply@github.com>2018-04-04 22:50:12 +0200
commit20bd26dc7d322cc6409c9e09ee6c8908658d3bbd (patch)
treec7a28e58e2b7cba62faa6e6989dc240f28f021c9 /src/core/hle/service
parentMerge pull request #306 from daniellimws/new-fmt-macros (diff)
parentsvc: Stub out SetThreadActivity, GetThreadContext. (diff)
downloadyuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar.gz
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar.bz2
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar.lz
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar.xz
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.tar.zst
yuzu-20bd26dc7d322cc6409c9e09ee6c8908658d3bbd.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/audio/audout_u.cpp9
-rw-r--r--src/core/hle/service/audio/audren_u.cpp14
-rw-r--r--src/core/hle/service/friend/friend.cpp2
-rw-r--r--src/core/hle/service/friend/friend_u.cpp19
-rw-r--r--src/core/hle/service/friend/friend_u.h18
-rw-r--r--src/core/hle/service/nifm/nifm.cpp3
-rw-r--r--src/core/hle/service/vi/vi.cpp19
-rw-r--r--src/core/hle/service/vi/vi.h7
8 files changed, 87 insertions, 4 deletions
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp
index e873d768f..8e935cb7f 100644
--- a/src/core/hle/service/audio/audout_u.cpp
+++ b/src/core/hle/service/audio/audout_u.cpp
@@ -25,7 +25,7 @@ class IAudioOut final : public ServiceFramework<IAudioOut> {
public:
IAudioOut() : ServiceFramework("IAudioOut"), audio_out_state(AudioState::Stopped) {
static const FunctionInfo functions[] = {
- {0x0, nullptr, "GetAudioOutState"},
+ {0x0, &IAudioOut::GetAudioOutState, "GetAudioOutState"},
{0x1, &IAudioOut::StartAudioOut, "StartAudioOut"},
{0x2, &IAudioOut::StopAudioOut, "StopAudioOut"},
{0x3, &IAudioOut::AppendAudioOutBuffer_1, "AppendAudioOutBuffer_1"},
@@ -57,6 +57,13 @@ public:
}
private:
+ void GetAudioOutState(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_Audio, "called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(static_cast<u32>(audio_out_state));
+ }
+
void StartAudioOut(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_Audio, "(STUBBED) called");
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index 6d0461bbc..7990595aa 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -158,7 +158,7 @@ public:
{0x0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"},
{0x1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"},
{0x2, nullptr, "GetAudioDeviceOutputVolume"},
- {0x3, nullptr, "GetActiveAudioDeviceName"},
+ {0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"},
{0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"},
{0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"},
{0x6, nullptr, "ListAudioDeviceNameAuto"},
@@ -199,6 +199,18 @@ private:
rb.Push(RESULT_SUCCESS);
}
+ void GetActiveAudioDeviceName(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_Audio, "(STUBBED) called");
+ IPC::RequestParser rp{ctx};
+
+ const std::string audio_interface = "AudioDevice";
+ ctx.WriteBuffer(audio_interface.c_str(), audio_interface.size());
+
+ IPC::ResponseBuilder rb = rp.MakeBuilder(3, 0, 0);
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(1);
+ }
+
void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_Audio, "(STUBBED) called");
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index 26593bb0c..fc5adc56d 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -6,6 +6,7 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/friend/friend.h"
#include "core/hle/service/friend/friend_a.h"
+#include "core/hle/service/friend/friend_u.h"
namespace Service {
namespace Friend {
@@ -22,6 +23,7 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
void InstallInterfaces(SM::ServiceManager& service_manager) {
auto module = std::make_shared<Module>();
std::make_shared<Friend_A>(module)->InstallAsService(service_manager);
+ std::make_shared<Friend_U>(module)->InstallAsService(service_manager);
}
} // namespace Friend
diff --git a/src/core/hle/service/friend/friend_u.cpp b/src/core/hle/service/friend/friend_u.cpp
new file mode 100644
index 000000000..084388e5f
--- /dev/null
+++ b/src/core/hle/service/friend/friend_u.cpp
@@ -0,0 +1,19 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/service/friend/friend_u.h"
+
+namespace Service {
+namespace Friend {
+
+Friend_U::Friend_U(std::shared_ptr<Module> module)
+ : Module::Interface(std::move(module), "friend:u") {
+ static const FunctionInfo functions[] = {
+ {0, &Friend_U::Unknown, "Unknown"},
+ };
+ RegisterHandlers(functions);
+}
+
+} // namespace Friend
+} // namespace Service
diff --git a/src/core/hle/service/friend/friend_u.h b/src/core/hle/service/friend/friend_u.h
new file mode 100644
index 000000000..6be49ff01
--- /dev/null
+++ b/src/core/hle/service/friend/friend_u.h
@@ -0,0 +1,18 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/hle/service/friend/friend.h"
+
+namespace Service {
+namespace Friend {
+
+class Friend_U final : public Module::Interface {
+public:
+ explicit Friend_U(std::shared_ptr<Module> module);
+};
+
+} // namespace Friend
+} // namespace Service
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index dd2d5fe63..b32112db3 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -70,9 +70,8 @@ private:
}
void GetResult(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called");
- IPC::ResponseBuilder rb{ctx, 3};
+ IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
- rb.Push<u32>(0);
}
void GetSystemEventReadableHandles(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called");
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 06c34e979..42793f155 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -17,6 +17,7 @@
#include "core/hle/service/vi/vi_m.h"
#include "core/hle/service/vi/vi_s.h"
#include "core/hle/service/vi/vi_u.h"
+#include "core/settings.h"
#include "video_core/renderer_base.h"
#include "video_core/video_core.h"
@@ -711,6 +712,23 @@ private:
rb.Push(RESULT_SUCCESS);
}
+ void GetDisplayResolution(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_VI, "(STUBBED) called");
+ IPC::RequestParser rp{ctx};
+ u64 display_id = rp.Pop<u64>();
+
+ IPC::ResponseBuilder rb = rp.MakeBuilder(6, 0, 0);
+ rb.Push(RESULT_SUCCESS);
+
+ if (Settings::values.use_docked_mode) {
+ rb.Push(static_cast<u32>(DisplayResolution::DockedWidth));
+ rb.Push(static_cast<u32>(DisplayResolution::DockedHeight));
+ } else {
+ rb.Push(static_cast<u32>(DisplayResolution::UndockedWidth));
+ rb.Push(static_cast<u32>(DisplayResolution::UndockedHeight));
+ }
+ }
+
void SetLayerScalingMode(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_VI, "(STUBBED) called");
IPC::RequestParser rp{ctx};
@@ -808,6 +826,7 @@ IApplicationDisplayService::IApplicationDisplayService(
{1000, &IApplicationDisplayService::ListDisplays, "ListDisplays"},
{1010, &IApplicationDisplayService::OpenDisplay, "OpenDisplay"},
{1020, &IApplicationDisplayService::CloseDisplay, "CloseDisplay"},
+ {1102, &IApplicationDisplayService::GetDisplayResolution, "GetDisplayResolution"},
{2101, &IApplicationDisplayService::SetLayerScalingMode, "SetLayerScalingMode"},
{2020, &IApplicationDisplayService::OpenLayer, "OpenLayer"},
{2030, &IApplicationDisplayService::CreateStrayLayer, "CreateStrayLayer"},
diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h
index 985c9d27c..7f16fad8e 100644
--- a/src/core/hle/service/vi/vi.h
+++ b/src/core/hle/service/vi/vi.h
@@ -14,6 +14,13 @@ struct EventType;
namespace Service {
namespace VI {
+enum class DisplayResolution : u32 {
+ DockedWidth = 1920,
+ DockedHeight = 1080,
+ UndockedWidth = 1280,
+ UndockedHeight = 720,
+};
+
class Module final {
public:
class Interface : public ServiceFramework<Interface> {