Cemu/src/Cafe/IOSU/PDM/iosu_pdm.h
goeiecool9999 f3fe6f3455
Some checks failed
Build check / build (push) Waiting to run
Generate translation template / generate-pot (push) Failing after 25s
GameList: Allow sorting by more columns (#1571)
2025-06-13 12:47:46 +02:00

41 lines
No EOL
923 B
C++

#pragma once
#include "Cafe/IOSU/iosu_types_common.h"
namespace iosu
{
namespace pdm
{
inline constexpr size_t NUM_PLAY_STATS_ENTRIES = 256;
inline constexpr size_t NUM_PLAY_DIARY_ENTRIES_MAX = 18250; // 0x474A
struct PlayDiaryEntry
{
uint64be titleId;
uint32be ukn08; // probably minutes
uint16be dayIndex;
uint16be ukn0E;
};
uint32 GetDiaryEntries(uint8 accountSlot, PlayDiaryEntry* diaryEntries, uint32 maxEntries);
/* Helper for UI game list */
struct GameListStat
{
struct LastPlayDate
{
uint32 year; // if 0 -> never played
uint32 month;
uint32 day;
bool operator<(const LastPlayDate& b) const;
bool operator==(const LastPlayDate& b) const;
std::weak_ordering operator<=>(const LastPlayDate& b) const;
}last_played;
uint32 numMinutesPlayed;
};
bool GetStatForGamelist(uint64 titleId, GameListStat& stat);
IOSUModule* GetModule();
};
};