Minor fixes

This commit is contained in:
Wojtek Figat
2022-07-23 01:27:40 +02:00
parent b9cd6974fb
commit 1633d8ebb6
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
#include "Screen.h"
#include "Engine.h"
#include "Engine/Core/Log.h"
#include "Engine/Core/Types/Nullable.h"
#include "Engine/Platform/Window.h"
@@ -102,7 +103,7 @@ void Screen::SetCursorVisible(const bool value)
#else
const auto win = Engine::MainWindow;
#endif
if (win)
if (win && Engine::HasGameViewportFocus())
{
win->SetCursor(value ? CursorType::Default : CursorType::Hidden);
}