| 321 | } |
| 322 | |
| 323 | bool Window::PollEvent(WindowEvent* event) |
| 324 | { |
| 325 | #if NAZARA_PLATFORM_SAFE |
| 326 | if (!m_impl) |
| 327 | { |
| 328 | NazaraError("Window not created"); |
| 329 | return false; |
| 330 | } |
| 331 | #endif |
| 332 | |
| 333 | if (!m_asyncWindow) |
| 334 | m_impl->ProcessEvents(false); |
| 335 | |
| 336 | if (!m_events.empty()) |
| 337 | { |
| 338 | if (event) |
| 339 | *event = m_events.front(); |
| 340 | |
| 341 | m_events.pop(); |
| 342 | |
| 343 | return true; |
| 344 | } |
| 345 | |
| 346 | return false; |
| 347 | } |
| 348 | |
| 349 | void Window::ProcessEvents(bool block) |
| 350 | { |
no test coverage detected