diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 12 | ||||
-rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
-rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 21 | ||||
-rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 12 | ||||
-rwxr-xr-x | src/input_common/analog_from_button.cpp | 14 |
5 files changed, 48 insertions, 12 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_) {40, &IApplicationFunctions::NotifyRunning, "NotifyRunning"}, {50, &IApplicationFunctions::GetPseudoDeviceId, "GetPseudoDeviceId"}, {60, nullptr, "SetMediaPlaybackStateForApplication"}, - {65, nullptr, "IsGamePlayRecordingSupported"}, + {65, &IApplicationFunctions::IsGamePlayRecordingSupported, "IsGamePlayRecordingSupported"}, {66, &IApplicationFunctions::InitializeGamePlayRecording, "InitializeGamePlayRecording"}, {67, &IApplicationFunctions::SetGamePlayRecordingState, "SetGamePlayRecordingState"}, {68, nullptr, "RequestFlushGamePlayingMovieForDebug"}, @@ -1480,6 +1480,16 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { rb.Push(*res_code); } +void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + + constexpr bool gameplay_recording_supported = false; + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push(gameplay_recording_supported); +} + void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_AM, "(STUBBED) called"); 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: void SetTerminateResult(Kernel::HLERequestContext& ctx); void GetDisplayVersion(Kernel::HLERequestContext& ctx); void GetDesiredLanguage(Kernel::HLERequestContext& ctx); + void IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx); void InitializeGamePlayRecording(Kernel::HLERequestContext& ctx); void SetGamePlayRecordingState(Kernel::HLERequestContext& ctx); void NotifyRunning(Kernel::HLERequestContext& ctx); 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: {10103, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::Old2>, "SaveReportWithUserOld2"}, {10104, &PlayReport::SaveReport<Core::Reporter::PlayReportType::New>, "SaveReport"}, {10105, &PlayReport::SaveReportWithUser<Core::Reporter::PlayReportType::New>, "SaveReportWithUser"}, - {10200, nullptr, "RequestImmediateTransmission"}, - {10300, nullptr, "GetTransmissionStatus"}, + {10200, &PlayReport::RequestImmediateTransmission, "RequestImmediateTransmission"}, + {10300, &PlayReport::GetTransmissionStatus, "GetTransmissionStatus"}, {10400, &PlayReport::GetSystemSessionId, "GetSystemSessionId"}, {20100, &PlayReport::SaveSystemReport, "SaveSystemReport"}, {20101, &PlayReport::SaveSystemReportWithUser, "SaveSystemReportWithUser"}, @@ -108,6 +108,23 @@ private: rb.Push(RESULT_SUCCESS); } + void RequestImmediateTransmission(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_PREPO, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } + + void GetTransmissionStatus(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_PREPO, "(STUBBED) called"); + + constexpr s32 status = 0; + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push(status); + } + void GetSystemSessionId(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_PREPO, "(STUBBED) called"); diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 4ffb00902..0b306b87a 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -263,11 +263,15 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname); + std::vector<u8> optval(ctx.GetWriteBufferSize()); + + ctx.WriteBuffer(optval); + IPC::ResponseBuilder rb{ctx, 5}; rb.Push(RESULT_SUCCESS); rb.Push<s32>(-1); rb.PushEnum(Errno::NOTCONN); - rb.Push<u32>(0); + rb.Push<u32>(static_cast<u32>(optval.size())); } void BSD::Listen(Kernel::HLERequestContext& ctx) { @@ -417,11 +421,11 @@ void BSD::Close(Kernel::HLERequestContext& ctx) { } void BSD::EventFd(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service, "(STUBBED) called"); IPC::RequestParser rp{ctx}; - const s32 fd = rp.Pop<s32>(); + const u64 initval = rp.Pop<u64>(); + const u32 flags = rp.Pop<u32>(); - LOG_DEBUG(Service, "called. fd={}", fd); + LOG_WARNING(Service, "(STUBBED) called. initval={}, flags={}", initval, flags); BuildErrnoResponse(ctx, Errno::SUCCESS); } 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 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <atomic> #include <chrono> #include <cmath> #include <thread> @@ -20,13 +21,16 @@ public: : up(std::move(up_)), down(std::move(down_)), left(std::move(left_)), right(std::move(right_)), modifier(std::move(modifier_)), modifier_scale(modifier_scale_), modifier_angle(modifier_angle_) { + update_thread_running.store(true); update_thread = std::thread(&Analog::UpdateStatus, this); } ~Analog() override { - update_thread_running = false; - if (update_thread.joinable()) { - update_thread.join(); + if (update_thread_running.load()) { + update_thread_running.store(false); + if (update_thread.joinable()) { + update_thread.join(); + } } } @@ -58,7 +62,7 @@ public: } void UpdateStatus() { - while (update_thread_running) { + while (update_thread_running.load()) { const float coef = modifier->GetStatus() ? modifier_scale : 1.0f; bool r = right->GetStatus(); @@ -160,7 +164,7 @@ private: float angle{}; float amplitude{}; std::thread update_thread; - bool update_thread_running{true}; + std::atomic<bool> update_thread_running{}; }; std::unique_ptr<Input::AnalogDevice> AnalogFromButton::Create(const Common::ParamPackage& params) { |