Never set disc as active title when launching channel with same ID
https://bugs.dolphin-emu.org/issues/11804
This commit is contained in:
1 parent
da1fbbc5d5
commit
2fda104d5a
4 files changed
+22
-13
No files matched your search
@@ -25,6 +25,7 @@
|
||||
#include "Core/IOS/IOSC.h"
|
||||
#include "Core/IOS/Uids.h"
|
||||
#include "Core/IOS/VersionInfo.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
@@ -93,7 +94,8 @@ void TitleContext::DoState(PointerWrap& p)
|
||||
p.Do(active);
|
||||
}
|
||||
|
||||
void TitleContext::Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketReader& ticket_)
|
||||
void TitleContext::Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketReader& ticket_,
|
||||
DiscIO::Platform platform)
|
||||
{
|
||||
if (!tmd_.IsValid() || !ticket_.IsValid())
|
||||
{
|
||||
@@ -108,7 +110,7 @@ void TitleContext::Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketR
|
||||
// Interesting title changes (channel or disc game launch) always happen after an IOS reload.
|
||||
if (first_change)
|
||||
{
|
||||
SConfig::GetInstance().SetRunningGameMetadata(tmd);
|
||||
SConfig::GetInstance().SetRunningGameMetadata(tmd, platform);
|
||||
first_change = false;
|
||||
}
|
||||
}
|
||||
@@ -298,7 +300,7 @@ bool ES::LaunchPPCTitle(u64 title_id, bool skip_reload)
|
||||
return LaunchTitle(required_ios);
|
||||
}
|
||||
|
||||
m_title_context.Update(tmd, ticket);
|
||||
m_title_context.Update(tmd, ticket, DiscIO::Platform::WiiWAD);
|
||||
INFO_LOG(IOS_ES, "LaunchPPCTitle: Title context changed: %016" PRIx64, tmd.GetTitleId());
|
||||
|
||||
// Note: the UID/GID is also updated for IOS titles, but since we have no guarantee IOS titles
|
||||
@@ -648,7 +650,7 @@ ReturnCode ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketRead
|
||||
if (tmd.GetTitleId() != ticket.GetTitleId())
|
||||
return ES_EINVAL;
|
||||
|
||||
m_title_context.Update(tmd, ticket);
|
||||
m_title_context.Update(tmd, ticket, DiscIO::Platform::WiiDisc);
|
||||
INFO_LOG(IOS_ES, "ES_DIVerify: Title context changed: %016" PRIx64, tmd.GetTitleId());
|
||||
|
||||
// XXX: We are supposed to verify the TMD and ticket here, but cannot because
|
||||
|
||||
@@ -18,13 +18,19 @@
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
enum class Platform;
|
||||
}
|
||||
|
||||
namespace IOS::HLE::Device
|
||||
{
|
||||
struct TitleContext
|
||||
{
|
||||
void Clear();
|
||||
void DoState(PointerWrap& p);
|
||||
void Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketReader& ticket_);
|
||||
void Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketReader& ticket_,
|
||||
DiscIO::Platform platform);
|
||||
|
||||
IOS::ES::TicketReader ticket;
|
||||
IOS::ES::TMDReader tmd;
|
||||
|
||||
Reference in new issue
Block a user