C++ SDL Keydown Not Working Please Help Me
Keydown is not working. Please help me. Repo, https://github.com/MintMellowCat/sdl-helper-cpp, code:
bool keyDown(SDL_Keycode key) {
SDL_Event event;
if (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_KEYDOWN:
if (event.key.keysym.sym == key) {
return true;
} else {
return false;
}
}
}
return 0;
}
from Recent Questions - Stack Overflow https://ift.tt/3coX5x6
https://ift.tt/eA8V8J
Comments
Post a Comment