Skip to content

Commit d5868d7

Browse files
committed
cleaner fix added in
1 parent 4fe8837 commit d5868d7

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

samples-android/ButtonClicker/jni/ButtonClickerNativeActivity_Engine.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ void Engine::UnloadResources() { renderer_.Unload(); }
6161
*/
6262
int Engine::InitDisplay(const int32_t cmd) {
6363
if (!initialized_resources_) {
64+
while(authorizing_) {
65+
std::chrono::milliseconds d(100);
66+
std::this_thread::sleep_for(d);
67+
}
6468
gl_context_->Init(app_->window);
6569
InitUI();
6670
LoadResources();
@@ -296,15 +300,6 @@ void android_main(android_app *state) {
296300
// Init play game services
297301
g_engine.InitGooglePlayGameServices();
298302

299-
//let's wait here...
300-
{
301-
int count = 50;
302-
while(count--) {
303-
std::chrono::milliseconds d(100);
304-
std::this_thread::sleep_for(d);
305-
}
306-
LOGI("=====Spin Waiting done for gpg service");
307-
}
308303
state->userData = &g_engine;
309304
state->onAppCmd = Engine::HandleCmd;
310305
state->onInputEvent = Engine::HandleInput;

0 commit comments

Comments
 (0)