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_) | |||
| 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 | ||
| 1483 | void 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 | |||
| 1483 | void IApplicationFunctions::InitializeGamePlayRecording(Kernel::HLERequestContext& ctx) { | 1493 | void 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/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 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) { | |||
| 263 | 263 | ||
| 264 | LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname); | 264 | LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname); |
| 265 | 265 | ||
| 266 | std::vector<u8> optval(ctx.GetWriteBufferSize()); | ||
| 267 | |||
| 268 | ctx.WriteBuffer(optval); | ||
| 269 | |||
| 266 | IPC::ResponseBuilder rb{ctx, 5}; | 270 | IPC::ResponseBuilder rb{ctx, 5}; |
| 267 | rb.Push(RESULT_SUCCESS); | 271 | rb.Push(RESULT_SUCCESS); |
| 268 | rb.Push<s32>(-1); | 272 | rb.Push<s32>(-1); |
| 269 | rb.PushEnum(Errno::NOTCONN); | 273 | rb.PushEnum(Errno::NOTCONN); |
| 270 | rb.Push<u32>(0); | 274 | rb.Push<u32>(static_cast<u32>(optval.size())); |
| 271 | } | 275 | } |
| 272 | 276 | ||
| 273 | void BSD::Listen(Kernel::HLERequestContext& ctx) { | 277 | void BSD::Listen(Kernel::HLERequestContext& ctx) { |
| @@ -417,11 +421,11 @@ void BSD::Close(Kernel::HLERequestContext& ctx) { | |||
| 417 | } | 421 | } |
| 418 | 422 | ||
| 419 | void BSD::EventFd(Kernel::HLERequestContext& ctx) { | 423 | void BSD::EventFd(Kernel::HLERequestContext& ctx) { |
| 420 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 421 | IPC::RequestParser rp{ctx}; | 424 | IPC::RequestParser rp{ctx}; |
| 422 | const s32 fd = rp.Pop<s32>(); | 425 | const u64 initval = rp.Pop<u64>(); |
| 426 | const u32 flags = rp.Pop<u32>(); | ||
| 423 | 427 | ||
| 424 | LOG_DEBUG(Service, "called. fd={}", fd); | 428 | LOG_WARNING(Service, "(STUBBED) called. initval={}, flags={}", initval, flags); |
| 425 | 429 | ||
| 426 | BuildErrnoResponse(ctx, Errno::SUCCESS); | 430 | BuildErrnoResponse(ctx, Errno::SUCCESS); |
| 427 | } | 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 | ||
| 166 | std::unique_ptr<Input::AnalogDevice> AnalogFromButton::Create(const Common::ParamPackage& params) { | 170 | std::unique_ptr<Input::AnalogDevice> AnalogFromButton::Create(const Common::ParamPackage& params) { |