mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
RawSPU initialization fix
This commit is contained in:
parent
d94ce7094e
commit
3d9c76a80d
1 changed files with 13 additions and 3 deletions
|
@ -214,12 +214,22 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void InitRawSPU(MemoryBlock* raw_spu, const u32 num)
|
||||
u32 InitRawSPU(MemoryBlock* raw_spu)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
||||
|
||||
MemoryBlocks.push_back(raw_spu);
|
||||
if (num < sizeof(RawSPUMem) / sizeof(RawSPUMem[0])) RawSPUMem[num] = raw_spu;
|
||||
u32 index;
|
||||
for (index = 0; index < sizeof(RawSPUMem) / sizeof(RawSPUMem[0]); index++)
|
||||
{
|
||||
if (!RawSPUMem[index])
|
||||
{
|
||||
RawSPUMem[index] = raw_spu;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MemoryBlocks.push_back(raw_spu->SetRange(RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * index, RAW_SPU_PROB_OFFSET));
|
||||
return index;
|
||||
}
|
||||
|
||||
void CloseRawSPU(MemoryBlock* raw_spu, const u32 num)
|
||||
|
|
Loading…
Add table
Reference in a new issue