code: Resolve unused variable warnings
This commit is contained in:
@ -7,7 +7,6 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include "citra_qt/game_list.h"
|
|
||||||
#include "citra_qt/multiplayer/client_room.h"
|
#include "citra_qt/multiplayer/client_room.h"
|
||||||
#include "citra_qt/multiplayer/direct_connect.h"
|
#include "citra_qt/multiplayer/direct_connect.h"
|
||||||
#include "citra_qt/multiplayer/host_room.h"
|
#include "citra_qt/multiplayer/host_room.h"
|
||||||
@ -16,7 +15,6 @@
|
|||||||
#include "citra_qt/multiplayer/state.h"
|
#include "citra_qt/multiplayer/state.h"
|
||||||
#include "citra_qt/uisettings.h"
|
#include "citra_qt/uisettings.h"
|
||||||
#include "citra_qt/util/clickable_label.h"
|
#include "citra_qt/util/clickable_label.h"
|
||||||
#include "common/announce_multiplayer_room.h"
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model,
|
MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_list_model,
|
||||||
@ -231,8 +229,9 @@ bool MultiplayerState::OnCloseRoom() {
|
|||||||
if (room->GetState() != Network::Room::State::Open) {
|
if (room->GetState() != Network::Room::State::Open) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save ban list
|
// Save ban list
|
||||||
UISettings::values.ban_list = std::move(room->GetBanList());
|
UISettings::values.ban_list = room->GetBanList();
|
||||||
|
|
||||||
room->Destroy();
|
room->Destroy();
|
||||||
announce_multiplayer_session->Stop();
|
announce_multiplayer_session->Stop();
|
||||||
|
@ -849,17 +849,13 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, std::size_t& bb_start, u3
|
|||||||
// Save start addr of basicblock in CreamCache
|
// Save start addr of basicblock in CreamCache
|
||||||
ARM_INST_PTR inst_base = nullptr;
|
ARM_INST_PTR inst_base = nullptr;
|
||||||
TransExtData ret = TransExtData::NON_BRANCH;
|
TransExtData ret = TransExtData::NON_BRANCH;
|
||||||
int size = 0; // instruction size of basic block
|
|
||||||
bb_start = trans_cache_buf_top;
|
bb_start = trans_cache_buf_top;
|
||||||
|
|
||||||
u32 phys_addr = addr;
|
u32 phys_addr = addr;
|
||||||
u32 pc_start = cpu->Reg[15];
|
u32 pc_start = cpu->Reg[15];
|
||||||
|
|
||||||
while (ret == TransExtData::NON_BRANCH) {
|
while (ret == TransExtData::NON_BRANCH) {
|
||||||
unsigned int inst_size = InterpreterTranslateInstruction(cpu, phys_addr, inst_base);
|
u32 inst_size = InterpreterTranslateInstruction(cpu, phys_addr, inst_base);
|
||||||
|
|
||||||
size++;
|
|
||||||
|
|
||||||
phys_addr += inst_size;
|
phys_addr += inst_size;
|
||||||
|
|
||||||
if ((phys_addr & 0xfff) == 0) {
|
if ((phys_addr & 0xfff) == 0) {
|
||||||
|
@ -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) {
|
for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) {
|
||||||
u32 except;
|
u32 except;
|
||||||
char type;
|
[[maybe_unused]] char type;
|
||||||
|
|
||||||
type = (fop->flags & OP_SD) ? 's' : 'd';
|
type = (fop->flags & OP_SD) ? 's' : 'd';
|
||||||
if (op == FOP_EXT)
|
if (op == FOP_EXT)
|
||||||
|
@ -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) {
|
for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) {
|
||||||
s32 m = vfp_get_float(state, sm);
|
s32 m = vfp_get_float(state, sm);
|
||||||
u32 except;
|
u32 except;
|
||||||
char type;
|
[[maybe_unused]] char type;
|
||||||
|
|
||||||
type = (fop->flags & OP_DD) ? 'd' : 's';
|
type = (fop->flags & OP_DD) ? 'd' : 's';
|
||||||
if (op == FOP_EXT)
|
if (op == FOP_EXT)
|
||||||
|
@ -301,10 +301,6 @@ private:
|
|||||||
std::vector<std::shared_ptr<Timer>> timers;
|
std::vector<std::shared_ptr<Timer>> timers;
|
||||||
Timer* current_timer = nullptr;
|
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
|
// When true, the event queue can't be modified. Used while deserializing to workaround
|
||||||
// destructor side effects.
|
// destructor side effects.
|
||||||
bool event_queue_locked = false;
|
bool event_queue_locked = false;
|
||||||
|
@ -80,7 +80,7 @@ private:
|
|||||||
std::shared_ptr<Callback> timeout_callback;
|
std::shared_ptr<Callback> timeout_callback;
|
||||||
|
|
||||||
void WakeUp(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
|
void WakeUp(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
|
||||||
std::shared_ptr<WaitObject> object);
|
std::shared_ptr<WaitObject> object) override;
|
||||||
|
|
||||||
class DummyCallback : public WakeupCallback {
|
class DummyCallback : public WakeupCallback {
|
||||||
public:
|
public:
|
||||||
|
@ -265,7 +265,7 @@ ResultCode Process::HeapFree(VAddr target, u32 size) {
|
|||||||
|
|
||||||
// Free heaps block by block
|
// Free heaps block by block
|
||||||
CASCADE_RESULT(auto backing_blocks, vm_manager.GetBackingBlocksForRange(target, size));
|
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);
|
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));
|
CASCADE_RESULT(auto backing_blocks, vm_manager.GetBackingBlocksForRange(source, size));
|
||||||
VAddr interval_target = target;
|
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 =
|
auto target_vma =
|
||||||
vm_manager.MapBackingMemory(interval_target, backing_memory, block_size, target_state);
|
vm_manager.MapBackingMemory(interval_target, backing_memory, block_size, target_state);
|
||||||
ASSERT(target_vma.Succeeded());
|
ASSERT(target_vma.Succeeded());
|
||||||
|
@ -17,12 +17,9 @@
|
|||||||
#include "core/file_sys/errors.h"
|
#include "core/file_sys/errors.h"
|
||||||
#include "core/file_sys/ncch_container.h"
|
#include "core/file_sys/ncch_container.h"
|
||||||
#include "core/file_sys/title_metadata.h"
|
#include "core/file_sys/title_metadata.h"
|
||||||
#include "core/hle/ipc.h"
|
|
||||||
#include "core/hle/ipc_helpers.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/client_session.h"
|
||||||
#include "core/hle/kernel/errors.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/server_session.h"
|
||||||
#include "core/hle/kernel/session.h"
|
#include "core/hle/kernel/session.h"
|
||||||
#include "core/hle/service/am/am.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);
|
std::string tmd_path = GetTitleMetadataPath(media_type, title_id);
|
||||||
|
|
||||||
u32 content_read = 0;
|
|
||||||
FileSys::TitleMetadata tmd;
|
FileSys::TitleMetadata tmd;
|
||||||
if (tmd.Load(tmd_path) == Loader::ResultStatus::Success) {
|
if (tmd.Load(tmd_path) == Loader::ResultStatus::Success) {
|
||||||
std::size_t write_offset = 0;
|
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));
|
content_info_out.Write(&content_info, write_offset, sizeof(ContentInfo));
|
||||||
write_offset += sizeof(ContentInfo);
|
write_offset += sizeof(ContentInfo);
|
||||||
content_read++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common/common_paths.h"
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/hle/applets/applet.h"
|
#include "core/hle/applets/applet.h"
|
||||||
#include "core/hle/service/apt/applet_manager.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::size_t NumApplets = 29;
|
||||||
static constexpr std::array<AppletTitleData, NumApplets> applet_titleids = {{
|
static constexpr std::array<AppletTitleData, NumApplets> applet_titleids = {{
|
||||||
{AppletId::HomeMenu, AppletId::None, 0x4003000008202, 0x4003000008F02, 0x4003000009802,
|
{{AppletId::HomeMenu, AppletId::None}, {0x4003000008202, 0x4003000008F02, 0x4003000009802,
|
||||||
0x4003000008202, 0x400300000A102, 0x400300000A902, 0x400300000B102},
|
0x4003000008202, 0x400300000A102, 0x400300000A902, 0x400300000B102}},
|
||||||
{AppletId::AlternateMenu, AppletId::None, 0x4003000008102, 0x4003000008102, 0x4003000008102,
|
{{AppletId::AlternateMenu, AppletId::None}, {0x4003000008102, 0x4003000008102, 0x4003000008102,
|
||||||
0x4003000008102, 0x4003000008102, 0x4003000008102, 0x4003000008102},
|
0x4003000008102, 0x4003000008102, 0x4003000008102, 0x4003000008102}},
|
||||||
{AppletId::Camera, AppletId::None, 0x4003000008402, 0x4003000009002, 0x4003000009902,
|
{{AppletId::Camera, AppletId::None}, {0x4003000008402, 0x4003000009002, 0x4003000009902,
|
||||||
0x4003000008402, 0x400300000A202, 0x400300000AA02, 0x400300000B202},
|
0x4003000008402, 0x400300000A202, 0x400300000AA02, 0x400300000B202}},
|
||||||
{AppletId::FriendList, AppletId::None, 0x4003000008D02, 0x4003000009602, 0x4003000009F02,
|
{{AppletId::FriendList, AppletId::None}, {0x4003000008D02, 0x4003000009602, 0x4003000009F02,
|
||||||
0x4003000008D02, 0x400300000A702, 0x400300000AF02, 0x400300000B702},
|
0x4003000008D02, 0x400300000A702, 0x400300000AF02, 0x400300000B702}},
|
||||||
{AppletId::GameNotes, AppletId::None, 0x4003000008702, 0x4003000009302, 0x4003000009C02,
|
{{AppletId::GameNotes, AppletId::None}, {0x4003000008702, 0x4003000009302, 0x4003000009C02,
|
||||||
0x4003000008702, 0x400300000A502, 0x400300000AD02, 0x400300000B502},
|
0x4003000008702, 0x400300000A502, 0x400300000AD02, 0x400300000B502}},
|
||||||
{AppletId::InternetBrowser, AppletId::None, 0x4003000008802, 0x4003000009402, 0x4003000009D02,
|
{{AppletId::InternetBrowser, AppletId::None}, {0x4003000008802, 0x4003000009402, 0x4003000009D02,
|
||||||
0x4003000008802, 0x400300000A602, 0x400300000AE02, 0x400300000B602},
|
0x4003000008802, 0x400300000A602, 0x400300000AE02, 0x400300000B602}},
|
||||||
{AppletId::InstructionManual, AppletId::None, 0x4003000008602, 0x4003000009202, 0x4003000009B02,
|
{{AppletId::InstructionManual, AppletId::None}, {0x4003000008602, 0x4003000009202, 0x4003000009B02,
|
||||||
0x4003000008602, 0x400300000A402, 0x400300000AC02, 0x400300000B402},
|
0x4003000008602, 0x400300000A402, 0x400300000AC02, 0x400300000B402}},
|
||||||
{AppletId::Notifications, AppletId::None, 0x4003000008E02, 0x4003000009702, 0x400300000A002,
|
{{AppletId::Notifications, AppletId::None}, {0x4003000008E02, 0x4003000009702, 0x400300000A002,
|
||||||
0x4003000008E02, 0x400300000A802, 0x400300000B002, 0x400300000B802},
|
0x4003000008E02, 0x400300000A802, 0x400300000B002, 0x400300000B802}},
|
||||||
{AppletId::Miiverse, AppletId::None, 0x400300000BC02, 0x400300000BD02, 0x400300000BE02,
|
{{AppletId::Miiverse, AppletId::None}, {0x400300000BC02, 0x400300000BD02, 0x400300000BE02,
|
||||||
0x400300000BC02, 0x4003000009E02, 0x4003000009502, 0x400300000B902},
|
0x400300000BC02, 0x4003000009E02, 0x4003000009502, 0x400300000B902}},
|
||||||
// These values obtained from an older NS dump firmware 4.5
|
// These values obtained from an older NS dump firmware 4.5
|
||||||
{AppletId::MiiversePost, AppletId::None, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02,
|
{{AppletId::MiiversePost, AppletId::None}, {0x400300000BA02, 0x400300000BA02, 0x400300000BA02,
|
||||||
0x400300000BA02, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02},
|
0x400300000BA02, 0x400300000BA02, 0x400300000BA02, 0x400300000BA02}},
|
||||||
// {AppletId::MiiversePost, AppletId::None, 0x4003000008302, 0x4003000008B02, 0x400300000BA02,
|
// {AppletId::MiiversePost, AppletId::None, 0x4003000008302, 0x4003000008B02, 0x400300000BA02,
|
||||||
// 0x4003000008302, 0x0, 0x0, 0x0},
|
// 0x4003000008302, 0x0, 0x0, 0x0},
|
||||||
{AppletId::AmiiboSettings, AppletId::None, 0x4003000009502, 0x4003000009E02, 0x400300000B902,
|
{{AppletId::AmiiboSettings, AppletId::None}, {0x4003000009502, 0x4003000009E02, 0x400300000B902,
|
||||||
0x4003000009502, 0x0, 0x4003000008C02, 0x400300000BF02},
|
0x4003000009502, 0x0, 0x4003000008C02, 0x400300000BF02}},
|
||||||
{AppletId::SoftwareKeyboard1, AppletId::SoftwareKeyboard2, 0x400300000C002, 0x400300000C802,
|
{{AppletId::SoftwareKeyboard1, AppletId::SoftwareKeyboard2}, {0x400300000C002, 0x400300000C802,
|
||||||
0x400300000D002, 0x400300000C002, 0x400300000D802, 0x400300000DE02, 0x400300000E402},
|
0x400300000D002, 0x400300000C002, 0x400300000D802, 0x400300000DE02, 0x400300000E402}},
|
||||||
{AppletId::Ed1, AppletId::Ed2, 0x400300000C102, 0x400300000C902, 0x400300000D102,
|
{{AppletId::Ed1, AppletId::Ed2}, {0x400300000C102, 0x400300000C902, 0x400300000D102,
|
||||||
0x400300000C102, 0x400300000D902, 0x400300000DF02, 0x400300000E502},
|
0x400300000C102, 0x400300000D902, 0x400300000DF02, 0x400300000E502}},
|
||||||
{AppletId::PnoteApp, AppletId::PnoteApp2, 0x400300000C302, 0x400300000CB02, 0x400300000D302,
|
{{AppletId::PnoteApp, AppletId::PnoteApp2}, {0x400300000C302, 0x400300000CB02, 0x400300000D302,
|
||||||
0x400300000C302, 0x400300000DB02, 0x400300000E102, 0x400300000E702},
|
0x400300000C302, 0x400300000DB02, 0x400300000E102, 0x400300000E702}},
|
||||||
{AppletId::SnoteApp, AppletId::SnoteApp2, 0x400300000C402, 0x400300000CC02, 0x400300000D402,
|
{{AppletId::SnoteApp, AppletId::SnoteApp2}, {0x400300000C402, 0x400300000CC02, 0x400300000D402,
|
||||||
0x400300000C402, 0x400300000DC02, 0x400300000E202, 0x400300000E802},
|
0x400300000C402, 0x400300000DC02, 0x400300000E202, 0x400300000E802}},
|
||||||
{AppletId::Error, AppletId::Error2, 0x400300000C502, 0x400300000C502, 0x400300000C502,
|
{{AppletId::Error, AppletId::Error2}, {0x400300000C502, 0x400300000C502, 0x400300000C502,
|
||||||
0x400300000C502, 0x400300000CF02, 0x400300000CF02, 0x400300000CF02},
|
0x400300000C502, 0x400300000CF02, 0x400300000CF02, 0x400300000CF02}},
|
||||||
{AppletId::Mint, AppletId::Mint2, 0x400300000C602, 0x400300000CE02, 0x400300000D602,
|
{{AppletId::Mint, AppletId::Mint2}, {0x400300000C602, 0x400300000CE02, 0x400300000D602,
|
||||||
0x400300000C602, 0x400300000DD02, 0x400300000E302, 0x400300000E902},
|
0x400300000C602, 0x400300000DD02, 0x400300000E302, 0x400300000E902}},
|
||||||
{AppletId::Extrapad, AppletId::Extrapad2, 0x400300000CD02, 0x400300000CD02, 0x400300000CD02,
|
{{AppletId::Extrapad, AppletId::Extrapad2}, {0x400300000CD02, 0x400300000CD02, 0x400300000CD02,
|
||||||
0x400300000CD02, 0x400300000D502, 0x400300000D502, 0x400300000D502},
|
0x400300000CD02, 0x400300000D502, 0x400300000D502, 0x400300000D502}},
|
||||||
{AppletId::Memolib, AppletId::Memolib2, 0x400300000F602, 0x400300000F602, 0x400300000F602,
|
{{AppletId::Memolib, AppletId::Memolib2}, {0x400300000F602, 0x400300000F602, 0x400300000F602,
|
||||||
0x400300000F602, 0x400300000F602, 0x400300000F602, 0x400300000F602},
|
0x400300000F602, 0x400300000F602, 0x400300000F602, 0x400300000F602}},
|
||||||
// TODO(Subv): Fill in the rest of the titleids
|
// TODO(Subv): Fill in the rest of the titleids
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include <cryptopp/osrng.h>
|
#include <cryptopp/osrng.h>
|
||||||
#include <cryptopp/sha.h>
|
#include <cryptopp/sha.h>
|
||||||
#include "common/archives.h"
|
#include "common/archives.h"
|
||||||
#include "common/common_paths.h"
|
|
||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/string_util.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 EULAVersion MAX_EULA_VERSION{0x7F, 0x7F};
|
||||||
constexpr ConsoleModelInfo CONSOLE_MODEL_OLD{NINTENDO_3DS_XL, {0, 0, 0}};
|
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 u8 CONSOLE_LANGUAGE = LANGUAGE_EN;
|
||||||
constexpr UsernameBlock CONSOLE_USERNAME_BLOCK{u"CITRA", 0, 0};
|
constexpr UsernameBlock CONSOLE_USERNAME_BLOCK{u"CITRA", 0, 0};
|
||||||
constexpr BirthdayBlock PROFILE_BIRTHDAY{3, 25}; // March 25th, 2014
|
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) {
|
void Module::Interface::GetModelNintendo2DS(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp(ctx, 0x06, 0, 0);
|
IPC::RequestParser rp(ctx, 0x06, 0, 0);
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
|
||||||
u32 data;
|
u32 data{};
|
||||||
|
|
||||||
// TODO(Subv): Find out the correct error codes
|
// TODO(Subv): Find out the correct error codes
|
||||||
rb.Push(cfg->GetConfigInfoBlock(ConsoleModelBlockID, 4, 0x8, reinterpret_cast<u8*>(&data)));
|
rb.Push(cfg->GetConfigInfoBlock(ConsoleModelBlockID, 4, 0x8, reinterpret_cast<u8*>(&data)));
|
||||||
@ -370,7 +368,7 @@ ResultVal<void*> Module::GetConfigInfoBlockPointer(u32 block_id, u32 size, u32 f
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResultCode Module::GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, void* output) {
|
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));
|
CASCADE_RESULT(pointer, GetConfigInfoBlockPointer(block_id, size, flag));
|
||||||
memcpy(output, pointer, size);
|
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) {
|
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));
|
CASCADE_RESULT(pointer, GetConfigInfoBlockPointer(block_id, size, flag));
|
||||||
memcpy(pointer, input, size);
|
memcpy(pointer, input, size);
|
||||||
return RESULT_SUCCESS;
|
return RESULT_SUCCESS;
|
||||||
@ -701,7 +699,7 @@ void Module::SetSystemLanguage(SystemLanguage language) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SystemLanguage Module::GetSystemLanguage() {
|
SystemLanguage Module::GetSystemLanguage() {
|
||||||
u8 block;
|
u8 block{};
|
||||||
GetConfigInfoBlock(LanguageBlockID, sizeof(block), 8, &block);
|
GetConfigInfoBlock(LanguageBlockID, sizeof(block), 8, &block);
|
||||||
return static_cast<SystemLanguage>(block);
|
return static_cast<SystemLanguage>(block);
|
||||||
}
|
}
|
||||||
@ -712,7 +710,7 @@ void Module::SetSoundOutputMode(SoundOutputMode mode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SoundOutputMode Module::GetSoundOutputMode() {
|
SoundOutputMode Module::GetSoundOutputMode() {
|
||||||
u8 block;
|
u8 block{};
|
||||||
GetConfigInfoBlock(SoundOutputModeBlockID, sizeof(block), 8, &block);
|
GetConfigInfoBlock(SoundOutputModeBlockID, sizeof(block), 8, &block);
|
||||||
return static_cast<SoundOutputMode>(block);
|
return static_cast<SoundOutputMode>(block);
|
||||||
}
|
}
|
||||||
@ -723,7 +721,7 @@ void Module::SetCountryCode(u8 country_code) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u8 Module::GetCountryCode() {
|
u8 Module::GetCountryCode() {
|
||||||
ConsoleCountryInfo block;
|
ConsoleCountryInfo block{};
|
||||||
GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block);
|
GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block);
|
||||||
return block.country_code;
|
return block.country_code;
|
||||||
}
|
}
|
||||||
@ -734,7 +732,7 @@ void Module::SetCountryInfo(u8 country_code, u8 state_code) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u8 Module::GetStateCode() {
|
u8 Module::GetStateCode() {
|
||||||
ConsoleCountryInfo block;
|
ConsoleCountryInfo block{};
|
||||||
GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block);
|
GetConfigInfoBlock(CountryInfoBlockID, sizeof(block), 8, &block);
|
||||||
return block.state_code;
|
return block.state_code;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,9 @@ void DSP_DSP::WriteProcessPipe(Kernel::HLERequestContext& ctx) {
|
|||||||
buffer[6] = 0;
|
buffer[6] = 0;
|
||||||
buffer[7] = 0;
|
buffer[7] = 0;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
LOG_ERROR(Service_DSP, "Unknown pipe {}", pipe);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
system.DSP().PipeWrite(pipe, buffer);
|
system.DSP().PipeWrite(pipe, buffer);
|
||||||
|
@ -884,6 +884,8 @@ ResultVal<u16> FS_USER::GetSpecialContentIndexFromTMD(MediaType media_type, u64
|
|||||||
default:
|
default:
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ResultCode(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_USER::FS_USER(Core::System& system)
|
FS_USER::FS_USER(Core::System& system)
|
||||||
|
@ -92,7 +92,8 @@ u16 NWM_UDS::GetNextAvailableNodeId() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Any connection attempts to an already full network should have been refused.
|
// 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() {
|
void NWM_UDS::BroadcastNodeMap() {
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
|
|
||||||
namespace Service::NWM {
|
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.
|
constexpr u64 DefaultNetworkUptime = 900000000; // 15 minutes in microseconds.
|
||||||
|
|
||||||
// Note: These values were taken from a packet capture of an o3DS XL
|
// Note: These values were taken from a packet capture of an o3DS XL
|
||||||
|
@ -178,15 +178,6 @@ static const std::unordered_map<int, int> sockopt_map = {{
|
|||||||
{0x1009, SO_ERROR},
|
{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
|
/// Structure to represent the 3ds' pollfd structure, which is different than most implementations
|
||||||
struct CTRPollFD {
|
struct CTRPollFD {
|
||||||
u32 fd; ///< Socket handle
|
u32 fd; ///< Socket handle
|
||||||
|
@ -255,7 +255,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Regs& regs;
|
[[maybe_unused]] const Regs& regs;
|
||||||
Shader::ShaderSetup& setup;
|
Shader::ShaderSetup& setup;
|
||||||
Common::Vec4<float24>* buffer_begin;
|
Common::Vec4<float24>* buffer_begin;
|
||||||
Common::Vec4<float24>* buffer_cur;
|
Common::Vec4<float24>* buffer_cur;
|
||||||
|
@ -153,35 +153,6 @@ struct ScreenRectVertex {
|
|||||||
|
|
||||||
constexpr u32 VERTEX_BUFFER_SIZE = sizeof(ScreenRectVertex) * 8192;
|
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<float, 3 * 2> MakeOrthographicMatrix(float width, float height, bool flipped) {
|
|
||||||
|
|
||||||
std::array<float, 3 * 2> 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)
|
RendererVulkan::RendererVulkan(Frontend::EmuWindow& window)
|
||||||
: RendererBase{window}, instance{window, Settings::values.renderer_debug}, scheduler{instance, *this},
|
: RendererBase{window}, instance{window, Settings::values.renderer_debug}, scheduler{instance, *this},
|
||||||
renderpass_cache{instance, scheduler}, runtime{instance, scheduler, renderpass_cache},
|
renderpass_cache{instance, scheduler}, runtime{instance, scheduler, renderpass_cache},
|
||||||
|
@ -13,7 +13,7 @@ struct ShaderRegs;
|
|||||||
|
|
||||||
namespace Pica::Shader {
|
namespace Pica::Shader {
|
||||||
|
|
||||||
class ShaderSetup;
|
struct ShaderSetup;
|
||||||
|
|
||||||
enum class UniformBindings : u32 { Common, VS, GS };
|
enum class UniformBindings : u32 { Common, VS, GS };
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float24 pos;
|
[[maybe_unused]] float24 pos;
|
||||||
Common::Vec4<float24> coeffs;
|
Common::Vec4<float24> coeffs;
|
||||||
Common::Vec4<float24> bias;
|
Common::Vec4<float24> bias;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user