MCPcopy Create free account
hub / github.com/SFML/SFML / deviceEnumerationCallback

Method deviceEnumerationCallback

src/SFML/Window/Win32/JoystickImpl.cpp:1059–1075  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1057
1058////////////////////////////////////////////////////////////
1059BOOL CALLBACK JoystickImpl::deviceEnumerationCallback(const DIDEVICEINSTANCE* deviceInstance, void*)
1060{
1061 for (JoystickRecord& record : joystickList)
1062 {
1063 if (record.guid == deviceInstance->guidInstance)
1064 {
1065 record.plugged = true;
1066
1067 return DIENUM_CONTINUE;
1068 }
1069 }
1070
1071 const JoystickRecord record = {deviceInstance->guidInstance, sf::Joystick::Count, true};
1072 joystickList.push_back(record);
1073
1074 return DIENUM_CONTINUE;
1075}
1076
1077
1078////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected