Fix VSync, Fix Mouse Input (Yay!), Add MAXFPS env

This commit is contained in:
2021-01-13 19:40:11 +01:00
parent 0370a2e871
commit 37542ab831
6 changed files with 31 additions and 19 deletions

View File

@@ -14,9 +14,16 @@ int main(int argc, char **argv)
std::cout << "[Debug Mode]" << std::endl;
#endif
// Create window
// Create controller
Controller *mainController = new Controller();
const char* fps_env = std::getenv("MAXFPS");
if(fps_env) {
uint16_t maxfps = std::stoul(fps_env);
mainController->setMaxFps(maxfps);
std::cout << "[Warning] Default max FPS overridden with " << maxfps << " by environment." << std::endl;
}
mainController->run();
delete mainController;