Skip to content

Commit

Permalink
[Windows] fix #1083
Browse files Browse the repository at this point in the history
  • Loading branch information
Reputeless committed Sep 22, 2023
1 parent 5967299 commit c794c56
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ namespace s3d
}
}

const bool windowFocused = SIV3D_ENGINE(Window)->getState().focused;

{
m_allInputs.clear();

Expand All @@ -120,7 +122,7 @@ namespace s3d

for (size_t i = 0; i < _countof(buf); ++i)
{
const bool pressed = ((buf[i] >> 7) & 0x1);
const bool pressed = (windowFocused && ((buf[i] >> 7) & 0x1));

auto& state = m_states[i];
state.update(pressed);
Expand All @@ -134,7 +136,7 @@ namespace s3d
}
}

if (SIV3D_ENGINE(Window)->getState().focused)
if (windowFocused)
{
if (m_states[VK_ESCAPE].down())
{
Expand Down

0 comments on commit c794c56

Please sign in to comment.