clang-format: pcsx2/CDVD/CDVD.cpp

This commit is contained in:
Ty Lamontagne 2021-10-17 23:20:08 -04:00 committed by refractionpcsx2
parent f5a9b98578
commit 0fed1cbedd
1 changed files with 77 additions and 78 deletions

View File

@ -1,5 +1,5 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
@ -155,14 +155,14 @@ static void cdvdCreateNewNVM(const wxString& filename)
if (!fp.IsOpened())
throw Exception::CannotCreateStream(filename);
u8 zero[1024] = { 0 };
u8 zero[1024] = {0};
fp.Write(zero, sizeof(zero));
// Write NVM ILink area with dummy data (Age of Empires 2)
// Also write language data defaulting to English (Guitar Hero 2)
NVMLayout* nvmLayout = getNvmLayout();
u8 ILinkID_Data[8] = { 0x00, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x86 };
u8 ILinkID_Data[8] = {0x00, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x86};
fp.Seek(*(s32*)(((u8*)nvmLayout) + offsetof(NVMLayout, ilinkId)));
fp.Write(ILinkID_Data, sizeof(ILinkID_Data));
@ -198,7 +198,7 @@ static void cdvdNVM(u8* buffer, int offset, size_t bytes, bool read)
else
{
u8 LanguageParams[16];
u8 zero[16] = { 0 };
u8 zero[16] = {0};
NVMLayout* nvmLayout = getNvmLayout();
wxFFile fp(fname, L"r+b");
@ -653,8 +653,7 @@ static s32 cdvdReadDvdDualInfo(s32* dualType, u32* layer1Start)
static bool cdvdIsDVD()
{
if (cdvd.Type == CDVD_TYPE_DETCTDVDS || cdvd.Type == CDVD_TYPE_DETCTDVDD
|| cdvd.Type == CDVD_TYPE_PS2DVD || cdvd.Type == CDVD_TYPE_DVDV)
if (cdvd.Type == CDVD_TYPE_DETCTDVDS || cdvd.Type == CDVD_TYPE_DETCTDVDD || cdvd.Type == CDVD_TYPE_PS2DVD || cdvd.Type == CDVD_TYPE_DVDV)
return true;
else
return false;
@ -678,7 +677,7 @@ static int cdvdTrayStateDetecting()
return CDVD_TYPE_DETCTDVDS;
}
if(cdvd.Type != CDVD_TYPE_NODISC)
if (cdvd.Type != CDVD_TYPE_NODISC)
return CDVD_TYPE_DETCTCD;
else
return CDVD_TYPE_DETCT; //Detecting any kind of disc existing
@ -852,7 +851,7 @@ void cdvdNewDiskCB()
if (cdvd.Type > 0)
cdvd.Tray.cdvdActionSeconds = 3;
}
else if(cdvd.Type > 0)
else if (cdvd.Type > 0)
{
DevCon.WriteLn(Color_Green, L"Seeking new media");
cdvd.Ready &= ~CDVD_DRIVE_READY;
@ -1027,7 +1026,7 @@ __fi void cdvdActionInterrupt()
case cdvdAction_Break:
// Make sure the cdvd action state is pretty well cleared:
DevCon.WriteLn("CDVD Break Call");
if(!(cdvd.Ready & 0x40))
if (!(cdvd.Ready & 0x40))
cdvd.Error = 1; // Abort
cdvd.Reading = 0;
@ -1108,7 +1107,7 @@ __fi void cdvdReadInterrupt()
cdvd.Status = CDVD_STATUS_READ;
return;
}
else if(cdvd.Reading)
else if (cdvd.Reading)
{
if (cdvd.RErr == 0)
{