Skip to content

Commit 6aec5be

Browse files
authored
remove uwp define from the public interface (#9)
1 parent 86092cb commit 6aec5be

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

include/GameAnalytics/GameAnalytics.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,5 @@ namespace gameanalytics
129129
static bool isSdkReady(bool needsInitialized);
130130
static bool isSdkReady(bool needsInitialized, bool warn);
131131
static bool isSdkReady(bool needsInitialized, bool warn, std::string const& message);
132-
133-
#if USE_UWP
134-
static void OnAppSuspending(Platform::Object ^sender, Windows::ApplicationModel::SuspendingEventArgs ^e);
135-
static void OnAppResuming(Platform::Object ^sender, Platform::Object ^args);
136-
#endif
137-
138132
};
139133
} // namespace gameanalytics

source/gameanalytics/GameAnalytics.cpp

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -984,56 +984,4 @@ namespace gameanalytics
984984
}
985985
}
986986

987-
#if USE_UWP
988-
void GameAnalytics::OnAppSuspending(Platform::Object ^sender, Windows::ApplicationModel::SuspendingEventArgs ^e)
989-
{
990-
(void)sender; // Unused parameter
991-
992-
auto deferral = e->SuspendingOperation->GetDeferral();
993-
994-
Concurrency::create_task([deferral]()
995-
{
996-
if (!state::GAState::useManualSessionHandling())
997-
{
998-
onSuspend();
999-
1000-
while(!threading::GAThreading::isThreadFinished())
1001-
{
1002-
std::this_thread::sleep_for(std::chrono::milliseconds(100));
1003-
}
1004-
}
1005-
else
1006-
{
1007-
logging::GALogger::i("OnSuspending: Not calling GameAnalytics.OnSuspend() as using manual session handling");
1008-
}
1009-
deferral->Complete();
1010-
});
1011-
1012-
1013-
}
1014-
1015-
void GameAnalytics::OnAppResuming(Platform::Object ^sender, Platform::Object ^args)
1016-
{
1017-
(void)sender; // Unused parameter
1018-
1019-
if(_endThread)
1020-
{
1021-
return;
1022-
}
1023-
1024-
threading::GAThreading::performTaskOnGAThread([]()
1025-
{
1026-
if (!state::GAState::useManualSessionHandling())
1027-
{
1028-
onResume();
1029-
}
1030-
else
1031-
{
1032-
logging::GALogger::i("OnResuming: Not calling GameAnalytics.OnResume() as using manual session handling");
1033-
}
1034-
});
1035-
}
1036-
1037-
#endif
1038-
1039987
} // namespace gameanalytics

0 commit comments

Comments
 (0)