Просмотр исходного кода

Minor change of comments on gameplay-main-android.cpp file.

Ramprasad Madhavan 14 лет назад
Родитель
Сommit
203f0d6ad2
2 измененных файлов с 5 добавлено и 10 удалено
  1. 1 8
      gameplay/src/PlatformAndroid.cpp
  2. 4 2
      gameplay/src/gameplay-main-android.cpp

+ 1 - 8
gameplay/src/PlatformAndroid.cpp

@@ -39,7 +39,7 @@ ASensorEventQueue* __sensorEventQueue;
 ASensorEvent __sensorEvent;
 const ASensor* __accelerometerSensor;
 
-static int __orientationAngle;
+static int __orientationAngle = 90; // Landscape by default.
 static bool __multiTouch = false;
 bool __displayKeyboard = false;
 
@@ -452,9 +452,6 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd)
 {
     switch (cmd) 
     {
-        case APP_CMD_SAVE_STATE:
-            // TODO
-            break;
         case APP_CMD_INIT_WINDOW:
             // The window is being shown, get it ready.
             if (app->window != NULL)
@@ -529,10 +526,6 @@ Platform* Platform::create(Game* game)
 {
     Platform* platform = new Platform(game);
     
-    // TODO: Determine initial orientation angle.
-    //orientation_direction_t direction;
-    //orientation_get(&direction, &__orientationAngle);
-
     return platform;
 }
 

+ 4 - 2
gameplay/src/gameplay-main-android.cpp

@@ -12,7 +12,8 @@ extern struct android_app* __state;
  */
 void android_main(struct android_app* state)
 {
-    // Make sure glue isn't stripped.
+    // Android specific : Dummy function that needs to be called to 
+    // ensure that the native activity works properly behind the scenes.
     app_dummy();
     
     __state = state;
@@ -24,7 +25,8 @@ void android_main(struct android_app* state)
     Game::getInstance()->exit();
     delete platform;
     
-    // We need to exit the process to cleanup global resources.
+    // Android specific : the process needs to exit to 
+    // to trigger cleanup of global resources (such as game).
     exit(0);
 }