linuxserver / docker-emulatorjs

Web based retro emulation frontend with rom scanning and automated art ingestion.
GNU General Public License v3.0
509 stars 51 forks source link

[BUG] retroarch hangs when exiting game #77

Closed wonx closed 3 weeks ago

wonx commented 3 months ago

Is there an existing issue for this?

Current Behavior

It's my first time using emulatorjs. I'm having issues when closing/exiting a game. Either pressing ESC twice, or going into the retroarch menu and quitting, the window freezes and I'm unable to get to the main menu again.

Expected Behavior

I should be able to go back to the rom selection screen again.

Steps To Reproduce

  1. Browse the game you want to play
  2. Start it
  3. Press ESC twice to exit.

Environment

- OS: Debian Bookworm
- How docker service was installed: via docker compose.

CPU architecture

x86-64

Docker creation

---
services:
  emulatorjs:
    image: lscr.io/linuxserver/emulatorjs:latest
    container_name: emulatorjs
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - SUBFOLDER=/ #optional
    volumes:
      - /path/to/config:/config
      - /path/to/data:/data
    ports:
      - 3000:3000
      - 80:80
      - 4001:4001 #optional
    restart: unless-stopped

Container logs

Nothing relevant in the logs.
github-actions[bot] commented 3 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thelamer commented 3 months ago

The method to exit a game is to press back on the browser. This catches and ensures the save data is dumped: https://github.com/linuxserver/emulatorjs/blob/master/frontend/js/index.js#L225-L233

This can also be triggered on a controller with the xbox button three times quickly.

The only time you would need to clean exit retroarch using escape like this is if you made a series of settings changes and wanted the config to be dumped to the browsers local storage.

Basically this is known behavior.

LinuxServer-CI commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.