Commits

Alex Szpakowski  committed 00c3587

Renamed Joystick:getProductGUID back to Joystick:getGUID

  • Participants
  • Parent commits c49b070

Comments (0)

Files changed (8)

File src/modules/joystick/Joystick.h

 
 	virtual void *getHandle() const = 0;
 
-	virtual std::string getProductGUID() const = 0;
+	virtual std::string getGUID() const = 0;
 	virtual int getInstanceID() const = 0;
 	virtual int getID() const = 0;
 

File src/modules/joystick/sdl/Joystick.cpp

 	return joyhandle;
 }
 
-std::string Joystick::getProductGUID() const
+std::string Joystick::getGUID() const
 {
 	// SDL2's GUIDs identify *classes* of devices, instead of unique devices.
 	return pguid;

File src/modules/joystick/sdl/Joystick.h

 
 	void *getHandle() const;
 
-	std::string getProductGUID() const;
+	std::string getGUID() const;
 	int getInstanceID() const;
 	int getID() const;
 

File src/modules/joystick/sdl/JoystickModule.cpp

 	if (deviceindex < 0 || deviceindex >= SDL_NumJoysticks())
 		return 0;
 
-	std::string guidstr = getDeviceProductGUID(deviceindex);
+	std::string guidstr = getDeviceGUID(deviceindex);
 
 	joystick::Joystick *joystick = 0;
 
 	for (size_t i = 0; i < joysticks.size(); i++)
 	{
 		// Try to re-use a disconnected Joystick with the same GUID.
-		if (!joysticks[i]->isConnected() && joysticks[i]->getProductGUID() == guidstr)
+		if (!joysticks[i]->isConnected() && joysticks[i]->getGUID() == guidstr)
 		{
 			joystick = joysticks[i];
 			joystick->open(deviceindex);
 		if (!SDL_IsGameController(d_index))
 			continue;
 
-		if (guid.compare(getDeviceProductGUID(d_index)) != 0)
+		if (guid.compare(getDeviceGUID(d_index)) != 0)
 			continue;
 
 		std::vector<love::joystick::Joystick *>::const_iterator it;
 		for (it = activeSticks.begin(); it != activeSticks.end(); ++it)
 		{
-			if ((*it)->isGamepad() || guid.compare((*it)->getProductGUID()) != 0)
+			if ((*it)->isGamepad() || guid.compare((*it)->getGUID()) != 0)
 				continue;
 
 			// Big hack time: open the index as a game controller and compare
 	}
 }
 
-std::string JoystickModule::getDeviceProductGUID(int deviceindex) const
+std::string JoystickModule::getDeviceGUID(int deviceindex) const
 {
 	if (deviceindex < 0 || deviceindex >= SDL_NumJoysticks())
 		return std::string("");

File src/modules/joystick/sdl/JoystickModule.h

 	void checkGamepads(const std::string &guid) const;
 
 	// SDL2's GUIDs identify *classes* of devices, instead of unique devices.
-	std::string getDeviceProductGUID(int deviceindex) const;
+	std::string getDeviceGUID(int deviceindex) const;
 
 	// Lists of currently connected Joysticks.
 	std::vector<Joystick *> activeSticks;

File src/modules/joystick/sdl/wrap_Joystick.cpp

 	return 2;
 }
 
-int w_Joystick_getProductGUID(lua_State *L)
+int w_Joystick_getGUID(lua_State *L)
 {
 	Joystick *j = luax_checkjoystick(L, 1);
-	luax_pushstring(L, j->getProductGUID());
+	luax_pushstring(L, j->getGUID());
 	return 1;
 }
 
 	{ "isConnected", w_Joystick_isConnected },
 	{ "getName", w_Joystick_getName },
 	{ "getID", w_Joystick_getID },
-	{ "getProductGUID", w_Joystick_getProductGUID },
+	{ "getGUID", w_Joystick_getGUID },
 	{ "getAxisCount", w_Joystick_getAxisCount },
 	{ "getButtonCount", w_Joystick_getButtonCount },
 	{ "getHatCount", w_Joystick_getHatCount },

File src/modules/joystick/sdl/wrap_Joystick.h

 int w_Joystick_isConnected(lua_State *L);
 int w_Joystick_getName(lua_State *L);
 int w_Joystick_getID(lua_State *L);
-int w_Joystick_getProductGUID(lua_State *L);
+int w_Joystick_getGUID(lua_State *L);
 int w_Joystick_getAxisCount(lua_State *L);
 int w_Joystick_getButtonCount(lua_State *L);
 int w_Joystick_getHatCount(lua_State *L);

File src/modules/joystick/sdl/wrap_JoystickModule.cpp

 	else
 	{
 		love::joystick::Joystick *stick = luax_checkjoystick(L, 1);
-		guid = stick->getProductGUID();
+		guid = stick->getGUID();
 	}
 
 	const char *gpbindstr = luaL_checkstring(L, 2);