[nostalgia/core] Add key event handler
This commit is contained in:
@@ -74,8 +74,9 @@ uint64_t ticksMs(Context *ctx) noexcept {
|
||||
return static_cast<uint64_t>(now - id->startTime);
|
||||
}
|
||||
|
||||
bool buttonDown(Context*, Key) noexcept {
|
||||
return false;
|
||||
bool buttonDown(Context *ctx, Key key) noexcept {
|
||||
const auto id = ctx->windowerData<GlfwImplData>();
|
||||
return (id->keysDown >> static_cast<int>(key)) & 1;
|
||||
}
|
||||
|
||||
ox::Error shutdown(Context *ctx) noexcept {
|
||||
|
||||
Reference in New Issue
Block a user