mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Fix all uninitialized variable warnings (C26495)
This commit is contained in:
@ -16,10 +16,10 @@ namespace ActionReplay
|
||||
{
|
||||
struct AREntry
|
||||
{
|
||||
AREntry() {}
|
||||
AREntry() = default;
|
||||
AREntry(u32 _addr, u32 _value) : cmd_addr(_addr), value(_value) {}
|
||||
u32 cmd_addr;
|
||||
u32 value;
|
||||
u32 cmd_addr = 0;
|
||||
u32 value = 0;
|
||||
};
|
||||
constexpr bool operator==(const AREntry& left, const AREntry& right)
|
||||
{
|
||||
|
@ -64,44 +64,44 @@ public:
|
||||
|
||||
// These store if the relevant setting should be reset back later (true) or if it should be left
|
||||
// alone on restore (false)
|
||||
bool bSetEmulationSpeed;
|
||||
bool bSetVolume;
|
||||
std::array<bool, MAX_BBMOTES> bSetWiimoteSource;
|
||||
std::array<bool, SerialInterface::MAX_SI_CHANNELS> bSetPads;
|
||||
std::array<bool, ExpansionInterface::MAX_EXI_CHANNELS> bSetEXIDevice;
|
||||
bool bSetEmulationSpeed = false;
|
||||
bool bSetVolume = false;
|
||||
std::array<bool, MAX_BBMOTES> bSetWiimoteSource{};
|
||||
std::array<bool, SerialInterface::MAX_SI_CHANNELS> bSetPads{};
|
||||
std::array<bool, ExpansionInterface::MAX_EXI_CHANNELS> bSetEXIDevice{};
|
||||
|
||||
private:
|
||||
bool valid;
|
||||
bool bCPUThread;
|
||||
bool bJITFollowBranch;
|
||||
bool bSyncGPUOnSkipIdleHack;
|
||||
bool bFloatExceptions;
|
||||
bool bDivideByZeroExceptions;
|
||||
bool bFPRF;
|
||||
bool bAccurateNaNs;
|
||||
bool bMMU;
|
||||
bool bLowDCBZHack;
|
||||
bool bDisableICache;
|
||||
bool m_EnableJIT;
|
||||
bool bSyncGPU;
|
||||
int iSyncGpuMaxDistance;
|
||||
int iSyncGpuMinDistance;
|
||||
float fSyncGpuOverclock;
|
||||
bool bFastDiscSpeed;
|
||||
bool bDSPHLE;
|
||||
bool bHLE_BS2;
|
||||
int iSelectedLanguage;
|
||||
PowerPC::CPUCore cpu_core;
|
||||
int Volume;
|
||||
float m_EmulationSpeed;
|
||||
float m_OCFactor;
|
||||
bool m_OCEnable;
|
||||
bool m_bt_passthrough_enabled;
|
||||
bool valid = false;
|
||||
bool bCPUThread = false;
|
||||
bool bJITFollowBranch = false;
|
||||
bool bSyncGPUOnSkipIdleHack = false;
|
||||
bool bFloatExceptions = false;
|
||||
bool bDivideByZeroExceptions = false;
|
||||
bool bFPRF = false;
|
||||
bool bAccurateNaNs = false;
|
||||
bool bMMU = false;
|
||||
bool bLowDCBZHack = false;
|
||||
bool bDisableICache = false;
|
||||
bool m_EnableJIT = false;
|
||||
bool bSyncGPU = false;
|
||||
int iSyncGpuMaxDistance = 0;
|
||||
int iSyncGpuMinDistance = 0;
|
||||
float fSyncGpuOverclock = 0;
|
||||
bool bFastDiscSpeed = false;
|
||||
bool bDSPHLE = false;
|
||||
bool bHLE_BS2 = false;
|
||||
int iSelectedLanguage = 0;
|
||||
PowerPC::CPUCore cpu_core = PowerPC::CPUCore::Interpreter;
|
||||
int Volume = 0;
|
||||
float m_EmulationSpeed = 0;
|
||||
float m_OCFactor = 0;
|
||||
bool m_OCEnable = false;
|
||||
bool m_bt_passthrough_enabled = false;
|
||||
std::string sBackend;
|
||||
std::string m_strGPUDeterminismMode;
|
||||
std::array<WiimoteSource, MAX_BBMOTES> iWiimoteSource;
|
||||
std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS> Pads;
|
||||
std::array<ExpansionInterface::TEXIDevices, ExpansionInterface::MAX_EXI_CHANNELS> m_EXIDevice;
|
||||
std::array<WiimoteSource, MAX_BBMOTES> iWiimoteSource{};
|
||||
std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS> Pads{};
|
||||
std::array<ExpansionInterface::TEXIDevices, ExpansionInterface::MAX_EXI_CHANNELS> m_EXIDevice{};
|
||||
};
|
||||
|
||||
void ConfigCache::SaveConfig(const SConfig& config)
|
||||
|
@ -279,10 +279,10 @@ struct DSP_Regs
|
||||
struct DSPInitOptions
|
||||
{
|
||||
// DSP IROM blob, which is where the DSP boots from. Embedded into the DSP.
|
||||
std::array<u16, DSP_IROM_SIZE> irom_contents;
|
||||
std::array<u16, DSP_IROM_SIZE> irom_contents{};
|
||||
|
||||
// DSP DROM blob, which contains resampling coefficients.
|
||||
std::array<u16, DSP_COEF_SIZE> coef_contents;
|
||||
std::array<u16, DSP_COEF_SIZE> coef_contents{};
|
||||
|
||||
// Core used to emulate the DSP.
|
||||
// Default: JIT64.
|
||||
|
@ -100,8 +100,7 @@ static Gen::OpArg GetRegisterPointer(size_t reg)
|
||||
#define STATIC_REG_ACCS
|
||||
//#undef STATIC_REG_ACCS
|
||||
|
||||
DSPJitRegCache::DSPJitRegCache(DSPEmitter& emitter)
|
||||
: m_emitter(emitter), m_is_temporary(false), m_is_merged(false)
|
||||
DSPJitRegCache::DSPJitRegCache(DSPEmitter& emitter) : m_emitter(emitter), m_is_temporary(false)
|
||||
{
|
||||
for (X64CachedReg& xreg : m_xregs)
|
||||
{
|
||||
@ -188,13 +187,10 @@ DSPJitRegCache::DSPJitRegCache(DSPEmitter& emitter)
|
||||
m_regs[i + DSP_REG_AXL0].shift = 0;
|
||||
m_regs[i + DSP_REG_AXH0].shift = 16;
|
||||
}
|
||||
|
||||
m_use_ctr = 0;
|
||||
}
|
||||
|
||||
DSPJitRegCache::DSPJitRegCache(const DSPJitRegCache& cache)
|
||||
: m_regs(cache.m_regs), m_xregs(cache.m_xregs), m_emitter(cache.m_emitter),
|
||||
m_is_temporary(true), m_is_merged(false)
|
||||
: m_regs(cache.m_regs), m_xregs(cache.m_xregs), m_emitter(cache.m_emitter), m_is_temporary(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -170,14 +170,14 @@ private:
|
||||
void MovToMemory(size_t reg);
|
||||
void FlushMemBackedRegs();
|
||||
|
||||
std::array<DynamicReg, 37> m_regs;
|
||||
std::array<X64CachedReg, 16> m_xregs;
|
||||
std::array<DynamicReg, 37> m_regs{};
|
||||
std::array<X64CachedReg, 16> m_xregs{};
|
||||
|
||||
DSPEmitter& m_emitter;
|
||||
bool m_is_temporary;
|
||||
bool m_is_merged;
|
||||
bool m_is_merged = false;
|
||||
|
||||
int m_use_ctr;
|
||||
int m_use_ctr = 0;
|
||||
};
|
||||
|
||||
} // namespace DSP::JIT::x64
|
||||
|
@ -15,7 +15,7 @@ namespace Dolphin_Debugger
|
||||
struct CallstackEntry
|
||||
{
|
||||
std::string Name;
|
||||
u32 vAddress;
|
||||
u32 vAddress = 0;
|
||||
};
|
||||
|
||||
bool GetCallstack(std::vector<CallstackEntry>& output);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/IOFile.h"
|
||||
|
||||
CDump::CDump(const std::string& filename) : m_pData(nullptr)
|
||||
CDump::CDump(const std::string& filename)
|
||||
{
|
||||
File::IOFile pStream(filename, "rb");
|
||||
if (pStream)
|
||||
|
@ -27,9 +27,9 @@ private:
|
||||
STRUCTUR_SIZE = 0x2BC
|
||||
};
|
||||
|
||||
u8* m_pData;
|
||||
u8* m_pData = nullptr;
|
||||
|
||||
size_t m_size;
|
||||
size_t m_size = 0;
|
||||
|
||||
u32 Read32(u32 _pos);
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ public:
|
||||
u32 GetImportsNameTable() const;
|
||||
|
||||
private:
|
||||
RSOHeader m_header;
|
||||
RSOHeader m_header{};
|
||||
std::string m_name;
|
||||
u32 m_address = 0;
|
||||
};
|
||||
|
@ -22,8 +22,8 @@ struct CPMemory
|
||||
{
|
||||
TVtxDesc vtxDesc;
|
||||
std::array<VAT, CP_NUM_VAT_REG> vtxAttr;
|
||||
std::array<u32, CP_NUM_ARRAYS> arrayBases;
|
||||
std::array<u32, CP_NUM_ARRAYS> arrayStrides;
|
||||
std::array<u32, CP_NUM_ARRAYS> arrayBases{};
|
||||
std::array<u32, CP_NUM_ARRAYS> arrayStrides{};
|
||||
};
|
||||
|
||||
void LoadCPReg(u32 subCmd, u32 value, CPMemory& cpMem);
|
||||
|
@ -120,19 +120,19 @@ bool FifoDataFile::Save(const std::string& filename)
|
||||
PadFile(m_Frames.size() * sizeof(FileFrameInfo), file);
|
||||
|
||||
u64 bpMemOffset = file.Tell();
|
||||
file.WriteArray(m_BPMem, BP_MEM_SIZE);
|
||||
file.WriteArray(m_BPMem);
|
||||
|
||||
u64 cpMemOffset = file.Tell();
|
||||
file.WriteArray(m_CPMem, CP_MEM_SIZE);
|
||||
file.WriteArray(m_CPMem);
|
||||
|
||||
u64 xfMemOffset = file.Tell();
|
||||
file.WriteArray(m_XFMem, XF_MEM_SIZE);
|
||||
file.WriteArray(m_XFMem);
|
||||
|
||||
u64 xfRegsOffset = file.Tell();
|
||||
file.WriteArray(m_XFRegs, XF_REGS_SIZE);
|
||||
file.WriteArray(m_XFRegs);
|
||||
|
||||
u64 texMemOffset = file.Tell();
|
||||
file.WriteArray(m_TexMem, TEX_MEM_SIZE);
|
||||
file.WriteArray(m_TexMem);
|
||||
|
||||
// Write header
|
||||
FileHeader header;
|
||||
@ -285,27 +285,27 @@ std::unique_ptr<FifoDataFile> FifoDataFile::Load(const std::string& filename, bo
|
||||
|
||||
u32 size = std::min<u32>(BP_MEM_SIZE, header.bpMemSize);
|
||||
file.Seek(header.bpMemOffset, SEEK_SET);
|
||||
file.ReadArray(dataFile->m_BPMem, size);
|
||||
file.ReadArray(&dataFile->m_BPMem);
|
||||
|
||||
size = std::min<u32>(CP_MEM_SIZE, header.cpMemSize);
|
||||
file.Seek(header.cpMemOffset, SEEK_SET);
|
||||
file.ReadArray(dataFile->m_CPMem, size);
|
||||
file.ReadArray(&dataFile->m_CPMem);
|
||||
|
||||
size = std::min<u32>(XF_MEM_SIZE, header.xfMemSize);
|
||||
file.Seek(header.xfMemOffset, SEEK_SET);
|
||||
file.ReadArray(dataFile->m_XFMem, size);
|
||||
file.ReadArray(&dataFile->m_XFMem);
|
||||
|
||||
size = std::min<u32>(XF_REGS_SIZE, header.xfRegsSize);
|
||||
file.Seek(header.xfRegsOffset, SEEK_SET);
|
||||
file.ReadArray(dataFile->m_XFRegs, size);
|
||||
file.ReadArray(&dataFile->m_XFRegs);
|
||||
|
||||
// Texture memory saving was added in version 4.
|
||||
std::memset(dataFile->m_TexMem, 0, TEX_MEM_SIZE);
|
||||
dataFile->m_TexMem.fill(0);
|
||||
if (dataFile->m_Version >= 4)
|
||||
{
|
||||
size = std::min<u32>(TEX_MEM_SIZE, header.texMemSize);
|
||||
file.Seek(header.texMemOffset, SEEK_SET);
|
||||
file.ReadArray(dataFile->m_TexMem, size);
|
||||
file.ReadArray(&dataFile->m_TexMem);
|
||||
}
|
||||
|
||||
if (!file.IsGood())
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -25,18 +26,18 @@ struct MemoryUpdate
|
||||
TMEM = 0x08,
|
||||
};
|
||||
|
||||
u32 fifoPosition;
|
||||
u32 address;
|
||||
u32 fifoPosition = 0;
|
||||
u32 address = 0;
|
||||
std::vector<u8> data;
|
||||
Type type;
|
||||
Type type{};
|
||||
};
|
||||
|
||||
struct FifoFrameInfo
|
||||
{
|
||||
std::vector<u8> fifoData;
|
||||
|
||||
u32 fifoStart;
|
||||
u32 fifoEnd;
|
||||
u32 fifoStart = 0;
|
||||
u32 fifoEnd = 0;
|
||||
|
||||
// Must be sorted by fifoPosition
|
||||
std::vector<MemoryUpdate> memoryUpdates;
|
||||
@ -63,11 +64,11 @@ public:
|
||||
bool HasBrokenEFBCopies() const;
|
||||
bool ShouldGenerateFakeVIUpdates() const;
|
||||
|
||||
u32* GetBPMem() { return m_BPMem; }
|
||||
u32* GetCPMem() { return m_CPMem; }
|
||||
u32* GetXFMem() { return m_XFMem; }
|
||||
u32* GetXFRegs() { return m_XFRegs; }
|
||||
u8* GetTexMem() { return m_TexMem; }
|
||||
u32* GetBPMem() { return m_BPMem.data(); }
|
||||
u32* GetCPMem() { return m_CPMem.data(); }
|
||||
u32* GetXFMem() { return m_XFMem.data(); }
|
||||
u32* GetXFRegs() { return m_XFRegs.data(); }
|
||||
u8* GetTexMem() { return m_TexMem.data(); }
|
||||
u32 GetRamSizeReal() { return m_ram_size_real; }
|
||||
u32 GetExRamSizeReal() { return m_exram_size_real; }
|
||||
|
||||
@ -93,13 +94,13 @@ private:
|
||||
static void ReadMemoryUpdates(u64 fileOffset, u32 numUpdates,
|
||||
std::vector<MemoryUpdate>& memUpdates, File::IOFile& file);
|
||||
|
||||
u32 m_BPMem[BP_MEM_SIZE];
|
||||
u32 m_CPMem[CP_MEM_SIZE];
|
||||
u32 m_XFMem[XF_MEM_SIZE];
|
||||
u32 m_XFRegs[XF_REGS_SIZE];
|
||||
u8 m_TexMem[TEX_MEM_SIZE];
|
||||
u32 m_ram_size_real;
|
||||
u32 m_exram_size_real;
|
||||
std::array<u32, BP_MEM_SIZE> m_BPMem{};
|
||||
std::array<u32, CP_MEM_SIZE> m_CPMem{};
|
||||
std::array<u32, XF_MEM_SIZE> m_XFMem{};
|
||||
std::array<u32, XF_REGS_SIZE> m_XFRegs{};
|
||||
std::array<u8, TEX_MEM_SIZE> m_TexMem{};
|
||||
u32 m_ram_size_real = 0;
|
||||
u32 m_exram_size_real = 0;
|
||||
|
||||
u32 m_Flags = 0;
|
||||
u32 m_Version = 0;
|
||||
|
@ -354,8 +354,8 @@ struct SmallBlockAccessors : Accessors
|
||||
}
|
||||
|
||||
private:
|
||||
u8** alloc_base;
|
||||
u32 size;
|
||||
u8** alloc_base = nullptr;
|
||||
u32 size = 0;
|
||||
};
|
||||
|
||||
struct NullAccessors : Accessors
|
||||
|
@ -82,24 +82,24 @@ protected:
|
||||
};
|
||||
|
||||
// 32 * 5 because 32 samples per millisecond, for max 5 milliseconds.
|
||||
int m_samples_left[32 * 5];
|
||||
int m_samples_right[32 * 5];
|
||||
int m_samples_surround[32 * 5];
|
||||
int m_samples_auxA_left[32 * 5];
|
||||
int m_samples_auxA_right[32 * 5];
|
||||
int m_samples_auxA_surround[32 * 5];
|
||||
int m_samples_auxB_left[32 * 5];
|
||||
int m_samples_auxB_right[32 * 5];
|
||||
int m_samples_auxB_surround[32 * 5];
|
||||
int m_samples_left[32 * 5]{};
|
||||
int m_samples_right[32 * 5]{};
|
||||
int m_samples_surround[32 * 5]{};
|
||||
int m_samples_auxA_left[32 * 5]{};
|
||||
int m_samples_auxA_right[32 * 5]{};
|
||||
int m_samples_auxA_surround[32 * 5]{};
|
||||
int m_samples_auxB_left[32 * 5]{};
|
||||
int m_samples_auxB_right[32 * 5]{};
|
||||
int m_samples_auxB_surround[32 * 5]{};
|
||||
|
||||
u16 m_cmdlist[512];
|
||||
u16 m_cmdlist[512]{};
|
||||
u32 m_cmdlist_size = 0;
|
||||
|
||||
// Table of coefficients for polyphase sample rate conversion.
|
||||
// The coefficients aren't always available (they are part of the DSP DROM)
|
||||
// so we also need to know if they are valid or not.
|
||||
std::optional<u32> m_coeffs_checksum = std::nullopt;
|
||||
std::array<s16, 0x800> m_coeffs;
|
||||
std::array<s16, 0x800> m_coeffs{};
|
||||
|
||||
u16 m_compressor_pos = 0;
|
||||
|
||||
|
@ -21,27 +21,27 @@ public:
|
||||
|
||||
protected:
|
||||
// Additional AUX buffers
|
||||
int m_samples_auxC_left[32 * 3];
|
||||
int m_samples_auxC_right[32 * 3];
|
||||
int m_samples_auxC_surround[32 * 3];
|
||||
int m_samples_auxC_left[32 * 3]{};
|
||||
int m_samples_auxC_right[32 * 3]{};
|
||||
int m_samples_auxC_surround[32 * 3]{};
|
||||
|
||||
// Wiimote buffers
|
||||
int m_samples_wm0[6 * 3];
|
||||
int m_samples_aux0[6 * 3];
|
||||
int m_samples_wm1[6 * 3];
|
||||
int m_samples_aux1[6 * 3];
|
||||
int m_samples_wm2[6 * 3];
|
||||
int m_samples_aux2[6 * 3];
|
||||
int m_samples_wm3[6 * 3];
|
||||
int m_samples_aux3[6 * 3];
|
||||
int m_samples_wm0[6 * 3]{};
|
||||
int m_samples_aux0[6 * 3]{};
|
||||
int m_samples_wm1[6 * 3]{};
|
||||
int m_samples_aux1[6 * 3]{};
|
||||
int m_samples_wm2[6 * 3]{};
|
||||
int m_samples_aux2[6 * 3]{};
|
||||
int m_samples_wm3[6 * 3]{};
|
||||
int m_samples_aux3[6 * 3]{};
|
||||
|
||||
// Are we implementing an old version of AXWii which still has updates?
|
||||
bool m_old_axwii;
|
||||
bool m_old_axwii = false;
|
||||
|
||||
// Last volume values for MAIN and AUX. Used to generate volume ramps to
|
||||
// interpolate nicely between old and new volume values.
|
||||
u16 m_last_main_volume;
|
||||
u16 m_last_aux_volumes[3];
|
||||
u16 m_last_main_volume = 0;
|
||||
u16 m_last_aux_volumes[3]{};
|
||||
|
||||
// If needed, extract the updates related fields from a PB. We need to
|
||||
// reinject them afterwards so that the correct PB typs is written to RAM.
|
||||
|
@ -37,26 +37,26 @@ namespace DVDThread
|
||||
{
|
||||
struct ReadRequest
|
||||
{
|
||||
bool copy_to_ram;
|
||||
u32 output_address;
|
||||
u64 dvd_offset;
|
||||
u32 length;
|
||||
DiscIO::Partition partition;
|
||||
bool copy_to_ram = false;
|
||||
u32 output_address = 0;
|
||||
u64 dvd_offset = 0;
|
||||
u32 length = 0;
|
||||
DiscIO::Partition partition{};
|
||||
|
||||
// This determines which code DVDInterface will run to reply
|
||||
// to the emulated software. We can't use callbacks,
|
||||
// because function pointers can't be stored in savestates.
|
||||
DVDInterface::ReplyType reply_type;
|
||||
DVDInterface::ReplyType reply_type = DVDInterface::ReplyType::NoReply;
|
||||
|
||||
// IDs are used to uniquely identify a request. They must not be
|
||||
// identical to IDs of any other requests that currently exist, but
|
||||
// it's fine to re-use IDs of requests that have existed in the past.
|
||||
u64 id;
|
||||
u64 id = 0;
|
||||
|
||||
// Only used for logging
|
||||
u64 time_started_ticks;
|
||||
u64 realtime_started_us;
|
||||
u64 realtime_done_us;
|
||||
u64 time_started_ticks = 0;
|
||||
u64 realtime_started_us = 0;
|
||||
u64 realtime_done_us = 0;
|
||||
};
|
||||
|
||||
using ReadResult = std::pair<ReadRequest, std::vector<u8>>;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
// For savestates. storing it here seemed cleaner than requiring each implementation to report its
|
||||
// type. I know this class is set up like an interface, but no code requires it to be strictly
|
||||
// such.
|
||||
TEXIDevices m_device_type;
|
||||
TEXIDevices m_device_type = TEXIDevices::EXIDEVICE_NONE;
|
||||
|
||||
private:
|
||||
// Byte transfer function for this device
|
||||
|
@ -404,8 +404,8 @@ private:
|
||||
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
|
||||
sf::UdpSocket m_sf_socket;
|
||||
sf::IpAddress m_sf_recipient_ip;
|
||||
char m_in_frame[9004];
|
||||
char m_out_frame[9004];
|
||||
char m_in_frame[9004]{};
|
||||
char m_out_frame[9004]{};
|
||||
std::thread m_read_thread;
|
||||
Common::Flag m_read_enabled;
|
||||
Common::Flag m_read_thread_shutdown;
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
DEntry m_gci_header;
|
||||
std::vector<GCMBlock> m_save_data;
|
||||
std::vector<u16> m_used_blocks;
|
||||
bool m_dirty;
|
||||
bool m_dirty = false;
|
||||
std::string m_filename;
|
||||
};
|
||||
} // namespace Memcard
|
||||
|
@ -82,7 +82,7 @@ private:
|
||||
struct GCMemcardAnimationFrameRGBA8
|
||||
{
|
||||
std::vector<u32> image_data;
|
||||
u8 delay;
|
||||
u8 delay = 0;
|
||||
};
|
||||
|
||||
// size of a single memory card block in bytes
|
||||
|
@ -23,10 +23,8 @@ public:
|
||||
virtual void ClearAll() = 0;
|
||||
virtual void DoState(PointerWrap& p) = 0;
|
||||
u32 GetCardId() const { return m_nintendo_card_id; }
|
||||
bool IsAddressInBounds(u32 address) const { return address <= (m_memory_card_size - 1); }
|
||||
|
||||
protected:
|
||||
int m_card_index;
|
||||
u16 m_nintendo_card_id;
|
||||
u32 m_memory_card_size;
|
||||
};
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
void DoState(PointerWrap& p) override;
|
||||
|
||||
private:
|
||||
bool IsAddressInBounds(u32 address) const { return address <= (m_memory_card_size - 1); }
|
||||
|
||||
std::string m_filename;
|
||||
std::unique_ptr<u8[]> m_memcard_data;
|
||||
std::unique_ptr<u8[]> m_flush_buffer;
|
||||
@ -38,4 +40,5 @@ private:
|
||||
std::mutex m_flush_mutex;
|
||||
Common::Event m_flush_trigger;
|
||||
Common::Flag m_dirty;
|
||||
u32 m_memory_card_size;
|
||||
};
|
||||
|
@ -96,9 +96,9 @@ union USIChannelIn_Lo
|
||||
// SI Channel
|
||||
struct SSIChannel
|
||||
{
|
||||
USIChannelOut out;
|
||||
USIChannelIn_Hi in_hi;
|
||||
USIChannelIn_Lo in_lo;
|
||||
USIChannelOut out{};
|
||||
USIChannelIn_Hi in_hi{};
|
||||
USIChannelIn_Lo in_lo{};
|
||||
std::unique_ptr<ISIDevice> device;
|
||||
|
||||
bool has_recent_device_change = false;
|
||||
|
@ -60,7 +60,7 @@ private:
|
||||
|
||||
GBASockServer m_sock_server;
|
||||
NextAction m_next_action = NextAction::SendCommand;
|
||||
EBufferCommands m_last_cmd;
|
||||
EBufferCommands m_last_cmd = EBufferCommands::CMD_STATUS;
|
||||
u64 m_timestamp_sent = 0;
|
||||
};
|
||||
} // namespace SerialInterface
|
||||
|
@ -91,8 +91,9 @@ public:
|
||||
File = 1,
|
||||
Directory = 2,
|
||||
};
|
||||
u8 mode, attributes;
|
||||
Type type;
|
||||
u8 mode = 0;
|
||||
u8 attributes = 0;
|
||||
Type type{};
|
||||
/// File name relative to the title data directory.
|
||||
std::string path;
|
||||
// Only valid for regular (i.e. non-directory) files.
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
virtual u32 GetDataSize() const = 0;
|
||||
|
||||
u8* data_ptr;
|
||||
u8* data_ptr = nullptr;
|
||||
};
|
||||
|
||||
std::unique_ptr<DataReportManipulator> MakeDataReportManipulator(InputReportID rpt_id,
|
||||
|
@ -94,7 +94,7 @@ void CameraLogic::Update(const Common::Matrix44& transform, Common::Vec2 field_o
|
||||
struct CameraPoint
|
||||
{
|
||||
IRBasic::IRObject position;
|
||||
u8 size;
|
||||
u8 size = 0;
|
||||
};
|
||||
|
||||
std::array<CameraPoint, leds.size()> camera_points;
|
||||
|
@ -155,10 +155,10 @@ private:
|
||||
int BusRead(u8 slave_addr, u8 addr, int count, u8* data_out) override;
|
||||
int BusWrite(u8 slave_addr, u8 addr, int count, const u8* data_in) override;
|
||||
|
||||
Register m_reg_data;
|
||||
Register m_reg_data{};
|
||||
|
||||
// When disabled the camera does not respond on the bus.
|
||||
// Change is triggered by wiimote report 0x13.
|
||||
bool m_is_enabled;
|
||||
bool m_is_enabled = false;
|
||||
};
|
||||
} // namespace WiimoteEmu
|
||||
|
@ -79,10 +79,6 @@ Common::Quaternion ComplementaryFilter(const Common::Quaternion& gyroscope,
|
||||
}
|
||||
}
|
||||
|
||||
IMUCursorState::IMUCursorState() : rotation{Common::Quaternion::Identity()}
|
||||
{
|
||||
}
|
||||
|
||||
void EmulateShake(PositionalState* state, ControllerEmu::Shake* const shake_group,
|
||||
float time_elapsed)
|
||||
{
|
||||
|
@ -23,27 +23,25 @@ using MathUtil::GRAVITY_ACCELERATION;
|
||||
struct PositionalState
|
||||
{
|
||||
// meters
|
||||
Common::Vec3 position;
|
||||
Common::Vec3 position{};
|
||||
// meters/second
|
||||
Common::Vec3 velocity;
|
||||
Common::Vec3 velocity{};
|
||||
// meters/second^2
|
||||
Common::Vec3 acceleration;
|
||||
Common::Vec3 acceleration{};
|
||||
};
|
||||
|
||||
struct RotationalState
|
||||
{
|
||||
// radians
|
||||
Common::Vec3 angle;
|
||||
Common::Vec3 angle{};
|
||||
// radians/second
|
||||
Common::Vec3 angular_velocity;
|
||||
Common::Vec3 angular_velocity{};
|
||||
};
|
||||
|
||||
struct IMUCursorState
|
||||
{
|
||||
IMUCursorState();
|
||||
|
||||
// Rotation of world around device.
|
||||
Common::Quaternion rotation;
|
||||
Common::Quaternion rotation = Common::Quaternion::Identity();
|
||||
|
||||
float recentered_pitch = {};
|
||||
};
|
||||
@ -51,6 +49,7 @@ struct IMUCursorState
|
||||
// Contains both positional and rotational state.
|
||||
struct MotionState : PositionalState, RotationalState
|
||||
{
|
||||
MotionState() = default;
|
||||
};
|
||||
|
||||
// Note that 'gyroscope' is rotation of world around device.
|
||||
|
@ -112,10 +112,10 @@ private:
|
||||
ControllerEmu::SettingValue<double> m_hit_strength_setting;
|
||||
|
||||
// Holds previous user input state to watch for "new" hits.
|
||||
u8 m_prev_pad_input;
|
||||
u8 m_prev_pad_input = 0;
|
||||
// Holds new drum pad hits that still need velocity data to be sent.
|
||||
u8 m_new_pad_hits;
|
||||
u8 m_new_pad_hits = 0;
|
||||
// Holds how many more frames to send each drum-pad bit.
|
||||
std::array<u8, 6> m_pad_remaining_frames;
|
||||
std::array<u8, 6> m_pad_remaining_frames{};
|
||||
};
|
||||
} // namespace WiimoteEmu
|
||||
|
@ -64,11 +64,11 @@ private:
|
||||
int BusRead(u8 slave_addr, u8 addr, int count, u8* data_out) override;
|
||||
int BusWrite(u8 slave_addr, u8 addr, int count, const u8* data_in) override;
|
||||
|
||||
Register reg_data;
|
||||
Register reg_data{};
|
||||
|
||||
// TODO: What actions reset this state?
|
||||
// Is this actually in the register somewhere?
|
||||
ADPCMState adpcm_state;
|
||||
ADPCMState adpcm_state{};
|
||||
|
||||
ControllerEmu::SettingValue<double> m_speaker_pan_setting;
|
||||
};
|
||||
|
@ -232,8 +232,8 @@ public:
|
||||
void LoadDefaults(const ControllerInterface& ciface) override;
|
||||
|
||||
private:
|
||||
std::array<ControllerEmu::Buttons*, NUM_HOTKEY_GROUPS> m_keys;
|
||||
std::array<ControllerEmu::ControlGroup*, NUM_HOTKEY_GROUPS> m_hotkey_groups;
|
||||
std::array<ControllerEmu::Buttons*, NUM_HOTKEY_GROUPS> m_keys{};
|
||||
std::array<ControllerEmu::ControlGroup*, NUM_HOTKEY_GROUPS> m_hotkey_groups{};
|
||||
};
|
||||
|
||||
namespace HotkeyManagerEmu
|
||||
|
@ -110,12 +110,9 @@ private:
|
||||
struct ExecutingCommandInfo
|
||||
{
|
||||
ExecutingCommandInfo() {}
|
||||
ExecutingCommandInfo(u32 request_address)
|
||||
: m_request_address(request_address), m_copy_diimmbuf(false)
|
||||
{
|
||||
}
|
||||
u32 m_request_address;
|
||||
bool m_copy_diimmbuf;
|
||||
ExecutingCommandInfo(u32 request_address) : m_request_address(request_address) {}
|
||||
u32 m_request_address = 0;
|
||||
bool m_copy_diimmbuf = false;
|
||||
};
|
||||
|
||||
friend class ::CBoot;
|
||||
|
@ -377,9 +377,9 @@ private:
|
||||
struct OpenedContent
|
||||
{
|
||||
bool m_opened = false;
|
||||
u64 m_fd;
|
||||
u64 m_fd = 0;
|
||||
u64 m_title_id = 0;
|
||||
ES::Content m_content;
|
||||
ES::Content m_content{};
|
||||
u32 m_uid = 0;
|
||||
};
|
||||
|
||||
|
@ -237,8 +237,8 @@ private:
|
||||
void DoState(PointerWrap& p);
|
||||
|
||||
bool in_use = false;
|
||||
ObjectType type;
|
||||
ObjectSubType subtype;
|
||||
ObjectType type{};
|
||||
ObjectSubType subtype{};
|
||||
std::vector<u8> data;
|
||||
u32 misc_data = 0;
|
||||
u32 owner_mask = 0;
|
||||
|
@ -137,7 +137,7 @@ private:
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
ConfigData m_data;
|
||||
ConfigData m_data{};
|
||||
};
|
||||
} // namespace Net
|
||||
} // namespace IOS::HLE
|
||||
|
@ -65,18 +65,18 @@ enum SSL_IOCTL
|
||||
|
||||
struct WII_SSL
|
||||
{
|
||||
mbedtls_ssl_context ctx;
|
||||
mbedtls_ssl_config config;
|
||||
mbedtls_ssl_session session;
|
||||
mbedtls_entropy_context entropy;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
mbedtls_x509_crt cacert;
|
||||
mbedtls_x509_crt clicert;
|
||||
mbedtls_pk_context pk;
|
||||
mbedtls_ssl_context ctx{};
|
||||
mbedtls_ssl_config config{};
|
||||
mbedtls_ssl_session session{};
|
||||
mbedtls_entropy_context entropy{};
|
||||
mbedtls_ctr_drbg_context ctr_drbg{};
|
||||
mbedtls_x509_crt cacert{};
|
||||
mbedtls_x509_crt clicert{};
|
||||
mbedtls_pk_context pk{};
|
||||
int sockfd = -1;
|
||||
int hostfd = -1;
|
||||
std::string hostname;
|
||||
bool active;
|
||||
bool active = false;
|
||||
};
|
||||
|
||||
class NetSSLDevice : public Device
|
||||
|
@ -233,10 +233,10 @@ public:
|
||||
|
||||
struct PollCommand
|
||||
{
|
||||
u32 request_addr;
|
||||
u32 buffer_out;
|
||||
u32 request_addr = 0;
|
||||
u32 buffer_out = 0;
|
||||
std::vector<pollfd_t> wii_fds;
|
||||
s64 timeout;
|
||||
s64 timeout = 0;
|
||||
};
|
||||
|
||||
static s32 GetNetErrorCode(s32 ret, std::string_view caller, bool is_rw);
|
||||
@ -292,7 +292,7 @@ private:
|
||||
void UpdatePollCommands();
|
||||
|
||||
std::unordered_map<s32, WiiSocket> WiiSockets;
|
||||
s32 errno_last;
|
||||
s32 errno_last = 0;
|
||||
std::vector<PollCommand> pending_polls;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_time =
|
||||
std::chrono::high_resolution_clock::now();
|
||||
|
@ -159,7 +159,7 @@ private:
|
||||
u32 m_block_length = 0;
|
||||
u32 m_bus_width = 0;
|
||||
|
||||
std::array<u32, 0x200 / sizeof(u32)> m_registers;
|
||||
std::array<u32, 0x200 / sizeof(u32)> m_registers{};
|
||||
|
||||
File::IOFile m_card;
|
||||
};
|
||||
|
@ -50,20 +50,20 @@ private:
|
||||
|
||||
std::string m_device_name;
|
||||
|
||||
mbedtls_aes_context m_aes_ctx;
|
||||
mbedtls_aes_context m_aes_ctx{};
|
||||
u8 m_aes_key[0x10] = {};
|
||||
u8 m_aes_iv[0x10] = {};
|
||||
|
||||
ES::TMDReader m_tmd;
|
||||
std::string m_base_extract_path;
|
||||
|
||||
u64 m_current_title_id;
|
||||
u64 m_current_title_id = 0;
|
||||
std::string m_current_title_id_str;
|
||||
u16 m_current_group_id;
|
||||
u16 m_current_group_id = 0;
|
||||
std::string m_current_group_id_str;
|
||||
u64 m_import_title_id;
|
||||
u64 m_import_title_id = 0;
|
||||
std::string m_import_title_id_str;
|
||||
u16 m_import_group_id;
|
||||
u16 m_import_group_id = 0;
|
||||
std::string m_import_group_id_str;
|
||||
|
||||
// Set on IMPORT_TITLE_INIT when the next profile application should not delete
|
||||
|
@ -84,10 +84,10 @@ private:
|
||||
|
||||
struct FileDescriptor
|
||||
{
|
||||
bool in_use;
|
||||
bool in_use = false;
|
||||
std::string path;
|
||||
int mode;
|
||||
size_t position;
|
||||
int mode = 0;
|
||||
size_t position = 0;
|
||||
File::IOFile file;
|
||||
|
||||
bool Open();
|
||||
|
@ -82,11 +82,11 @@ public:
|
||||
class Player
|
||||
{
|
||||
public:
|
||||
PlayerId pid;
|
||||
PlayerId pid{};
|
||||
std::string name;
|
||||
std::string revision;
|
||||
u32 ping;
|
||||
SyncIdentifierComparison game_status;
|
||||
u32 ping = 0;
|
||||
SyncIdentifierComparison game_status = SyncIdentifierComparison::Unknown;
|
||||
|
||||
bool IsHost() const { return pid == 1; }
|
||||
};
|
||||
@ -153,7 +153,7 @@ protected:
|
||||
struct AsyncQueueEntry
|
||||
{
|
||||
sf::Packet packet;
|
||||
u8 channel_id;
|
||||
u8 channel_id = 0;
|
||||
};
|
||||
|
||||
void ClearBuffers();
|
||||
|
@ -28,84 +28,84 @@ namespace NetPlay
|
||||
{
|
||||
struct NetSettings
|
||||
{
|
||||
bool m_CPUthread;
|
||||
PowerPC::CPUCore m_CPUcore;
|
||||
bool m_EnableCheats;
|
||||
int m_SelectedLanguage;
|
||||
bool m_OverrideRegionSettings;
|
||||
bool m_DSPHLE;
|
||||
bool m_DSPEnableJIT;
|
||||
bool m_WriteToMemcard;
|
||||
bool m_RAMOverrideEnable;
|
||||
u32 m_Mem1Size;
|
||||
u32 m_Mem2Size;
|
||||
DiscIO::Region m_FallbackRegion;
|
||||
bool m_AllowSDWrites;
|
||||
bool m_CopyWiiSave;
|
||||
bool m_OCEnable;
|
||||
float m_OCFactor;
|
||||
std::array<ExpansionInterface::TEXIDevices, 3> m_EXIDevice;
|
||||
bool m_CPUthread = false;
|
||||
PowerPC::CPUCore m_CPUcore{};
|
||||
bool m_EnableCheats = false;
|
||||
int m_SelectedLanguage = 0;
|
||||
bool m_OverrideRegionSettings = false;
|
||||
bool m_DSPHLE = false;
|
||||
bool m_DSPEnableJIT = false;
|
||||
bool m_WriteToMemcard = false;
|
||||
bool m_RAMOverrideEnable = false;
|
||||
u32 m_Mem1Size = 0;
|
||||
u32 m_Mem2Size = 0;
|
||||
DiscIO::Region m_FallbackRegion{};
|
||||
bool m_AllowSDWrites = false;
|
||||
bool m_CopyWiiSave = false;
|
||||
bool m_OCEnable = false;
|
||||
float m_OCFactor = 0;
|
||||
std::array<ExpansionInterface::TEXIDevices, 3> m_EXIDevice{};
|
||||
|
||||
std::array<u32, Config::SYSCONF_SETTINGS.size()> m_SYSCONFSettings;
|
||||
std::array<u32, Config::SYSCONF_SETTINGS.size()> m_SYSCONFSettings{};
|
||||
|
||||
bool m_EFBAccessEnable;
|
||||
bool m_BBoxEnable;
|
||||
bool m_ForceProgressive;
|
||||
bool m_EFBToTextureEnable;
|
||||
bool m_XFBToTextureEnable;
|
||||
bool m_DisableCopyToVRAM;
|
||||
bool m_ImmediateXFBEnable;
|
||||
bool m_EFBEmulateFormatChanges;
|
||||
int m_SafeTextureCacheColorSamples;
|
||||
bool m_PerfQueriesEnable;
|
||||
bool m_FloatExceptions;
|
||||
bool m_DivideByZeroExceptions;
|
||||
bool m_FPRF;
|
||||
bool m_AccurateNaNs;
|
||||
bool m_DisableICache;
|
||||
bool m_SyncOnSkipIdle;
|
||||
bool m_SyncGPU;
|
||||
int m_SyncGpuMaxDistance;
|
||||
int m_SyncGpuMinDistance;
|
||||
float m_SyncGpuOverclock;
|
||||
bool m_JITFollowBranch;
|
||||
bool m_FastDiscSpeed;
|
||||
bool m_MMU;
|
||||
bool m_Fastmem;
|
||||
bool m_SkipIPL;
|
||||
bool m_LoadIPLDump;
|
||||
bool m_VertexRounding;
|
||||
int m_InternalResolution;
|
||||
bool m_EFBScaledCopy;
|
||||
bool m_FastDepthCalc;
|
||||
bool m_EnablePixelLighting;
|
||||
bool m_WidescreenHack;
|
||||
bool m_ForceFiltering;
|
||||
int m_MaxAnisotropy;
|
||||
bool m_ForceTrueColor;
|
||||
bool m_DisableCopyFilter;
|
||||
bool m_DisableFog;
|
||||
bool m_ArbitraryMipmapDetection;
|
||||
float m_ArbitraryMipmapDetectionThreshold;
|
||||
bool m_EnableGPUTextureDecoding;
|
||||
bool m_DeferEFBCopies;
|
||||
int m_EFBAccessTileSize;
|
||||
bool m_EFBAccessDeferInvalidation;
|
||||
bool m_EFBAccessEnable = false;
|
||||
bool m_BBoxEnable = false;
|
||||
bool m_ForceProgressive = false;
|
||||
bool m_EFBToTextureEnable = false;
|
||||
bool m_XFBToTextureEnable = false;
|
||||
bool m_DisableCopyToVRAM = false;
|
||||
bool m_ImmediateXFBEnable = false;
|
||||
bool m_EFBEmulateFormatChanges = false;
|
||||
int m_SafeTextureCacheColorSamples = 0;
|
||||
bool m_PerfQueriesEnable = false;
|
||||
bool m_FloatExceptions = false;
|
||||
bool m_DivideByZeroExceptions = false;
|
||||
bool m_FPRF = false;
|
||||
bool m_AccurateNaNs = false;
|
||||
bool m_DisableICache = false;
|
||||
bool m_SyncOnSkipIdle = false;
|
||||
bool m_SyncGPU = false;
|
||||
int m_SyncGpuMaxDistance = 0;
|
||||
int m_SyncGpuMinDistance = 0;
|
||||
float m_SyncGpuOverclock = 0;
|
||||
bool m_JITFollowBranch = false;
|
||||
bool m_FastDiscSpeed = false;
|
||||
bool m_MMU = false;
|
||||
bool m_Fastmem = false;
|
||||
bool m_SkipIPL = false;
|
||||
bool m_LoadIPLDump = false;
|
||||
bool m_VertexRounding = false;
|
||||
int m_InternalResolution = 0;
|
||||
bool m_EFBScaledCopy = false;
|
||||
bool m_FastDepthCalc = false;
|
||||
bool m_EnablePixelLighting = false;
|
||||
bool m_WidescreenHack = false;
|
||||
bool m_ForceFiltering = false;
|
||||
int m_MaxAnisotropy = 0;
|
||||
bool m_ForceTrueColor = false;
|
||||
bool m_DisableCopyFilter = false;
|
||||
bool m_DisableFog = false;
|
||||
bool m_ArbitraryMipmapDetection = false;
|
||||
float m_ArbitraryMipmapDetectionThreshold = 0;
|
||||
bool m_EnableGPUTextureDecoding = false;
|
||||
bool m_DeferEFBCopies = false;
|
||||
int m_EFBAccessTileSize = 0;
|
||||
bool m_EFBAccessDeferInvalidation = false;
|
||||
|
||||
bool m_StrictSettingsSync;
|
||||
bool m_SyncSaveData;
|
||||
bool m_SyncCodes;
|
||||
bool m_StrictSettingsSync = false;
|
||||
bool m_SyncSaveData = false;
|
||||
bool m_SyncCodes = false;
|
||||
std::string m_SaveDataRegion;
|
||||
bool m_SyncAllWiiSaves;
|
||||
std::array<int, 4> m_WiimoteExtension;
|
||||
bool m_GolfMode;
|
||||
bool m_UseFMA;
|
||||
bool m_HideRemoteGBAs;
|
||||
bool m_SyncAllWiiSaves = false;
|
||||
std::array<int, 4> m_WiimoteExtension{};
|
||||
bool m_GolfMode = false;
|
||||
bool m_UseFMA = false;
|
||||
bool m_HideRemoteGBAs = false;
|
||||
|
||||
// These aren't sent over the network directly
|
||||
bool m_IsHosting;
|
||||
bool m_HostInputAuthority;
|
||||
std::array<std::string, 4> m_GBARomPaths;
|
||||
bool m_IsHosting = false;
|
||||
bool m_HostInputAuthority = false;
|
||||
std::array<std::string, 4> m_GBARomPaths{};
|
||||
};
|
||||
|
||||
struct NetTraversalConfig
|
||||
@ -226,7 +226,7 @@ enum : u8
|
||||
|
||||
struct WiimoteInput
|
||||
{
|
||||
u8 report_id;
|
||||
u8 report_id = 0;
|
||||
std::vector<u8> data;
|
||||
};
|
||||
using PlayerId = u8;
|
||||
@ -235,19 +235,19 @@ using PadIndex = s8;
|
||||
using PadMappingArray = std::array<PlayerId, 4>;
|
||||
struct GBAConfig
|
||||
{
|
||||
bool enabled;
|
||||
bool has_rom;
|
||||
bool enabled = false;
|
||||
bool has_rom = false;
|
||||
std::string title;
|
||||
std::array<u8, 20> hash;
|
||||
std::array<u8, 20> hash{};
|
||||
};
|
||||
using GBAConfigArray = std::array<GBAConfig, 4>;
|
||||
|
||||
struct PadDetails
|
||||
{
|
||||
std::string player_name;
|
||||
bool is_local;
|
||||
int local_pad;
|
||||
bool hide_gba;
|
||||
std::string player_name{};
|
||||
bool is_local = false;
|
||||
int local_pad = 0;
|
||||
bool hide_gba = false;
|
||||
};
|
||||
|
||||
std::string GetPlayerMappingString(PlayerId pid, const PadMappingArray& pad_map,
|
||||
|
@ -80,16 +80,16 @@ private:
|
||||
class Client
|
||||
{
|
||||
public:
|
||||
PlayerId pid;
|
||||
PlayerId pid{};
|
||||
std::string name;
|
||||
std::string revision;
|
||||
SyncIdentifierComparison game_status;
|
||||
bool has_ipl_dump;
|
||||
bool has_hardware_fma;
|
||||
SyncIdentifierComparison game_status = SyncIdentifierComparison::Unknown;
|
||||
bool has_ipl_dump = false;
|
||||
bool has_hardware_fma = false;
|
||||
|
||||
ENetPeer* socket;
|
||||
u32 ping;
|
||||
u32 current_game;
|
||||
ENetPeer* socket = nullptr;
|
||||
u32 ping = 0;
|
||||
u32 current_game = 0;
|
||||
|
||||
Common::QoSSession qos_session;
|
||||
|
||||
@ -106,16 +106,16 @@ private:
|
||||
struct AsyncQueueEntry
|
||||
{
|
||||
sf::Packet packet;
|
||||
PlayerId target_pid;
|
||||
TargetMode target_mode;
|
||||
u8 channel_id;
|
||||
PlayerId target_pid{};
|
||||
TargetMode target_mode{};
|
||||
u8 channel_id = 0;
|
||||
};
|
||||
|
||||
struct ChunkedDataQueueEntry
|
||||
{
|
||||
sf::Packet packet;
|
||||
PlayerId target_pid;
|
||||
TargetMode target_mode;
|
||||
PlayerId target_pid{};
|
||||
TargetMode target_mode{};
|
||||
std::string title;
|
||||
};
|
||||
|
||||
@ -171,7 +171,7 @@ private:
|
||||
std::map<PlayerId, Client> m_players;
|
||||
|
||||
std::unordered_map<u32, std::vector<std::pair<PlayerId, u64>>> m_timebase_by_frame;
|
||||
bool m_desync_detected;
|
||||
bool m_desync_detected = false;
|
||||
|
||||
struct
|
||||
{
|
||||
@ -191,7 +191,7 @@ private:
|
||||
Common::Event m_chunked_data_event;
|
||||
Common::Event m_chunked_data_complete_event;
|
||||
std::thread m_chunked_data_thread;
|
||||
u32 m_next_chunked_data_id;
|
||||
u32 m_next_chunked_data_id = 0;
|
||||
std::unordered_map<u32, unsigned int> m_chunked_data_complete_count;
|
||||
bool m_abort_chunked_data = false;
|
||||
|
||||
|
@ -266,9 +266,9 @@ private:
|
||||
|
||||
Jit64AsmRoutineManager asm_routines{*this};
|
||||
|
||||
bool m_enable_blr_optimization;
|
||||
bool m_cleanup_after_stackfault;
|
||||
u8* m_stack;
|
||||
bool m_enable_blr_optimization = false;
|
||||
bool m_cleanup_after_stackfault = false;
|
||||
u8* m_stack = nullptr;
|
||||
|
||||
HyoutaUtilities::RangeSizeSet<u8*> m_free_ranges_near;
|
||||
HyoutaUtilities::RangeSizeSet<u8*> m_free_ranges_far;
|
||||
|
@ -134,9 +134,9 @@ protected:
|
||||
FarCodeCache m_far_code;
|
||||
|
||||
// Backed up when we switch to far code.
|
||||
u8* m_near_code;
|
||||
u8* m_near_code_end;
|
||||
bool m_near_code_write_failed;
|
||||
u8* m_near_code = nullptr;
|
||||
u8* m_near_code_end = nullptr;
|
||||
bool m_near_code_write_failed = false;
|
||||
|
||||
std::unordered_map<u8*, TrampolineInfo> m_back_patch_info;
|
||||
std::unordered_map<u8*, u8*> m_exception_handler_at_loc;
|
||||
|
@ -205,5 +205,5 @@ private:
|
||||
|
||||
// This array is indexed with the masked PC and likely holds the correct block id.
|
||||
// This is used as a fast cache of block_map used in the assembly dispatcher.
|
||||
std::array<JitBlock*, FAST_BLOCK_MAP_ELEMENTS> fast_block_map; // start_addr & mask -> number
|
||||
std::array<JitBlock*, FAST_BLOCK_MAP_ELEMENTS> fast_block_map{}; // start_addr & mask -> number
|
||||
};
|
||||
|
@ -24,29 +24,29 @@ namespace PPCAnalyst
|
||||
struct CodeOp // 16B
|
||||
{
|
||||
UGeckoInstruction inst;
|
||||
GekkoOPInfo* opinfo;
|
||||
u32 address;
|
||||
u32 branchTo; // if UINT32_MAX, not a branch
|
||||
GekkoOPInfo* opinfo = nullptr;
|
||||
u32 address = 0;
|
||||
u32 branchTo = 0; // if UINT32_MAX, not a branch
|
||||
BitSet32 regsOut;
|
||||
BitSet32 regsIn;
|
||||
BitSet32 fregsIn;
|
||||
s8 fregOut;
|
||||
bool isBranchTarget;
|
||||
bool branchUsesCtr;
|
||||
bool branchIsIdleLoop;
|
||||
bool wantsCR0;
|
||||
bool wantsCR1;
|
||||
bool wantsFPRF;
|
||||
bool wantsCA;
|
||||
bool wantsCAInFlags;
|
||||
bool outputCR0;
|
||||
bool outputCR1;
|
||||
bool outputFPRF;
|
||||
bool outputCA;
|
||||
bool canEndBlock;
|
||||
bool canCauseException;
|
||||
bool skipLRStack;
|
||||
bool skip; // followed BL-s for example
|
||||
s8 fregOut = 0;
|
||||
bool isBranchTarget = false;
|
||||
bool branchUsesCtr = false;
|
||||
bool branchIsIdleLoop = false;
|
||||
bool wantsCR0 = false;
|
||||
bool wantsCR1 = false;
|
||||
bool wantsFPRF = false;
|
||||
bool wantsCA = false;
|
||||
bool wantsCAInFlags = false;
|
||||
bool outputCR0 = false;
|
||||
bool outputCR1 = false;
|
||||
bool outputFPRF = false;
|
||||
bool outputCA = false;
|
||||
bool canEndBlock = false;
|
||||
bool canCauseException = false;
|
||||
bool skipLRStack = false;
|
||||
bool skip = false; // followed BL-s for example
|
||||
// which registers are still needed after this instruction in this block
|
||||
BitSet32 fprInUse;
|
||||
BitSet32 gprInUse;
|
||||
@ -138,23 +138,24 @@ using CodeBuffer = std::vector<CodeOp>;
|
||||
struct CodeBlock
|
||||
{
|
||||
// Beginning PPC address.
|
||||
u32 m_address;
|
||||
u32 m_address = 0;
|
||||
|
||||
// Number of instructions
|
||||
// Gives us the size of the block.
|
||||
u32 m_num_instructions;
|
||||
u32 m_num_instructions = 0;
|
||||
|
||||
// Some basic statistics about the block.
|
||||
BlockStats* m_stats;
|
||||
BlockStats* m_stats = nullptr;
|
||||
|
||||
// Register statistics about the block.
|
||||
BlockRegStats *m_gpa, *m_fpa;
|
||||
BlockRegStats* m_gpa = nullptr;
|
||||
BlockRegStats* m_fpa = nullptr;
|
||||
|
||||
// Are we a broken block?
|
||||
bool m_broken;
|
||||
bool m_broken = false;
|
||||
|
||||
// Did we have a memory_exception?
|
||||
bool m_memory_exception;
|
||||
bool m_memory_exception = false;
|
||||
|
||||
// Which GQRs this block uses, if any.
|
||||
BitSet8 m_gqr_used;
|
||||
|
@ -87,10 +87,6 @@ constexpr std::array<u32, 128> s_way_from_plru = [] {
|
||||
}();
|
||||
} // Anonymous namespace
|
||||
|
||||
InstructionCache::InstructionCache()
|
||||
{
|
||||
}
|
||||
|
||||
void InstructionCache::Reset()
|
||||
{
|
||||
valid.fill(0);
|
||||
|
@ -21,16 +21,16 @@ constexpr u32 ICACHE_VMEM_BIT = 0x20000000;
|
||||
|
||||
struct InstructionCache
|
||||
{
|
||||
std::array<std::array<std::array<u32, ICACHE_BLOCK_SIZE>, ICACHE_WAYS>, ICACHE_SETS> data;
|
||||
std::array<std::array<u32, ICACHE_WAYS>, ICACHE_SETS> tags;
|
||||
std::array<u32, ICACHE_SETS> plru;
|
||||
std::array<u32, ICACHE_SETS> valid;
|
||||
std::array<std::array<std::array<u32, ICACHE_BLOCK_SIZE>, ICACHE_WAYS>, ICACHE_SETS> data{};
|
||||
std::array<std::array<u32, ICACHE_WAYS>, ICACHE_SETS> tags{};
|
||||
std::array<u32, ICACHE_SETS> plru{};
|
||||
std::array<u32, ICACHE_SETS> valid{};
|
||||
|
||||
std::array<u8, 1 << 20> lookup_table;
|
||||
std::array<u8, 1 << 21> lookup_table_ex;
|
||||
std::array<u8, 1 << 20> lookup_table_vmem;
|
||||
std::array<u8, 1 << 20> lookup_table{};
|
||||
std::array<u8, 1 << 21> lookup_table_ex{};
|
||||
std::array<u8, 1 << 20> lookup_table_vmem{};
|
||||
|
||||
InstructionCache();
|
||||
InstructionCache() = default;
|
||||
u32 ReadInstruction(u32 addr);
|
||||
void Invalidate(u32 addr);
|
||||
void Init();
|
||||
|
@ -113,14 +113,14 @@ static_assert(std::is_standard_layout<PairedSingle>(), "PairedSingle must be sta
|
||||
// Unfortunately not all of those fit in 520 bytes, but we can fit most of ps and all of the rest.
|
||||
struct PowerPCState
|
||||
{
|
||||
u32 pc; // program counter
|
||||
u32 npc;
|
||||
u32 pc = 0; // program counter
|
||||
u32 npc = 0;
|
||||
|
||||
// gather pipe pointer for JIT access
|
||||
u8* gather_pipe_ptr;
|
||||
u8* gather_pipe_base_ptr;
|
||||
u8* gather_pipe_ptr = nullptr;
|
||||
u8* gather_pipe_base_ptr = nullptr;
|
||||
|
||||
u32 gpr[32]; // General purpose registers. r1 = stack pointer.
|
||||
u32 gpr[32]{}; // General purpose registers. r1 = stack pointer.
|
||||
|
||||
#ifndef _M_X86_64
|
||||
// The paired singles are strange : PS0 is stored in the full 64 bits of each FPR
|
||||
@ -129,25 +129,25 @@ struct PowerPCState
|
||||
alignas(16) PairedSingle ps[32];
|
||||
#endif
|
||||
|
||||
ConditionRegister cr;
|
||||
ConditionRegister cr{};
|
||||
|
||||
UReg_MSR msr; // machine state register
|
||||
UReg_FPSCR fpscr; // floating point flags/status bits
|
||||
|
||||
// Exception management.
|
||||
u32 Exceptions;
|
||||
u32 Exceptions = 0;
|
||||
|
||||
// Downcount for determining when we need to do timing
|
||||
// This isn't quite the right location for it, but it is here to accelerate the ARM JIT
|
||||
// This variable should be inside of the CoreTiming namespace if we wanted to be correct.
|
||||
int downcount;
|
||||
int downcount = 0;
|
||||
|
||||
// XER, reformatted into byte fields for easier access.
|
||||
u8 xer_ca;
|
||||
u8 xer_so_ov; // format: (SO << 1) | OV
|
||||
u8 xer_ca = 0;
|
||||
u8 xer_so_ov = 0; // format: (SO << 1) | OV
|
||||
// The Broadway CPU implements bits 16-23 of the XER register... even though it doesn't support
|
||||
// lscbx
|
||||
u16 xer_stringctrl;
|
||||
u16 xer_stringctrl = 0;
|
||||
|
||||
#if _M_X86_64
|
||||
// This member exists only for the purpose of an assertion that its offset <= 0x100.
|
||||
@ -156,19 +156,19 @@ struct PowerPCState
|
||||
alignas(16) PairedSingle ps[32];
|
||||
#endif
|
||||
|
||||
u32 sr[16]; // Segment registers.
|
||||
u32 sr[16]{}; // Segment registers.
|
||||
|
||||
// special purpose registers - controls quantizers, DMA, and lots of other misc extensions.
|
||||
// also for power management, but we don't care about that.
|
||||
u32 spr[1024];
|
||||
u32 spr[1024]{};
|
||||
|
||||
// Storage for the stack pointer of the BLR optimization.
|
||||
u8* stored_stack_pointer;
|
||||
u8* stored_stack_pointer = nullptr;
|
||||
|
||||
std::array<std::array<TLBEntry, TLB_SIZE / TLB_WAYS>, NUM_TLBS> tlb;
|
||||
|
||||
u32 pagetable_base;
|
||||
u32 pagetable_hashmask;
|
||||
u32 pagetable_base = 0;
|
||||
u32 pagetable_hashmask = 0;
|
||||
|
||||
InstructionCache iCache;
|
||||
|
||||
|
@ -28,9 +28,9 @@ struct BlockStat
|
||||
struct ProfileStats
|
||||
{
|
||||
std::vector<BlockStat> block_stats;
|
||||
u64 cost_sum;
|
||||
u64 timecost_sum;
|
||||
u64 countsPerSec;
|
||||
u64 cost_sum = 0;
|
||||
u64 timecost_sum = 0;
|
||||
u64 countsPerSec = 0;
|
||||
};
|
||||
|
||||
} // namespace Profiler
|
||||
|
@ -298,10 +298,10 @@ static std::map<double, int> GetSavedStates()
|
||||
|
||||
struct CompressAndDumpState_args
|
||||
{
|
||||
std::vector<u8>* buffer_vector;
|
||||
std::mutex* buffer_mutex;
|
||||
std::vector<u8>* buffer_vector = nullptr;
|
||||
std::mutex* buffer_mutex = nullptr;
|
||||
std::string filename;
|
||||
bool wait;
|
||||
bool wait = false;
|
||||
};
|
||||
|
||||
static void CompressAndDumpState(CompressAndDumpState_args save_args)
|
||||
|
@ -13,18 +13,18 @@ namespace NetPlay
|
||||
{
|
||||
struct SyncIdentifier
|
||||
{
|
||||
u64 dol_elf_size;
|
||||
u64 dol_elf_size = 0;
|
||||
std::string game_id;
|
||||
u16 revision;
|
||||
u8 disc_number;
|
||||
bool is_datel;
|
||||
u16 revision = 0;
|
||||
u8 disc_number = 0;
|
||||
bool is_datel = false;
|
||||
|
||||
// This hash is intended to be (but is not guaranteed to be):
|
||||
// 1. Identical for discs with no differences that affect netplay/TAS sync
|
||||
// 2. Different for discs with differences that affect netplay/TAS sync
|
||||
// 3. Much faster than hashing the entire disc
|
||||
// The way the hash is calculated may change with updates to Dolphin.
|
||||
std::array<u8, 20> sync_hash;
|
||||
std::array<u8, 20> sync_hash{};
|
||||
|
||||
bool operator==(const SyncIdentifier& s) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user