summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/prepo/prepo.cpp21
-rw-r--r--src/core/hle/service/sockets/bsd.cpp6
-rwxr-xr-xsrc/input_common/analog_from_button.cpp14
3 files changed, 31 insertions, 10 deletions
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/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 9a5b32975..0b306b87a 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -421,11 +421,11 @@ void BSD::Close(Kernel::HLERequestContext& ctx) {
421} 421}
422 422
423void BSD::EventFd(Kernel::HLERequestContext& ctx) { 423void BSD::EventFd(Kernel::HLERequestContext& ctx) {
424 LOG_WARNING(Service, "(STUBBED) called");
425 IPC::RequestParser rp{ctx}; 424 IPC::RequestParser rp{ctx};
426 const s32 fd = rp.Pop<s32>(); 425 const u64 initval = rp.Pop<u64>();
426 const u32 flags = rp.Pop<u32>();
427 427
428 LOG_DEBUG(Service, "called. fd={}", fd); 428 LOG_WARNING(Service, "(STUBBED) called. initval={}, flags={}", initval, flags);
429 429
430 BuildErrnoResponse(ctx, Errno::SUCCESS); 430 BuildErrnoResponse(ctx, Errno::SUCCESS);
431} 431}
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) {