Compare commits

...

3 Commits

Author SHA1 Message Date
Margen67 5e1cfbec06
Merge d1be412836 into 3d79874828 2024-12-21 15:30:15 +01:00
Adrian 3d79874828 [XAM] Fixed profile setting for preferred color
Fixes Supreme Commander from crashing.
2024-12-21 14:58:16 +01:00
Margen67 d1be412836 Add /Qpar
See https://learn.microsoft.com/en-us/cpp/build/reference/qpar-auto-parallelizer?view=msvc-170
2024-12-16 21:35:12 -08:00
3 changed files with 18 additions and 2 deletions

View File

@ -66,6 +66,7 @@ filter({"configurations:Release", "platforms:Windows"})
buildoptions({
"/Gw",
"/Ob3",
"/Qpar",
})
filter("configurations:Debug")

View File

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

View File

@ -35,6 +35,21 @@ enum class X_USER_PROFILE_SETTING_SOURCE : uint32_t {
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
struct X_USER_PROFILE_SETTING_HEADER {
xe::be<uint32_t> setting_id;