Skip to content

Commit

Permalink
go-steamworks: fix SteamUserStats.GetAchievement on Windows (hajimeho…
Browse files Browse the repository at this point in the history
…shi#5)

This one is a sneaky one, since it's Windows-specific
and it was impossible to debug on Linux why some players report
all of their achievements being unlocked.

Turns out, it's a Windows-specific typo in the library.
  • Loading branch information
quasilyte authored Aug 13, 2023
1 parent ee1a819 commit 103842c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion steamworks_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func (s steamUserStats) GetAchievement(name string) (achieved, success bool) {
cname := append([]byte(name), 0)
defer runtime.KeepAlive(cname)

v, err := theDLL.call(flatAPI_ISteamUserStats_SetAchievement, uintptr(s), uintptr(unsafe.Pointer(&cname[0])), uintptr(unsafe.Pointer(&achieved)))
v, err := theDLL.call(flatAPI_ISteamUserStats_GetAchievement, uintptr(s), uintptr(unsafe.Pointer(&cname[0])), uintptr(unsafe.Pointer(&achieved)))
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 103842c

Please sign in to comment.