| 347 | } |
| 348 | |
| 349 | void Window::setFrameRateLimit( Uint32 FrameRateLimit ) { |
| 350 | if ( FrameRateLimit == ContextSettings::FrameRateLimitScreenRefreshRate ) { |
| 351 | Display* currentDisplay = Engine::instance()->getDisplayManager()->getDisplayIndex( |
| 352 | isOpen() ? getCurrentDisplayIndex() : 0 ); |
| 353 | FrameRateLimit = currentDisplay->getRefreshRate(); |
| 354 | } |
| 355 | mFrameData.FPS.Limit = (Float)FrameRateLimit; |
| 356 | } |
| 357 | |
| 358 | Uint32 Window::getFrameRateLimit() const { |
| 359 | return static_cast<Uint32>( mFrameData.FPS.Limit ); |