spu2: Fix a few warnings.

Cast DMAICounter to u32, hopefully it isn't negative.
This commit is contained in:
lightningterror 2021-01-23 16:31:14 +01:00
parent e0394921e9
commit 376e699515
2 changed files with 5 additions and 5 deletions

View File

@ -338,7 +338,7 @@ void V_Core::FinishDMAwrite()
{
DMAICounter = std::min(ReadSize, (u32)0x100) * 4;
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > DMAICounter)
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > (u32)DMAICounter)
{
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = DMAICounter;
@ -430,7 +430,7 @@ void V_Core::FinishDMAread()
{
DMAICounter = std::min(ReadSize, (u32)0x100) * 4;
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > DMAICounter)
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > (u32)DMAICounter)
{
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = DMAICounter;
@ -462,7 +462,7 @@ void V_Core::DoDMAread(u16* pMem, u32 size)
//Regs.ATTR |= 0x30;
TADR = MADR + (size << 1);
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > DMAICounter)
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > (u32)DMAICounter)
{
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = DMAICounter;

View File

@ -477,7 +477,7 @@ __forceinline void TimeUpdate(u32 cClocks)
}
else
{
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > Cores[0].DMAICounter)
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > (u32)Cores[0].DMAICounter)
{
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = Cores[0].DMAICounter;
@ -534,7 +534,7 @@ __forceinline void TimeUpdate(u32 cClocks)
}
else
{
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > Cores[1].DMAICounter)
if (((psxCounters[6].sCycleT + psxCounters[6].CycleT) - psxRegs.cycle) > (u32)Cores[1].DMAICounter)
{
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = Cores[1].DMAICounter;