mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
TitleList: Use narrower filter for identifying data titles
Previous code accidentally caught some game updates and dlc titles
This commit is contained in:
parent
0f469eb2b9
commit
911573e0dd
23
src/Cafe/TitleList/AppType.h
Normal file
23
src/Cafe/TitleList/AppType.h
Normal file
@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
enum class APP_TYPE : uint32
|
||||
{
|
||||
GAME = 0x80000000,
|
||||
GAME_UPDATE = 0x0800001B,
|
||||
GAME_DLC = 0x0800000E,
|
||||
// data titles
|
||||
VERSION_DATA_TITLE = 0x10000015,
|
||||
DRC_FIRMWARE = 0x10000013,
|
||||
DRC_TEXTURE_ATLAS = 0x1000001A,
|
||||
};
|
||||
|
||||
// allow direct comparison with uint32
|
||||
inline bool operator==(APP_TYPE lhs, uint32 rhs)
|
||||
{
|
||||
return static_cast<uint32>(lhs) == rhs;
|
||||
}
|
||||
|
||||
inline bool operator==(uint32 lhs, APP_TYPE rhs)
|
||||
{
|
||||
return lhs == static_cast<uint32>(rhs);
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
#include "Cafe/Filesystem/fsc.h"
|
||||
#include "config/CemuConfig.h" // for CafeConsoleRegion. Move to NCrypto?
|
||||
#include "TitleId.h"
|
||||
#include "AppType.h"
|
||||
#include "ParsedMetaXml.h"
|
||||
|
||||
enum class CafeTitleFileType
|
||||
@ -122,9 +123,7 @@ public:
|
||||
if(!IsValid())
|
||||
return false;
|
||||
uint32 appType = GetAppType();
|
||||
if(appType == 0)
|
||||
return false; // not a valid app_type, but handle this in case some users use placeholder .xml data with fields zeroed-out
|
||||
return ((appType>>24)&0x80) == 0;
|
||||
return appType == APP_TYPE::DRC_FIRMWARE || appType == APP_TYPE::DRC_TEXTURE_ATLAS || appType == APP_TYPE::VERSION_DATA_TITLE;
|
||||
}
|
||||
|
||||
// API which requires parsed meta data or cached info
|
||||
|
Loading…
Reference in New Issue
Block a user