Browse Source

Android identity;

bjorn 4 years ago
parent
commit
e5a0d8c369
3 changed files with 7 additions and 38 deletions
  1. 2 20
      api/init.lua
  2. 0 16
      api/lovr/filesystem/getApplicationId.lua
  3. 5 2
      api/lovr/filesystem/getIdentity.lua

+ 2 - 20
api/init.lua

@@ -4173,25 +4173,6 @@ return {
             }
             }
           }
           }
         },
         },
-        {
-          name = "getApplicationId",
-          summary = "Get the application ID.",
-          description = "Returns the platform-specific application ID, or `nil` if the current platform doesn't have one.\n\nCurrently only implemented on Android, where it returns the package name, e.g. `org.lovr.app`.",
-          key = "lovr.filesystem.getApplicationId",
-          module = "lovr.filesystem",
-          variants = {
-            {
-              arguments = {},
-              returns = {
-                {
-                  name = "id",
-                  type = "string",
-                  description = "The application ID."
-                }
-              }
-            }
-          }
-        },
         {
         {
           name = "getDirectoryItems",
           name = "getDirectoryItems",
           summary = "Get a list of files in a directory.",
           summary = "Get a list of files in a directory.",
@@ -4239,9 +4220,10 @@ return {
         {
         {
           name = "getIdentity",
           name = "getIdentity",
           summary = "Get the name of the save directory.",
           summary = "Get the name of the save directory.",
-          description = "Returns the identity of the game, which is used as the name of the save directory.  The default is `default`.",
+          description = "Returns the identity of the game, which is used as the name of the save directory.  The default is `default`.  It can be changed using `t.identity` in `lovr.conf`.",
           key = "lovr.filesystem.getIdentity",
           key = "lovr.filesystem.getIdentity",
           module = "lovr.filesystem",
           module = "lovr.filesystem",
+          notes = "On Android, this is always the package id (like `org.lovr.app`).",
           variants = {
           variants = {
             {
             {
               arguments = {},
               arguments = {},

+ 0 - 16
api/lovr/filesystem/getApplicationId.lua

@@ -1,16 +0,0 @@
-return {
-  summary = 'Get the application ID.',
-  description = [[
-    Returns the platform-specific application ID, or `nil` if the current platform doesn't have one.
-
-    Currently only implemented on Android, where it returns the package name, e.g. `org.lovr.app`.
-  ]],
-  arguments = {},
-  returns = {
-    {
-      name = 'id',
-      type = 'string',
-      description = 'The application ID.'
-    }
-  }
-}

+ 5 - 2
api/lovr/filesystem/getIdentity.lua

@@ -2,7 +2,7 @@ return {
   summary = 'Get the name of the save directory.',
   summary = 'Get the name of the save directory.',
   description = [[
   description = [[
     Returns the identity of the game, which is used as the name of the save directory.  The default
     Returns the identity of the game, which is used as the name of the save directory.  The default
-    is `default`.
+    is `default`.  It can be changed using `t.identity` in `lovr.conf`.
   ]],
   ]],
   arguments = {},
   arguments = {},
   returns = {
   returns = {
@@ -11,5 +11,8 @@ return {
       type = 'string',
       type = 'string',
       description = 'The name of the save directory, or `nil` if it isn\'t set.'
       description = 'The name of the save directory, or `nil` if it isn\'t set.'
     }
     }
-  }
+  },
+  notes = [[
+    On Android, this is always the package id (like `org.lovr.app`).
+  ]]
 }
 }