|
@@ -1,4 +1,5 @@
|
|
|
#include "Quirks.h"
|
|
#include "Quirks.h"
|
|
|
|
|
+#include "sfwindow.h"
|
|
|
|
|
|
|
|
using namespace WalrusRPG;
|
|
using namespace WalrusRPG;
|
|
|
|
|
|
|
@@ -12,5 +13,5 @@ void Quirks::deinit()
|
|
|
|
|
|
|
|
bool Quirks::get_key(keycode_t key)
|
|
bool Quirks::get_key(keycode_t key)
|
|
|
{
|
|
{
|
|
|
- return sf::Keyboard::isKeyPressed(key);
|
|
|
|
|
|
|
+ return sf::Keyboard::isKeyPressed(key) && window.hasFocus();
|
|
|
}
|
|
}
|