Skip to content

Commit

Permalink
Opt-out of Prelaunch which is problematic for games
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jan 29, 2016
1 parent b3b5f1a commit 0ff56c0
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
Binary file modified VSIX/Direct3DUWPGame.vsix
Binary file not shown.
12 changes: 12 additions & 0 deletions d3d11game_uwp/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ ref class ViewProvider sealed : public IFrameworkView
// Event handlers
void OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args)
{
if (args->Kind == ActivationKind::Launch)
{
auto launchArgs = static_cast<LaunchActivatedEventArgs^>(args);

if (launchArgs->PrelaunchActivated)
{
// Opt-out of Prelaunch
CoreApplication::Exit();
return;
}
}

int w, h;
m_game->GetDefaultSize(w, h);

Expand Down
12 changes: 12 additions & 0 deletions d3d11game_uwp_dr/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ ref class ViewProvider sealed : public IFrameworkView
// Event handlers
void OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args)
{
if (args->Kind == ActivationKind::Launch)
{
auto launchArgs = static_cast<LaunchActivatedEventArgs^>(args);

if (launchArgs->PrelaunchActivated)
{
// Opt-out of Prelaunch
CoreApplication::Exit();
return;
}
}

int w, h;
m_game->GetDefaultSize(w, h);

Expand Down
12 changes: 12 additions & 0 deletions d3d12game_uwp/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ ref class ViewProvider sealed : public IFrameworkView
// Event handlers
void OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args)
{
if (args->Kind == ActivationKind::Launch)
{
auto launchArgs = static_cast<LaunchActivatedEventArgs^>(args);

if (launchArgs->PrelaunchActivated)
{
// Opt-out of Prelaunch
CoreApplication::Exit();
return;
}
}

int w, h;
m_game->GetDefaultSize(w, h);

Expand Down
12 changes: 12 additions & 0 deletions d3d12game_uwp_dr/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ ref class ViewProvider sealed : public IFrameworkView
// Event handlers
void OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args)
{
if (args->Kind == ActivationKind::Launch)
{
auto launchArgs = static_cast<LaunchActivatedEventArgs^>(args);

if (launchArgs->PrelaunchActivated)
{
// Opt-out of Prelaunch
CoreApplication::Exit();
return;
}
}

int w, h;
m_game->GetDefaultSize(w, h);

Expand Down

0 comments on commit 0ff56c0

Please sign in to comment.