| 579 | } |
| 580 | |
| 581 | Application::Application() |
| 582 | : _seed(0) |
| 583 | , _idled(false) |
| 584 | , _fpsLimited(true) |
| 585 | , _renderRunning(true) |
| 586 | , _logicRunning(true) |
| 587 | , _fullScreen(false) |
| 588 | , _alwaysOnTop(false) |
| 589 | , _devMode(false) |
| 590 | , _frame(0) |
| 591 | , _visualWidth(1280) |
| 592 | , _visualHeight(720) |
| 593 | , _winWidth(_visualWidth) |
| 594 | , _winHeight(_visualHeight) |
| 595 | , _bufferWidth(0) |
| 596 | , _bufferHeight(0) |
| 597 | , _targetFPS(60) |
| 598 | , _maxFPS(60) |
| 599 | , _deltaTime(0) |
| 600 | , _cpuTime(0) |
| 601 | , _totalTime(0) |
| 602 | , _frequency(double(bx::getHPFrequency())) |
| 603 | , _sdlWindow(nullptr) |
| 604 | , _sdlGLContext(nullptr) |
| 605 | , _themeColor(0xfffac03d) |
| 606 | , _winPosition{-1.0f, -1.0f} |
| 607 | , _platformData{} { |
| 608 | _lastTime = bx::getHPCounter() / _frequency; |
| 609 | #if !BX_PLATFORM_LINUX |
| 610 | auto locale = SDL_GetPreferredLocales(); |
| 611 | _locale = locale->language; |
| 612 | SDL_free(locale); |
| 613 | #else |
| 614 | _locale = "en"s; |
| 615 | #endif |
| 616 | } |
| 617 | |
| 618 | const std::string& Application::getLocale() const noexcept { |
| 619 | return _locale; |
nothing calls this directly
no test coverage detected