@@ -388,4 +388,4 @@ static void DVDThread()
}
}
}
}
} // namespace DVDThread
@@ -23,15 +23,15 @@ namespace DiscIO
{
enum class Platform;
class Volume;
}
} // namespace DiscIO
namespace IOS
{
namespace ES
{
class TMDReader;
class TicketReader;
}
}
} // namespace ES
} // namespace IOS

namespace DVDThread
{
@@ -60,4 +60,4 @@ void StartRead(u64 dvd_offset, u32 length, const DiscIO::Partition& partition,
void StartReadToEmulatedRAM(u32 output_address, u64 dvd_offset, u32 length,
const DiscIO::Partition& partition, DVDInterface::ReplyType reply_type,
s64 ticks_until_completion);
}
} // namespace DVDThread
@@ -10,7 +10,7 @@ namespace DiscIO
{
struct Partition;
class Volume;
}
} // namespace DiscIO

namespace FileMonitor
{
@@ -25,4 +25,4 @@ InputConfig* GetConfig();
ControllerEmu::ControlGroup* GetGroup(int port, KeyboardGroup group);

KeyboardStatus GetStatus(int port);
}
} // namespace Keyboard
@@ -14,7 +14,7 @@ namespace ControllerEmu
{
class ControlGroup;
class Buttons;
}
} // namespace ControllerEmu

enum class KeyboardGroup
{
@@ -31,4 +31,4 @@ void Rumble(int pad_num, ControlState strength);
void ResetRumble(int pad_num);

bool GetMicButton(int pad_num);
}
} // namespace Pad
@@ -40,4 +40,4 @@ void FastWrite8(u8 value);
void FastWrite16(u16 value);
void FastWrite32(u32 value);
void FastWrite64(u64 value);
}
} // namespace GPFifo
@@ -108,4 +108,4 @@ void DoState(PointerWrap& p)

p.DoMarker("WIIHW");
}
}
} // namespace HW
@@ -11,4 +11,4 @@ namespace HW
void Init();
void Shutdown();
void DoState(PointerWrap& p);
}
} // namespace HW
@@ -387,4 +387,4 @@ void WriteHandler<T>::ResetMethod(WriteHandlingMethod<T>* method)
#define MaybeExtern
MMIO_PUBLIC_SPECIALIZATIONS()
#undef MaybeExtern
}
} // namespace MMIO
@@ -91,7 +91,7 @@ inline u16* HighPart(volatile u32* ptr)
{
return LowPart(ptr) + 1;
}
}
} // namespace Utils

class Mapping
{
@@ -220,4 +220,4 @@ inline void Mapping::Write(u32 addr, u64 val)
{
DEBUG_ASSERT(0);
}
}
} // namespace MMIO
@@ -237,4 +237,4 @@ class WriteHandler
#define MaybeExtern extern
MMIO_PUBLIC_SPECIALIZATIONS()
#undef MaybeExtern
}
} // namespace MMIO
@@ -461,4 +461,4 @@ void Write_U64_Swap(u64 value, u32 address)
std::memcpy(GetPointer(address), &value, sizeof(u64));
}

} // namespace
} // namespace Memory
@@ -110,4 +110,4 @@ void CopyToEmuSwapped(u32 address, const T* data, size_t size)
for (size_t i = 0; i < size / sizeof(T); i++)
dest[i] = Common::FromBigEndian(data[i]);
}
}
} // namespace Memory
@@ -70,4 +70,4 @@ void ADPCMDecoder::DecodeBlock(s16* pcm, const u8* adpcm)
m_histr1, m_histr2);
}
}
}
} // namespace StreamADPCM
@@ -31,4 +31,4 @@ class ADPCMDecoder
s32 m_histr1 = 0;
s32 m_histr2 = 0;
};
}
} // namespace StreamADPCM
@@ -20,8 +20,8 @@ namespace FS
class FileSystem;
}
class IOSC;
}
} // namespace IOS::HLE
} // namespace HLE
} // namespace IOS

namespace WiiSave
{
@@ -125,4 +125,4 @@ void InitAdapterClass()
jclass adapter_class = env->FindClass("org/dolphinemu/dolphinemu/utils/Java_WiimoteAdapter");
s_adapter_class = reinterpret_cast<jclass>(env->NewGlobalRef(adapter_class));
}
}
} // namespace WiimoteReal
@@ -49,7 +49,7 @@ class WiimoteScannerAndroid final : public WiimoteScannerBackend
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {}
};
}
} // namespace WiimoteReal

#else
#include "Core/HW/WiimoteReal/IODummy.h"
@@ -17,4 +17,4 @@ class WiimoteScannerDummy final : public WiimoteScannerBackend
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override {}
void Update() override {}
};
}
} // namespace WiimoteReal
@@ -275,4 +275,4 @@ int WiimoteLinux::IOWrite(u8 const* buf, size_t len)
return write(m_int_sock, buf, (int)len);
}

}; // WiimoteReal
}; // namespace WiimoteReal
@@ -51,7 +51,7 @@ class WiimoteScannerLinux final : public WiimoteScannerBackend
int m_device_id;
int m_device_sock;
};
}
} // namespace WiimoteReal

#else
#include "Core/HW/WiimoteReal/IODummy.h"
@@ -53,7 +53,7 @@ class WiimoteScannerWindows final : public WiimoteScannerBackend
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override;
};
}
} // namespace WiimoteReal

#else
#include "Core/HW/WiimoteReal/IODummy.h"
@@ -20,7 +20,7 @@ class WiimoteScannerDarwin final : public WiimoteScannerBackend
private:
bool stopScanning = false;
};
}
} // namespace WiimoteReal

#else
#include "Core/HW/WiimoteReal/IODummy.h"
@@ -257,13 +257,12 @@ @interface ConnectBT : NSObject
@implementation SearchBT
- (void)deviceInquiryComplete:(IOBluetoothDeviceInquiry*)sender
error:(IOReturn)error
aborted:(BOOL)aborted
{
aborted:(BOOL)aborted {
done = true;
}

- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender device:(IOBluetoothDevice*)device
{
- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender
device:(IOBluetoothDevice*)device {
NOTICE_LOG(WIIMOTE, "Discovered Bluetooth device at %s: %s", [[device addressString] UTF8String],
[[device name] UTF8String]);

@@ -275,8 +274,7 @@ - (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender device:(IOBlu
@implementation ConnectBT
- (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel
data:(unsigned char*)data
length:(NSUInteger)length
{
length:(NSUInteger)length {
IOBluetoothDevice* device = [l2capChannel device];
WiimoteReal::WiimoteDarwin* wm = nullptr;

@@ -316,8 +314,7 @@ - (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel
CFRunLoopStop(CFRunLoopGetCurrent());
}

- (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel
{
- (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel {
IOBluetoothDevice* device = [l2capChannel device];
WiimoteReal::WiimoteDarwin* wm = nullptr;

@@ -40,7 +40,7 @@ class WiimoteScannerHidapi final : public WiimoteScannerBackend
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {} // not needed for hidapi
};
}
} // namespace WiimoteReal

#else
#include "Core/HW/WiimoteReal/IODummy.h"
@@ -32,7 +32,7 @@ namespace Device
{
class Device;
class ES;
}
} // namespace Device

struct Request;
struct OpenRequest;
@@ -642,16 +642,16 @@ void WiimoteDevice::SendConfigurationRequest(u16 scid, u16 mtu, u16 flush_time_o
SendCommandToACL(L2CAP_CONFIG_REQ, L2CAP_CONFIG_REQ, offset, buffer);
}

//
//
//
//
// --- SDP
//
//
//
//
//
//
//
//
//
// --- SDP
//
//
//
//
//

#define SDP_UINT8 0x08
#define SDP_UINT16 0x09
@@ -935,4 +935,4 @@ void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const u8* data
if (bt)
bt->AccessWiimoteByIndex(number)->ReceiveL2capData(channel_id, data, size);
}
}
} // namespace Core
@@ -2530,11 +2530,11 @@ static __inline int hci_filter_test(uint8_t bit, const struct hci_filter* filter
return (filter->mask[off] & (1 << ((bit - 1) & 0x1f)));
}

/*
* HCI socket ioctl's
*
* Apart from GBTINFOA, these are all indexed on the unit name
*/
/*
* HCI socket ioctl's
*
* Apart from GBTINFOA, these are all indexed on the unit name
*/

#define SIOCGBTINFO _IOWR('b', 5, struct btreq) /* get unit info */
#define SIOCGBTINFOA _IOWR('b', 6, struct btreq) /* get info by address */
@@ -76,7 +76,7 @@ struct DeviceEntry
u8 num_altsettings;
};
#pragma pack(pop)
}
} // namespace

USBV5ResourceManager::~USBV5ResourceManager()
{
@@ -349,4 +349,4 @@ void UninstallExceptionHandler()

#endif

} // namespace
} // namespace EMM
@@ -8,4 +8,4 @@ namespace EMM
{
void InstallExceptionHandler();
void UninstallExceptionHandler();
}
} // namespace EMM
@@ -272,4 +272,4 @@ void Reload()
LoadPatches();
}

} // namespace
} // namespace PatchEngine
@@ -12,12 +12,14 @@
#define MSG_WAITALL (8)
#endif

typedef enum {
typedef enum
{
GDB_SIGTRAP = 5,
GDB_SIGTERM = 15,
} gdb_signals;

typedef enum {
typedef enum
{
GDB_BP_TYPE_NONE = 0,
GDB_BP_TYPE_X,
GDB_BP_TYPE_R,
@@ -16,7 +16,7 @@ struct GekkoOPTemplate
Interpreter::Instruction Inst;
GekkoOPInfo opinfo;
};
}
} // namespace

// clang-format off
static GekkoOPInfo unknownopinfo = { "unknown_instruction", OpType::Unknown, FL_ENDBLOCK, 0, 0, 0, 0 };
@@ -39,7 +39,7 @@ struct GekkoOPTemplate
int opcode;
Jit64::Instruction Inst;
};
}
} // namespace

const GekkoOPTemplate primarytable[] = {
{4, &Jit64::DynaRunTable4}, // RunTable4
@@ -226,7 +226,7 @@ void RCX64Reg::Realize()
}
}

RCX64Reg::operator X64Reg() const &
RCX64Reg::operator X64Reg() const&
{
if (const preg_t* preg = std::get_if<preg_t>(&contents))
{
@@ -241,7 +241,7 @@ RCX64Reg::operator X64Reg() const &
return {};
}

RCX64Reg::operator OpArg() const &
RCX64Reg::operator OpArg() const&
{
return Gen::R(RCX64Reg::operator X64Reg());
}
@@ -42,8 +42,8 @@ class RCOpArg

void Realize();
Gen::OpArg Location() const;
operator Gen::OpArg() const & { return Location(); }
operator Gen::OpArg() const && = delete;
operator Gen::OpArg() const& { return Location(); }
operator Gen::OpArg() const&& = delete;
bool IsSimpleReg() const { return Location().IsSimpleReg(); }
bool IsSimpleReg(Gen::X64Reg reg) const { return Location().IsSimpleReg(reg); }
Gen::X64Reg GetSimpleReg() const { return Location().GetSimpleReg(); }
@@ -81,10 +81,10 @@ class RCX64Reg
RCX64Reg& operator=(const RCX64Reg&) = delete;

void Realize();
operator Gen::OpArg() const &;
operator Gen::X64Reg() const &;
operator Gen::OpArg() const && = delete;
operator Gen::X64Reg() const && = delete;
operator Gen::OpArg() const&;
operator Gen::X64Reg() const&;
operator Gen::OpArg() const&& = delete;
operator Gen::X64Reg() const&& = delete;

void Unlock();

@@ -47,7 +47,7 @@ struct GekkoOPTemplate
_Instruction Inst;
// GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out
};
}
} // namespace

constexpr GekkoOPTemplate primarytable[] = {
{4, &JitArm64::DynaRunTable4}, // RunTable4
@@ -272,4 +272,4 @@ void Shutdown()
g_jit = nullptr;
}
}
}
} // namespace JitInterface
@@ -70,4 +70,4 @@ void CompileExceptionCheck(ExceptionType type);
void SetJit(JitBase* jit);

void Shutdown();
}
} // namespace JitInterface
@@ -845,35 +845,35 @@ TranslateResult JitCache_TranslateAddress(u32 address)
return TranslateResult{true, from_bat, tlb_addr.address};
}

// *********************************************************************************
// Warning: Test Area
//
// This code is for TESTING and it works in interpreter mode ONLY. Some games (like
// COD iirc) work thanks to this basic TLB emulation.
// It is just a small hack and we have never spend enough time to finalize it.
// Cheers PearPC!
//
// *********************************************************************************

/*
* PearPC
* ppc_mmu.cc
*
* Copyright (C) 2003, 2004 Sebastian Biallas (sb@biallas.net)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// *********************************************************************************
// Warning: Test Area
//
// This code is for TESTING and it works in interpreter mode ONLY. Some games (like
// COD iirc) work thanks to this basic TLB emulation.
// It is just a small hack and we have never spend enough time to finalize it.
// Cheers PearPC!
//
// *********************************************************************************

/*
* PearPC
* ppc_mmu.cc
*
* Copyright (C) 2003, 2004 Sebastian Biallas (sb@biallas.net)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#define PPC_EXC_DSISR_PAGE (1 << 30)
#define PPC_EXC_DSISR_PROT (1 << 27)
@@ -1021,4 +1021,4 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
return address;
}

} // namespace
} // namespace PPCAnalyst
@@ -225,4 +225,4 @@ void FindFunctions(u32 startAddr, u32 endAddr, PPCSymbolDB* func_db);
bool AnalyzeFunction(u32 startAddr, Common::Symbol& func, u32 max_size = 0);
bool ReanalyzeFunction(u32 start_addr, Common::Symbol& func, u32 max_size = 0);

} // namespace
} // namespace PPCAnalyst
@@ -198,4 +198,4 @@ void LogCompiledInstructions()
++time;
}

} // namespace
} // namespace PPCTables
@@ -61,4 +61,4 @@ void Flush();
// for calling back into UI code without introducing a dependency on it in core
using AfterLoadCallbackFunc = std::function<void()>;
void SetOnAfterLoadCallback(AfterLoadCallbackFunc callback);
}
} // namespace State
@@ -19,7 +19,7 @@ namespace IOS::HLE::FS
{
class FileHandle;
class FileSystem;
}
} // namespace IOS::HLE::FS

class SysConf final
{
@@ -849,4 +849,4 @@ bool RepairNAND(IOS::HLE::Kernel& ios)
{
return !CheckNAND(ios, true).bad;
}
}
} // namespace WiiUtils
@@ -23,7 +23,7 @@ namespace HLE
{
class Kernel;
}
}
} // namespace IOS

namespace WiiUtils
{
@@ -83,4 +83,4 @@ struct NANDCheckResult
};
NANDCheckResult CheckNAND(IOS::HLE::Kernel& ios);
bool RepairNAND(IOS::HLE::Kernel& ios);
}
} // namespace WiiUtils
@@ -210,4 +210,4 @@ std::unique_ptr<BlobReader> CreateBlobReader(const std::string& filename)
}
}

} // namespace
} // namespace DiscIO
@@ -166,4 +166,4 @@ bool CompressFileToBlob(const std::string& infile_path, const std::string& outfi
bool DecompressBlobToFile(const std::string& infile_path, const std::string& outfile_path,
CompressCB callback = nullptr, void* arg = nullptr);

} // namespace
} // namespace DiscIO
@@ -79,4 +79,4 @@ bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
return true;
}

} // namespace
} // namespace DiscIO
@@ -57,4 +57,4 @@ class CISOFileReader : public BlobReader
MapType m_ciso_map[CISO_MAP_SIZE];
};

} // namespace
} // namespace DiscIO
@@ -425,4 +425,4 @@ bool IsGCZBlob(File::IOFile& file)
return is_gcz;
}

} // namespace
} // namespace DiscIO
@@ -68,4 +68,4 @@ class CompressedBlobReader : public SectorReader
std::string m_file_name;
};

} // namespace
} // namespace DiscIO
@@ -826,4 +826,4 @@ static std::string ASCIIToUppercase(std::string str)
return str;
}

} // namespace
} // namespace DiscIO
@@ -21,7 +21,7 @@ namespace File
{
struct FSTEntry;
class IOFile;
}
} // namespace File

namespace DiscIO
{
@@ -186,4 +186,4 @@ class DirectoryBlobReader : public BlobReader
u64 m_data_size;
};

} // namespace
} // namespace DiscIO
@@ -96,7 +96,10 @@ DriveReader::DriveReader(const std::string& drive)
#endif
#endif
}
else { NOTICE_LOG(DISCIO, "Load from DVD backup failed or no disc in drive %s", drive.c_str()); }
else
{
NOTICE_LOG(DISCIO, "Load from DVD backup failed or no disc in drive %s", drive.c_str());
}
}

DriveReader::~DriveReader()
@@ -156,4 +159,4 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8* o
#endif
}

} // namespace
} // namespace DiscIO
@@ -44,4 +44,4 @@ class DriveReader : public SectorReader
u64 m_size = 0;
};

} // namespace
} // namespace DiscIO
@@ -672,4 +672,4 @@ const std::string& GetCompanyFromID(const std::string& company_id)
else
return EMPTY_STRING;
}
}
} // namespace DiscIO
@@ -88,4 +88,4 @@ Region GetSysMenuRegion(u16 title_version);
std::string GetSysMenuVersionString(u16 title_version);

const std::string& GetCompanyFromID(const std::string& company_id);
}
} // namespace DiscIO
@@ -36,4 +36,4 @@ bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
}
}

} // namespace
} // namespace DiscIO
@@ -32,4 +32,4 @@ class PlainFileReader : public BlobReader
s64 m_size;
};

} // namespace
} // namespace DiscIO
@@ -330,4 +330,4 @@ std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(u64 disc_offset) const
return nullptr;
}

} // namespace
} // namespace DiscIO
@@ -103,4 +103,4 @@ class FileSystemGCWii : public FileSystem
std::unique_ptr<FileInfo> FindFileInfo(const std::string& path, const FileInfo& file_info) const;
};

} // namespace
} // namespace DiscIO
@@ -272,4 +272,4 @@ void NANDImporter::ExportKeys(const std::string& nand_root)
if (!file.WriteBytes(m_nand_keys.data(), NAND_KEYS_SIZE))
PanicAlertT("Unable to write to file %s", file_path.c_str());
}
}
} // namespace DiscIO
@@ -58,4 +58,4 @@ class NANDImporter final
std::function<void()> m_update_callback;
size_t m_nand_root_length = 0;
};
}
} // namespace DiscIO
@@ -58,7 +58,7 @@ void Replace32(u64 offset, u64 nbytes, u8* out_ptr, u64 replace_offset, u32 repl
for (size_t i = 0; i < sizeof(u32); ++i)
Replace8(offset, nbytes, out_ptr, replace_offset + i, reinterpret_cast<u8*>(&replace_value)[i]);
}
}
} // namespace

namespace DiscIO
{
@@ -69,4 +69,4 @@ std::unique_ptr<Volume> CreateVolumeFromFilename(const std::string& filename)
return nullptr;
}

} // namespace
} // namespace DiscIO
@@ -48,4 +48,4 @@ bool VolumeFileBlobReader::Read(u64 offset, u64 length, u8* out_ptr)

return m_volume.Read(m_file_info->GetOffset() + offset, length, out_ptr, m_partition);
}
} // namespace
} // namespace DiscIO
@@ -36,4 +36,4 @@ class VolumeFileBlobReader final : public BlobReader
const Partition& m_partition;
std::unique_ptr<FileInfo> m_file_info;
};
} // namespace
} // namespace DiscIO
@@ -287,4 +287,4 @@ VolumeGC::ConvertedGCBanner VolumeGC::ExtractBannerInformation(const GCBanner& b

VolumeGC::ConvertedGCBanner::ConvertedGCBanner() = default;
VolumeGC::ConvertedGCBanner::~ConvertedGCBanner() = default;
} // namespace
} // namespace DiscIO
@@ -108,4 +108,4 @@ class VolumeGC : public Volume
std::unique_ptr<BlobReader> m_reader;
};

} // namespace
} // namespace DiscIO
@@ -33,7 +33,7 @@ namespace IOS::ES
{
struct Content;
class SignedBlobReader;
}
} // namespace IOS::ES

namespace DiscIO
{
@@ -218,4 +218,4 @@ u64 VolumeWAD::GetRawSize() const
return m_reader->GetRawSize();
}

} // namespace
} // namespace DiscIO
@@ -79,4 +79,4 @@ class VolumeWAD : public Volume
u32 m_data_size = 0;
};

} // namespace
} // namespace DiscIO
@@ -98,4 +98,4 @@ class VolumeWii : public Volume
mutable u8 m_last_decrypted_block_data[BLOCK_DATA_SIZE];
};

} // namespace
} // namespace DiscIO
@@ -180,4 +180,4 @@ std::unique_ptr<WbfsFileReader> WbfsFileReader::Create(File::IOFile file, const
return reader;
}

} // namespace
} // namespace DiscIO
@@ -81,4 +81,4 @@ class WbfsFileReader : public BlobReader
bool m_good;
};

} // namespace
} // namespace DiscIO
@@ -38,4 +38,4 @@ class WiiSaveBanner
bool m_valid = true;
std::string m_path;
};
}
} // namespace DiscIO
@@ -46,4 +46,4 @@ class WiiWAD
std::vector<u8> m_data_app;
std::vector<u8> m_footer;
};
}
} // namespace DiscIO
@@ -13,7 +13,7 @@ namespace PatchEngine
{
struct Patch;
struct PatchEntry;
}
} // namespace PatchEngine

class QDialogButtonBox;
class QGroupBox;
@@ -322,7 +322,7 @@ void GameList::ShowContextMenu(const QPoint&)
if (platform == DiscIO::Platform::WiiDisc)
{
auto* perform_disc_update = menu->addAction(tr("Perform System Update"), this,
[ this, file_path = game->GetFilePath() ] {
[this, file_path = game->GetFilePath()] {
WiiUpdate::PerformDiscUpdate(file_path, this);
});
perform_disc_update->setEnabled(!Core::IsRunning() || !SConfig::GetInstance().bWii);
@@ -11,7 +11,7 @@ namespace DiscIO
{
enum class Country;
enum class Platform;
}
} // namespace DiscIO

// Store for various QPixmaps that will be used repeatedly.
class Resources final
@@ -66,5 +66,5 @@ enum class ParseStatus
};

std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::string& expr);
}
}
} // namespace ExpressionParser
} // namespace ciface
@@ -242,5 +242,5 @@ void Touchscreen::Motor::Rumble(int padID, double state)
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetDoRumble(), padID, state);
IDCache::GetJavaVM()->DetachCurrentThread();
}
}
}
} // namespace Android
} // namespace ciface
@@ -65,5 +65,5 @@ class Touchscreen : public Core::Device
private:
const int _padID;
};
}
}
} // namespace Android
} // namespace ciface
@@ -21,5 +21,5 @@ BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device);

void PopulateDevices(HWND hwnd);
}
}
} // namespace DInput
} // namespace ciface
@@ -76,5 +76,5 @@ std::unordered_set<DWORD> GetXInputGUIDS()
SetupDiDestroyDeviceInfoList(setup_enum);
return guids;
}
}
}
} // namespace DInput
} // namespace ciface
@@ -13,4 +13,4 @@ namespace DInput
{
std::unordered_set<DWORD> GetXInputGUIDS();
}
}
} // namespace ciface
@@ -196,5 +196,5 @@ class FFDeviceAdapter : public IUnknownImpl
return FFDeviceSetForceFeedbackProperty(m_device, property, &value);
}
};
}
}
} // namespace ForceFeedback
} // namespace ciface
@@ -13,5 +13,5 @@ void PopulateDevices(void* window);
void DeInit();

void DeviceElementDebugPrint(const void*, void*);
}
}
} // namespace OSX
} // namespace ciface
@@ -90,5 +90,5 @@ class Joystick : public ForceFeedback::ForceFeedbackDevice

ForceFeedback::FFDeviceAdapterReference m_ff_device;
};
}
}
} // namespace OSX
} // namespace ciface
@@ -41,5 +41,5 @@ class RunLoopStopper
}
};

} // namespace ciface
} // namespace OSX
} // namespace ciface
@@ -161,5 +161,5 @@ void PipeDevice::ParseCommand(const std::string& command)
}
}
}
}
}
} // namespace Pipes
} // namespace ciface
@@ -58,5 +58,5 @@ class PipeDevice : public Core::Device
std::map<std::string, PipeInput*> m_buttons;
std::map<std::string, PipeInput*> m_axes;
};
}
}
} // namespace Pipes
} // namespace ciface
@@ -10,5 +10,5 @@ namespace Quartz
{
void PopulateDevices(void* window);
void DeInit();
}
}
} // namespace Quartz
} // namespace ciface
@@ -369,5 +369,5 @@ ControlState KeyboardMouse::Axis::GetState() const
{
return std::max(0.0f, *m_axis / (m_positive ? MOUSE_AXIS_SENSITIVITY : -MOUSE_AXIS_SENSITIVITY));
}
}
}
} // namespace XInput2
} // namespace ciface
@@ -113,5 +113,5 @@ class KeyboardMouse : public Core::Device
const int pointer_deviceid, keyboard_deviceid;
std::string name;
};
}
}
} // namespace XInput2
} // namespace ciface
@@ -207,4 +207,4 @@ void ProfileCycler::PreviousWiimoteProfileForGame(int controller_index)
CycleProfileForGame(CycleDirection::Backward, Wiimote::GetConfig(), m_wiimote_profile_index,
GetWiimoteInputProfilesForGame(controller_index), controller_index);
}
}
} // namespace InputProfile
@@ -50,4 +50,4 @@ class ProfileCycler

int m_wiimote_profile_index = 0;
};
}
} // namespace InputProfile
@@ -16,8 +16,7 @@ @interface AppDelegate ()

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
{
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification {
NSArray* arguments = [[NSProcessInfo processInfo] arguments];

__block std::vector<std::string> args;
@@ -33,8 +32,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)aNotification
});
}

- (void)applicationWillTerminate:(NSNotification*)aNotification
{
- (void)applicationWillTerminate:(NSNotification*)aNotification {
}

@end
@@ -44,8 +44,8 @@ void run_on_main(std::function<void()> fnc)
NSAlert* alert = [[[NSAlert alloc] init] autorelease];

[alert setMessageText:@"Fatal error"];
[alert
setInformativeText:[NSString stringWithCString:text.c_str() encoding:NSUTF8StringEncoding]];
[alert setInformativeText:[NSString stringWithCString:text.c_str()
encoding:NSUTF8StringEncoding]];
[alert setAlertStyle:NSAlertStyleCritical];

[alert beginSheetModalForWindow:GetWindow()
@@ -73,8 +73,8 @@ void run_on_main(std::function<void()> fnc)
void UI::SetDescription(const std::string& text)
{
run_on_main([&] {
[GetView()
SetDescription:[NSString stringWithCString:text.c_str() encoding:NSUTF8StringEncoding]];
[GetView() SetDescription:[NSString stringWithCString:text.c_str()
encoding:NSUTF8StringEncoding]];
});
}

@@ -135,4 +135,4 @@ optparse::Values& ParseArguments(optparse::OptionParser* parser,
AddConfigLayer(options);
return options;
}
}
} // namespace CommandLineParse
@@ -10,7 +10,7 @@ namespace optparse
{
class OptionParser;
class Values;
}
} // namespace optparse

namespace CommandLineParse
{
@@ -24,4 +24,4 @@ std::unique_ptr<optparse::OptionParser> CreateParser(ParserOptions options);
optparse::Values& ParseArguments(optparse::OptionParser* parser, int argc, char** argv);
optparse::Values& ParseArguments(optparse::OptionParser* parser,
const std::vector<std::string>& arguments);
}
} // namespace CommandLineParse
@@ -273,4 +273,4 @@ void GameFileCache::DoState(PointerWrap* p, u64 size)
});
}

} // namespace DiscIO
} // namespace UICommon
@@ -372,8 +372,8 @@ void EnableScreenSaver(Window win, bool enable)
void EnableScreenSaver(bool enable)
#endif
{
// Inhibit the screensaver. Depending on the operating system this may also
// disable low-power states and/or screen dimming.
// Inhibit the screensaver. Depending on the operating system this may also
// disable low-power states and/or screen dimming.

#if defined(HAVE_X11) && HAVE_X11
if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER))
@@ -74,4 +74,4 @@ std::vector<std::string> GetAvailableAntialiasingModes(int& msaa_modes)

return modes;
}
}
} // namespace VideoUtils
@@ -19,4 +19,4 @@ std::vector<std::string> GetAvailableResolutions(X11Utils::XRRConfiguration* xrr
#endif

std::vector<std::string> GetAvailableAntialiasingModes(int& m_msaa_modes);
}
} // namespace VideoUtils
@@ -275,4 +275,4 @@ void XRRConfiguration::AddResolutions(std::vector<std::string>& resos)
}

#endif
}
} // namespace X11Utils
@@ -51,4 +51,4 @@ class XRRConfiguration
bool bIsFullscreen;
};
#endif
}
} // namespace X11Utils
@@ -17,4 +17,4 @@ class BBox
static void Set(int index, int value);
static int Get(int index);
};
};
}; // namespace DX11
@@ -30,4 +30,4 @@ class DXVertexFormat : public NativeVertexFormat
std::array<D3D12_INPUT_ELEMENT_DESC, MAX_VERTEX_ATTRIBUTES> m_attribute_descriptions = {};
u32 m_num_attributes = 0;
};
} // namespace Vulkan
} // namespace DX12
@@ -22,4 +22,4 @@ class VideoBackend final : public VideoBackendBase
private:
void FillBackendInfo();
};
}
} // namespace DX12
@@ -21,4 +21,4 @@ class PerfQuery : public PerfQueryBase
bool IsFlushed() const override { return true; }
};

} // namespace
} // namespace Null
@@ -81,4 +81,4 @@ class PerfQueryGLESNV : public PerfQuery
void FlushOne();
};

} // namespace
} // namespace OGL
@@ -43,4 +43,4 @@ class SamplerCache
};

extern std::unique_ptr<SamplerCache> g_sampler_cache;
}
} // namespace OGL
@@ -392,4 +392,4 @@ std::unique_ptr<StreamBuffer> StreamBuffer::Create(u32 type, u32 size)
// default fallback, should work everywhere, but isn't the best way to do this job
return std::make_unique<MapAndOrphan>(type, size);
}
}
} // namespace OGL
@@ -453,4 +453,4 @@ void PerspectiveDivide(OutputVertexData* vertex)
screen.y = projected.y * wInverse * xfmem.viewport.ht + xfmem.viewport.yOrig - 342;
screen.z = projected.z * wInverse * xfmem.viewport.zRange + xfmem.viewport.farZ;
}
}
} // namespace Clipper
@@ -18,4 +18,4 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp
bool& backface);

void PerspectiveDivide(OutputVertexData* vertex);
}
} // namespace Clipper
@@ -30,4 +30,4 @@ void CopyRegion(const T* const source, const MathUtil::Rectangle<int>& srcrect,
}
}
}
}
} // namespace SW
@@ -219,4 +219,4 @@ void OnObjectEnd()

stats.thisFrame.numDrawnObjects++;
}
}
} // namespace DebugUtil
@@ -23,4 +23,4 @@ void DrawObjectBuffer(s16 x, s16 y, const u8* color, int bufferBase, int subBuff

void DrawTempBuffer(const u8* color, int buffer);
void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char* name);
}
} // namespace DebugUtil
@@ -33,4 +33,4 @@ void ClearEfb()
}
}
}
}
} // namespace EfbCopy
@@ -710,4 +710,4 @@ void IncPerfCounterQuadCount(PerfQueryType type)
quad[type] = 0;
++perf_values[type];
}
}
} // namespace EfbInterface
@@ -467,4 +467,4 @@ void DrawTriangleFrontFace(const OutputVertexData* v0, const OutputVertexData* v
}
}
}
}
} // namespace Rasterizer
@@ -40,4 +40,4 @@ struct RasterBlock
s32 TextureLod[16];
bool TextureLinear[16];
};
}
} // namespace Rasterizer
@@ -1468,7 +1468,7 @@ void EncodeEfbCopy(u8* dst, const EFBCopyParams& params, u32 native_width, u32 b
}
}
}
}
} // namespace

void Encode(AbstractStagingTexture* dst, const EFBCopyParams& params, u32 native_width,
u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,
@@ -1493,4 +1493,4 @@ void Encode(AbstractStagingTexture* dst, const EFBCopyParams& params, u32 native
bytes_per_row, num_blocks_y, memory_stride, src_rect, scale_by_half);
}
}
}
} // namespace TextureEncoder
@@ -247,4 +247,4 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8* sample)
imageWidth);
}
}
}
} // namespace TextureSampler
@@ -19,4 +19,4 @@ enum
BLU_SMP,
ALP_SMP
};
}
} // namespace TextureSampler
@@ -455,4 +455,4 @@ void TransformTexCoord(const InputVertexData* src, OutputVertexData* dst, bool s
dst->texCoords[coordNum][1] *= (bpmem.texcoords[coordNum].t.scale_minus_1 + 1);
}
}
}
} // namespace TransformUnit
@@ -13,4 +13,4 @@ void TransformPosition(const InputVertexData* src, OutputVertexData* dst);
void TransformNormal(const InputVertexData* src, bool nbt, OutputVertexData* dst);
void TransformColor(const InputVertexData* src, OutputVertexData* dst);
void TransformTexCoord(const InputVertexData* src, OutputVertexData* dst, bool specialCase);
}
} // namespace TransformUnit
@@ -23,4 +23,4 @@ void SetBlendMode();
void ClearScreen(const MathUtil::Rectangle<int>& rc);
void OnPixelFormatChange();
void SetInterlacingMode(const BPCmd& bp);
}
} // namespace BPFunctions
@@ -585,4 +585,4 @@ void Prepare()
s_event_sync_gpu = CoreTiming::RegisterEvent("SyncGPUCallback", SyncGPUCallback);
s_syncing_suspended = true;
}
}
} // namespace Fifo
@@ -94,7 +94,7 @@ struct hash<PortableVertexDeclaration>
return Common::HashFletcher(reinterpret_cast<const u8*>(&decl), sizeof(decl));
}
};
}
} // namespace std

// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
// is in the respective backend, not here in VideoCommon.
@@ -125,4 +125,4 @@ void ClearMessages()
std::lock_guard<std::mutex> lock(s_messages_mutex);
s_messages.clear();
}
}
} // namespace OSD
@@ -27,14 +27,14 @@ constexpr u32 CYAN = 0xFF00FFFF;
constexpr u32 GREEN = 0xFF00FF00;
constexpr u32 RED = 0xFFFF0000;
constexpr u32 YELLOW = 0xFFFFFF30;
};
}; // namespace Color

namespace Duration
{
constexpr u32 SHORT = 2000;
constexpr u32 NORMAL = 5000;
constexpr u32 VERY_LONG = 10000;
};
}; // namespace Duration

// On-screen message display (colored yellow by default)
void AddMessage(const std::string& message, u32 ms = Duration::SHORT, u32 rgba = Color::YELLOW);
@@ -158,9 +158,8 @@ void PixelShaderManager::SetConstants()
bpmem.tevindref.getTexCoord(stage) | bpmem.tevindref.getTexMap(stage) << 8 | 1 << 16;
// Note: a tevind of zero just happens to be a passthrough, so no need
// to set an extra bit.
constants.pack1[i][2] =
bpmem.tevind[i].hex; // TODO: This match shadergen, but videosw will
// always wrap.
constants.pack1[i][2] = bpmem.tevind[i].hex; // TODO: This match shadergen, but videosw
// will always wrap.

// The ubershader uses tevind != 0 as a condition whether to calculate texcoords,
// even when texture is disabled, instead of the stage < bpmem.genMode.numindstages.
@@ -25,4 +25,4 @@ constexpr bool AreBpTexMode0MipmapsEnabled(const T& tm0)
{
return (tm0.min_filter & 3) != 0;
}
}
} // namespace SamplerCommon
@@ -1934,14 +1934,13 @@ void TextureCacheBase::ReleaseEFBCopyStagingTexture(std::unique_ptr<AbstractStag
void TextureCacheBase::UninitializeXFBMemory(u8* dst, u32 stride, u32 bytes_per_row,
u32 num_blocks_y)
{
// Originally, we planned on using a 'key color'
// for alpha to address partial xfbs (Mario Strikers / Chicken Little).
// This work was removed since it was unfinished but there
// was still a desire to differentiate between the old and the new approach
// which is why we still set uninitialized xfb memory to fuchsia
// (Y=1,U=254,V=254) instead of dark green (Y=0,U=0,V=0) in YUV
// like is done in the EFB path.
// This comment is indented wrong because of the silly linter, btw.
// Originally, we planned on using a 'key color'
// for alpha to address partial xfbs (Mario Strikers / Chicken Little).
// This work was removed since it was unfinished but there
// was still a desire to differentiate between the old and the new approach
// which is why we still set uninitialized xfb memory to fuchsia
// (Y=1,U=254,V=254) instead of dark green (Y=0,U=0,V=0) in YUV
// like is done in the EFB path.

#if defined(_M_X86) || defined(_M_X86_64)
__m128i sixteenBytes = _mm_set1_epi16((s16)(u16)0xFE01);
@@ -197,4 +197,4 @@ void WriteVertexLighting(ShaderCode& out, APIType api_type, const char* world_po
"}\n"
"\n");
}
}
} // namespace UberShader
@@ -31,4 +31,4 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
void EnumeratePixelShaderUids(const std::function<void(const PixelShaderUid&)>& callback);
void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config,
PixelShaderUid* uid);
}
} // namespace UberShader
@@ -25,4 +25,4 @@ VertexShaderUid GetVertexShaderUid();
ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config,
const vertex_ubershader_uid_data* uid_data);
void EnumerateVertexShaderUids(const std::function<void(const VertexShaderUid&)>& callback);
}
} // namespace UberShader
@@ -55,7 +55,7 @@ struct hash<VertexLoaderUID>
{
size_t operator()(const VertexLoaderUID& uid) const { return uid.GetHash(); }
};
}
} // namespace std

class VertexLoaderBase
{
@@ -91,7 +91,7 @@ struct entry
u64 num_verts;
bool operator<(const entry& other) const { return num_verts > other.num_verts; }
};
}
} // namespace

std::string VertexLoadersToString()
{
@@ -295,7 +295,7 @@ NativeVertexFormat* GetCurrentVertexFormat()
return s_current_vtx_fmt;
}

} // namespace
} // namespace VertexLoaderManager

void LoadCPReg(u32 sub_cmd, u32 value, bool is_preprocess)
{
@@ -53,4 +53,4 @@ extern u32 position_matrix_index[4];

// VB_HAS_X. Bitmask telling what vertex components are present.
extern u32 g_current_components;
}
} // namespace VertexLoaderManager
@@ -102,7 +102,7 @@ struct Normal_Index_Indices3

static const int size = sizeof(I) * 3;
};
}
} // namespace

void VertexLoader_Normal::Init()
{
@@ -32,7 +32,10 @@ static u64 table[] = {
0x8000000000000048ull, // regular_field = 0b1001

// "random" numbers
0x0F7B8B1ABD9B8D3Full, 0xA8B86F73FDAADD2Dull, 0x1B17A557BFEB351Dull, 0xE3354268B0C2395Bull,
0x0F7B8B1ABD9B8D3Full,
0xA8B86F73FDAADD2Dull,
0x1B17A557BFEB351Dull,
0xE3354268B0C2395Bull,
};

// Verify that bitfields in a union have the same underlying data
@@ -120,7 +120,7 @@ void FifoCallback(u64 userdata, s64 lateness)
EXPECT_EQ(s_lateness, lateness);
++s_counter;
}
}
} // namespace SharedSlotTest

TEST(CoreTiming, SharedSlot)
{
@@ -183,7 +183,7 @@ static void RescheduleCallback(u64 userdata, s64 lateness)
if (s_reschedules > 0)
CoreTiming::ScheduleEvent(1000, reinterpret_cast<CoreTiming::EventType*>(userdata), userdata);
}
}
} // namespace ChainSchedulingTest

TEST(CoreTiming, ChainScheduling)
{
@@ -235,7 +235,7 @@ static void ChainCallback(u64 userdata, s64 lateness)

CoreTiming::ScheduleEvent(-1000, s_cb_next, userdata - 1);
}
}
} // namespace ScheduleIntoPastTest

// This can happen when scheduling from outside the CPU Thread.
// Also, if the callback is very late, it may reschedule itself for the next period which
@@ -22,6 +22,7 @@ class TestAccelerator : public DSP::Accelerator
}

bool EndExceptionRaised() const { return m_accov_raised; }

protected:
void OnEndException() override
{