Compare commits

...

3 Commits

Author SHA1 Message Date
¥IGA 36afa3924f
Merge fd64846aab into 3d79874828 2024-12-21 13:13:21 -05:00
Adrian 3d79874828 [XAM] Fixed profile setting for preferred color
Fixes Supreme Commander from crashing.
2024-12-21 14:58:16 +01:00
¥IGA fd64846aab
[Misc] Support for upcoming Python releases 2024-12-18 15:27:31 +01:00
3 changed files with 32 additions and 11 deletions

View File

@ -52,9 +52,9 @@ UserProfile::UserProfile(uint64_t xuid, X_XAMACCOUNTINFO* account_info)
// XPROFILE_GAMER_CONTROL_SENSITIVITY // XPROFILE_GAMER_CONTROL_SENSITIVITY
AddSetting(std::make_unique<UserSetting>(0x10040018, 0)); AddSetting(std::make_unique<UserSetting>(0x10040018, 0));
// Preferred color 1 // Preferred color 1
AddSetting(std::make_unique<UserSetting>(0x1004001D, 0xFFFF0000u)); AddSetting(std::make_unique<UserSetting>(0x1004001D, PREFERRED_COLOR_NONE));
// Preferred color 2 // Preferred color 2
AddSetting(std::make_unique<UserSetting>(0x1004001E, 0xFF00FF00u)); AddSetting(std::make_unique<UserSetting>(0x1004001E, PREFERRED_COLOR_NONE));
// XPROFILE_GAMER_ACTION_AUTO_AIM // XPROFILE_GAMER_ACTION_AUTO_AIM
AddSetting(std::make_unique<UserSetting>(0x10040022, 1)); AddSetting(std::make_unique<UserSetting>(0x10040022, 1));
// XPROFILE_GAMER_ACTION_AUTO_CENTER // XPROFILE_GAMER_ACTION_AUTO_CENTER

View File

@ -35,6 +35,21 @@ enum class X_USER_PROFILE_SETTING_SOURCE : uint32_t {
UNKNOWN = 3, UNKNOWN = 3,
}; };
enum PREFERRED_COLOR_OPTIONS : uint32_t {
PREFERRED_COLOR_NONE,
PREFERRED_COLOR_BLACK,
PREFERRED_COLOR_WHITE,
PREFERRED_COLOR_YELLOW,
PREFERRED_COLOR_ORANGE,
PREFERRED_COLOR_PINK,
PREFERRED_COLOR_RED,
PREFERRED_COLOR_PURPLE,
PREFERRED_COLOR_BLUE,
PREFERRED_COLOR_GREEN,
PREFERRED_COLOR_BROWN,
PREFERRED_COLOR_SILVER
};
// Each setting contains 0x18 bytes long header // Each setting contains 0x18 bytes long header
struct X_USER_PROFILE_SETTING_HEADER { struct X_USER_PROFILE_SETTING_HEADER {
xe::be<uint32_t> setting_id; xe::be<uint32_t> setting_id;

24
xb.bat
View File

@ -1,5 +1,5 @@
@ECHO OFF @ECHO OFF
REM Copyright 2022 Ben Vanik. All Rights Reserved. REM Copyright 2024 Ben Vanik. All Rights Reserved.
SET "DIR=%~dp0" SET "DIR=%~dp0"
@ -35,14 +35,20 @@ SETLOCAL ENABLEDELAYEDEXPANSION
SET FOUND_PATH="" SET FOUND_PATH=""
SET "CANDIDATE_PATHS[0]=C:\python313\python.exe" SET "CANDIDATE_PATHS[0]=C:\python320\python.exe"
SET "CANDIDATE_PATHS[1]=C:\python312\python.exe" SET "CANDIDATE_PATHS[1]=C:\python319\python.exe"
SET "CANDIDATE_PATHS[2]=C:\python311\python.exe" SET "CANDIDATE_PATHS[2]=C:\python318\python.exe"
SET "CANDIDATE_PATHS[3]=C:\python310\python.exe" SET "CANDIDATE_PATHS[3]=C:\python317\python.exe"
SET "CANDIDATE_PATHS[4]=C:\python39\python.exe" SET "CANDIDATE_PATHS[4]=C:\python316\python.exe"
SET "CANDIDATE_PATHS[5]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe" SET "CANDIDATE_PATHS[5]=C:\python315\python.exe"
SET "CANDIDATE_PATHS[6]=C:\Windows\py.exe" SET "CANDIDATE_PATHS[6]=C:\python314\python.exe"
SET OUTPUT_INDEX=7 SET "CANDIDATE_PATHS[7]=C:\python313\python.exe"
SET "CANDIDATE_PATHS[8]=C:\python312\python.exe"
SET "CANDIDATE_PATHS[9]=C:\python311\python.exe"
SET "CANDIDATE_PATHS[10]=C:\python310\python.exe"
SET "CANDIDATE_PATHS[11]=C:\python%PYTHON_MINIMUM_VERSION[0]%%PYTHON_MINIMUM_VERSION[1]%\python.exe"
SET "CANDIDATE_PATHS[12]=C:\Windows\py.exe"
SET OUTPUT_INDEX=13
FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO ( FOR /F "usebackq delims=" %%L IN (`2^>NUL where python3`) DO (
IF %%~zL NEQ 0 ( IF %%~zL NEQ 0 (