diff --git a/src/citra_qt/multiplayer/state.cpp b/src/citra_qt/multiplayer/state.cpp index 9a8e04208..2835cae75 100644 --- a/src/citra_qt/multiplayer/state.cpp +++ b/src/citra_qt/multiplayer/state.cpp @@ -7,7 +7,6 @@ #include #include #include -#include "citra_qt/game_list.h" #include "citra_qt/multiplayer/client_room.h" #include "citra_qt/multiplayer/direct_connect.h" #include "citra_qt/multiplayer/host_room.h" @@ -16,7 +15,6 @@ #include "citra_qt/multiplayer/state.h" #include "citra_qt/uisettings.h" #include "citra_qt/util/clickable_label.h" -#include "common/announce_multiplayer_room.h" #include "common/logging/log.h" MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model, @@ -231,8 +229,9 @@ bool MultiplayerState::OnCloseRoom() { if (room->GetState() != Network::Room::State::Open) { return true; } + // Save ban list - UISettings::values.ban_list = std::move(room->GetBanList()); + UISettings::values.ban_list = room->GetBanList(); room->Destroy(); announce_multiplayer_session->Stop(); diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 16b662372..dc8d62d2a 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp @@ -849,17 +849,13 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, std::size_t& bb_start, u3 // Save start addr of basicblock in CreamCache ARM_INST_PTR inst_base = nullptr; TransExtData ret = TransExtData::NON_BRANCH; - int size = 0; // instruction size of basic block bb_start = trans_cache_buf_top; u32 phys_addr = addr; u32 pc_start = cpu->Reg[15]; while (ret == TransExtData::NON_BRANCH) { - unsigned int inst_size = InterpreterTranslateInstruction(cpu, phys_addr, inst_base); - - size++; - + u32 inst_size = InterpreterTranslateInstruction(cpu, phys_addr, inst_base); phys_addr += inst_size; if ((phys_addr & 0xfff) == 0) { diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp index f0f60a34a..8a58ed444 100644 --- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp @@ -1218,7 +1218,7 @@ u32 vfp_double_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) { u32 except; - char type; + [[maybe_unused]] char type; type = (fop->flags & OP_SD) ? 's' : 'd'; if (op == FOP_EXT) diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp index 6536bf03d..cdb8372f3 100644 --- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp @@ -1242,7 +1242,7 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr) { for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) { s32 m = vfp_get_float(state, sm); u32 except; - char type; + [[maybe_unused]] char type; type = (fop->flags & OP_DD) ? 'd' : 's'; if (op == FOP_EXT) diff --git a/src/core/core_timing.h b/src/core/core_timing.h index cb54c316d..11ef4d35b 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -301,10 +301,6 @@ private: std::vector> timers; Timer* current_timer = nullptr; - // Stores a scaling for the internal clockspeed. Changing this number results in - // under/overclocking the guest cpu - double cpu_clock_scale = 1.0; - // When true, the event queue can't be modified. Used while deserializing to workaround // destructor side effects. bool event_queue_locked = false; diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index 4d8b12241..406a3fffd 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -80,7 +80,7 @@ private: std::shared_ptr timeout_callback; void WakeUp(ThreadWakeupReason reason, std::shared_ptr thread, - std::shared_ptr object); + std::shared_ptr object) override; class DummyCallback : public WakeupCallback { public: diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index e78c4a1bb..a268a0dc2 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -265,7 +265,7 @@ ResultCode Process::HeapFree(VAddr target, u32 size) { // Free heaps block by block CASCADE_RESULT(auto backing_blocks, vm_manager.GetBackingBlocksForRange(target, size)); - for (const auto [backing_memory, block_size] : backing_blocks) { + for (const auto& [backing_memory, block_size] : backing_blocks) { memory_region->Free(kernel.memory.GetFCRAMOffset(backing_memory.GetPtr()), block_size); } @@ -396,7 +396,7 @@ ResultCode Process::Map(VAddr target, VAddr source, u32 size, VMAPermission perm CASCADE_RESULT(auto backing_blocks, vm_manager.GetBackingBlocksForRange(source, size)); VAddr interval_target = target; - for (const auto [backing_memory, block_size] : backing_blocks) { + for (const auto& [backing_memory, block_size] : backing_blocks) { auto target_vma = vm_manager.MapBackingMemory(interval_target, backing_memory, block_size, target_state); ASSERT(target_vma.Succeeded()); diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 5c2639eff..f215d67ce 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -17,12 +17,9 @@ #include "core/file_sys/errors.h" #include "core/file_sys/ncch_container.h" #include "core/file_sys/title_metadata.h" -#include "core/hle/ipc.h" #include "core/hle/ipc_helpers.h" -#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" #include "core/hle/kernel/errors.h" -#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/server_session.h" #include "core/hle/kernel/session.h" #include "core/hle/service/am/am.h" @@ -610,7 +607,6 @@ void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) { std::string tmd_path = GetTitleMetadataPath(media_type, title_id); - u32 content_read = 0; FileSys::TitleMetadata tmd; if (tmd.Load(tmd_path) == Loader::ResultStatus::Success) { std::size_t write_offset = 0; @@ -642,7 +638,6 @@ void Module::Interface::FindDLCContentInfos(Kernel::HLERequestContext& ctx) { content_info_out.Write(&content_info, write_offset, sizeof(ContentInfo)); write_offset += sizeof(ContentInfo); - content_read++; } } diff --git a/src/core/hle/service/apt/applet_manager.cpp b/src/core/hle/service/apt/applet_manager.cpp index b90f6248e..d59980720 100644 --- a/src/core/hle/service/apt/applet_manager.cpp +++ b/src/core/hle/service/apt/applet_manager.cpp @@ -2,7 +2,6 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/common_paths.h" #include "core/core.h" #include "core/hle/applets/applet.h" #include "core/hle/service/apt/applet_manager.h" @@ -27,47 +26,47 @@ struct AppletTitleData { static constexpr std::size_t NumApplets = 29; static constexpr std::array applet_titleids = {{ - {AppletId::HomeMenu, AppletId::None, 0x4003000008202, 0x4003000008F02, 0x4003000009802, - 0x4003000008202, 0x400300000A102, 0x400300000A902, 0x400300000B102}, - {AppletId::AlternateMenu, AppletId::None, 0x4003000008102, 0x4003000008102, 0x4003000008102, - 0x4003000008102, 0x4003000008102, 0x4003000008102, 0x4003000008102}, - {AppletId::Camera, AppletId::None, 0x4003000008402, 0x4003000009002, 0x4003000009902, - 0x4003000008402, 0x400300000A202, 0x400300000AA02, 0x400300000B202}, - {AppletId::FriendList, AppletId::None, 0x4003000008D02, 0x4003000009602, 0x4003000009F02, - 0x4003000008D02, 0x400300000A702, 0x400300000AF02, 0x400300000B702}, - {AppletId::GameNotes, AppletId::None, 0x4003000008702, 0x4003000009302, 0x4003000009C02, - 0x4003000008702, 0x400300000A502, 0x400300000AD02, 0x400300000B502}, - {AppletId::InternetBrowser, AppletId::None, 0x4003000008802, 0x4003000009402, 0x4003000009D02, - 0x4003000008802, 0x400300000A602, 0x400300000AE02, 0x400300000B602}, - {AppletId::InstructionManual, AppletId::None, 0x4003000008602, 0x4003000009202, 0x4003000009B02, - 0x4003000008602, 0x400300000A402, 0x400300000AC02, 0x400300000B402}, - {AppletId::Notifications, AppletId::None, 0x4003000008E02, 0x4003000009702, 0x400300000A002, - 0x4003000008E02, 0x400300000A802, 0x400300000B002, 0x400300000B802}, - {AppletId::Miiverse, AppletId::None, 0x400300000BC02, 0x400300000BD02, 0x400300000BE02, - 0x400300000BC02, 0x4003000009E02, 0x4003000009502, 0x400300000B902}, + {{AppletId::HomeMenu, AppletId::None}, {0x4003000008202, 0x4003000008F02, 0x4003000009802, + 0x4003000008202, 0x400300000A102, 0x400300000A902, 0x400300000B102}}, + {{AppletId::AlternateMenu, AppletId::None}, {0x4003000008102, 0x4003000008102, 0x4003000008102, + 0x4003000008102, 0x4003000008102, 0x4003000008102, 0x4003000008102}}, + {{AppletId::Camera, AppletId::None}, {0x4003000008402, 0x4003000009002, 0x4003000009902, + 0x4003000008402, 0x400300000A202, 0x400300000AA02, 0x400300000B202}}, + {{AppletId::FriendList, AppletId::None}, {0x4003000008D02, 0x4003000009602, 0x4003000009F02, + 0x4003000008D02, 0x400300000A702, 0x400300000AF02, 0x400300000B702}}, + {{AppletId::GameNotes, AppletId::None}, {0x4003000008702, 0x4003000009302, 0x4003000009C02, + 0x4003000008702, 0x400300000A502, 0x400300000AD02, 0x400300000B502}}, + {{AppletId::InternetBrowser, AppletId::None}, {0x4003000008802, 0x4003000009402, 0x4003000009D02, + 0x4003000008802, 0x400300000A602, 0x400300000AE02, 0x400300000B602}}, + {{AppletId::InstructionManual, AppletId::None}, {0x4003000008602, 0x4003000009202, 0x4003000009B02, + 0x4003000008602, 0x400300000A402, 0x400300000AC02, 0x400300000B402}}, + {{AppletId::Notifications, AppletId::None}, {0x4003000008E02, 0x4003000009702, 0x400300000A002, + 0x4003000008E02, 0x400300000A802, 0x400300000B002, 0x400300000B802}}, + {{AppletId::Miiverse, AppletId::None}, {0x400300000BC02, 0x400300000BD02, 0x400300000BE02, + 0x400300000BC02, 0x4003000009E02, 0x4003000009502, 0x400300000B902}}, // These values obtained from an older NS dump firmware 4.5 - {AppletId::MiiversePost, AppletId::None, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02, - 0x400300000BA02, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02}, + {{AppletId::MiiversePost, AppletId::None}, {0x400300000BA02, 0x400300000BA02, 0x400300000BA02, + 0x400300000BA02, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02}}, // {AppletId::MiiversePost, AppletId::None, 0x4003000008302, 0x4003000008B02, 0x400300000BA02, // 0x4003000008302, 0x0, 0x0, 0x0}, - {AppletId::AmiiboSettings, AppletId::None, 0x4003000009502, 0x4003000009E02, 0x400300000B902, - 0x4003000009502, 0x0, 0x4003000008C02, 0x400300000BF02}, - {AppletId::SoftwareKeyboard1, AppletId::SoftwareKeyboard2, 0x400300000C002, 0x400300000C802, - 0x400300000D002, 0x400300000C002, 0x400300000D802, 0x400300000DE02, 0x400300000E402}, - {AppletId::Ed1, AppletId::Ed2, 0x400300000C102, 0x400300000C902, 0x400300000D102, - 0x400300000C102, 0x400300000D902, 0x400300000DF02, 0x400300000E502}, - {AppletId::PnoteApp, AppletId::PnoteApp2, 0x400300000C302, 0x400300000CB02, 0x400300000D302, - 0x400300000C302, 0x400300000DB02, 0x400300000E102, 0x400300000E702}, - {AppletId::SnoteApp, AppletId::SnoteApp2, 0x400300000C402, 0x400300000CC02, 0x400300000D402, - 0x400300000C402, 0x400300000DC02, 0x400300000E202, 0x400300000E802}, - {AppletId::Error, AppletId::Error2, 0x400300000C502, 0x400300000C502, 0x400300000C502, - 0x400300000C502, 0x400300000CF02, 0x400300000CF02, 0x400300000CF02}, - {AppletId::Mint, AppletId::Mint2, 0x400300000C602, 0x400300000CE02, 0x400300000D602, - 0x400300000C602, 0x400300000DD02, 0x400300000E302, 0x400300000E902}, - {AppletId::Extrapad, AppletId::Extrapad2, 0x400300000CD02, 0x400300000CD02, 0x400300000CD02, - 0x400300000CD02, 0x400300000D502, 0x400300000D502, 0x400300000D502}, - {AppletId::Memolib, AppletId::Memolib2, 0x400300000F602, 0x400300000F602, 0x400300000F602, - 0x400300000F602, 0x400300000F602, 0x400300000F602, 0x400300000F602}, + {{AppletId::AmiiboSettings, AppletId::None}, {0x4003000009502, 0x4003000009E02, 0x400300000B902, + 0x4003000009502, 0x0, 0x4003000008C02, 0x400300000BF02}}, + {{AppletId::SoftwareKeyboard1, AppletId::SoftwareKeyboard2}, {0x400300000C002, 0x400300000C802, + 0x400300000D002, 0x400300000C002, 0x400300000D802, 0x400300000DE02, 0x400300000E402}}, + {{AppletId::Ed1, AppletId::Ed2}, {0x400300000C102, 0x400300000C902, 0x400300000D102, + 0x400300000C102, 0x400300000D902, 0x400300000DF02, 0x400300000E502}}, + {{AppletId::PnoteApp, AppletId::PnoteApp2}, {0x400300000C302, 0x400300000CB02, 0x400300000D302, + 0x400300000C302, 0x400300000DB02, 0x400300000E102, 0x400300000E702}}, + {{AppletId::SnoteApp, AppletId::SnoteApp2}, {0x400300000C402, 0x400300000CC02, 0x400300000D402, + 0x400300000C402, 0x400300000DC02, 0x400300000E202, 0x400300000E802}}, + {{AppletId::Error, AppletId::Error2}, {0x400300000C502, 0x400300000C502, 0x400300000C502, + 0x400300000C502, 0x400300000CF02, 0x400300000CF02, 0x400300000CF02}}, + {{AppletId::Mint, AppletId::Mint2}, {0x400300000C602, 0x400300000CE02, 0x400300000D602, + 0x400300000C602, 0x400300000DD02, 0x400300000E302, 0x400300000E902}}, + {{AppletId::Extrapad, AppletId::Extrapad2}, {0x400300000CD02, 0x400300000CD02, 0x400300000CD02, + 0x400300000CD02, 0x400300000D502, 0x400300000D502, 0x400300000D502}}, + {{AppletId::Memolib, AppletId::Memolib2}, {0x400300000F602, 0x400300000F602, 0x400300000F602, + 0x400300000F602, 0x400300000F602, 0x400300000F602, 0x400300000F602}}, // TODO(Subv): Fill in the rest of the titleids }}; diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 3b13229b8..7f8c16e03 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -10,7 +10,6 @@ #include #include #include "common/archives.h" -#include "common/common_paths.h" #include "common/file_util.h" #include "common/logging/log.h" #include "common/string_util.h" @@ -107,7 +106,6 @@ static_assert(sizeof(ConsoleCountryInfo) == 4, "ConsoleCountryInfo must be exact constexpr EULAVersion MAX_EULA_VERSION{0x7F, 0x7F}; constexpr ConsoleModelInfo CONSOLE_MODEL_OLD{NINTENDO_3DS_XL, {0, 0, 0}}; -constexpr ConsoleModelInfo CONSOLE_MODEL_NEW{NEW_NINTENDO_3DS_XL, {0, 0, 0}}; constexpr u8 CONSOLE_LANGUAGE = LANGUAGE_EN; constexpr UsernameBlock CONSOLE_USERNAME_BLOCK{u"CITRA", 0, 0}; constexpr BirthdayBlock PROFILE_BIRTHDAY{3, 25}; // March 25th, 2014 @@ -269,7 +267,7 @@ void Module::Interface::GetSystemModel(Kernel::HLERequestContext& ctx) { void Module::Interface::GetModelNintendo2DS(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp(ctx, 0x06, 0, 0); IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); - u32 data; + u32 data{}; // TODO(Subv): Find out the correct error codes rb.Push(cfg->GetConfigInfoBlock(ConsoleModelBlockID, 4, 0x8, reinterpret_cast(&data))); @@ -370,7 +368,7 @@ ResultVal Module::GetConfigInfoBlockPointer(u32 block_id, u32 size, u32 f } ResultCode Module::GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, void* output) { - void* pointer; + void* pointer = nullptr; CASCADE_RESULT(pointer, GetConfigInfoBlockPointer(block_id, size, flag)); memcpy(output, pointer, size); @@ -378,7 +376,7 @@ ResultCode Module::GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, void* ou } ResultCode Module::SetConfigInfoBlock(u32 block_id, u32 size, u32 flag, const void* input) { - void* pointer; + void* pointer = nullptr; CASCADE_RESULT(pointer, GetConfigInfoBlockPointer(block_id, size, flag)); memcpy(pointer, input, size); return RESULT_SUCCESS; @@ -701,7 +699,7 @@ void Module::SetSystemLanguage(SystemLanguage language) { } SystemLanguage Module::GetSystemLanguage() { - u8 block; + u8 block{}; GetConfigInfoBlock(LanguageBlockID, sizeof(block), 8, &block); return static_cast(block); } @@ -712,7 +710,7 @@ void Module::SetSoundOutputMode(SoundOutputMode mode) { } SoundOutputMode Module::GetSoundOutputMode() { - u8 block; + u8 block{}; GetConfigInfoBlock(SoundOutputModeBlockID, sizeof(block), 8, &block); return static_cast(block); } @@ -723,7 +721,7 @@ void Module::SetCountryCode(u8 country_code) { } u8 Module::GetCountryCode() { - ConsoleCountryInfo block; + ConsoleCountryInfo block{}; GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block); return block.country_code; } @@ -734,7 +732,7 @@ void Module::SetCountryInfo(u8 country_code, u8 state_code) { } u8 Module::GetStateCode() { - ConsoleCountryInfo block; + ConsoleCountryInfo block{}; GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block); return block.state_code; } diff --git a/src/core/hle/service/dsp/dsp_dsp.cpp b/src/core/hle/service/dsp/dsp_dsp.cpp index 607b4a363..a01ae73ed 100644 --- a/src/core/hle/service/dsp/dsp_dsp.cpp +++ b/src/core/hle/service/dsp/dsp_dsp.cpp @@ -95,6 +95,9 @@ void DSP_DSP::WriteProcessPipe(Kernel::HLERequestContext& ctx) { buffer[6] = 0; buffer[7] = 0; break; + default: + LOG_ERROR(Service_DSP, "Unknown pipe {}", pipe); + break; } system.DSP().PipeWrite(pipe, buffer); diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp index 4f61ad242..af07e0866 100644 --- a/src/core/hle/service/fs/fs_user.cpp +++ b/src/core/hle/service/fs/fs_user.cpp @@ -884,6 +884,8 @@ ResultVal FS_USER::GetSpecialContentIndexFromTMD(MediaType media_type, u64 default: ASSERT(false); } + + return ResultCode(-1); } FS_USER::FS_USER(Core::System& system) diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index 4f287661e..988fbcc4f 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -92,7 +92,8 @@ u16 NWM_UDS::GetNextAvailableNodeId() { } // Any connection attempts to an already full network should have been refused. - ASSERT_MSG(false, "No available connection slots in the network"); + UNREACHABLE_MSG("No available connection slots in the network"); + return 0; } void NWM_UDS::BroadcastNodeMap() { diff --git a/src/core/hle/service/nwm/uds_beacon.cpp b/src/core/hle/service/nwm/uds_beacon.cpp index e12895ccf..d20a7bd67 100644 --- a/src/core/hle/service/nwm/uds_beacon.cpp +++ b/src/core/hle/service/nwm/uds_beacon.cpp @@ -15,9 +15,6 @@ namespace Service::NWM { -// 802.11 broadcast MAC address -constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - constexpr u64 DefaultNetworkUptime = 900000000; // 15 minutes in microseconds. // Note: These values were taken from a packet capture of an o3DS XL diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index ef6f7f727..5558299db 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp @@ -178,15 +178,6 @@ static const std::unordered_map sockopt_map = {{ {0x1009, SO_ERROR}, }}; -/// Converts a socket option from 3ds-specific to platform-specific -static int TranslateSockOpt(int console_opt_name) { - auto found = sockopt_map.find(console_opt_name); - if (found != sockopt_map.end()) { - return found->second; - } - return console_opt_name; -} - /// Structure to represent the 3ds' pollfd structure, which is different than most implementations struct CTRPollFD { u32 fd; ///< Socket handle diff --git a/src/video_core/geometry_pipeline.cpp b/src/video_core/geometry_pipeline.cpp index b7ec248ca..bd46cc1ba 100644 --- a/src/video_core/geometry_pipeline.cpp +++ b/src/video_core/geometry_pipeline.cpp @@ -255,7 +255,7 @@ public: } private: - const Regs& regs; + [[maybe_unused]] const Regs& regs; Shader::ShaderSetup& setup; Common::Vec4* buffer_begin; Common::Vec4* buffer_cur; diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 4c9b44b9e..84adf6761 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -153,35 +153,6 @@ struct ScreenRectVertex { constexpr u32 VERTEX_BUFFER_SIZE = sizeof(ScreenRectVertex) * 8192; -/** - * Defines a 1:1 pixel ortographic projection matrix with (0,0) on the top-left - * corner and (width, height) on the lower-bottom. - * - * The projection part of the matrix is trivial, hence these operations are represented - * by a 3x2 matrix. - * - * @param flipped Whether the frame should be flipped upside down. - */ -static std::array MakeOrthographicMatrix(float width, float height, bool flipped) { - - std::array matrix; // Laid out in column-major order - - // Last matrix row is implicitly assumed to be [0, 0, 1]. - if (flipped) { - // clang-format off - matrix[0] = 2.f / width; matrix[2] = 0.f; matrix[4] = -1.f; - matrix[1] = 0.f; matrix[3] = 2.f / height; matrix[5] = -1.f; - // clang-format on - } else { - // clang-format off - matrix[0] = 2.f / width; matrix[2] = 0.f; matrix[4] = -1.f; - matrix[1] = 0.f; matrix[3] = -2.f / height; matrix[5] = 1.f; - // clang-format on - } - - return matrix; -} - RendererVulkan::RendererVulkan(Frontend::EmuWindow& window) : RendererBase{window}, instance{window, Settings::values.renderer_debug}, scheduler{instance, *this}, renderpass_cache{instance, scheduler}, runtime{instance, scheduler, renderpass_cache}, diff --git a/src/video_core/shader/shader_uniforms.h b/src/video_core/shader/shader_uniforms.h index b1fcac362..679f6d50e 100644 --- a/src/video_core/shader/shader_uniforms.h +++ b/src/video_core/shader/shader_uniforms.h @@ -13,7 +13,7 @@ struct ShaderRegs; namespace Pica::Shader { -class ShaderSetup; +struct ShaderSetup; enum class UniformBindings : u32 { Common, VS, GS }; diff --git a/src/video_core/swrasterizer/clipper.cpp b/src/video_core/swrasterizer/clipper.cpp index 6d331ec00..4a6e00d53 100644 --- a/src/video_core/swrasterizer/clipper.cpp +++ b/src/video_core/swrasterizer/clipper.cpp @@ -46,7 +46,7 @@ public: } private: - float24 pos; + [[maybe_unused]] float24 pos; Common::Vec4 coeffs; Common::Vec4 bias; };