Merge pull request #8083 from Techjar/clang-7-format

Reformat repo to clang-format 7.0 rules
This commit is contained in:
Léo Lam 2019-05-06 21:42:07 +02:00 committed by GitHub
commit 6f6c7e5df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
208 changed files with 311 additions and 309 deletions

View File

@ -730,4 +730,4 @@ float InputDevice::AxisValue(int padID, ButtonType axis)
else else
return _buttons[binding->second->_buttontype] == BUTTON_PRESSED ? 1.0f : 0.0f; return _buttons[binding->second->_buttontype] == BUTTON_PRESSED ? 1.0f : 0.0f;
} }
} } // namespace ButtonManager

View File

@ -256,4 +256,4 @@ float GetAxisValue(int padID, ButtonType axis);
bool GamepadEvent(const std::string& dev, int button, int action); bool GamepadEvent(const std::string& dev, int button, int action);
void GamepadAxisEvent(const std::string& dev, int axis, float value); void GamepadAxisEvent(const std::string& dev, int axis, float value);
void Shutdown(); void Shutdown();
} } // namespace ButtonManager

View File

@ -31,4 +31,4 @@ void StopAudioDump();
void IncreaseVolume(unsigned short offset); void IncreaseVolume(unsigned short offset);
void DecreaseVolume(unsigned short offset); void DecreaseVolume(unsigned short offset);
void ToggleMuteVolume(); void ToggleMuteVolume();
} } // namespace AudioCommon

View File

@ -25,4 +25,4 @@ private:
double m_stretch_ratio = 1.0; double m_stretch_ratio = 1.0;
}; };
} // AudioCommon } // namespace AudioCommon

View File

@ -33,4 +33,4 @@ private:
FixedSizeQueue<float, 32768> m_decoded_fifo; FixedSizeQueue<float, 32768> m_decoded_fifo;
}; };
} // AudioCommon } // namespace AudioCommon

View File

@ -4380,4 +4380,4 @@ void ARM64FloatEmitter::MOVI2FDUP(ARM64Reg Rd, float value, ARM64Reg scratch)
DUP(32, Rd, Rd, 0); DUP(32, Rd, Rd, 0);
} }
} // namespace } // namespace Arm64Gen

View File

@ -1143,4 +1143,4 @@ private:
} }
} }
}; };
} } // namespace Arm64Gen

View File

@ -83,4 +83,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
{ {
return __atomic_exchange_n(&loc, newval, __ATOMIC_ACQ_REL); return __atomic_exchange_n(&loc, newval, __ATOMIC_ACQ_REL);
} }
} } // namespace Common

View File

@ -91,4 +91,4 @@ inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
{ {
return (T*)_InterlockedExchangePointer_acq((void* volatile*)&loc, (void*)newval); return (T*)_InterlockedExchangePointer_acq((void* volatile*)&loc, (void*)newval);
} }
} } // namespace Common

View File

@ -253,4 +253,4 @@ private:
Flag m_may_sleep; // If this is set, we fall back from the busy loop to an event based Flag m_may_sleep; // If this is set, we fall back from the busy loop to an event based
// synchronization. // synchronization.
}; };
} } // namespace Common

View File

@ -32,4 +32,4 @@ bool ConfigLocation::operator<(const ConfigLocation& other) const
const int key_compare = strcasecmp(key.c_str(), other.key.c_str()); const int key_compare = strcasecmp(key.c_str(), other.key.c_str());
return key_compare < 0; return key_compare < 0;
} }
} } // namespace Config

View File

@ -50,4 +50,4 @@ struct ConfigInfo
ConfigLocation location; ConfigLocation location;
T default_value; T default_value;
}; };
} } // namespace Config

View File

@ -41,4 +41,4 @@ constexpr std::array<LayerType, 7> SEARCH_ORDER{{
LayerType::GlobalGame, LayerType::GlobalGame,
LayerType::Base, LayerType::Base,
}}; }};
} } // namespace Config

View File

@ -97,4 +97,4 @@ const LayerMap& Layer::GetLayerMap() const
{ {
return m_map; return m_map;
} }
} } // namespace Config

View File

@ -42,7 +42,7 @@ inline std::optional<std::string> TryParse(const std::string& str_value)
{ {
return str_value; return str_value;
} }
} } // namespace detail
template <typename T> template <typename T>
struct ConfigInfo; struct ConfigInfo;
@ -154,4 +154,4 @@ protected:
const LayerType m_layer; const LayerType m_layer;
std::unique_ptr<ConfigLayerLoader> m_loader; std::unique_ptr<ConfigLayerLoader> m_loader;
}; };
} } // namespace Config

View File

@ -36,4 +36,4 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
} }
return 0; return 0;
} }
} } // namespace ENetUtil

View File

@ -10,4 +10,4 @@ namespace ENetUtil
{ {
void WakeupThread(ENetHost* host); void WakeupThread(ENetHost* host);
int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event); int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event);
} } // namespace ENetUtil

View File

@ -43,4 +43,4 @@ void SetSIMDMode(int rounding_mode, bool non_ieee_mode);
void SaveSIMDState(); void SaveSIMDState();
void LoadSIMDState(); void LoadSIMDState();
void LoadDefaultSIMDState(); void LoadDefaultSIMDState();
} } // namespace FPURoundMode

View File

@ -106,8 +106,8 @@ bool GLContextAGL::Initialize(void* display_handle, void* window_handle, bool st
std::unique_ptr<GLContext> GLContextAGL::CreateSharedContext() std::unique_ptr<GLContext> GLContextAGL::CreateSharedContext()
{ {
NSOpenGLContext* new_agl_context = NSOpenGLContext* new_agl_context = [[NSOpenGLContext alloc] initWithFormat:m_pixel_format
[[NSOpenGLContext alloc] initWithFormat:m_pixel_format shareContext:m_context]; shareContext:m_context];
if (new_agl_context == nil) if (new_agl_context == nil)
{ {
ERROR_LOG(VIDEO, "failed to create shared context"); ERROR_LOG(VIDEO, "failed to create shared context");

View File

@ -969,7 +969,7 @@ void GekkoDisassembler::mtfsb(u32 in, int n)
} }
} }
// Paired instructions // Paired instructions
#define RA ((inst >> 16) & 0x1f) #define RA ((inst >> 16) & 0x1f)
#define RB ((inst >> 11) & 0x1f) #define RB ((inst >> 11) & 0x1f)

View File

@ -26,4 +26,4 @@ void LoadSIMDState()
void LoadDefaultSIMDState() void LoadDefaultSIMDState()
{ {
} }
} } // namespace FPURoundMode

View File

@ -110,4 +110,4 @@ void RegisterV(const void* base_address, u32 code_size, const char* format, va_l
s_perf_map_file.WriteBytes(entry.data(), entry.size()); s_perf_map_file.WriteBytes(entry.data(), entry.size());
} }
} }
} } // namespace JitRegister

View File

@ -30,4 +30,4 @@ inline void Register(const void* start, const void* end, const char* format, ...
RegisterV(start, code_size, format, args); RegisterV(start, code_size, format, args);
va_end(args); va_end(args);
} }
} } // namespace JitRegister

View File

@ -46,4 +46,4 @@ private:
mutable std::variant<T, std::function<T()>> m_value; mutable std::variant<T, std::function<T()>> m_value;
}; };
} } // namespace Common

View File

@ -72,7 +72,7 @@ enum LOG_LEVELS
static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID"; static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";
} // namespace } // namespace LogTypes
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line, void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line,
const char* fmt, ...) const char* fmt, ...)

View File

@ -49,4 +49,4 @@ std::string MD5Sum(const std::string& file_path, std::function<bool(int)> report
return output_string; return output_string;
} }
} } // namespace MD5

View File

@ -161,4 +161,4 @@ std::string Profiler::Read()
return buffer.str(); return buffer.str();
} }
} } // namespace Common

View File

@ -55,7 +55,7 @@ public:
private: private:
Profiler* m_p; Profiler* m_p;
}; };
}; }; // namespace Common
// Warning: This profiler isn't thread safe. Only profile functions which doesn't run simultaneously // Warning: This profiler isn't thread safe. Only profile functions which doesn't run simultaneously
#define PROFILE(name) \ #define PROFILE(name) \

View File

@ -107,4 +107,4 @@ private:
ElementPtr* m_read_ptr; ElementPtr* m_read_ptr;
std::atomic<u32> m_size; std::atomic<u32> m_size;
}; };
} } // namespace Common

View File

@ -112,7 +112,7 @@ struct hash<TraversalHostId>
return p[0] ^ ((p[1] << 13) | (p[1] >> 19)); return p[0] ^ ((p[1] << 13) | (p[1] >> 19));
} }
}; };
} } // namespace std
static int sock; static int sock;
static std::unordered_map<TraversalRequestId, OutgoingPacketInfo> outgoingPackets; static std::unordered_map<TraversalRequestId, OutgoingPacketInfo> outgoingPackets;

View File

@ -12,6 +12,6 @@ namespace UPnP
{ {
void TryPortmapping(u16 port); void TryPortmapping(u16 port);
void StopPortmapping(); void StopPortmapping();
} } // namespace UPnP
#endif #endif

View File

@ -3389,4 +3389,4 @@ void XEmitter::RDTSC()
Write8(0x0F); Write8(0x0F);
Write8(0x31); Write8(0x31);
} }
} } // namespace Gen

View File

@ -1177,4 +1177,4 @@ private:
} }
}; };
} // namespace } // namespace Gen

View File

@ -61,4 +61,4 @@ void LoadDefaultSIMDState()
{ {
_mm_setcsr(default_sse_state); _mm_setcsr(default_sse_state);
} }
} } // namespace FPURoundMode

View File

@ -14,4 +14,4 @@ namespace ActionReplay
{ {
void DecryptARCode(std::vector<std::string> vCodes, std::vector<AREntry>* ops); void DecryptARCode(std::vector<std::string> vCodes, std::vector<AREntry>* ops);
} // namespace } // namespace ActionReplay

View File

@ -48,4 +48,4 @@ void EnableSelfLogging(bool enable);
std::vector<std::string> GetSelfLog(); std::vector<std::string> GetSelfLog();
void ClearSelfLog(); void ClearSelfLog();
bool IsSelfLogging(); bool IsSelfLogging();
} // namespace } // namespace ActionReplay

View File

@ -10,10 +10,10 @@ namespace Config
{ {
class ConfigLayerLoader; class ConfigLayerLoader;
enum class LayerType; enum class LayerType;
} } // namespace Config
namespace ConfigLoaders namespace ConfigLoaders
{ {
void SaveToSYSCONF(Config::LayerType layer); void SaveToSYSCONF(Config::LayerType layer);
std::unique_ptr<Config::ConfigLayerLoader> GenerateBaseConfigLoader(); std::unique_ptr<Config::ConfigLayerLoader> GenerateBaseConfigLoader();
} } // namespace ConfigLoaders

View File

@ -25,4 +25,4 @@ std::unique_ptr<Config::ConfigLayerLoader> GenerateGlobalGameConfigLoader(const
u16 revision); u16 revision);
std::unique_ptr<Config::ConfigLayerLoader> GenerateLocalGameConfigLoader(const std::string& id, std::unique_ptr<Config::ConfigLayerLoader> GenerateLocalGameConfigLoader(const std::string& id,
u16 revision); u16 revision);
} } // namespace ConfigLoaders

View File

@ -15,4 +15,4 @@ namespace ConfigLoaders
// systems to co-exist without trampling on each other while saving. // systems to co-exist without trampling on each other while saving.
// This function shall be removed when the old configuration system retires. // This function shall be removed when the old configuration system retires.
bool IsSettingSaveable(const Config::ConfigLocation& config_location); bool IsSettingSaveable(const Config::ConfigLocation& config_location);
} // namespace ConfigLoader } // namespace ConfigLoaders

View File

@ -32,4 +32,4 @@ private:
void SaveToDTM(Movie::DTMHeader* header); void SaveToDTM(Movie::DTMHeader* header);
std::unique_ptr<Config::ConfigLayerLoader> GenerateMovieConfigLoader(Movie::DTMHeader* header); std::unique_ptr<Config::ConfigLayerLoader> GenerateMovieConfigLoader(Movie::DTMHeader* header);
} } // namespace ConfigLoaders

View File

@ -442,4 +442,4 @@ void SetFakeTBStartTicks(u64 val)
g.fake_TB_start_ticks = val; g.fake_TB_start_ticks = val;
} }
} // namespace } // namespace CoreTiming

View File

@ -108,4 +108,4 @@ void SetFakeTBStartTicks(u64 val);
void ForceExceptionCheck(s64 cycles); void ForceExceptionCheck(s64 cycles);
} // end of namespace } // namespace CoreTiming

View File

@ -495,7 +495,7 @@ void nop(const UDSPInstruction opc)
} }
} // namespace Ext } // namespace Ext
} // namespace Interpeter } // namespace Interpreter
// The ext ops are calculated in parallel with the actual op. That means that // The ext ops are calculated in parallel with the actual op. That means that
// both the main op and the ext op see the same register state as input. The // both the main op and the ext op see the same register state as input. The

View File

@ -44,5 +44,5 @@ void nr(UDSPInstruction opc);
void nop(UDSPInstruction opc); void nop(UDSPInstruction opc);
} // namespace Ext } // namespace Ext
} // namespace Interpeter } // namespace Interpreter
} // namespace DSP } // namespace DSP

View File

@ -159,4 +159,4 @@ void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const
} }
} }
} // end of namespace Debugger } // namespace Dolphin_Debugger

View File

@ -25,4 +25,4 @@ void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size,
const std::string& title); const std::string& title);
void AddAutoBreakpoints(); void AddAutoBreakpoints();
} // end of namespace Debugger } // namespace Dolphin_Debugger

View File

@ -290,4 +290,4 @@ void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory& cpMe
vtxDescHex >>= 2; vtxDescHex >>= 2;
} }
} }
} } // namespace FifoAnalyzer

View File

@ -38,4 +38,4 @@ void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory& cpMe
extern bool s_DrawingObject; extern bool s_DrawingObject;
extern FifoAnalyzer::CPMemory s_CpMem; extern FifoAnalyzer::CPMemory s_CpMem;
} } // namespace FifoAnalyzer

View File

@ -253,4 +253,4 @@ void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
inifile.SetLines("Gecko", lines); inifile.SetLines("Gecko", lines);
inifile.SetLines("Gecko_Enabled", enabledLines); inifile.SetLines("Gecko_Enabled", enabledLines);
} }
} } // namespace Gecko

View File

@ -15,4 +15,4 @@ namespace Gecko
std::vector<GeckoCode> LoadCodes(const IniFile& globalIni, const IniFile& localIni); std::vector<GeckoCode> LoadCodes(const IniFile& globalIni, const IniFile& localIni);
std::vector<GeckoCode> DownloadCodes(std::string gametdb_id, bool* succeeded); std::vector<GeckoCode> DownloadCodes(std::string gametdb_id, bool* succeeded);
void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes); void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes);
} } // namespace Gecko

View File

@ -68,4 +68,4 @@ void GeckoReturnTrampoline()
PowerPC::HostRead_U64(SP + 24 + (2 * i + 1) * sizeof(u64))); PowerPC::HostRead_U64(SP + 24 + (2 * i + 1) * sizeof(u64)));
} }
} }
} } // namespace HLE_Misc

View File

@ -10,4 +10,4 @@ void UnimplementedFunction();
void HBReload(); void HBReload();
void GeckoCodeHandlerICacheFlush(); void GeckoCodeHandlerICacheFlush();
void GeckoReturnTrampoline(); void GeckoReturnTrampoline();
} } // namespace HLE_Misc

View File

@ -14,4 +14,4 @@ void HLE_LogDPrint();
void HLE_LogVDPrint(); void HLE_LogVDPrint();
void HLE_LogFPrint(); void HLE_LogFPrint();
void HLE_LogVFPrint(); void HLE_LogVFPrint();
} } // namespace HLE_OS

View File

@ -28,4 +28,4 @@ unsigned int GetAIDSampleRate();
void GenerateAISInterrupt(); void GenerateAISInterrupt();
} // namespace } // namespace AudioInterface

View File

@ -328,4 +328,4 @@ bool PauseAndLock(bool do_lock, bool unpause_on_unlock, bool control_adjacent)
} }
return was_unpaused; return was_unpaused;
} }
} } // namespace CPU

View File

@ -74,4 +74,4 @@ const State* GetStatePtr();
// "control_adjacent" causes PauseAndLock to behave like EnableStepping by modifying the // "control_adjacent" causes PauseAndLock to behave like EnableStepping by modifying the
// state of the Audio and FIFO subsystems as well. // state of the Audio and FIFO subsystems as well.
bool PauseAndLock(bool do_lock, bool unpause_on_unlock = true, bool control_adjacent = false); bool PauseAndLock(bool do_lock, bool unpause_on_unlock = true, bool control_adjacent = false);
} } // namespace CPU

View File

@ -16,7 +16,7 @@ namespace DiscIO
{ {
class Volume; class Volume;
struct Partition; struct Partition;
} } // namespace DiscIO
namespace MMIO namespace MMIO
{ {
class Mapping; class Mapping;

View File

@ -388,4 +388,4 @@ static void DVDThread()
} }
} }
} }
} } // namespace DVDThread

View File

@ -23,15 +23,15 @@ namespace DiscIO
{ {
enum class Platform; enum class Platform;
class Volume; class Volume;
} } // namespace DiscIO
namespace IOS namespace IOS
{ {
namespace ES namespace ES
{ {
class TMDReader; class TMDReader;
class TicketReader; class TicketReader;
} } // namespace ES
} } // namespace IOS
namespace DVDThread 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, void StartReadToEmulatedRAM(u32 output_address, u64 dvd_offset, u32 length,
const DiscIO::Partition& partition, DVDInterface::ReplyType reply_type, const DiscIO::Partition& partition, DVDInterface::ReplyType reply_type,
s64 ticks_until_completion); s64 ticks_until_completion);
} } // namespace DVDThread

View File

@ -10,7 +10,7 @@ namespace DiscIO
{ {
struct Partition; struct Partition;
class Volume; class Volume;
} } // namespace DiscIO
namespace FileMonitor namespace FileMonitor
{ {

View File

@ -25,4 +25,4 @@ InputConfig* GetConfig();
ControllerEmu::ControlGroup* GetGroup(int port, KeyboardGroup group); ControllerEmu::ControlGroup* GetGroup(int port, KeyboardGroup group);
KeyboardStatus GetStatus(int port); KeyboardStatus GetStatus(int port);
} } // namespace Keyboard

View File

@ -14,7 +14,7 @@ namespace ControllerEmu
{ {
class ControlGroup; class ControlGroup;
class Buttons; class Buttons;
} } // namespace ControllerEmu
enum class KeyboardGroup enum class KeyboardGroup
{ {

View File

@ -31,4 +31,4 @@ void Rumble(int pad_num, ControlState strength);
void ResetRumble(int pad_num); void ResetRumble(int pad_num);
bool GetMicButton(int pad_num); bool GetMicButton(int pad_num);
} } // namespace Pad

View File

@ -40,4 +40,4 @@ void FastWrite8(u8 value);
void FastWrite16(u16 value); void FastWrite16(u16 value);
void FastWrite32(u32 value); void FastWrite32(u32 value);
void FastWrite64(u64 value); void FastWrite64(u64 value);
} } // namespace GPFifo

View File

@ -108,4 +108,4 @@ void DoState(PointerWrap& p)
p.DoMarker("WIIHW"); p.DoMarker("WIIHW");
} }
} } // namespace HW

View File

@ -11,4 +11,4 @@ namespace HW
void Init(); void Init();
void Shutdown(); void Shutdown();
void DoState(PointerWrap& p); void DoState(PointerWrap& p);
} } // namespace HW

View File

@ -387,4 +387,4 @@ void WriteHandler<T>::ResetMethod(WriteHandlingMethod<T>* method)
#define MaybeExtern #define MaybeExtern
MMIO_PUBLIC_SPECIALIZATIONS() MMIO_PUBLIC_SPECIALIZATIONS()
#undef MaybeExtern #undef MaybeExtern
} } // namespace MMIO

View File

@ -91,7 +91,7 @@ inline u16* HighPart(volatile u32* ptr)
{ {
return LowPart(ptr) + 1; return LowPart(ptr) + 1;
} }
} } // namespace Utils
class Mapping class Mapping
{ {
@ -220,4 +220,4 @@ inline void Mapping::Write(u32 addr, u64 val)
{ {
DEBUG_ASSERT(0); DEBUG_ASSERT(0);
} }
} } // namespace MMIO

View File

@ -237,4 +237,4 @@ private:
#define MaybeExtern extern #define MaybeExtern extern
MMIO_PUBLIC_SPECIALIZATIONS() MMIO_PUBLIC_SPECIALIZATIONS()
#undef MaybeExtern #undef MaybeExtern
} } // namespace MMIO

View File

@ -461,4 +461,4 @@ void Write_U64_Swap(u64 value, u32 address)
std::memcpy(GetPointer(address), &value, sizeof(u64)); std::memcpy(GetPointer(address), &value, sizeof(u64));
} }
} // namespace } // namespace Memory

View File

@ -110,4 +110,4 @@ void CopyToEmuSwapped(u32 address, const T* data, size_t size)
for (size_t i = 0; i < size / sizeof(T); i++) for (size_t i = 0; i < size / sizeof(T); i++)
dest[i] = Common::FromBigEndian(data[i]); dest[i] = Common::FromBigEndian(data[i]);
} }
} } // namespace Memory

View File

@ -70,4 +70,4 @@ void ADPCMDecoder::DecodeBlock(s16* pcm, const u8* adpcm)
m_histr1, m_histr2); m_histr1, m_histr2);
} }
} }
} } // namespace StreamADPCM

View File

@ -31,4 +31,4 @@ private:
s32 m_histr1 = 0; s32 m_histr1 = 0;
s32 m_histr2 = 0; s32 m_histr2 = 0;
}; };
} } // namespace StreamADPCM

View File

@ -20,8 +20,8 @@ namespace FS
class FileSystem; class FileSystem;
} }
class IOSC; class IOSC;
} } // namespace HLE
} // namespace IOS::HLE } // namespace IOS
namespace WiiSave namespace WiiSave
{ {

View File

@ -125,4 +125,4 @@ void InitAdapterClass()
jclass adapter_class = env->FindClass("org/dolphinemu/dolphinemu/utils/Java_WiimoteAdapter"); jclass adapter_class = env->FindClass("org/dolphinemu/dolphinemu/utils/Java_WiimoteAdapter");
s_adapter_class = reinterpret_cast<jclass>(env->NewGlobalRef(adapter_class)); s_adapter_class = reinterpret_cast<jclass>(env->NewGlobalRef(adapter_class));
} }
} } // namespace WiimoteReal

View File

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

View File

@ -17,4 +17,4 @@ public:
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override {} void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override {}
void Update() override {} void Update() override {}
}; };
} } // namespace WiimoteReal

View File

@ -275,4 +275,4 @@ int WiimoteLinux::IOWrite(u8 const* buf, size_t len)
return write(m_int_sock, buf, (int)len); return write(m_int_sock, buf, (int)len);
} }
}; // WiimoteReal }; // namespace WiimoteReal

View File

@ -51,7 +51,7 @@ private:
int m_device_id; int m_device_id;
int m_device_sock; int m_device_sock;
}; };
} } // namespace WiimoteReal
#else #else
#include "Core/HW/WiimoteReal/IODummy.h" #include "Core/HW/WiimoteReal/IODummy.h"

View File

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

View File

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

View File

@ -257,13 +257,12 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
@implementation SearchBT @implementation SearchBT
- (void)deviceInquiryComplete:(IOBluetoothDeviceInquiry*)sender - (void)deviceInquiryComplete:(IOBluetoothDeviceInquiry*)sender
error:(IOReturn)error error:(IOReturn)error
aborted:(BOOL)aborted aborted:(BOOL)aborted {
{
done = true; 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], NOTICE_LOG(WIIMOTE, "Discovered Bluetooth device at %s: %s", [[device addressString] UTF8String],
[[device name] UTF8String]); [[device name] UTF8String]);
@ -275,8 +274,7 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
@implementation ConnectBT @implementation ConnectBT
- (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel - (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel
data:(unsigned char*)data data:(unsigned char*)data
length:(NSUInteger)length length:(NSUInteger)length {
{
IOBluetoothDevice* device = [l2capChannel device]; IOBluetoothDevice* device = [l2capChannel device];
WiimoteReal::WiimoteDarwin* wm = nullptr; WiimoteReal::WiimoteDarwin* wm = nullptr;
@ -316,8 +314,7 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
CFRunLoopStop(CFRunLoopGetCurrent()); CFRunLoopStop(CFRunLoopGetCurrent());
} }
- (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel - (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel {
{
IOBluetoothDevice* device = [l2capChannel device]; IOBluetoothDevice* device = [l2capChannel device];
WiimoteReal::WiimoteDarwin* wm = nullptr; WiimoteReal::WiimoteDarwin* wm = nullptr;

View File

@ -40,7 +40,7 @@ public:
void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override; void FindWiimotes(std::vector<Wiimote*>&, Wiimote*&) override;
void Update() override {} // not needed for hidapi void Update() override {} // not needed for hidapi
}; };
} } // namespace WiimoteReal
#else #else
#include "Core/HW/WiimoteReal/IODummy.h" #include "Core/HW/WiimoteReal/IODummy.h"

View File

@ -32,7 +32,7 @@ namespace Device
{ {
class Device; class Device;
class ES; class ES;
} } // namespace Device
struct Request; struct Request;
struct OpenRequest; struct OpenRequest;

View File

@ -642,16 +642,16 @@ void WiimoteDevice::SendConfigurationRequest(u16 scid, u16 mtu, u16 flush_time_o
SendCommandToACL(L2CAP_CONFIG_REQ, L2CAP_CONFIG_REQ, offset, buffer); SendCommandToACL(L2CAP_CONFIG_REQ, L2CAP_CONFIG_REQ, offset, buffer);
} }
// //
// //
// //
// //
// --- SDP // --- SDP
// //
// //
// //
// //
// //
#define SDP_UINT8 0x08 #define SDP_UINT8 0x08
#define SDP_UINT16 0x09 #define SDP_UINT16 0x09
@ -935,4 +935,4 @@ void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const u8* data
if (bt) if (bt)
bt->AccessWiimoteByIndex(number)->ReceiveL2capData(channel_id, data, size); bt->AccessWiimoteByIndex(number)->ReceiveL2capData(channel_id, data, size);
} }
} } // namespace Core

View File

@ -2530,7 +2530,7 @@ static __inline int hci_filter_test(uint8_t bit, const struct hci_filter* filter
return (filter->mask[off] & (1 << ((bit - 1) & 0x1f))); return (filter->mask[off] & (1 << ((bit - 1) & 0x1f)));
} }
/* /*
* HCI socket ioctl's * HCI socket ioctl's
* *
* Apart from GBTINFOA, these are all indexed on the unit name * Apart from GBTINFOA, these are all indexed on the unit name

View File

@ -76,7 +76,7 @@ struct DeviceEntry
u8 num_altsettings; u8 num_altsettings;
}; };
#pragma pack(pop) #pragma pack(pop)
} } // namespace
USBV5ResourceManager::~USBV5ResourceManager() USBV5ResourceManager::~USBV5ResourceManager()
{ {

View File

@ -349,4 +349,4 @@ void UninstallExceptionHandler()
#endif #endif
} // namespace } // namespace EMM

View File

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

View File

@ -272,4 +272,4 @@ void Reload()
LoadPatches(); LoadPatches();
} }
} // namespace } // namespace PatchEngine

View File

@ -12,12 +12,14 @@
#define MSG_WAITALL (8) #define MSG_WAITALL (8)
#endif #endif
typedef enum { typedef enum
{
GDB_SIGTRAP = 5, GDB_SIGTRAP = 5,
GDB_SIGTERM = 15, GDB_SIGTERM = 15,
} gdb_signals; } gdb_signals;
typedef enum { typedef enum
{
GDB_BP_TYPE_NONE = 0, GDB_BP_TYPE_NONE = 0,
GDB_BP_TYPE_X, GDB_BP_TYPE_X,
GDB_BP_TYPE_R, GDB_BP_TYPE_R,

View File

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

View File

@ -39,7 +39,7 @@ struct GekkoOPTemplate
int opcode; int opcode;
Jit64::Instruction Inst; Jit64::Instruction Inst;
}; };
} } // namespace
const GekkoOPTemplate primarytable[] = { const GekkoOPTemplate primarytable[] = {
{4, &Jit64::DynaRunTable4}, // RunTable4 {4, &Jit64::DynaRunTable4}, // RunTable4

View File

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

View File

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

View File

@ -47,7 +47,7 @@ struct GekkoOPTemplate
_Instruction Inst; _Instruction Inst;
// GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out // GekkoOPInfo opinfo; // Doesn't need opinfo, Interpreter fills it out
}; };
} } // namespace
constexpr GekkoOPTemplate primarytable[] = { constexpr GekkoOPTemplate primarytable[] = {
{4, &JitArm64::DynaRunTable4}, // RunTable4 {4, &JitArm64::DynaRunTable4}, // RunTable4

View File

@ -272,4 +272,4 @@ void Shutdown()
g_jit = nullptr; g_jit = nullptr;
} }
} }
} } // namespace JitInterface

View File

@ -70,4 +70,4 @@ void CompileExceptionCheck(ExceptionType type);
void SetJit(JitBase* jit); void SetJit(JitBase* jit);
void Shutdown(); void Shutdown();
} } // namespace JitInterface

View File

@ -845,17 +845,17 @@ TranslateResult JitCache_TranslateAddress(u32 address)
return TranslateResult{true, from_bat, tlb_addr.address}; return TranslateResult{true, from_bat, tlb_addr.address};
} }
// ********************************************************************************* // *********************************************************************************
// Warning: Test Area // Warning: Test Area
// //
// This code is for TESTING and it works in interpreter mode ONLY. Some games (like // This code is for TESTING and it works in interpreter mode ONLY. Some games (like
// COD iirc) work thanks to this basic TLB emulation. // 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. // It is just a small hack and we have never spend enough time to finalize it.
// Cheers PearPC! // Cheers PearPC!
// //
// ********************************************************************************* // *********************************************************************************
/* /*
* PearPC * PearPC
* ppc_mmu.cc * ppc_mmu.cc
* *

View File

@ -1021,4 +1021,4 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std:
return address; return address;
} }
} // namespace } // namespace PPCAnalyst

Some files were not shown because too many files have changed in this diff Show More