Rinnegatamante / lpp-vita

Lua Player Plus for PSVITA. Documentation on: http://rinnegatamante.github.io/lpp-vita/
GNU General Public License v3.0
179 stars 27 forks source link

'System.executeUri' prompts for confirmation to close app under certain conditions #66

Closed jimbob4000 closed 1 year ago

jimbob4000 commented 1 year ago

Hi,

I've encountered a potential issue with the 'System.executeUri' command when using it in RetroFlow.

For users with a large library of games (over 2,000), after the app executes the 'System.executeUri' command to load a game, they are prompted to accept closing the app.

"The following application will close, Cancel / Okay"

If the game library is smaller there is no message about the app closing. Any help would be appreciated, not sure if it's related to how much resource the app is using with larger game libraries.

Retroflow launch command for reference: System.executeUri("psgm:play?titleid=RETROVITA" .. "&param=" .. (def_core_name) .. "&param2=" .. rom_location) System.exit()

Vita launcher cpp command in case it helps: char uri[512]; // I've removed an if statement as it's probably not relevant sprintf(uri, "psgm:play?titleid=%s&param=%s&param2=%s", RETROARCH_TITLE_ID, retro_core, game_path.c_str()); sceAppMgrLaunchAppByUri(0xFFFFF, uri); sceKernelDelayThread(1000); sceKernelExitProcess(0);

Thanks

BlackSheepBoy69 commented 1 year ago

In the Vita launcher it seems to delay for 1000 before exitting. Not sure if that's milliseconds or microseconds. You could try something similar and in Lua+ you could put System.wait(1000) right before System.exit() and see if that solves the issue?

jimbob4000 commented 1 year ago

In the Vita launcher it seems to delay for 1000 before exitting. Not sure if that's milliseconds or microseconds. You could try something similar and in Lua+ you could put System.wait(1000) right before System.exit() and see if that solves the issue?

Thanks, I've tried this but the behaviour is the same.

Rinnegatamante commented 1 year ago

https://github.com/Rinnegatamante/lpp-vita/commit/be12f45623f7b3e4e72267814bc74fd23b87b70f

After this reaches Nightly, try to call System.exit() right after System.executeUri.

jimbob4000 commented 1 year ago

Hi @Rinnegatamante, that seems to have fixed the issue. Thanks for your support, it's much appreciated.