clang-format'ed

This commit is contained in:
2019-05-11 12:38:06 +02:00
committed by Daniel Brunner
parent be72157399
commit 8678653095
3 changed files with 37 additions and 39 deletions

View File

@ -213,10 +213,7 @@ protected:
return ((u16)m_bba_mem.raw[index + 1] << 8) | m_bba_mem.raw[index];
}
inline u8* PtrFromPagePtr(int const index)
{
return &m_bba_mem.raw[page_ptr(index) << 8];
}
inline u8* PtrFromPagePtr(int const index) { return &m_bba_mem.raw[page_ptr(index) << 8]; }
inline const u8* PtrFromPagePtr(int const index) const
{
@ -237,49 +234,51 @@ protected:
void inc_rwp();
bool RecvHandlePacket();
union {
union
{
std::array<u8, BBA_MEM_SIZE> raw;
#pragma pack(push, 1)
struct {
u8 ncra; //0x00
u8 ncrb; //0x01
struct
{
u8 ncra; // 0x00
u8 ncrb; // 0x01
u16 : 16;
u8 ltps; //0x04
u8 lrps; //0x05
u8 ltps; // 0x04
u8 lrps; // 0x05
u16 : 16;
u8 imr; //0x08
u8 ir; //0x09
u16 bp; //0x0a
u16 tlbp; //0x0c
u16 twp; //0x0e
u16 iob; //0x10
u16 trp; //0x12
u16 rxintt; //0x14
u16 rwp; //0x16
u16 rrp; //0x18
u16 rhbp; //0x1a
u8 imr; // 0x08
u8 ir; // 0x09
u16 bp; // 0x0a
u16 tlbp; // 0x0c
u16 twp; // 0x0e
u16 iob; // 0x10
u16 trp; // 0x12
u16 rxintt; // 0x14
u16 rwp; // 0x16
u16 rrp; // 0x18
u16 rhbp; // 0x1a
u32 : 32;
std::array<u8, 6> nafr_par; //0x20
std::array<u8, 8> nafr_mar; //0x26
std::array<u8, 6> nafr_par; // 0x20
std::array<u8, 8> nafr_mar; // 0x26
u16 : 16;
u8 nwayc; //0x30
u8 nways; //0x31
u8 gca; //0x32
u8 nwayc; // 0x30
u8 nways; // 0x31
u8 gca; // 0x32
u64 : 64;
u16 : 16;
u8 misc; //0x3d
u16 txfifocnt; //0x3e
u8 misc; // 0x3d
u16 txfifocnt; // 0x3e
u64 : 64;
u16 wrtxfifod; //0x48
u16 wrtxfifod; // 0x48
u64 : 48;
u8 misc2; //0x50
u8 misc2; // 0x50
u64 : 64;
u16 : 16;
u8 : 8;
u8 si_actrl; //0x5c
u8 si_status; //0x5d
u8 si_actrl; // 0x5c
u8 si_status; // 0x5d
u16 : 16;
u8 si_actrl2; //0x60
u8 si_actrl2; // 0x60
};
#pragma pack(pop)
} m_bba_mem;

View File

@ -25,8 +25,7 @@
namespace ExpansionInterface
{
#define NOTIMPLEMENTED \
NOTICE_LOG(SP1, "%s not implemented for your UNIX", __PRETTY_FUNCTION__);
#define NOTIMPLEMENTED NOTICE_LOG(SP1, "%s not implemented for your UNIX", __PRETTY_FUNCTION__);
CEXIEthernetTAP::~CEXIEthernetTAP()
{

View File

@ -101,10 +101,10 @@ void GameCubePane::CreateWidgets()
// Add SP1 devices
for (const auto& entry :
{std::make_pair(tr("<Nothing>"), ExpansionInterface::EXIDEVICE_NONE),
std::make_pair(tr("Dummy"), ExpansionInterface::EXIDEVICE_DUMMY),
std::make_pair(tr("Broadband Adapter (TAP)", "virtual network device"), ExpansionInterface::EXIDEVICE_ETH_TAP)})
for (const auto& entry : {std::make_pair(tr("<Nothing>"), ExpansionInterface::EXIDEVICE_NONE),
std::make_pair(tr("Dummy"), ExpansionInterface::EXIDEVICE_DUMMY),
std::make_pair(tr("Broadband Adapter (TAP)", "virtual network device"),
ExpansionInterface::EXIDEVICE_ETH_TAP)})
{
m_slot_combos[2]->addItem(entry.first, entry.second);
}