[XAM/UI] - Stubbed XamShowSigninUIEx and XamShowNuiSigninUI
- Add XTT file header - Stubbed XamShowSigninUIEx & XamShowNuiSigninUI - add flags for XamShowCreateProfileUI, exXamShowSigninUI, and XamUserLogon - Define sign in states - Add undefined params
This commit is contained in:
parent
fd82727be6
commit
d143f13fdf
|
@ -86,13 +86,19 @@ inline const std::map<XTileType, std::string> kTileFileNames = {
|
|||
static constexpr std::pair<uint16_t, uint16_t> kProfileIconSize = {64, 64};
|
||||
static constexpr std::pair<uint16_t, uint16_t> kProfileIconSizeSmall = {32, 32};
|
||||
|
||||
enum X_User_Sign_In_State : uint32_t {
|
||||
NotSignedIn,
|
||||
SignedInLocally, // Offline
|
||||
SignedInToLive, // Online
|
||||
};
|
||||
|
||||
class UserProfile {
|
||||
public:
|
||||
UserProfile(const uint64_t xuid, const X_XAMACCOUNTINFO* account_info);
|
||||
|
||||
uint64_t xuid() const { return xuid_; }
|
||||
std::string name() const { return account_info_.GetGamertagString(); }
|
||||
uint32_t signin_state() const { return 1; }
|
||||
uint32_t signin_state() const { return SignedInLocally; }
|
||||
uint32_t type() const { return 1 | 2; /* local | online profile? */ }
|
||||
|
||||
uint32_t GetReservedFlags() const {
|
||||
|
|
|
@ -19,8 +19,9 @@ namespace xam {
|
|||
enum class DeviceType : uint32_t {
|
||||
Invalid = 0,
|
||||
HDD = 1,
|
||||
MU = 2,
|
||||
MU = 2, // support removed in 9199
|
||||
ODD = 4,
|
||||
USBMASS = 16, // Added in 8955
|
||||
};
|
||||
|
||||
enum class DummyDeviceId : uint32_t {
|
||||
|
|
|
@ -209,10 +209,9 @@ dword_result_t XamInputGetKeystrokeEx_entry(
|
|||
}
|
||||
DECLARE_XAM_EXPORT1(XamInputGetKeystrokeEx, kInput, kImplemented);
|
||||
|
||||
X_HRESULT_result_t XamUserGetDeviceContext_entry(
|
||||
dword_t user_index,
|
||||
dword_t unk, // It's set to 3 for a big button
|
||||
lpdword_t out_ptr) {
|
||||
X_HRESULT_result_t XamUserGetDeviceContext_entry(dword_t user_index,
|
||||
dword_t device_type,
|
||||
lpdword_t out_ptr) {
|
||||
// Games check the result - usually with some masking.
|
||||
// If this function fails they assume zero, so let's fail AND
|
||||
// set zero just to be safe.
|
||||
|
|
|
@ -938,7 +938,7 @@ X_RESULT xeXamShowSigninUI(uint32_t user_index, uint32_t users_needed,
|
|||
close);
|
||||
}
|
||||
|
||||
X_RESULT xeXamShowCreateProfileUIEx(uint32_t user_index, dword_t unkn,
|
||||
X_RESULT xeXamShowCreateProfileUIEx(uint32_t user_index, dword_t flag,
|
||||
char* unkn2_ptr) {
|
||||
Emulator* emulator = kernel_state()->emulator();
|
||||
xe::ui::ImGuiDrawer* imgui_drawer = emulator->imgui_drawer();
|
||||
|
@ -954,24 +954,42 @@ X_RESULT xeXamShowCreateProfileUIEx(uint32_t user_index, dword_t unkn,
|
|||
}
|
||||
|
||||
dword_result_t XamShowSigninUI_entry(dword_t users_needed, dword_t flags) {
|
||||
// sets overlapped to zero;
|
||||
return xeXamShowSigninUI(XUserIndexAny, users_needed, flags);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowSigninUI, kUserProfiles, kImplemented);
|
||||
|
||||
dword_result_t XamShowSigninUIEx_entry(dword_t users_needed, dword_t flags,
|
||||
lpvoid_t overlapped) {
|
||||
// user_index = XUserIndexAny
|
||||
return 0;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowSigninUIEx, kUserProfiles, kStub);
|
||||
|
||||
dword_result_t XamShowNuiSigninUI_entry(unknown_t unk1, unknown_t unk2,
|
||||
dword_t flags) {
|
||||
// users_needed always = 1
|
||||
// user_index = 0?
|
||||
// uint32_t sent_flags = flags | XSSUI_NUI; // always ensures it is added
|
||||
return 0;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowNuiSigninUI, kUserProfiles, kStub);
|
||||
|
||||
dword_result_t XamShowSigninUIp_entry(dword_t user_index, dword_t users_needed,
|
||||
dword_t flags) {
|
||||
// sets overlapped to zero;
|
||||
return xeXamShowSigninUI(user_index, users_needed, flags);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowSigninUIp, kUserProfiles, kImplemented);
|
||||
|
||||
dword_result_t XamShowCreateProfileUIEx_entry(dword_t user_index, dword_t unkn,
|
||||
dword_result_t XamShowCreateProfileUIEx_entry(dword_t user_index, dword_t flag,
|
||||
lpstring_t unkn2_ptr) {
|
||||
return xeXamShowCreateProfileUIEx(user_index, unkn, unkn2_ptr);
|
||||
return xeXamShowCreateProfileUIEx(user_index, flag, unkn2_ptr);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowCreateProfileUIEx, kUserProfiles, kImplemented);
|
||||
|
||||
dword_result_t XamShowCreateProfileUI_entry(dword_t user_index, dword_t unkn) {
|
||||
return xeXamShowCreateProfileUIEx(user_index, unkn, 0);
|
||||
dword_result_t XamShowCreateProfileUI_entry(dword_t user_index, dword_t flag) {
|
||||
return xeXamShowCreateProfileUIEx(user_index, flag, 0);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamShowCreateProfileUI, kUserProfiles, kImplemented);
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ typedef uint32_t X_STATUS;
|
|||
#define X_STATUS_INVALID_HANDLE ((X_STATUS)0xC0000008L)
|
||||
#define X_STATUS_INVALID_PARAMETER ((X_STATUS)0xC000000DL)
|
||||
#define X_STATUS_NO_SUCH_FILE ((X_STATUS)0xC000000FL)
|
||||
#define X_STATUS_INVALID_DEVICE_REQUEST ((X_STATUS)0xC0000010L)
|
||||
#define X_STATUS_END_OF_FILE ((X_STATUS)0xC0000011L)
|
||||
#define X_STATUS_NO_MEMORY ((X_STATUS)0xC0000017L)
|
||||
#define X_STATUS_ALREADY_COMMITTED ((X_STATUS)0xC0000021L)
|
||||
|
@ -931,6 +932,93 @@ struct X_DASH_APP_INFO {
|
|||
static_assert_size(X_DASH_APP_INFO, 0xC);
|
||||
#pragma pack(pop)
|
||||
|
||||
// XamShowCreateProfileUI Flags
|
||||
enum XSCPUI_Flags : uint32_t {
|
||||
XSCPUI_CreateNewProfile = 0x00000000,
|
||||
XSCPUI_SignUpForLive = 0x00000001, // Used in NXE and kinect profile page
|
||||
XSCPUI_RecoverProfile = 0x00000002, // Used in NXE and kinect profile Select
|
||||
};
|
||||
|
||||
// XamShowSigninUI Flags
|
||||
enum XSSUI_Flags : uint32_t {
|
||||
XSSUI_ALL = 0x00000000, // show all profiles with option to create one or download
|
||||
XSSUI_LocalSignInOnly = 0x00000001,
|
||||
XSSUI_ShowOnlineEnabledOnly = 0x00000002,
|
||||
XSSUI_AllowSignout = 0x00000004,
|
||||
XSSUI_NUI = 0x00000008, // always set by XamShowNuiSigninUI
|
||||
XSSUI_DisallowPlayAs = 0x00000010,
|
||||
XSSUI_AddUser = 0x00010000,
|
||||
XSSUI_CompleteSignIn = 0x00020000,
|
||||
XSSUI_ShowParentalControlledOnly = 0x00040000,
|
||||
XSSUI_EnableGuest = 0x00080000,
|
||||
XSSUI_DisallowReload = 0x00100000,
|
||||
XSSUI_ConvertOfflineToGuest = 0x00400000,
|
||||
XSSUI_Unk_1 = 0x00800000, // used by XamShowSigninUIEx
|
||||
XSSUI_DisallowGuest = 0x01000000,
|
||||
XSSUI_Unk_2 = 0x02000000, // used by XamShowSigninUIEx
|
||||
XSSUI_Unk_3 = 0x04000000, // used by XamShowSigninUIp
|
||||
XSSUI_Unk_4 = 0x20000000, // used by XamShowSigninUIp
|
||||
/* Known examples:
|
||||
- 0x04000001 // used by XamShowSigninUI
|
||||
- 0x04030000 // used by XamShowSigninUIp to login to a specific account for NXE and Kinect
|
||||
- 0x24030000 // used by XamShowSigninUIp
|
||||
- 0x02230002 // used by XamShowSigninUIEx
|
||||
- 0x01000002 // used by XamShowSigninUIEx
|
||||
- 0x01010002 // used by XamShowSigninUIEx
|
||||
*/
|
||||
};
|
||||
|
||||
// XamUserLogon Flags
|
||||
enum XUL_FLAGS : uint32_t {
|
||||
XUL_OfflineOnly = 0x00000001,
|
||||
XUL_ForceLiveLogOff = 0x00000002,
|
||||
XUL_AddUser = 0x00000004,
|
||||
XUL_RemoveUser = 0x00000008,
|
||||
XUL_ForegroundPriority = 0x00000010,
|
||||
XUL_NoPopupNotification = 0x00000020,
|
||||
XUL_DontWaitForCompletion = 0x00000040, // overlap related
|
||||
XUL_AllowMachineAccountOnly = 0x00000080,
|
||||
XUL_CheckOnlineTicketsOnly = 0x00000100,
|
||||
XUL_AllowDefaultUser = 0x00000200,
|
||||
XUL_AllowUsersWithRequiredMessage = 0x00000400,
|
||||
XUL_RestrictPopupNotification = 0x00000800,
|
||||
XUL_unknown_1 = 0x00002000,
|
||||
XUL_InvalidFlag = 0x00004000, // return X_E_INVALIDARG
|
||||
/* Known examples:
|
||||
- 0x00000008 blades 6717 log out
|
||||
- 0x00000017 Blades 6717 log on
|
||||
- 0x00000023
|
||||
- 0x00000048 Blades
|
||||
- 0x00000013 Testing Network
|
||||
- 0x00000424
|
||||
- 0x00000025 NXE
|
||||
- 0x00000014 Blades OOBE profile creation
|
||||
*/
|
||||
};
|
||||
|
||||
// XamUserGetDeviceContext
|
||||
enum Device_Context_Types : uint32_t {
|
||||
DCT_BigButton = 3,
|
||||
DCT_Microphone = 4,
|
||||
};
|
||||
|
||||
enum MicDeviceRequest_Type : uint16_t {
|
||||
MDRT_Gain = 1,
|
||||
MDRT_Data = 7,
|
||||
MDRT_Capabilities = 9,
|
||||
};
|
||||
|
||||
// https://www.se7ensins.com/forums/threads/xtt-file-research.966597/
|
||||
struct XTTFileHeader {
|
||||
uint32_t xttTag;
|
||||
uint8_t signature[0x100]; // XECRYPT_SIG
|
||||
uint32_t signedBlockSize;
|
||||
uint32_t fileSize;
|
||||
uint32_t compressedTablesSize;
|
||||
uint32_t uncompressedTablesSize;
|
||||
uint32_t xttFileVersion;
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace xe
|
||||
|
|
Loading…
Reference in New Issue