[XAM/User] XamUserCreateTitlesPlayedEnumerator - Skip titles without achievements
It mimics behaviour of real 360 dashboard that skips info about demos and system apps also smaller code style changes
This commit is contained in:
parent
1a872dcd85
commit
49e292718a
|
@ -9,19 +9,17 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#include "xenia/base/cvar.h"
|
||||||
#include "xenia/base/logging.h"
|
#include "xenia/base/logging.h"
|
||||||
#include "xenia/kernel/kernel_state.h"
|
#include "xenia/kernel/kernel_state.h"
|
||||||
#include "xenia/kernel/util/shim_utils.h"
|
#include "xenia/kernel/util/shim_utils.h"
|
||||||
#include "xenia/kernel/xam/xam_private.h"
|
#include "xenia/kernel/xam/xam_private.h"
|
||||||
|
#include "xenia/kernel/xam/xdbf/xdbf.h"
|
||||||
#include "xenia/kernel/xenumerator.h"
|
#include "xenia/kernel/xenumerator.h"
|
||||||
#include "xenia/kernel/xthread.h"
|
#include "xenia/kernel/xthread.h"
|
||||||
#include "xenia/xbox.h"
|
#include "xenia/xbox.h"
|
||||||
#include "xenia/kernel/xam/xdbf/xdbf.h"
|
|
||||||
#include "xenia/base/cvar.h"
|
|
||||||
|
|
||||||
|
DEFINE_bool(signin_state, true, "User signed in", "Kernel");
|
||||||
DEFINE_bool(signin_state, true,
|
|
||||||
"User signed in", "Kernel");
|
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
|
@ -713,6 +711,11 @@ dword_result_t XamUserCreateTitlesPlayedEnumerator(
|
||||||
if (title.title_id == kDashboardID)
|
if (title.title_id == kDashboardID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// TODO: Look for better check to provide information about demo title
|
||||||
|
// or system title
|
||||||
|
if (!title.gamerscore_total || !title.achievements_possible)
|
||||||
|
continue;
|
||||||
|
|
||||||
auto* details = (xdbf::X_XDBF_GPD_TITLEPLAYED*)e->AppendItem();
|
auto* details = (xdbf::X_XDBF_GPD_TITLEPLAYED*)e->AppendItem();
|
||||||
details->title_id = title.title_id;
|
details->title_id = title.title_id;
|
||||||
details->achievements_possible = title.achievements_possible;
|
details->achievements_possible = title.achievements_possible;
|
||||||
|
@ -733,12 +736,12 @@ dword_result_t XamUserCreateTitlesPlayedEnumerator(
|
||||||
|
|
||||||
return X_ERROR_SUCCESS;
|
return X_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT1(XamUserCreateTitlesPlayedEnumerator, kUserProfiles, kImplemented);
|
DECLARE_XAM_EXPORT1(XamUserCreateTitlesPlayedEnumerator, kUserProfiles,
|
||||||
|
kImplemented);
|
||||||
|
|
||||||
dword_result_t XamReadTile(dword_t section_id, dword_t game_id, qword_t item_id,
|
dword_result_t XamReadTile(dword_t section_id, dword_t game_id, qword_t item_id,
|
||||||
dword_t offset, lpdword_t output_ptr,
|
dword_t offset, lpdword_t output_ptr,
|
||||||
lpdword_t buffer_size_ptr,
|
lpdword_t buffer_size_ptr, dword_t overlapped) {
|
||||||
dword_t overlapped) {
|
|
||||||
uint32_t buffer_size = buffer_size_ptr ? *buffer_size_ptr : 0;
|
uint32_t buffer_size = buffer_size_ptr ? *buffer_size_ptr : 0;
|
||||||
|
|
||||||
if (!output_ptr) {
|
if (!output_ptr) {
|
||||||
|
@ -753,7 +756,8 @@ dword_result_t XamReadTile(dword_t section_id, dword_t game_id, qword_t item_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Section 2 == images
|
// Section 2 == images
|
||||||
Entry* entry = game_spa->GetEntry((uint16_t)SpaSection::kImage, item_id.value());
|
Entry* entry =
|
||||||
|
game_spa->GetEntry((uint16_t)SpaSection::kImage, item_id.value());
|
||||||
|
|
||||||
if (!buffer_size) {
|
if (!buffer_size) {
|
||||||
buffer_size = entry->info.size;
|
buffer_size = entry->info.size;
|
||||||
|
@ -769,8 +773,8 @@ dword_result_t XamReadTile(dword_t section_id, dword_t game_id, qword_t item_id,
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT1(XamReadTile, kUserProfiles, kSketchy);
|
DECLARE_XAM_EXPORT1(XamReadTile, kUserProfiles, kSketchy);
|
||||||
|
|
||||||
dword_result_t XamReadTileEx(dword_t section_id, dword_t game_id, qword_t item_id,
|
dword_result_t XamReadTileEx(dword_t section_id, dword_t game_id,
|
||||||
dword_t offset, dword_t unk1,
|
qword_t item_id, dword_t offset, dword_t unk1,
|
||||||
dword_t unk2, lpdword_t output_ptr) {
|
dword_t unk2, lpdword_t output_ptr) {
|
||||||
return XamReadTile(section_id, game_id, item_id, offset, output_ptr, 0, 0);
|
return XamReadTile(section_id, game_id, item_id, offset, output_ptr, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -788,6 +792,5 @@ DECLARE_XAM_EXPORT1(XamUserIsOnlineEnabled, kUserProfiles, kStub);
|
||||||
} // namespace kernel
|
} // namespace kernel
|
||||||
} // namespace xe
|
} // namespace xe
|
||||||
|
|
||||||
|
|
||||||
void xe::kernel::xam::RegisterUserExports(
|
void xe::kernel::xam::RegisterUserExports(
|
||||||
xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) {}
|
xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) {}
|
||||||
|
|
Loading…
Reference in New Issue