Adjust speed and remove unnecessary window.setFramerateLimit call

cpp
Elnu 3 years ago
parent ba88df070a
commit 9cb6f35ec1

@ -148,7 +148,6 @@ class Block {
int main() int main()
{ {
sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "elnutris"); sf::RenderWindow window(sf::VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "elnutris");
window.setFramerateLimit(8);
Block block; Block block;
@ -174,7 +173,7 @@ int main()
window.clear(); window.clear();
// Fast forward // 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 // Rotation
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up)) { if (sf::Keyboard::isKeyPressed(sf::Keyboard::Key::Up)) {

Loading…
Cancel
Save