[Scummvm-tracker] [ScummVM :: Bugs] #12727: ANDROID: Allow Save location in SDcard (Write permission on SD)

ScummVM :: Bugs trac at scummvm.org
Sat Oct 23 16:53:05 UTC 2021


#12727: ANDROID: Allow Save location in SDcard (Write permission on SD)
-------------------------------------------------+-------------------------
Reporter:  LukasThyWalls                         |       Owner:  (none)
    Type:  feature request                       |      Status:  new
Priority:  normal                                |   Component:  Port:
                                                 |  Android
 Version:                                        |  Resolution:
Keywords:  Android, SDCard, Write permission,    |        Game:
  Savegames, Feature request                     |
-------------------------------------------------+-------------------------
Comment (by LukasThyWalls):

 Hello.

 I just tested the 2.5.0 version (via Google Play) and the behavior is
 different. In fact, now the SAF appears. And with a certain selection i
 can make work the saves in the SDCard, but other things are wrong. But to
 explain it, i need to make context:

 In my phone, the SDcard is ''/storage/9016-4EF8/'', to cut: ''<SDCARD>''.
 What i want is a subfolder in SDCard like this: in
 ''<SDCARD>/Juegos/ScummVM/'', with two or more subfolders inside, but the
 ones important here are: ''Juegos'' (where the games are) and ''Saves''
 (where i want the saves).
 So, the save folder i trying to pick and use is
 ''<SDCARD>/Juegos/ScummVM/Saves/''.

 First, when i pick the save folder (''<SDCARD>/Juegos/ScummVM/Saves/'')
 the first time, now the SAF appears to select a folder to bring the
 permissions. However, with anything i pick with the SAF (SDCard root,
 ''<SDCARD>/Juegos/ScummVM/'' or ''<SDCARD>/Juegos/ScummVM/Saves/'') brings
 other message "''The chosen directory cannot be written to. Please select
 other one''".
 **BUT**, if i try to pick again the same folder
 (''<SDCARD>/Juegos/ScummVM/Saves/''), there is no SAF and it seems it
 takes the setting.

 But then i detected ScummVM is creating the ''/Juegos/ScummVM/Saves/''
 subfolders, from wherever i picked from the SAF, for example:
 - If i picked with SAF ''<SDCARD>/Juegos/ScummVM/'', it creates
 ''<SDCARD>/Juegos/ScummVM/Juegos/ScummVM/Saves/''.
 - If i picked with SAF ''<SDCARD>/Juegos/ScummVM/Saves'', it creates
 ''<SDCARD>/Juegos/ScummVM/Saves/Juegos/ScummVM/Saves''.
 In both cases, the save game fails (''"Failed to save game to file:
 ..."''), but it creates the file with 0 bytes alongside a file called
 "timestamps" with 0 bytes inside the created subfolder.

 However, if i pick the SDcard root, it doesn't create the subfolders
 because they are already there and match where i choose the save game
 folder, and then save a game works.
 **BUT**, I noticed also that the first time you save, the message with the
 "Successfully save the game" doesn't pop-up (In consecutive saves it
 does), **AND** you can't overwrite an old save (it shows the ''"Failed to
 save game to file: ..."''), so this thing isn't fully working.

 So, there are 4 things what doesn't work like it should:

 - The first time you select a SDcard subfolder and use the SAF, it should
 be stick the folder and no prompting that the folder is not writable, when
 the second time works.

 - It shouldn't be using the path from SDcard root to re-creates those
 subfolders from wherever you have picked with the SAF, it should be have
 the permission if i picked any parent of the save folder, and use that one
 to the save files. In fact, if you don't pick the SDcard root, they
 doesn't match and creates new sub-folders that you don't want and the
 saves don't work.

 - If everything is right with the subfolders, the first you save, the
 "save successfully" message should pop-up like the successive saves (This
 could be pretty minor, but maybe it is symptom/consequence of the others
 issues).

 - If you can save once, you should be able to overwrite the old saves.

 I didn't test this with a devel version, but i will be doing it soon. If
 it's needed to create a new bug, i will do.

 Thanks!
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/12727#comment:11>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list