[XAM] Added XamProfileOpen support and xam_profile.cc dedicated file for XamProfile exports
- Modified implementation of MountProfile to allow custom mount paths
This commit is contained in:
parent
7e51efeec5
commit
4620fa93d8
|
@ -253,9 +253,12 @@ void ProfileManager::ModifyGamertag(const uint64_t xuid, std::string gamertag) {
|
|||
DismountProfile(xuid);
|
||||
}
|
||||
|
||||
bool ProfileManager::MountProfile(const uint64_t xuid) {
|
||||
bool ProfileManager::MountProfile(const uint64_t xuid, std::string mount_path) {
|
||||
std::filesystem::path profile_path = GetProfilePath(xuid);
|
||||
std::string mount_path = fmt::format("{:016X}", xuid) + ':';
|
||||
if (mount_path.empty()) {
|
||||
mount_path = fmt::format("{:016X}", xuid);
|
||||
}
|
||||
mount_path += ':';
|
||||
|
||||
auto device =
|
||||
std::make_unique<vfs::HostPathDevice>(mount_path, profile_path, false);
|
||||
|
|
|
@ -86,7 +86,7 @@ class ProfileManager {
|
|||
|
||||
void ModifyGamertag(const uint64_t xuid, std::string gamertag);
|
||||
|
||||
bool MountProfile(const uint64_t xuid);
|
||||
bool MountProfile(const uint64_t xuid, std::string mount_path = "");
|
||||
bool DismountProfile(const uint64_t xuid);
|
||||
|
||||
void Login(const uint64_t xuid, const uint8_t user_index = XUserIndexAny,
|
||||
|
|
|
@ -24,6 +24,7 @@ XE_MODULE_EXPORT_GROUP(xam, Net)
|
|||
XE_MODULE_EXPORT_GROUP(xam, Notify)
|
||||
XE_MODULE_EXPORT_GROUP(xam, NUI)
|
||||
XE_MODULE_EXPORT_GROUP(xam, Party)
|
||||
XE_MODULE_EXPORT_GROUP(xam, Profile)
|
||||
XE_MODULE_EXPORT_GROUP(xam, Task)
|
||||
XE_MODULE_EXPORT_GROUP(xam, UI)
|
||||
XE_MODULE_EXPORT_GROUP(xam, User)
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2025 Xenia Canary. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
#include "xenia/kernel/util/shim_utils.h"
|
||||
#include "xenia/kernel/xam/xam_private.h"
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
dword_result_t XamProfileOpen_entry(qword_t xuid, lpstring_t mount_path) {
|
||||
const bool result =
|
||||
kernel_state()->xam_state()->profile_manager()->MountProfile(
|
||||
xuid, mount_path.value());
|
||||
|
||||
return result ? X_ERROR_SUCCESS : X_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamProfileOpen, kNone, kImplemented);
|
||||
|
||||
} // namespace xam
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
DECLARE_XAM_EMPTY_REGISTER_EXPORTS(Profile);
|
Loading…
Reference in New Issue