Added r_ViewportPos cvar for set the position of a viewport of a game/server launchers
This commit is contained in:
@@ -69,3 +69,14 @@ int APIENTRY WinMain([[maybe_unused]] HINSTANCE hInstance, [[maybe_unused]] HINS
|
||||
|
||||
return static_cast<int>(status);
|
||||
}
|
||||
|
||||
void CVar_OnViewportPosition(const AZ::Vector2& value)
|
||||
{
|
||||
if (HWND windowHandle = GetActiveWindow())
|
||||
{
|
||||
SetWindowPos(windowHandle, nullptr,
|
||||
value.GetX(),
|
||||
value.GetY(),
|
||||
0, 0, SWP_NOOWNERZORDER | SWP_NOSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user