Merge remote-tracking branch 'upstream/canary_experimental' into edge

This commit is contained in:
Herman S.
2026-01-26 09:44:07 +09:00
2 changed files with 19 additions and 16 deletions
+19 -11
View File
@@ -7,6 +7,8 @@
******************************************************************************
*/
#include <ranges>
#include "xenia/base/logging.h"
#include "xenia/kernel/kernel_state.h"
#include "xenia/kernel/util/shim_utils.h"
@@ -630,20 +632,26 @@ dword_result_t XamUserCreateAchievementEnumerator_entry(
kernel_state()->achievement_manager()->GetTitleAchievements(
requester_xuid, title_id_);
if (!user_title_achievements.empty()) {
for (const auto& entry : user_title_achievements) {
auto unlock_time = X_FILETIME();
if (entry.IsUnlocked() && entry.unlock_time.is_valid()) {
unlock_time = entry.unlock_time;
}
const auto requested_achievements = user_title_achievements |
std::views::drop(offset) |
std::views::take(count);
auto item = AchievementDetails(
entry.achievement_id, entry.achievement_name.c_str(),
entry.unlocked_description.c_str(), entry.locked_description.c_str(),
entry.image_id, entry.gamerscore, unlock_time, entry.flags);
if (requested_achievements.empty()) {
return X_ERROR_INVALID_PARAMETER;
}
e->AppendItem(item);
for (const auto& entry : requested_achievements) {
auto unlock_time = X_FILETIME();
if (entry.IsUnlocked() && entry.unlock_time.is_valid()) {
unlock_time = entry.unlock_time;
}
auto item = AchievementDetails(
entry.achievement_id, entry.achievement_name.c_str(),
entry.unlocked_description.c_str(), entry.locked_description.c_str(),
entry.image_id, entry.gamerscore, unlock_time, entry.flags);
e->AppendItem(item);
}
*handle_ptr = e->handle();
-5
View File
@@ -518,11 +518,6 @@ void XThread::Execute() {
// Let the kernel know we are starting.
kernel_state()->OnThreadExecute(this);
// All threads get a mandatory sleep. This is to deal with some buggy
// games that are assuming the 360 is so slow to create threads that they
// have time to initialize shared structures AFTER CreateThread (RR).
xe::threading::Sleep(std::chrono::milliseconds(10));
// Dispatch any APCs that were queued before the thread was created first.
DeliverAPCs();