Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions include/GameAnalytics/GameAnalytics.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,5 @@ namespace gameanalytics
static bool isSdkReady(bool needsInitialized);
static bool isSdkReady(bool needsInitialized, bool warn);
static bool isSdkReady(bool needsInitialized, bool warn, std::string const& message);

#if USE_UWP
static void OnAppSuspending(Platform::Object ^sender, Windows::ApplicationModel::SuspendingEventArgs ^e);
static void OnAppResuming(Platform::Object ^sender, Platform::Object ^args);
#endif

};
} // namespace gameanalytics
52 changes: 0 additions & 52 deletions source/gameanalytics/GameAnalytics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,56 +984,4 @@ namespace gameanalytics
}
}

#if USE_UWP
void GameAnalytics::OnAppSuspending(Platform::Object ^sender, Windows::ApplicationModel::SuspendingEventArgs ^e)
{
(void)sender; // Unused parameter

auto deferral = e->SuspendingOperation->GetDeferral();

Concurrency::create_task([deferral]()
{
if (!state::GAState::useManualSessionHandling())
{
onSuspend();

while(!threading::GAThreading::isThreadFinished())
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
else
{
logging::GALogger::i("OnSuspending: Not calling GameAnalytics.OnSuspend() as using manual session handling");
}
deferral->Complete();
});


}

void GameAnalytics::OnAppResuming(Platform::Object ^sender, Platform::Object ^args)
{
(void)sender; // Unused parameter

if(_endThread)
{
return;
}

threading::GAThreading::performTaskOnGAThread([]()
{
if (!state::GAState::useManualSessionHandling())
{
onResume();
}
else
{
logging::GALogger::i("OnResuming: Not calling GameAnalytics.OnResume() as using manual session handling");
}
});
}

#endif

} // namespace gameanalytics