Skip to content

Commit

Permalink
rename _isActivated
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed May 11, 2024
1 parent cc69e38 commit 64bf92d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions MonoGame.Framework/Platform/Android/AndroidGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal static AndroidGameWindow FromHandle(IntPtr windowHandle)

private AndroidGameActivity _activity;
private readonly Game _game;
private bool _hasWindowFocus = true;
private bool _isActivated = true;
MediaState _mediaPlayer_PrevState = MediaState.Stopped;

private Rectangle _clientBounds;
Expand Down Expand Up @@ -89,9 +89,9 @@ public AndroidGameWindow(AndroidGameActivity activity, Game game)

void _activity_Resumed(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}

Expand All @@ -115,9 +115,9 @@ void _activity_Resumed(object sender, EventArgs e)

void _activity_Paused(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}

Expand All @@ -130,18 +130,18 @@ void _activity_Paused(object sender, EventArgs e)

private void _activity_WindowFocused(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}
}

private void _activity_WindowUnfocused(object sender, EventArgs e)
{
if (_hasWindowFocus)
if (_isActivated)
{
_hasWindowFocus = false;
_isActivated = false;
OnDeactivated();
}
}
Expand Down
18 changes: 9 additions & 9 deletions MonoGame.Framework/Platform/Cardboard/AndroidGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal static AndroidGameWindow FromHandle(IntPtr windowHandle)

private AndroidGameActivity _activity;
private readonly Game _game;
private bool _hasWindowFocus = true;
private bool _isActivated = true;
MediaState _mediaPlayer_PrevState = MediaState.Stopped;

private Rectangle _clientBounds;
Expand Down Expand Up @@ -89,9 +89,9 @@ public AndroidGameWindow(AndroidGameActivity activity, Game game)

void _activity_Resumed(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}

Expand All @@ -115,9 +115,9 @@ void _activity_Resumed(object sender, EventArgs e)

void _activity_Paused(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}

Expand All @@ -130,18 +130,18 @@ void _activity_Paused(object sender, EventArgs e)

private void _activity_WindowFocused(object sender, EventArgs e)
{
if (!_hasWindowFocus)
if (!_isActivated)
{
_hasWindowFocus = true;
_isActivated = true;
OnActivated();
}
}

private void _activity_WindowUnfocused(object sender, EventArgs e)
{
if (_hasWindowFocus)
if (_isActivated)
{
_hasWindowFocus = false;
_isActivated = false;
OnDeactivated();
}
}
Expand Down

0 comments on commit 64bf92d

Please sign in to comment.