mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
Merge pull request #3919 from rommapp/feature/netplay-username-from-account
Default EmulatorJS netplay username to the RomM account
This commit is contained in:
@@ -393,6 +393,11 @@ window.EJS_onGameStart = async () => {
|
||||
// are in place before room polling or a Create/Join action can start.
|
||||
const netplay = window.EJS_emulator?.netplay;
|
||||
if (netplay) {
|
||||
// EmulatorJS only prompts for a player name when netplay.name is unset,
|
||||
// so presetting it adopts the RomM account username automatically.
|
||||
if (!netplay.name && authStore.user?.username) {
|
||||
netplay.name = authStore.user.username;
|
||||
}
|
||||
netplay.getOpenRooms = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
||||
Reference in New Issue
Block a user