Compare commits

...

5 Commits

Author SHA1 Message Date
Caio Oliveira
8cff8e346f HEAERS 2025-12-26 02:20:06 -03:00
CamilleLaVey
bb7e63f8ae [hle] BufferDescritorC 2025-12-26 05:38:38 +01:00
xbzk
cfae726289 [video_core] nvn descriptor layout fix (#3206)
Yxzx presumes this:
// The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size.
But in MCI i`ve discovered that there are no sizes, both registers are GPU addresses (hence the 2.8gb allocation, it was an address actually)

Method could be much simpler but for safety i`ve routed both old and new worlds.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3206
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Co-authored-by: xbzk <xbzk@eden-emu.dev>
Co-committed-by: xbzk <xbzk@eden-emu.dev>
2025-12-26 04:54:14 +01:00
Gamer64
bb94cff886 [chore] Fixed a couple memory leaks using up ~15 MB each iteration (#398)
Co-authored-by: Jarrod Norwell <official.antique@gmail.com>
Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com>
Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/398
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Co-authored-by: Gamer64 <gamer64@eden-emu.dev>
Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
2025-12-26 02:55:52 +01:00
lizzie
370997f42e [externals/ffmpeg] remove --disable-postproc causing issues in OpenOrbis toolchain (#3203)
why was disable-postproc added? either way this fixes build errors not only on PS4 but also on Haiku i think

Signed-off-by: lizzie lizzie@eden-emu.dev

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3203
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-12-26 02:36:08 +01:00
23 changed files with 149 additions and 66 deletions

View File

@@ -217,7 +217,6 @@ else()
--disable-ffmpeg --disable-ffmpeg
--disable-ffprobe --disable-ffprobe
--disable-network --disable-network
--disable-postproc
--disable-swresample --disable-swresample
--enable-decoder=h264 --enable-decoder=h264
--enable-decoder=vp8 --enable-decoder=vp8

View File

@@ -39,7 +39,6 @@ android {
buildFeatures { buildFeatures {
viewBinding = true viewBinding = true
buildConfig = true
} }
compileOptions { compileOptions {

View File

@@ -14,6 +14,8 @@ android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kotlin.parallel.tasks.in.project=true kotlin.parallel.tasks.in.project=true
android.defaults.buildfeatures.buildconfig=true
# Android Gradle plugin 8.0.2 # Android Gradle plugin 8.0.2
android.suppressUnsupportedCompileSdk=34 android.suppressUnsupportedCompileSdk=34
android.native.buildOutput=verbose android.native.buildOutput=verbose

View File

@@ -34,8 +34,8 @@ struct Member {
struct RoomInformation { struct RoomInformation {
std::string name; ///< Name of the server std::string name; ///< Name of the server
std::string description; ///< Server description std::string description; ///< Server description
u32 member_slots; ///< Maximum number of members in this room u32 member_slots{}; ///< Maximum number of members in this room
u16 port; ///< The port of this room u16 port{}; ///< The port of this room
GameInfo preferred_game; ///< Game to advertise that you want to play GameInfo preferred_game; ///< Game to advertise that you want to play
std::string host_username; ///< Forum username of the host std::string host_username; ///< Forum username of the host
}; };
@@ -46,8 +46,8 @@ struct Room {
std::string id; std::string id;
std::string verify_uid; ///< UID used for verification std::string verify_uid; ///< UID used for verification
std::string ip; std::string ip;
u32 net_version; u32 net_version{};
bool has_password; bool has_password = false;
std::vector<Member> members; std::vector<Member> members;
}; };

View File

@@ -21,7 +21,7 @@ namespace Core::Frontend {
struct CabinetParameters { struct CabinetParameters {
Service::NFP::TagInfo tag_info; Service::NFP::TagInfo tag_info;
Service::NFP::RegisterInfo register_info; Service::NFP::RegisterInfo register_info;
Service::NFP::CabinetMode mode; Service::NFP::CabinetMode mode{};
}; };
using CabinetCallback = std::function<void(bool, const std::string&)>; using CabinetCallback = std::function<void(bool, const std::string&)>;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -20,9 +23,9 @@ struct KeyboardInitializeParameters {
std::u16string initial_text; std::u16string initial_text;
char16_t left_optional_symbol_key; char16_t left_optional_symbol_key;
char16_t right_optional_symbol_key; char16_t right_optional_symbol_key;
u32 max_text_length; u32 max_text_length{};
u32 min_text_length; u32 min_text_length{};
s32 initial_cursor_position; s32 initial_cursor_position{};
Service::AM::Frontend::SwkbdType type; Service::AM::Frontend::SwkbdType type;
Service::AM::Frontend::SwkbdPasswordMode password_mode; Service::AM::Frontend::SwkbdPasswordMode password_mode;
Service::AM::Frontend::SwkbdTextDrawType text_draw_type; Service::AM::Frontend::SwkbdTextDrawType text_draw_type;
@@ -34,12 +37,12 @@ struct KeyboardInitializeParameters {
}; };
struct InlineAppearParameters { struct InlineAppearParameters {
u32 max_text_length; u32 max_text_length{};
u32 min_text_length; u32 min_text_length{};
f32 key_top_scale_x; f32 key_top_scale_x{};
f32 key_top_scale_y; f32 key_top_scale_y{};
f32 key_top_translate_x; f32 key_top_translate_x{};
f32 key_top_translate_y; f32 key_top_translate_y{};
Service::AM::Frontend::SwkbdType type; Service::AM::Frontend::SwkbdType type;
Service::AM::Frontend::SwkbdKeyDisableFlags key_disable_flags; Service::AM::Frontend::SwkbdKeyDisableFlags key_disable_flags;
bool key_top_as_floating; bool key_top_as_floating;
@@ -50,7 +53,7 @@ struct InlineAppearParameters {
struct InlineTextParameters { struct InlineTextParameters {
std::u16string input_text; std::u16string input_text;
s32 cursor_position; s32 cursor_position{};
}; };
class SoftwareKeyboardApplet : public Applet { class SoftwareKeyboardApplet : public Applet {

View File

@@ -1,8 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <cstring>
#include <sstream> #include <sstream>
#include <boost/range/algorithm_ext/erase.hpp> #include <boost/range/algorithm_ext/erase.hpp>
@@ -187,7 +191,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) {
buffer_w_descriptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>()); buffer_w_descriptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>());
} }
const auto buffer_c_offset = rp.GetCurrentOffset() + command_header->data_size; buffer_c_offset = rp.GetCurrentOffset() + command_header->data_size;
if (!command_header->IsTipc()) { if (!command_header->IsTipc()) {
// Padding to align to 16 bytes // Padding to align to 16 bytes
@@ -294,7 +298,15 @@ Result HLERequestContext::WriteToOutgoingCommandBuffer() {
} }
// Write the domain objects to the command buffer, these go after the raw untranslated data. // Write the domain objects to the command buffer, these go after the raw untranslated data.
// TODO(Subv): This completely ignores C buffers.
if (buffer_c_offset != 0 && !buffer_c_descriptors.empty()) {
constexpr u32 WORDS_PER_DESCRIPTOR = sizeof(IPC::BufferDescriptorC) / sizeof(u32);
u32 descriptor_offset = buffer_c_offset;
for (const auto& descriptor : buffer_c_descriptors) {
std::memcpy(&cmd_buf[descriptor_offset], &descriptor, sizeof(descriptor));
descriptor_offset += WORDS_PER_DESCRIPTOR;
}
}
if (GetManager()->IsDomain()) { if (GetManager()->IsDomain()) {
current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size()); current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size());
@@ -393,10 +405,14 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
const bool is_buffer_b{BufferDescriptorB().size() > buffer_index && const bool is_buffer_b{BufferDescriptorB().size() > buffer_index &&
BufferDescriptorB()[buffer_index].Size()}; BufferDescriptorB()[buffer_index].Size()};
const std::size_t buffer_size{GetWriteBufferSize(buffer_index)}; const std::size_t buffer_size{GetWriteBufferSize(buffer_index)};
if (buffer_size == 0) {
LOG_WARNING(Core, "WriteBuffer target index {} has zero capacity", buffer_index);
return 0;
}
if (size > buffer_size) { if (size > buffer_size) {
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size, LOG_WARNING(Core, "size ({:016X}) is greater than buffer_size ({:016X}); clamping",
buffer_size); size, buffer_size);
size = buffer_size; // TODO(bunnei): This needs to be HW tested size = buffer_size;
} }
if (is_buffer_b) { if (is_buffer_b) {
@@ -418,15 +434,25 @@ std::size_t HLERequestContext::WriteBuffer(const void* buffer, std::size_t size,
std::size_t HLERequestContext::WriteBufferB(const void* buffer, std::size_t size, std::size_t HLERequestContext::WriteBufferB(const void* buffer, std::size_t size,
std::size_t buffer_index) const { std::size_t buffer_index) const {
if (buffer_index >= BufferDescriptorB().size() || size == 0) { if (buffer_index >= BufferDescriptorB().size()) {
LOG_WARNING(Core, "WriteBufferB invalid buffer index {}", buffer_index);
return 0;
}
if (size == 0) {
LOG_WARNING(Core, "skip empty buffer write (B)");
return 0; return 0;
} }
const auto buffer_size{BufferDescriptorB()[buffer_index].Size()}; const auto buffer_size{BufferDescriptorB()[buffer_index].Size()};
if (buffer_size == 0) {
LOG_WARNING(Core, "WriteBufferB target index {} has zero capacity", buffer_index);
return 0;
}
if (size > buffer_size) { if (size > buffer_size) {
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size, LOG_WARNING(Core, "size ({:016X}) is greater than buffer_size ({:016X}); clamping",
buffer_size); size, buffer_size);
size = buffer_size; // TODO(bunnei): This needs to be HW tested size = buffer_size;
} }
memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size); memory.WriteBlock(BufferDescriptorB()[buffer_index].Address(), buffer, size);
@@ -435,15 +461,25 @@ std::size_t HLERequestContext::WriteBufferB(const void* buffer, std::size_t size
std::size_t HLERequestContext::WriteBufferC(const void* buffer, std::size_t size, std::size_t HLERequestContext::WriteBufferC(const void* buffer, std::size_t size,
std::size_t buffer_index) const { std::size_t buffer_index) const {
if (buffer_index >= BufferDescriptorC().size() || size == 0) { if (buffer_index >= BufferDescriptorC().size()) {
LOG_WARNING(Core, "WriteBufferC invalid buffer index {}", buffer_index);
return 0;
}
if (size == 0) {
LOG_WARNING(Core, "skip empty buffer write (C)");
return 0; return 0;
} }
const auto buffer_size{BufferDescriptorC()[buffer_index].Size()}; const auto buffer_size{BufferDescriptorC()[buffer_index].Size()};
if (buffer_size == 0) {
LOG_WARNING(Core, "WriteBufferC target index {} has zero capacity", buffer_index);
return 0;
}
if (size > buffer_size) { if (size > buffer_size) {
LOG_CRITICAL(Core, "size ({:016X}) is greater than buffer_size ({:016X})", size, LOG_WARNING(Core, "size ({:016X}) is greater than buffer_size ({:016X}); clamping",
buffer_size); size, buffer_size);
size = buffer_size; // TODO(bunnei): This needs to be HW tested size = buffer_size;
} }
memory.WriteBlock(BufferDescriptorC()[buffer_index].Address(), buffer, size); memory.WriteBlock(BufferDescriptorC()[buffer_index].Address(), buffer, size);
@@ -473,12 +509,20 @@ std::size_t HLERequestContext::GetWriteBufferSize(std::size_t buffer_index) cons
ASSERT_OR_EXECUTE_MSG( ASSERT_OR_EXECUTE_MSG(
BufferDescriptorB().size() > buffer_index, { return 0; }, BufferDescriptorB().size() > buffer_index, { return 0; },
"BufferDescriptorB invalid buffer_index {}", buffer_index); "BufferDescriptorB invalid buffer_index {}", buffer_index);
return BufferDescriptorB()[buffer_index].Size(); const auto size = BufferDescriptorB()[buffer_index].Size();
if (size == 0) {
LOG_WARNING(Core, "BufferDescriptorB index {} has zero size", buffer_index);
}
return size;
} else { } else {
ASSERT_OR_EXECUTE_MSG( ASSERT_OR_EXECUTE_MSG(
BufferDescriptorC().size() > buffer_index, { return 0; }, BufferDescriptorC().size() > buffer_index, { return 0; },
"BufferDescriptorC invalid buffer_index {}", buffer_index); "BufferDescriptorC invalid buffer_index {}", buffer_index);
return BufferDescriptorC()[buffer_index].Size(); const auto size = BufferDescriptorC()[buffer_index].Size();
if (size == 0) {
LOG_WARNING(Core, "BufferDescriptorC index {} has zero size", buffer_index);
}
return size;
} }
return 0; return 0;
} }

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -422,6 +425,7 @@ private:
u32 data_payload_offset{}; u32 data_payload_offset{};
u32 handles_offset{}; u32 handles_offset{};
u32 domain_offset{}; u32 domain_offset{};
u32 buffer_c_offset{};
std::weak_ptr<SessionRequestManager> manager{}; std::weak_ptr<SessionRequestManager> manager{};
bool is_deferred{false}; bool is_deferred{false};

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
@@ -79,7 +82,7 @@ using DeviceHandle = u64;
// This is nn::nfc::TagInfo // This is nn::nfc::TagInfo
struct TagInfo { struct TagInfo {
UniqueSerialNumber uuid; UniqueSerialNumber uuid{};
u8 uuid_length; u8 uuid_length;
INSERT_PADDING_BYTES(0x15); INSERT_PADDING_BYTES(0x15);
NfcProtocol protocol; NfcProtocol protocol;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
@@ -315,7 +318,7 @@ static_assert(sizeof(ModelInfo) == 0x40, "ModelInfo is an invalid size");
// This is nn::nfp::RegisterInfo // This is nn::nfp::RegisterInfo
struct RegisterInfo { struct RegisterInfo {
Service::Mii::CharInfo mii_char_info; Service::Mii::CharInfo mii_char_info;
WriteDate creation_date; WriteDate creation_date{};
AmiiboName amiibo_name; AmiiboName amiibo_name;
u8 font_region; u8 font_region;
INSERT_PADDING_BYTES(0x7A); INSERT_PADDING_BYTES(0x7A);

View File

@@ -164,7 +164,7 @@ IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const ch
// Rebuild shared fonts from data ncas or synthesize // Rebuild shared fonts from data ncas or synthesize
impl->shared_font = std::make_shared<Kernel::PhysicalMemory>(SHARED_FONT_MEM_SIZE); impl->shared_font = std::make_shared<Kernel::PhysicalMemory>(SHARED_FONT_MEM_SIZE);
for (auto font : SHARED_FONTS) { for (auto& font : SHARED_FONTS) {
FileSys::VirtualFile romfs; FileSys::VirtualFile romfs;
const auto nca = const auto nca =
nand->GetEntry(static_cast<u64>(font.first), FileSys::ContentRecordType::Data); nand->GetEntry(static_cast<u64>(font.first), FileSys::ContentRecordType::Data);
@@ -261,7 +261,7 @@ Result IPlatformServiceManager::GetSharedFontInOrderOfPriority(
out_font_sizes.size(), impl->shared_font_regions.size()}); out_font_sizes.size(), impl->shared_font_regions.size()});
for (size_t i = 0; i < max_size; i++) { for (size_t i = 0; i < max_size; i++) {
auto region = impl->GetSharedFontRegion(i); auto& region = impl->GetSharedFontRegion(i);
out_font_codes[i] = static_cast<u32>(i); out_font_codes[i] = static_cast<u32>(i);
out_font_offsets[i] = region.offset; out_font_offsets[i] = region.offset;

View File

@@ -48,7 +48,7 @@ private:
void Save(); void Save();
PlayTimeDatabase database; PlayTimeDatabase database;
u64 running_program_id; u64 running_program_id{};
std::jthread play_time_thread; std::jthread play_time_thread;
}; };

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project // SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -53,7 +56,7 @@ struct ChatEntry {
/// Represents a system status message. /// Represents a system status message.
struct StatusMessageEntry { struct StatusMessageEntry {
StatusMessageTypes type; ///< Type of the message StatusMessageTypes type{}; ///< Type of the message
/// Subject of the message. i.e. the user who is joining/leaving/being banned, etc. /// Subject of the message. i.e. the user who is joining/leaving/being banned, etc.
std::string nickname; std::string nickname;
std::string username; std::string username;

View File

@@ -1705,21 +1705,26 @@ Binding BufferCache<P>::StorageBufferBinding(GPUVAddr ssbo_addr, u32 cbuf_index,
return NULL_BINDING; return NULL_BINDING;
} }
// xbzk: New size logic. Fixes MCI.
// If ever the * comment below prove wrong, the 'if' block may be removed.
const auto size = [&]() { const auto size = [&]() {
const bool is_nvn_cbuf = cbuf_index == 0; const bool is_nvn_cbuf = cbuf_index == 0;
// The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size.
if (is_nvn_cbuf) { if (is_nvn_cbuf) {
const u32 ssbo_size = gpu_memory->Read<u32>(ssbo_addr + 8); // * The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size.
if (ssbo_size != 0) { const u64 next_qword = gpu_memory->Read<u64>(ssbo_addr + 8);
return ssbo_size; const u32 upper_32 = static_cast<u32>(next_qword >> 32);
// Hardware-based detection: GPU addresses have non-zero upper bits
if (upper_32 == 0) {
// This is a size field, not a GPU address
return static_cast<u32>(next_qword); // Return lower_32
} }
} }
// Other titles (notably Doom Eternal) may use STG/LDG on buffer addresses in custom defined // Fall through: either not NVN cbuf (Doom Eternal & +), or NVN but ssbo_addr+8 is a GPU address (MCI)
// cbufs, which do not store the sizes adjacent to the addresses, so use the fully
// mapped buffer size for now.
const u32 memory_layout_size = static_cast<u32>(gpu_memory->GetMemoryLayoutSize(gpu_addr)); const u32 memory_layout_size = static_cast<u32>(gpu_memory->GetMemoryLayoutSize(gpu_addr));
// Cap at 8MB to prevent allocator overflow from misinterpreted addresses
return (std::min)(memory_layout_size, static_cast<u32>(8_MiB)); return (std::min)(memory_layout_size, static_cast<u32>(8_MiB));
}(); }();
// Alignment only applies to the offset of the buffer // Alignment only applies to the offset of the buffer
const u32 alignment = runtime.GetStorageBufferAlignment(); const u32 alignment = runtime.GetStorageBufferAlignment();
const GPUVAddr aligned_gpu_addr = Common::AlignDown(gpu_addr, alignment); const GPUVAddr aligned_gpu_addr = Common::AlignDown(gpu_addr, alignment);

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2021 yuzu Emulator Project // SPDX-FileCopyrightText: 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
@@ -17,7 +20,7 @@ void Scheduler::Push(s32 channel, CommandList&& entries) {
std::unique_lock lk(scheduling_guard); std::unique_lock lk(scheduling_guard);
auto it = channels.find(channel); auto it = channels.find(channel);
ASSERT(it != channels.end()); ASSERT(it != channels.end());
auto channel_state = it->second; auto& channel_state = it->second;
gpu.BindChannel(channel_state->bind_id); gpu.BindChannel(channel_state->bind_id);
channel_state->dma_pusher->Push(std::move(entries)); channel_state->dma_pusher->Push(std::move(entries));
channel_state->dma_pusher->DispatchCalls(); channel_state->dma_pusher->DispatchCalls();

View File

@@ -108,7 +108,7 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
VkRect2D GetScissorState(const Maxwell& regs, size_t index, u32 up_scale = 1, u32 down_shift = 0) { VkRect2D GetScissorState(const Maxwell& regs, size_t index, u32 up_scale = 1, u32 down_shift = 0) {
const auto& src = regs.scissor_test[index]; const auto& src = regs.scissor_test[index];
VkRect2D scissor; VkRect2D scissor{};
const auto scale_up = [&](s32 value) -> s32 { const auto scale_up = [&](s32 value) -> s32 {
if (value == 0) { if (value == 0) {
return 0U; return 0U;
@@ -374,7 +374,7 @@ void RasterizerVulkan::Clear(u32 layer_count) {
} }
UpdateViewportsState(regs); UpdateViewportsState(regs);
VkRect2D default_scissor; VkRect2D default_scissor{};
default_scissor.offset.x = 0; default_scissor.offset.x = 0;
default_scissor.offset.y = 0; default_scissor.offset.y = 0;
default_scissor.extent.width = (std::numeric_limits<s32>::max)(); default_scissor.extent.width = (std::numeric_limits<s32>::max)();

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: 2016 Citra Emulator Project // SPDX-FileCopyrightText: 2016 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -71,11 +74,11 @@ private:
std::unique_ptr<InputProfiles> profiles; std::unique_ptr<InputProfiles> profiles;
std::array<ConfigureInputPlayer*, 8> player_controllers; std::array<ConfigureInputPlayer*, 8> player_controllers{};
std::array<QWidget*, 8> player_tabs; std::array<QWidget*, 8> player_tabs{};
// Checkboxes representing the "Connected Controllers". // Checkboxes representing the "Connected Controllers".
std::array<QCheckBox*, 8> connected_controller_checkboxes; std::array<QCheckBox*, 8> connected_controller_checkboxes{};
ConfigureInputAdvanced* advanced; ConfigureInputAdvanced* advanced = nullptr;
Core::System& system; Core::System& system;
}; };

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -689,10 +692,10 @@ void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF cen
{ {
// Draw joysticks // Draw joysticks
using namespace Settings::NativeAnalog; using namespace Settings::NativeAnalog;
const auto l_stick = QPointF(stick_values[LStick].x.value, stick_values[LStick].y.value); const auto& l_stick = QPointF(stick_values[LStick].x.value, stick_values[LStick].y.value);
const auto l_button = button_values[Settings::NativeButton::LStick]; const auto& l_button = button_values[Settings::NativeButton::LStick];
const auto r_stick = QPointF(stick_values[RStick].x.value, stick_values[RStick].y.value); const auto& r_stick = QPointF(stick_values[RStick].x.value, stick_values[RStick].y.value);
const auto r_button = button_values[Settings::NativeButton::RStick]; const auto& r_button = button_values[Settings::NativeButton::RStick];
DrawJoystick(p, center + QPointF(-171, -41) + (l_stick * 4), 1.0f, l_button); DrawJoystick(p, center + QPointF(-171, -41) + (l_stick * 4), 1.0f, l_button);
DrawJoystick(p, center + QPointF(171, 8) + (r_stick * 4), 1.0f, r_button); DrawJoystick(p, center + QPointF(171, 8) + (r_stick * 4), 1.0f, r_button);

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -214,7 +217,7 @@ private:
bool mapping_active{}; bool mapping_active{};
int blink_counter{}; int blink_counter{};
int callback_key; int callback_key{};
QColor button_color{}; QColor button_color{};
ColorMapping colors{}; ColorMapping colors{};
Core::HID::LedPattern led_pattern{0, 0, 0, 0}; Core::HID::LedPattern led_pattern{0, 0, 0, 0};

View File

@@ -1495,7 +1495,7 @@ void MainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) { (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
auto_paused = true; auto_paused = true;
OnPauseGame(); OnPauseGame();
} else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) { } else if (!emu_thread->IsRunning() && auto_paused && (state & Qt::ApplicationActive)) {
auto_paused = false; auto_paused = false;
OnStartGame(); OnStartGame();
} }
@@ -1505,7 +1505,7 @@ void MainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
(state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) { (state & (Qt::ApplicationHidden | Qt::ApplicationInactive))) {
Settings::values.audio_muted = true; Settings::values.audio_muted = true;
auto_muted = true; auto_muted = true;
} else if (auto_muted && state == Qt::ApplicationActive) { } else if (auto_muted && (state & Qt::ApplicationActive)) {
Settings::values.audio_muted = false; Settings::values.audio_muted = false;
auto_muted = false; auto_muted = false;
} }

View File

@@ -482,13 +482,13 @@ private:
MultiplayerState* multiplayer_state = nullptr; MultiplayerState* multiplayer_state = nullptr;
GRenderWindow* render_window; GRenderWindow* render_window = nullptr;
GameList* game_list; GameList* game_list = nullptr;
LoadingScreen* loading_screen; LoadingScreen* loading_screen = nullptr;
QTimer shutdown_timer; QTimer shutdown_timer;
OverlayDialog* shutdown_dialog{}; OverlayDialog* shutdown_dialog{};
GameListPlaceholder* game_list_placeholder; GameListPlaceholder* game_list_placeholder = nullptr;
std::vector<VkDeviceInfo::Record> vk_device_records; std::vector<VkDeviceInfo::Record> vk_device_records;
@@ -531,7 +531,7 @@ private:
QString startup_icon_theme; QString startup_icon_theme;
// Debugger panes // Debugger panes
ControllerDialog* controller_dialog; ControllerDialog* controller_dialog = nullptr;
QAction* actions_recent_files[max_recent_files_item]; QAction* actions_recent_files[max_recent_files_item];
@@ -543,7 +543,7 @@ private:
QTranslator translator; QTranslator translator;
// Install progress dialog // Install progress dialog
QProgressDialog* install_progress; QProgressDialog* install_progress = nullptr;
// Last game booted, used for multi-process apps // Last game booted, used for multi-process apps
QString last_filename_booted; QString last_filename_booted;

View File

@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project // SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@@ -175,7 +178,7 @@ public:
private: private:
QString username; QString username;
QString nickname; QString nickname;
u64 title_id; u64 title_id{};
QString game_name; QString game_name;
}; };