diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/renderer/system.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/nsd.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/sfdnsres.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/host1x/codecs/codec.cpp | 3 |
4 files changed, 24 insertions, 4 deletions
diff --git a/src/audio_core/renderer/system.cpp b/src/audio_core/renderer/system.cpp index a23627472..6e07baa54 100644 --- a/src/audio_core/renderer/system.cpp +++ b/src/audio_core/renderer/system.cpp | |||
| @@ -778,7 +778,7 @@ u32 System::DropVoices(CommandBuffer& command_buffer, u32 estimated_process_time | |||
| 778 | while (i < command_buffer.count) { | 778 | while (i < command_buffer.count) { |
| 779 | const auto node_id{cmd->node_id}; | 779 | const auto node_id{cmd->node_id}; |
| 780 | const auto node_id_type{cmd->node_id >> 28}; | 780 | const auto node_id_type{cmd->node_id >> 28}; |
| 781 | const auto node_id_base{cmd->node_id & 0xFFF}; | 781 | const auto node_id_base{(cmd->node_id >> 16) & 0xFFF}; |
| 782 | 782 | ||
| 783 | // If the new estimated process time falls below the limit, we're done dropping. | 783 | // If the new estimated process time falls below the limit, we're done dropping. |
| 784 | if (estimated_process_time <= time_limit) { | 784 | if (estimated_process_time <= time_limit) { |
diff --git a/src/core/hle/service/sockets/nsd.cpp b/src/core/hle/service/sockets/nsd.cpp index bac21752a..491b76d48 100644 --- a/src/core/hle/service/sockets/nsd.cpp +++ b/src/core/hle/service/sockets/nsd.cpp | |||
| @@ -19,6 +19,12 @@ enum class ServerEnvironmentType : u8 { | |||
| 19 | Dp, | 19 | Dp, |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | // This is nn::nsd::EnvironmentIdentifier | ||
| 23 | struct EnvironmentIdentifier { | ||
| 24 | std::array<u8, 8> identifier; | ||
| 25 | }; | ||
| 26 | static_assert(sizeof(EnvironmentIdentifier) == 0x8); | ||
| 27 | |||
| 22 | NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, name} { | 28 | NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, name} { |
| 23 | // clang-format off | 29 | // clang-format off |
| 24 | static const FunctionInfo functions[] = { | 30 | static const FunctionInfo functions[] = { |
| @@ -101,8 +107,9 @@ void NSD::ResolveEx(HLERequestContext& ctx) { | |||
| 101 | } | 107 | } |
| 102 | 108 | ||
| 103 | void NSD::GetEnvironmentIdentifier(HLERequestContext& ctx) { | 109 | void NSD::GetEnvironmentIdentifier(HLERequestContext& ctx) { |
| 104 | const std::string environment_identifier = "lp1"; | 110 | constexpr EnvironmentIdentifier lp1 = { |
| 105 | ctx.WriteBuffer(environment_identifier); | 111 | .identifier = {'l', 'p', '1', '\0', '\0', '\0', '\0', '\0'}}; |
| 112 | ctx.WriteBuffer(lp1); | ||
| 106 | 113 | ||
| 107 | IPC::ResponseBuilder rb{ctx, 2}; | 114 | IPC::ResponseBuilder rb{ctx, 2}; |
| 108 | rb.Push(ResultSuccess); | 115 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index 22e4a6f49..c657c4efd 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp | |||
| @@ -150,6 +150,12 @@ static std::pair<u32, GetAddrInfoError> GetHostByNameRequestImpl(HLERequestConte | |||
| 150 | const std::string host = Common::StringFromBuffer(host_buffer); | 150 | const std::string host = Common::StringFromBuffer(host_buffer); |
| 151 | // For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions. | 151 | // For now, ignore options, which are in input buffer 1 for GetHostByNameRequestWithOptions. |
| 152 | 152 | ||
| 153 | // Prevent resolution of Nintendo servers | ||
| 154 | if (host.find("srv.nintendo.net") != std::string::npos) { | ||
| 155 | LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host); | ||
| 156 | return {0, GetAddrInfoError::AGAIN}; | ||
| 157 | } | ||
| 158 | |||
| 153 | auto res = Network::GetAddressInfo(host, /*service*/ std::nullopt); | 159 | auto res = Network::GetAddressInfo(host, /*service*/ std::nullopt); |
| 154 | if (!res.has_value()) { | 160 | if (!res.has_value()) { |
| 155 | return {0, Translate(res.error())}; | 161 | return {0, Translate(res.error())}; |
| @@ -261,6 +267,12 @@ static std::pair<u32, GetAddrInfoError> GetAddrInfoRequestImpl(HLERequestContext | |||
| 261 | const auto host_buffer = ctx.ReadBuffer(0); | 267 | const auto host_buffer = ctx.ReadBuffer(0); |
| 262 | const std::string host = Common::StringFromBuffer(host_buffer); | 268 | const std::string host = Common::StringFromBuffer(host_buffer); |
| 263 | 269 | ||
| 270 | // Prevent resolution of Nintendo servers | ||
| 271 | if (host.find("srv.nintendo.net") != std::string::npos) { | ||
| 272 | LOG_WARNING(Network, "Resolution of hostname {} requested, returning EAI_AGAIN", host); | ||
| 273 | return {0, GetAddrInfoError::AGAIN}; | ||
| 274 | } | ||
| 275 | |||
| 264 | std::optional<std::string> service = std::nullopt; | 276 | std::optional<std::string> service = std::nullopt; |
| 265 | if (ctx.CanReadBuffer(1)) { | 277 | if (ctx.CanReadBuffer(1)) { |
| 266 | const std::span<const u8> service_buffer = ctx.ReadBuffer(1); | 278 | const std::span<const u8> service_buffer = ctx.ReadBuffer(1); |
diff --git a/src/video_core/host1x/codecs/codec.cpp b/src/video_core/host1x/codecs/codec.cpp index 220cce28a..8d7da50fc 100644 --- a/src/video_core/host1x/codecs/codec.cpp +++ b/src/video_core/host1x/codecs/codec.cpp | |||
| @@ -319,6 +319,7 @@ void Codec::Decode() { | |||
| 319 | LOG_WARNING(Service_NVDRV, "Zero width or height in frame"); | 319 | LOG_WARNING(Service_NVDRV, "Zero width or height in frame"); |
| 320 | return; | 320 | return; |
| 321 | } | 321 | } |
| 322 | bool is_interlaced = initial_frame->interlaced_frame != 0; | ||
| 322 | if (av_codec_ctx->hw_device_ctx) { | 323 | if (av_codec_ctx->hw_device_ctx) { |
| 323 | final_frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter}; | 324 | final_frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter}; |
| 324 | ASSERT_MSG(final_frame, "av_frame_alloc final_frame failed"); | 325 | ASSERT_MSG(final_frame, "av_frame_alloc final_frame failed"); |
| @@ -334,7 +335,7 @@ void Codec::Decode() { | |||
| 334 | UNIMPLEMENTED_MSG("Unexpected video format: {}", final_frame->format); | 335 | UNIMPLEMENTED_MSG("Unexpected video format: {}", final_frame->format); |
| 335 | return; | 336 | return; |
| 336 | } | 337 | } |
| 337 | if (!final_frame->interlaced_frame) { | 338 | if (!is_interlaced) { |
| 338 | av_frames.push(std::move(final_frame)); | 339 | av_frames.push(std::move(final_frame)); |
| 339 | } else { | 340 | } else { |
| 340 | if (!filters_initialized) { | 341 | if (!filters_initialized) { |