summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp12
-rw-r--r--src/core/hle/service/am/am.h1
-rw-r--r--src/core/hle/service/nifm/nifm.cpp6
-rw-r--r--src/core/hle/service/prepo/prepo.cpp21
-rwxr-xr-xsrc/input_common/analog_from_button.cpp14
5 files changed, 45 insertions, 9 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 52b034fae..d42236a3a 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1192,7 +1192,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
1192 {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, 1192 {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"},
1193 {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, 1193 {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"},
1194 {60, nullptr, "SetMediaPlaybackStateForApplication"}, 1194 {60, nullptr, "SetMediaPlaybackStateForApplication"},
1195 {65, nullptr, "IsGamePlayRecordingSupported"}, 1195 {65, &IApplicationFunctions::IsGamePlayRecordingSupported, "IsGamePlayRecordingSupported"},
1196 {66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"}, 1196 {66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"},
1197 {67, &IApplicationFunctions::SetGamePlayRecordingState, "SetGamePlayRecordingState"}, 1197 {67, &IApplicationFunctions::SetGamePlayRecordingState, "SetGamePlayRecordingState"},
1198 {68, nullptr, "RequestFlushGamePlayingMovieForDebug"}, 1198 {68, nullptr, "RequestFlushGamePlayingMovieForDebug"},
@@ -1480,6 +1480,16 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
1480 rb.Push(*res_code); 1480 rb.Push(*res_code);
1481} 1481}
1482 1482
1483void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) {
1484 LOG_WARNING(Service_AM, "(STUBBED) called");
1485
1486 constexpr bool gameplay_recording_supported = false;
1487
1488 IPC::ResponseBuilder rb{ctx, 3};
1489 rb.Push(RESULT_SUCCESS);
1490 rb.Push(gameplay_recording_supported);
1491}
1492
1483void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { 1493void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) {
1484 LOG_WARNING(Service_AM, "(STUBBED) called"); 1494 LOG_WARNING(Service_AM, "(STUBBED) called");
1485 1495
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index a5401a4d2..f5db41ac8 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -266,6 +266,7 @@ private:
266 void SetTerminateResult(Kernel::HLERequestContext& ctx); 266 void SetTerminateResult(Kernel::HLERequestContext& ctx);
267 void GetDisplayVersion(Kernel::HLERequestContext& ctx); 267 void GetDisplayVersion(Kernel::HLERequestContext& ctx);
268 void GetDesiredLanguage(Kernel::HLERequestContext& ctx); 268 void GetDesiredLanguage(Kernel::HLERequestContext& ctx);
269 void IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx);
269 void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx); 270 void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx);
270 void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); 271 void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx);
271 void NotifyRunning(Kernel::HLERequestContext& ctx); 272 void NotifyRunning(Kernel::HLERequestContext& ctx);
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 4db183096..8372e170c 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -215,7 +215,11 @@ private:
215 void GetAppletInfo(Kernel::HLERequestContext& ctx) { 215 void GetAppletInfo(Kernel::HLERequestContext& ctx) {
216 LOG_WARNING(Service_NIFM, "(STUBBED) called"); 216 LOG_WARNING(Service_NIFM, "(STUBBED) called");
217 217
218 IPC::ResponseBuilder rb{ctx, 8}; 218 std::vector<u8> out_buffer(ctx.GetWriteBufferSize());
219
220 ctx.WriteBuffer(out_buffer);
221
222 IPC::ResponseBuilder rb{ctx, 5};
219 rb.Push(RESULT_SUCCESS); 223 rb.Push(RESULT_SUCCESS);
220 rb.Push<u32>(0); 224 rb.Push<u32>(0);
221 rb.Push<u32>(0); 225 rb.Push<u32>(0);
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
index 86ecc5b97..d5b3b17a5 100644
--- a/src/core/hle/service/prepo/prepo.cpp
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -25,8 +25,8 @@ public:
25 {10103, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::Old2>, "SaveReportWithUserOld2"}, 25 {10103, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::Old2>, "SaveReportWithUserOld2"},
26 {10104, &PlayReport::SaveReport<Core::Reporter::PlayReportType::New>, "SaveReport"}, 26 {10104, &PlayReport::SaveReport<Core::Reporter::PlayReportType::New>, "SaveReport"},
27 {10105, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::New>, "SaveReportWithUser"}, 27 {10105, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::New>, "SaveReportWithUser"},
28 {10200, nullptr, "RequestImmediateTransmission"}, 28 {10200, &PlayReport::RequestImmediateTransmission, "RequestImmediateTransmission"},
29 {10300, nullptr, "GetTransmissionStatus"}, 29 {10300, &PlayReport::GetTransmissionStatus, "GetTransmissionStatus"},
30 {10400, &PlayReport::GetSystemSessionId, "GetSystemSessionId"}, 30 {10400, &PlayReport::GetSystemSessionId, "GetSystemSessionId"},
31 {20100, &PlayReport::SaveSystemReport, "SaveSystemReport"}, 31 {20100, &PlayReport::SaveSystemReport, "SaveSystemReport"},
32 {20101, &PlayReport::SaveSystemReportWithUser, "SaveSystemReportWithUser"}, 32 {20101, &PlayReport::SaveSystemReportWithUser, "SaveSystemReportWithUser"},
@@ -108,6 +108,23 @@ private:
108 rb.Push(RESULT_SUCCESS); 108 rb.Push(RESULT_SUCCESS);
109 } 109 }
110 110
111 void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) {
112 LOG_WARNING(Service_PREPO, "(STUBBED) called");
113
114 IPC::ResponseBuilder rb{ctx, 2};
115 rb.Push(RESULT_SUCCESS);
116 }
117
118 void GetTransmissionStatus(Kernel::HLERequestContext& ctx) {
119 LOG_WARNING(Service_PREPO, "(STUBBED) called");
120
121 constexpr s32 status = 0;
122
123 IPC::ResponseBuilder rb{ctx, 3};
124 rb.Push(RESULT_SUCCESS);
125 rb.Push(status);
126 }
127
111 void GetSystemSessionId(Kernel::HLERequestContext& ctx) { 128 void GetSystemSessionId(Kernel::HLERequestContext& ctx) {
112 LOG_WARNING(Service_PREPO, "(STUBBED) called"); 129 LOG_WARNING(Service_PREPO, "(STUBBED) called");
113 130
diff --git a/src/input_common/analog_from_button.cpp b/src/input_common/analog_from_button.cpp
index 40b516f85..07a0fa4a1 100755
--- a/src/input_common/analog_from_button.cpp
+++ b/src/input_common/analog_from_button.cpp
@@ -2,6 +2,7 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <atomic>
5#include <chrono> 6#include <chrono>
6#include <cmath> 7#include <cmath>
7#include <thread> 8#include <thread>
@@ -20,13 +21,16 @@ public:
20 : up(std::move(up_)), down(std::move(down_)), left(std::move(left_)), 21 : up(std::move(up_)), down(std::move(down_)), left(std::move(left_)),
21 right(std::move(right_)), modifier(std::move(modifier_)), modifier_scale(modifier_scale_), 22 right(std::move(right_)), modifier(std::move(modifier_)), modifier_scale(modifier_scale_),
22 modifier_angle(modifier_angle_) { 23 modifier_angle(modifier_angle_) {
24 update_thread_running.store(true);
23 update_thread = std::thread(&Analog::UpdateStatus, this); 25 update_thread = std::thread(&Analog::UpdateStatus, this);
24 } 26 }
25 27
26 ~Analog() override { 28 ~Analog() override {
27 update_thread_running = false; 29 if (update_thread_running.load()) {
28 if (update_thread.joinable()) { 30 update_thread_running.store(false);
29 update_thread.join(); 31 if (update_thread.joinable()) {
32 update_thread.join();
33 }
30 } 34 }
31 } 35 }
32 36
@@ -58,7 +62,7 @@ public:
58 } 62 }
59 63
60 void UpdateStatus() { 64 void UpdateStatus() {
61 while (update_thread_running) { 65 while (update_thread_running.load()) {
62 const float coef = modifier->GetStatus() ? modifier_scale : 1.0f; 66 const float coef = modifier->GetStatus() ? modifier_scale : 1.0f;
63 67
64 bool r = right->GetStatus(); 68 bool r = right->GetStatus();
@@ -160,7 +164,7 @@ private:
160 float angle{}; 164 float angle{};
161 float amplitude{}; 165 float amplitude{};
162 std::thread update_thread; 166 std::thread update_thread;
163 bool update_thread_running{true}; 167 std::atomic<bool> update_thread_running{};
164}; 168};
165 169
166std::unique_ptr<Input::AnalogDevice> AnalogFromButton::Create(const Common::ParamPackage& params) { 170std::unique_ptr<Input::AnalogDevice> AnalogFromButton::Create(const Common::ParamPackage& params) {