mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Simplify some ternaries
This commit is contained in:
parent
d3fedffa6a
commit
a49cfc5a91
@ -622,7 +622,7 @@ bool spursKernel2SelectWorkload(spu_thread& spu)
|
|||||||
void spursKernelDispatchWorkload(spu_thread& spu, u64 widAndPollStatus)
|
void spursKernelDispatchWorkload(spu_thread& spu, u64 widAndPollStatus)
|
||||||
{
|
{
|
||||||
const auto ctxt = spu._ptr<SpursKernelContext>(0x100);
|
const auto ctxt = spu._ptr<SpursKernelContext>(0x100);
|
||||||
auto isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
const bool isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
||||||
|
|
||||||
auto pollStatus = static_cast<u32>(widAndPollStatus);
|
auto pollStatus = static_cast<u32>(widAndPollStatus);
|
||||||
auto wid = static_cast<u32>(widAndPollStatus >> 32);
|
auto wid = static_cast<u32>(widAndPollStatus >> 32);
|
||||||
@ -674,7 +674,7 @@ void spursKernelDispatchWorkload(spu_thread& spu, u64 widAndPollStatus)
|
|||||||
bool spursKernelWorkloadExit(spu_thread& spu)
|
bool spursKernelWorkloadExit(spu_thread& spu)
|
||||||
{
|
{
|
||||||
const auto ctxt = spu._ptr<SpursKernelContext>(0x100);
|
const auto ctxt = spu._ptr<SpursKernelContext>(0x100);
|
||||||
auto isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
const bool isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
||||||
|
|
||||||
// Select next workload to run
|
// Select next workload to run
|
||||||
spu.gpr[3].clear();
|
spu.gpr[3].clear();
|
||||||
@ -701,7 +701,7 @@ bool spursKernelEntry(spu_thread& spu)
|
|||||||
ctxt->spuNum = spu.gpr[3]._u32[3];
|
ctxt->spuNum = spu.gpr[3]._u32[3];
|
||||||
ctxt->spurs.set(spu.gpr[4]._u64[1]);
|
ctxt->spurs.set(spu.gpr[4]._u64[1]);
|
||||||
|
|
||||||
auto isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
const bool isKernel2 = ctxt->spurs->flags1 & SF1_32_WORKLOADS ? true : false;
|
||||||
|
|
||||||
// Initialise the SPURS context to its initial values
|
// Initialise the SPURS context to its initial values
|
||||||
ctxt->dmaTagId = CELL_SPURS_KERNEL_DMA_TAG_ID;
|
ctxt->dmaTagId = CELL_SPURS_KERNEL_DMA_TAG_ID;
|
||||||
@ -785,8 +785,8 @@ void spursSysServiceIdleHandler(spu_thread& spu, SpursKernelContext* ctxt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool allSpusIdle = nIdlingSpus == spurs->nSpus ? true : false;
|
const bool allSpusIdle = nIdlingSpus == spurs->nSpus;
|
||||||
bool exitIfNoWork = spurs->flags1 & SF1_EXIT_IF_NO_WORK ? true : false;
|
const bool exitIfNoWork = spurs->flags1 & SF1_EXIT_IF_NO_WORK ? true : false;
|
||||||
shouldExit = allSpusIdle && exitIfNoWork;
|
shouldExit = allSpusIdle && exitIfNoWork;
|
||||||
|
|
||||||
// Check if any workloads can be scheduled
|
// Check if any workloads can be scheduled
|
||||||
@ -843,7 +843,7 @@ void spursSysServiceIdleHandler(spu_thread& spu, SpursKernelContext* ctxt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool spuIdling = spurs->spuIdling & (1 << ctxt->spuNum) ? true : false;
|
const bool spuIdling = spurs->spuIdling & (1 << ctxt->spuNum) ? true : false;
|
||||||
if (foundReadyWorkload && shouldExit == false)
|
if (foundReadyWorkload && shouldExit == false)
|
||||||
{
|
{
|
||||||
spurs->spuIdling &= ~(1 << ctxt->spuNum);
|
spurs->spuIdling &= ~(1 << ctxt->spuNum);
|
||||||
|
@ -206,7 +206,7 @@ bool gui_settings::GetBootConfirmation(QWidget* parent, const gui_save& gui_save
|
|||||||
{
|
{
|
||||||
if (Emu.GetStatus(false) != system_state::stopping)
|
if (Emu.GetStatus(false) != system_state::stopping)
|
||||||
{
|
{
|
||||||
ensure(info == Emu.GetEmulationIdentifier(old_status == system_state::stopping ? true : false));
|
ensure(info == Emu.GetEmulationIdentifier(old_status == system_state::stopping));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user