浏览代码

Added a simple fps limit to avoid crunching too much FPS on devices that doesn't support vsync.

Eiyeron Fulmincendii 10 年之前
父节点
当前提交
e90c43edc8
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      platform/sfml/Graphics.cpp

+ 1 - 0
platform/sfml/Graphics.cpp

@@ -13,6 +13,7 @@ void GRAPHICS::init()
 {
     window.create(sf::VideoMode::getDesktopMode(), "WalrusRPG", sf::Style::Fullscreen);
     window.setVerticalSyncEnabled(true);
+    window.setFramerateLimit(60);
     view = sf::View(window.getDefaultView());
     buffer.create(320, 240);
 }