Skip to content

Commit

Permalink
input: rename GamepadGUID to GamepadSDLID to make upgrading to newer …
Browse files Browse the repository at this point in the history
…Ebiten versions easier
  • Loading branch information
silbinarywolf committed Apr 5, 2020
1 parent af08713 commit dacd4c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ func IsMouseButtonPressed(mouseButton MouseButton) bool {
return uiDriver().Input().IsMouseButtonPressed(driver.MouseButton(mouseButton))
}

// GamepadGUID returns a string with the uuid.
// GamepadSDLID returns a string with the uuid.
//
// GamepadGUID is concurrent-safe.
// GamepadSDLID is concurrent-safe.
//
// GamepadGUID always returns an empty string on browsers and mobiles.
func GamepadGUID(id int) string {
return uiDriver().Input().GamepadGUID(id)
// GamepadSDLID always returns an empty string on browsers and mobiles.
func GamepadSDLID(id int) string {
return uiDriver().Input().GamepadSDLID(id)
}

// GamepadName returns a string with the name.
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package driver

type Input interface {
CursorPosition() (x, y int)
GamepadGUID(id int) string
GamepadSDLID(id int) string
GamepadName(id int) string
GamepadAxis(id int, axis int) float64
GamepadAxisNum(id int) int
Expand Down
2 changes: 1 addition & 1 deletion internal/uidriver/glfw/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (i *Input) GamepadIDs() []int {
return r
}

func (i *Input) GamepadGUID(id int) string {
func (i *Input) GamepadSDLID(id int) string {
i.ui.m.RLock()
defer i.ui.m.RUnlock()
if len(i.gamepads) <= id {
Expand Down
2 changes: 1 addition & 1 deletion internal/uidriver/js/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (i *Input) CursorPosition() (x, y int) {
return i.ui.adjustPosition(i.cursorX, i.cursorY)
}

func (i *Input) GamepadGUID(id int) string {
func (i *Input) GamepadSDLID(id int) string {
return ""
}

Expand Down
2 changes: 1 addition & 1 deletion internal/uidriver/mobile/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (i *Input) GamepadIDs() []int {
return nil
}

func (i *Input) GamepadGUID(id int) string {
func (i *Input) GamepadSDLID(id int) string {
return ""
}

Expand Down

0 comments on commit dacd4c1

Please sign in to comment.