Adjust speed and remove unnecessary window.setFramerateLimit call
This commit is contained in:
parent
ba88df070a
commit
9cb6f35ec1
1 changed files with 1 additions and 2 deletions
|
@ -148,7 +148,6 @@ class Block {
|
|||
int main()
|
||||
{
|
||||
sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "elnutris");
|
||||
window.setFramerateLimit(8);
|
||||
|
||||
Block block;
|
||||
|
||||
|
@ -174,7 +173,7 @@ int main()
|
|||
window.clear();
|
||||
|
||||
// Fast forward
|
||||
window.setFramerateLimit(sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down) ? 16 : 8);
|
||||
window.setFramerateLimit(sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Down) ? 8 : 6);
|
||||
|
||||
// Rotation
|
||||
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue