Closed kitcatier closed 1 year ago
Although GetAsyncKeyState
is an unsafe function, according to Microsoft docs there's no remark that the function could crash or corrupt anything, and I'm pretty sure that's a battle tested API, too.
And to be honest, I wasn't very careful on marking unsafe/safe functions, I should, in the future, but for now, I think it's ok, since we're building an app and not a library.
Thanks for pointing it out, though!
https://github.com/etra0/botw-freecam/blob/5129e21902336ae8555cdcae231a15655201a249/botw-freecam/src/utils.rs#L49-L51 hello, if a function's entire body is unsafe, the function is itself unsafe and should be marked appropriately. Marking them unsafe also means that callers must make sure they know what they're doing.