[Misc] Cleanup in Kernel
This commit is contained in:
committed by
Radosław Gliński
parent
50492a951e
commit
b864149575
@@ -17,9 +17,6 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
GpdAchievementBackend::GpdAchievementBackend() {}
|
||||
GpdAchievementBackend::~GpdAchievementBackend() {}
|
||||
|
||||
void GpdAchievementBackend::EarnAchievement(const uint64_t xuid,
|
||||
const uint32_t title_id,
|
||||
const uint32_t achievement_id) {
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace xam {
|
||||
|
||||
class GpdAchievementBackend : public AchievementBackendInterface {
|
||||
public:
|
||||
GpdAchievementBackend();
|
||||
~GpdAchievementBackend();
|
||||
GpdAchievementBackend() = default;
|
||||
~GpdAchievementBackend() = default;
|
||||
|
||||
void EarnAchievement(const uint64_t xuid, const uint32_t title_id,
|
||||
const uint32_t achievement_id) override;
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/chrono.h"
|
||||
#include "xenia/kernel/util/xfiletime.h"
|
||||
#include "xenia/kernel/xam/xdbf/gpd_info.h"
|
||||
#include "xenia/kernel/xam/xdbf/spa_info.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "xenia/kernel/xam/apps/messenger_app.h"
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/threading.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "xenia/kernel/xam/apps/xam_app.h"
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/threading.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/xam/xam_content_device.h"
|
||||
#include "xenia/kernel/xenumerator.h"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "xenia/kernel/xam/apps/xgi_app.h"
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/threading.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "xenia/kernel/xam/apps/xlivebase_app.h"
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/threading.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "xenia/kernel/xthread.h"
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/threading.h"
|
||||
#include "xenia/emulator.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
#ifndef XENIA_KERNEL_XAM_APPS_XMP_APP_H_
|
||||
#define XENIA_KERNEL_XAM_APPS_XMP_APP_H_
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/mutex.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/xam/app_manager.h"
|
||||
|
||||
|
||||
@@ -108,7 +108,9 @@ ProfileManager::ProfileManager(KernelState* kernel_state,
|
||||
logged_profiles_.clear();
|
||||
accounts_.clear();
|
||||
|
||||
LoadAccounts(FindProfiles());
|
||||
for (const auto account_xuid : FindProfiles()) {
|
||||
LoadAccount(account_xuid);
|
||||
}
|
||||
|
||||
if (!cvars::logged_profile_slot_0_xuid.empty()) {
|
||||
Login(xe::string_util::from_string<uint64_t>(
|
||||
@@ -135,8 +137,6 @@ ProfileManager::ProfileManager(KernelState* kernel_state,
|
||||
}
|
||||
}
|
||||
|
||||
ProfileManager::~ProfileManager() {}
|
||||
|
||||
void ProfileManager::ReloadProfile(const uint64_t xuid) {
|
||||
if (accounts_.contains(xuid)) {
|
||||
accounts_.erase(xuid);
|
||||
@@ -145,7 +145,11 @@ void ProfileManager::ReloadProfile(const uint64_t xuid) {
|
||||
LoadAccount(xuid);
|
||||
}
|
||||
|
||||
void ProfileManager::ReloadProfiles() { LoadAccounts(FindProfiles()); }
|
||||
void ProfileManager::ReloadProfiles() {
|
||||
for (const auto account_xuid : FindProfiles()) {
|
||||
LoadAccount(account_xuid);
|
||||
}
|
||||
}
|
||||
|
||||
UserProfile* ProfileManager::GetProfile(const uint64_t xuid) const {
|
||||
const uint8_t user_index = GetUserIndexAssignedToProfile(xuid);
|
||||
@@ -236,12 +240,6 @@ bool ProfileManager::LoadAccount(const uint64_t xuid) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ProfileManager::LoadAccounts(const std::vector<uint64_t> profiles_xuids) {
|
||||
for (const auto& path : profiles_xuids) {
|
||||
LoadAccount(path);
|
||||
}
|
||||
}
|
||||
|
||||
bool ProfileManager::MountProfile(const uint64_t xuid, std::string mount_path) {
|
||||
std::filesystem::path profile_path = GetProfilePath(xuid);
|
||||
if (mount_path.empty()) {
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
const static std::string kDashboardStringID =
|
||||
inline const std::string kDashboardStringID =
|
||||
fmt::format("{:08X}", kDashboardID);
|
||||
|
||||
constexpr std::string_view kDefaultMountFormat = "User_{:016X}";
|
||||
@@ -60,7 +60,7 @@ class ProfileManager {
|
||||
// Loading Account means load basic data
|
||||
ProfileManager(KernelState* kernel_state, UserTracker* user_tracker);
|
||||
|
||||
~ProfileManager();
|
||||
~ProfileManager() = default;
|
||||
|
||||
bool CreateProfile(const std::string gamertag, bool autologin,
|
||||
bool default_xuid = false);
|
||||
@@ -77,7 +77,6 @@ class ProfileManager {
|
||||
void LoginMultiple(const std::map<uint8_t, uint64_t>& profiles);
|
||||
|
||||
bool LoadAccount(const uint64_t xuid);
|
||||
void LoadAccounts(const std::vector<uint64_t> profiles_xuids);
|
||||
|
||||
void ReloadProfiles();
|
||||
void ReloadProfile(const uint64_t xuid);
|
||||
|
||||
@@ -27,6 +27,8 @@ class CreateProfileUI final : public XamDialog {
|
||||
memset(gamertag_, 0, sizeof(gamertag_));
|
||||
}
|
||||
|
||||
~CreateProfileUI() = default;
|
||||
|
||||
private:
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ class GamercardUI final : public XamDialog {
|
||||
GamercardUI(xe::ui::Window* window, xe::ui::ImGuiDrawer* imgui_drawer,
|
||||
KernelState* kernel_state, uint64_t xuid);
|
||||
|
||||
~GamercardUI() = default;
|
||||
|
||||
private:
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
void DrawBaseSettings(ImGuiIO& io);
|
||||
|
||||
@@ -22,12 +22,7 @@ class ProfilePasscodeUI final : public XamDialog {
|
||||
ProfilePasscodeUI(xe::ui::ImGuiDrawer* imgui_drawer, std::string_view title,
|
||||
std::string_view description,
|
||||
MESSAGEBOX_RESULT* result_ptr);
|
||||
|
||||
void DrawPasscodeField(uint8_t key_id);
|
||||
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
virtual ~ProfilePasscodeUI() {}
|
||||
~ProfilePasscodeUI() = default;
|
||||
|
||||
bool SelectedSignedIn() const { return selected_signed_in_; }
|
||||
|
||||
@@ -48,6 +43,10 @@ class ProfilePasscodeUI final : public XamDialog {
|
||||
{"Left", DPAD_LEFT_PASSCODE},
|
||||
{"Right", DPAD_RIGHT_PASSCODE}};
|
||||
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
void DrawPasscodeField(uint8_t key_id);
|
||||
|
||||
bool has_opened_ = false;
|
||||
bool selected_signed_in_ = false;
|
||||
std::string title_;
|
||||
|
||||
@@ -22,6 +22,8 @@ class SigninUI final : public XamDialog {
|
||||
SigninUI(xe::ui::ImGuiDrawer* imgui_drawer, ProfileManager* profile_manager,
|
||||
uint32_t last_used_slot, uint32_t users_needed);
|
||||
|
||||
~SigninUI() = default;
|
||||
|
||||
private:
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ class TitleListUI final : public XamDialog {
|
||||
TitleListUI(xe::ui::ImGuiDrawer* imgui_drawer, const ImVec2 drawing_position,
|
||||
const UserProfile* profile);
|
||||
|
||||
private:
|
||||
~TitleListUI();
|
||||
|
||||
private:
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
void LoadProfileTitleList(xe::ui::ImGuiDrawer* imgui_drawer,
|
||||
|
||||
@@ -15,9 +15,6 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
UserData::UserData() {}
|
||||
UserData::~UserData() {}
|
||||
|
||||
UserData::UserData(const UserData& user_data) {
|
||||
data_ = user_data.data_;
|
||||
extended_data_ = user_data.extended_data_;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/string_util.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
namespace xe {
|
||||
@@ -175,9 +176,7 @@ class UserData {
|
||||
}
|
||||
|
||||
protected:
|
||||
~UserData();
|
||||
|
||||
UserData();
|
||||
UserData() = default;
|
||||
UserData(const UserData& user_data);
|
||||
|
||||
// From host
|
||||
@@ -193,6 +192,8 @@ class UserData {
|
||||
UserData(const X_USER_DATA_TYPE data_type, const X_USER_DATA_UNION* user_data,
|
||||
std::span<const uint8_t> extended_data);
|
||||
|
||||
~UserData() = default;
|
||||
|
||||
X_USER_DATA data_ = {};
|
||||
std::vector<uint8_t> extended_data_ = {};
|
||||
};
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "xenia/kernel/xam/user_profile.h"
|
||||
|
||||
#include <ranges>
|
||||
#include <sstream>
|
||||
|
||||
#include "third_party/fmt/include/fmt/format.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
@@ -21,7 +20,8 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
UserProfile::UserProfile(uint64_t xuid, X_XAMACCOUNTINFO* account_info)
|
||||
UserProfile::UserProfile(const uint64_t xuid,
|
||||
const X_XAMACCOUNTINFO* account_info)
|
||||
: xuid_(xuid), account_info_(*account_info), profile_images_() {
|
||||
// 58410A1F checks the user XUID against a mask of 0x00C0000000000000 (3<<54),
|
||||
// if non-zero, it prevents the user from playing the game.
|
||||
|
||||
@@ -74,7 +74,7 @@ enum class XTileType {
|
||||
};
|
||||
|
||||
// TODO: find filenames of other tile types that are stored in profile
|
||||
static const std::map<XTileType, std::string> kTileFileNames = {
|
||||
inline const std::map<XTileType, std::string> kTileFileNames = {
|
||||
{XTileType::kGamerTile, "tile_64.png"},
|
||||
{XTileType::kGamerTileSmall, "tile_32.png"},
|
||||
{XTileType::kPersonalGamerTile, "tile_64.png"},
|
||||
@@ -88,7 +88,7 @@ static constexpr std::pair<uint16_t, uint16_t> kProfileIconSizeSmall = {32, 32};
|
||||
|
||||
class UserProfile {
|
||||
public:
|
||||
UserProfile(uint64_t xuid, X_XAMACCOUNTINFO* account_info);
|
||||
UserProfile(const uint64_t xuid, const X_XAMACCOUNTINFO* account_info);
|
||||
|
||||
uint64_t xuid() const { return xuid_; }
|
||||
std::string name() const { return account_info_.GetGamertagString(); }
|
||||
|
||||
@@ -15,8 +15,6 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
Property::Property() : UserData() {};
|
||||
|
||||
Property::Property(const Property& property)
|
||||
: UserData(property), property_id_(property.property_id_) {}
|
||||
|
||||
@@ -43,8 +41,6 @@ Property::Property(std::span<const uint8_t> serialized_data)
|
||||
*reinterpret_cast<const uint32_t*>(serialized_data.data());
|
||||
}
|
||||
|
||||
Property::~Property() {};
|
||||
|
||||
std::vector<uint8_t> Property::Serialize() const {
|
||||
std::vector<uint8_t> serialized_property(
|
||||
sizeof(AttributeKey) + sizeof(X_USER_DATA) + extended_data_.size());
|
||||
|
||||
@@ -35,7 +35,7 @@ static_assert_size(XUSER_PROPERTY, 0x18);
|
||||
|
||||
class Property : public UserData {
|
||||
public:
|
||||
Property();
|
||||
Property() = default;
|
||||
Property(const Property& property);
|
||||
|
||||
Property(uint32_t property_id, UserDataTypes property_data);
|
||||
@@ -44,7 +44,8 @@ class Property : public UserData {
|
||||
// Ctor used for deserialization
|
||||
Property(const uint8_t* serialized_data, size_t data_size);
|
||||
Property(std::span<const uint8_t> serialized_data);
|
||||
~Property();
|
||||
|
||||
~Property() = default;
|
||||
|
||||
const AttributeKey GetPropertyId() const { return property_id_; }
|
||||
|
||||
|
||||
@@ -27,11 +27,6 @@ const static std::array<UserSetting, 3> default_setting_values = {
|
||||
UserSettingId::XPROFILE_GAMERCARD_PICTURE_KEY,
|
||||
xe::string_util::read_u16string_and_swap(u"gamercard_picture_key"))};
|
||||
|
||||
UserSetting::UserSetting(UserSetting& setting) : UserData(setting) {
|
||||
setting_id_ = setting.setting_id_;
|
||||
setting_source_ = setting.setting_source_;
|
||||
}
|
||||
|
||||
UserSetting::UserSetting(const UserSetting& setting) : UserData(setting) {
|
||||
setting_id_ = setting.setting_id_;
|
||||
setting_source_ = setting.setting_source_;
|
||||
|
||||
@@ -267,7 +267,7 @@ enum class UserSettingId : uint32_t {
|
||||
0x4F), // 0x7008004F, named "LastOnLIVE" in Velocity
|
||||
};
|
||||
|
||||
constexpr static std::array<UserSettingId, 104> known_settings = {
|
||||
inline constexpr std::array<UserSettingId, 104> known_settings = {
|
||||
UserSettingId::XPROFILE_PERMISSIONS,
|
||||
UserSettingId::XPROFILE_GAMER_TYPE,
|
||||
UserSettingId::XPROFILE_GAMER_YAXIS_INVERSION,
|
||||
@@ -374,7 +374,7 @@ constexpr static std::array<UserSettingId, 104> known_settings = {
|
||||
UserSettingId::XPROFILE_LAST_LIVE_SIGNIN,
|
||||
};
|
||||
|
||||
const static std::set<UserSettingId> title_writable_settings = {
|
||||
inline const std::set<UserSettingId> title_writable_settings = {
|
||||
UserSettingId::XPROFILE_TITLE_SPECIFIC1,
|
||||
UserSettingId::XPROFILE_TITLE_SPECIFIC2,
|
||||
UserSettingId::XPROFILE_TITLE_SPECIFIC3};
|
||||
@@ -447,7 +447,6 @@ enum ACCELERATOR_CONTROL_OPTIONS : uint8_t {
|
||||
|
||||
class UserSetting : public UserData {
|
||||
public:
|
||||
UserSetting(UserSetting& setting);
|
||||
UserSetting(const UserSetting& setting);
|
||||
// Ctor for writing from host
|
||||
UserSetting(UserSettingId setting_id, UserDataTypes setting_data);
|
||||
|
||||
@@ -28,8 +28,6 @@ DECLARE_int32(user_language);
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
UserTracker::UserTracker() : spa_data_(nullptr) {}
|
||||
UserTracker::~UserTracker() {}
|
||||
|
||||
bool UserTracker::AddUser(uint64_t xuid) {
|
||||
if (IsUserTracked(xuid)) {
|
||||
|
||||
@@ -45,8 +45,8 @@ struct TitleInfo {
|
||||
|
||||
class UserTracker {
|
||||
public:
|
||||
UserTracker();
|
||||
~UserTracker();
|
||||
UserTracker() = default;
|
||||
~UserTracker() = default;
|
||||
|
||||
// UserTracker specific methods
|
||||
bool AddUser(uint64_t xuid);
|
||||
@@ -115,7 +115,7 @@ class UserTracker {
|
||||
|
||||
void FlushUserData(const uint64_t xuid);
|
||||
|
||||
SpaInfo* spa_data_;
|
||||
SpaInfo* spa_data_ = nullptr;
|
||||
|
||||
std::set<uint64_t> tracked_xuids_;
|
||||
};
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#include "xenia/kernel/xenumerator.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
#if XE_PLATFORM_WIN32
|
||||
#include "xenia/base/platform_win.h"
|
||||
#endif
|
||||
|
||||
#include "third_party/fmt/include/fmt/format.h"
|
||||
|
||||
namespace xe {
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl/xboxkrnl_error.h>
|
||||
#include <xenia/kernel/xboxkrnl/xboxkrnl_modules.h>
|
||||
#include "xenia/base/cvar.h"
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/string_util.h"
|
||||
@@ -18,7 +16,9 @@
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_module.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_error.h"
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_memory.h"
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_modules.h"
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_threading.h"
|
||||
#include "xenia/kernel/xenumerator.h"
|
||||
#include "xenia/kernel/xthread.h"
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "xenia/cpu/export_resolver.h"
|
||||
#include "xenia/kernel/kernel_module.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/xam/xam_ordinals.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "xenia/base/clock.h"
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#define XENIA_KERNEL_XAM_XAM_PRIVATE_H_
|
||||
|
||||
#include "xenia/cpu/export_resolver.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/xam/xam_ordinals.h"
|
||||
|
||||
namespace xe {
|
||||
|
||||
@@ -33,12 +33,6 @@ XamState::XamState(Emulator* emulator, KernelState* kernel_state)
|
||||
AppManager::RegisterApps(kernel_state, app_manager_.get());
|
||||
}
|
||||
|
||||
XamState::~XamState() {
|
||||
app_manager_.reset();
|
||||
achievement_manager_.reset();
|
||||
content_manager_.reset();
|
||||
}
|
||||
|
||||
UserProfile* XamState::GetUserProfile(uint32_t user_index) const {
|
||||
if (user_index >= XUserMaxUserCount && user_index < XUserIndexLatest) {
|
||||
return nullptr;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace xam {
|
||||
class XamState {
|
||||
public:
|
||||
XamState(Emulator* emulator, KernelState* kernel_state);
|
||||
~XamState();
|
||||
~XamState() = default;
|
||||
|
||||
AppManager* app_manager() const { return app_manager_.get(); }
|
||||
ContentManager* content_manager() const { return content_manager_.get(); }
|
||||
|
||||
@@ -8,20 +8,13 @@
|
||||
*/
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/string_util.h"
|
||||
#include "xenia/cpu/processor.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/user_module.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_module.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
#include "xenia/kernel/xthread.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
#if XE_PLATFORM_WIN32
|
||||
#include "xenia/base/platform_win.h"
|
||||
#endif
|
||||
|
||||
#include "third_party/fmt/include/fmt/format.h"
|
||||
|
||||
namespace xe {
|
||||
|
||||
@@ -8,15 +8,12 @@
|
||||
*/
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/math.h"
|
||||
#include "xenia/base/string_util.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/user_profile.h"
|
||||
#include "xenia/kernel/xam/user_settings.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
#include "xenia/kernel/xenumerator.h"
|
||||
#include "xenia/kernel/xthread.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
#include "third_party/stb/stb_image.h"
|
||||
|
||||
@@ -7,12 +7,9 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
@@ -20,7 +17,7 @@ namespace xam {
|
||||
|
||||
void XGetVideoMode_entry(pointer_t<X_VIDEO_MODE> video_mode) {
|
||||
// TODO(benvanik): actually check to see if these are the same.
|
||||
xboxkrnl::VdQueryVideoMode(std::move(video_mode));
|
||||
xboxkrnl::VdQueryVideoMode(video_mode);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XGetVideoMode, kVideo, ExportTag::kSketchy);
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
#include "xenia/xbox.h"
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#ifndef XENIA_KERNEL_XAM_XDBF_GPD_INFO_H_
|
||||
#define XENIA_KERNEL_XAM_XDBF_GPD_INFO_H_
|
||||
|
||||
#include "xenia/kernel/xam/user_data.h"
|
||||
#include "xenia/kernel/xam/xdbf/xdbf_io.h"
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/xbox.h"
|
||||
#include "xenia/base/byte_order.h"
|
||||
#include "xenia/kernel/util/xfiletime.h"
|
||||
#include "xenia/kernel/xam/user_data.h"
|
||||
#include "xenia/kernel/xam/xdbf/xdbf_io.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
@@ -111,6 +111,8 @@ class GpdInfo : public XdbfFile {
|
||||
GpdInfo(const uint32_t title_id);
|
||||
GpdInfo(const uint32_t title_id, const std::vector<uint8_t> buffer);
|
||||
|
||||
~GpdInfo() = default;
|
||||
|
||||
// Normally GPD ALWAYS contains one free entry that indicates EOF
|
||||
bool IsValid() const { return !free_entries_.empty(); }
|
||||
// r/w image, setting, string.
|
||||
|
||||
@@ -29,7 +29,7 @@ class GpdInfoProfile : public GpdInfo {
|
||||
GpdInfoProfile(const std::vector<uint8_t> buffer)
|
||||
: GpdInfo(kDashboardID, buffer) {};
|
||||
|
||||
~GpdInfoProfile() {};
|
||||
~GpdInfoProfile() = default;
|
||||
|
||||
void AddNewTitle(const SpaInfo* title_data);
|
||||
void UpdateTitleInfo(const uint32_t title_id,
|
||||
|
||||
@@ -32,7 +32,7 @@ class GpdInfoTitle : public GpdInfo {
|
||||
GpdInfoTitle(const uint32_t title_id, const std::vector<uint8_t> buffer)
|
||||
: GpdInfo(title_id, buffer) {};
|
||||
|
||||
~GpdInfoTitle() {};
|
||||
~GpdInfoTitle() = default;
|
||||
|
||||
std::vector<uint32_t> GetAchievementsIds() const;
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ static_assert_size(AchievementTableEntry, 0x24);
|
||||
class SpaInfo : public XdbfFile {
|
||||
public:
|
||||
SpaInfo(const std::span<uint8_t> buffer);
|
||||
~SpaInfo() = default;
|
||||
|
||||
void Load();
|
||||
|
||||
|
||||
@@ -163,9 +163,11 @@ struct Entry {
|
||||
// https://free60project.github.io/wiki/XDBF.html
|
||||
class XdbfFile {
|
||||
public:
|
||||
XdbfFile() {};
|
||||
XdbfFile() = default;
|
||||
XdbfFile(const std::span<const uint8_t> buffer);
|
||||
|
||||
~XdbfFile() = default;
|
||||
|
||||
const Entry* const GetEntry(uint16_t section, uint64_t id) const;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user