MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / OnResizeWindow

Method OnResizeWindow

Sources/Main.cpp:459–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459void GameEventHandler::OnResizeWindow(std::int32_t width, std::int32_t height)
460{
461 // Resolution was changed, all viewports have to be recreated
462 Viewport::GetChain().clear();
463
464 Vector2i viewSize;
465 if (_currentHandler != nullptr) {
466 _currentHandler->OnInitializeViewport(width, height);
467 viewSize = _currentHandler->GetViewSize();
468 }
469
470#if defined(NCINE_HAS_WINDOWS)
471 PreferencesCache::EnableFullscreen = theApplication().GetGfxDevice().isFullscreen();
472#endif
473
474 LOGI("Rendering resolution: {}x{} ({}x{})", width, height, viewSize.X, viewSize.Y);
475}
476
477void GameEventHandler::OnShutdown()
478{

Callers

nothing calls this directly

Calls 4

isFullscreenMethod · 0.80
clearMethod · 0.45
OnInitializeViewportMethod · 0.45
GetViewSizeMethod · 0.45

Tested by

no test coverage detected