Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyoverlay showing wrong values on Linux #167

Open
hwsmm opened this issue Jan 22, 2023 · 2 comments
Open

Keyoverlay showing wrong values on Linux #167

hwsmm opened this issue Jan 22, 2023 · 2 comments

Comments

@hwsmm
Copy link

hwsmm commented Jan 22, 2023

Hi, I've been writing memory reader of mine in another language, and I just found out that

if UnderWine == true || runtime.GOOS != "windows" { //Arrays start at 0xC in Linux for some reason, has to be wine specific
leaderStart = 0xC
} else {
leaderStart = 0x8
}

applies the same to these lines. (0xC instead of 0x8)
var entries struct {
K1Pressed int8 `mem:"[Base + 0x8] + 0x1C"` //Pressed usually works with <20 update rate. It's recommended to create a buffer and predict presses by count to save CPU overhead
K1Count int32 `mem:"[Base + 0x8] + 0x14"`
K2Pressed int8 `mem:"[Base + 0xC] + 0x1C"`
K2Count int32 `mem:"[Base + 0xC] + 0x14"`
M1Pressed int8 `mem:"[Base + 0x10] + 0x1C"`
M1Count int32 `mem:"[Base + 0x10] + 0x14"`
M2Pressed int8 `mem:"[Base + 0x14] + 0x1C"`
M2Count int32 `mem:"[Base + 0x14] + 0x14"`
}


I'd write a PR if I were good enough at Go, but unfortunately I couldn't come up with a good solution, so I am just writing an issue.

@C0D3-M4513R
Copy link
Contributor

So you are saying, that K1Pressed should be the same as K2Pressed?
And K1Count should be the same as K2Count=? seems broken...

@KotRikD
Copy link
Contributor

KotRikD commented Apr 9, 2023

It's not the same thing. It just pointers to start of array with values. LeaderStart is needed to calculate current value pointer in array (NOT START OF ARRAY)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants