Core: Clean up brace placements

This commit is contained in:
Lioncash
2014-08-30 17:23:13 -04:00
parent 8553b0f27b
commit eb535be874
46 changed files with 262 additions and 206 deletions

View File

@ -576,7 +576,8 @@ void CWII_IPC_HLE_Device_fs::DoState(PointerWrap& p)
File::IOFile handle(entry.physicalName, "rb");
char buf[65536];
u32 count = size;
while (count > 65536) {
while (count > 65536)
{
handle.ReadArray(&buf[0], 65536);
p.DoArray(&buf[0], 65536);
count -= 65536;

View File

@ -27,7 +27,8 @@ void CWII_IPC_HLE_Device_hid::checkUsbUpdates(CWII_IPC_HLE_Device_hid* hid)
if (timeToFill == 0)
{
std::lock_guard<std::mutex> lk(hid->m_device_list_reply_mutex);
if (hid->deviceCommandAddress != 0){
if (hid->deviceCommandAddress != 0)
{
hid->FillOutDevices(Memory::Read_U32(hid->deviceCommandAddress + 0x18), Memory::Read_U32(hid->deviceCommandAddress + 0x1C));
// The original hardware overwrites the command type with the async reply type.
@ -240,7 +241,8 @@ bool CWII_IPC_HLE_Device_hid::IOCtl(u32 _CommandAddress)
case IOCTL_HID_SHUTDOWN:
{
std::lock_guard<std::mutex> lk(m_device_list_reply_mutex);
if (deviceCommandAddress != 0){
if (deviceCommandAddress != 0)
{
Memory::Write_U32(0xFFFFFFFF, Memory::Read_U32(deviceCommandAddress + 0x18));
// The original hardware overwrites the command type with the async reply type.

View File

@ -785,7 +785,8 @@ bool CWII_IPC_HLE_Device_net_ip_top::IOCtl(u32 _CommandAddress)
optval[15], optval[16], optval[17], optval[18], optval[19]);
//TODO: bug booto about this, 0x2005 most likely timeout related, default value on wii is , 0x2001 is most likely tcpnodelay
if (level == 6 && (optname == 0x2005 || optname == 0x2001)){
if (level == 6 && (optname == 0x2005 || optname == 0x2001))
{
ReturnValue = 0;
break;
}

View File

@ -422,7 +422,8 @@ private:
IOCTL_NWC24_REQUEST_SHUTDOWN = 0x28,
};
enum {
enum
{
MODEL_RVT = 0,
MODEL_RVV = 0,
MODEL_RVL = 1,

View File

@ -261,7 +261,8 @@ bool CWII_IPC_HLE_Device_sdio_slot0::IOCtlV(u32 _CommandAddress)
}
u32 ReturnValue = 0;
switch (CommandBuffer.Parameter) {
switch (CommandBuffer.Parameter)
{
case IOCTLV_SENDCMD:
INFO_LOG(WII_IPC_SD, "IOCTLV_SENDCMD 0x%08x", Memory::Read_U32(CommandBuffer.InBuffer[0].m_Address));
ReturnValue = ExecuteCommand(
@ -288,7 +289,8 @@ u32 CWII_IPC_HLE_Device_sdio_slot0::ExecuteCommand(u32 _BufferIn, u32 _BufferInS
{
// The game will send us a SendCMD with this information. To be able to read and write
// to a file we need to prepare a 0x10 byte output buffer as response.
struct Request {
struct Request
{
u32 command;
u32 type;
u32 resp;

View File

@ -33,7 +33,8 @@ private:
u8 Unk2;
u8 PressedKeys[6];
SMessageData(u32 _MsgType, u8 _Modifiers, u8 *_PressedKeys) {
SMessageData(u32 _MsgType, u8 _Modifiers, u8 *_PressedKeys)
{
MsgType = Common::swap32(_MsgType);
Unk1 = 0; // swapped
Modifiers = _Modifiers;

View File

@ -64,9 +64,12 @@ static s32 TranslateErrorCode(s32 native_error, bool isRW)
case ERRORCODE(EHOSTUNREACH):
return -SO_EHOSTUNREACH;
case EITHER(WSAEWOULDBLOCK, EAGAIN):
if (isRW){
if (isRW)
{
return -SO_EAGAIN; // EAGAIN
}else{
}
else
{
return -SO_EINPROGRESS; // EINPROGRESS
}
default:
@ -473,7 +476,8 @@ void WiiSocket::Update(bool read, bool write, bool except)
// recv/recvfrom only handles PEEK/OOB
flags &= SO_MSG_PEEK | SO_MSG_OOB;
#ifdef _WIN32
if (flags & SO_MSG_PEEK){
if (flags & SO_MSG_PEEK)
{
unsigned long totallen = 0;
ioctlsocket(fd, FIONREAD, &totallen);
ReturnValue = totallen;

View File

@ -52,12 +52,15 @@ typedef struct pollfd pollfd_t;
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net.h"
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h"
enum {
enum
{
SO_MSG_OOB = 0x01,
SO_MSG_PEEK = 0x02,
SO_MSG_NONBLOCK = 0x04,
};
enum {
enum
{
SO_SUCCESS,
SO_E2BIG = 1,
SO_EACCES,