Skip to content

Commit 8fbde80

Browse files
Do not save virtual or remote devices to sizes.ors
1 parent bb79fbf commit 8fbde80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ProfileManager.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ bool ProfileManager::SaveProfile(std::string profile_name, bool sizes)
8383
\*---------------------------------------------------------*/
8484
for(std::size_t controller_index = 0; controller_index < controllers.size(); controller_index++)
8585
{
86+
/*-----------------------------------------------------*\
87+
| Ignore remote and virtual controllers when saving |
88+
| sizes |
89+
\*-----------------------------------------------------*/
90+
if(sizes && (controllers[controller_index]->flags & CONTROLLER_FLAG_REMOTE
91+
|| controllers[controller_index]->flags & CONTROLLER_FLAG_VIRTUAL))
92+
{
93+
break;
94+
}
95+
8696
unsigned char *controller_data = controllers[controller_index]->GetDeviceDescription(profile_version);
8797
unsigned int controller_size;
8898

0 commit comments

Comments
 (0)