Skip to content

Commit df24305

Browse files
committed
PPU/Debugger: Fix op_branch_targets
1 parent cdc0441 commit df24305

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

rpcs3/Emu/Cell/PPUThread.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -1206,9 +1206,7 @@ std::array<u32, 2> op_branch_targets(u32 pc, ppu_opcode_t op)
12061206
{
12071207
std::array<u32, 2> res{pc + 4, umax};
12081208

1209-
g_fxo->need<ppu_far_jumps_t>();
1210-
1211-
if (u32 target = g_fxo->get<ppu_far_jumps_t>().get_target(pc))
1209+
if (u32 target = g_fxo->is_init<ppu_far_jumps_t>() ? g_fxo->get<ppu_far_jumps_t>().get_target(pc) : 0)
12121210
{
12131211
res[0] = target;
12141212
return res;

rpcs3/util/fixed_typemap.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ namespace stx
347347
}
348348

349349
// Check if object is not initialized but shall be initialized first (to use in initializing other objects)
350-
template <typename T>
350+
template <typename T> requires (std::is_constructible_v<T, manual_typemap&> || std::is_default_constructible_v<T>)
351351
void need() noexcept
352352
{
353353
if (!m_init[stx::typeindex<typeinfo, std::decay_t<T>>()])

0 commit comments

Comments
 (0)