MCPcopy Create free account
hub / github.com/360Controller/360Controller / MakeSettingsChanges

Method MakeSettingsChanges

360Controller/_60Controller.cpp:899–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

897
898
899void Xbox360Peripheral::MakeSettingsChanges()
900{
901 if (controllerType == XboxOne)
902 {
903 if (pretend360)
904 {
905 controllerType = XboxOnePretend360;
906 PadConnect();
907 }
908 }
909 else if (controllerType == XboxOnePretend360)
910 {
911 if (!pretend360)
912 {
913 controllerType = XboxOne;
914 PadConnect();
915 }
916 }
917
918 if (controllerType == Xbox360)
919 {
920 if (pretend360)
921 {
922 controllerType = Xbox360Pretend360;
923 PadConnect();
924 }
925 }
926 else if (controllerType == Xbox360Pretend360)
927 {
928 if (!pretend360)
929 {
930 controllerType = Xbox360;
931 PadConnect();
932 }
933 }
934
935 noMapping = true;
936 UInt8 normalMapping[15] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 };
937 for (int i = 0; i < 15; i++)
938 {
939 if (normalMapping[i] != mapping[i])
940 {
941 noMapping = false;
942 break;
943 }
944 }
945}
946
947
948// Called by the userspace IORegistryEntrySetCFProperties function

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected