mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Added love.keyboard.setKeyRepeat and love.keyboard.hasKeyRepeat (resolves issue #717)
This commit is contained in:
@@ -29,11 +29,26 @@ namespace keyboard
|
||||
namespace sdl
|
||||
{
|
||||
|
||||
Keyboard::Keyboard()
|
||||
: key_repeat(false)
|
||||
{
|
||||
}
|
||||
|
||||
const char *Keyboard::getName() const
|
||||
{
|
||||
return "love.keyboard.sdl";
|
||||
}
|
||||
|
||||
void Keyboard::setKeyRepeat(bool enable)
|
||||
{
|
||||
key_repeat = enable;
|
||||
}
|
||||
|
||||
bool Keyboard::hasKeyRepeat() const
|
||||
{
|
||||
return key_repeat;
|
||||
}
|
||||
|
||||
bool Keyboard::isDown(Key *keylist) const
|
||||
{
|
||||
const Uint8 *keystate = SDL_GetKeyboardState(0);
|
||||
|
||||
Reference in New Issue
Block a user