Archive 17/01/2023.

Maximize (or Minimize) SDL window through C++

freegodsoul

I didn’t find any engine parameter (Application::engineParameters_) responding for maximization/minimization of window,
so I’ve put this code in begining of my Application::Start() implementation.

Graphics* gfx = GetSubsystem<Graphics>(); GraphicsImpl* gfximpl = gfx->GetImpl(); SDL_Window* sdlwnd = gfximpl->GetWindow(); SDL_MaximizeWindow( sdlwnd );

P.S. Out-of-box Editor app already has maximized window, so I’m not sure if this approach is non-redundant. It looks like workaround, but it’s working. :wink:

[EDIT]

After some research I’ve found the method Graphics::Maximize(). Final version:
:smiley:

Graphics* gfx = GetSubsystem<Graphics>(); gfx->Maximize();