mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
launcher: Allow Spectators is a preference, not an in-room setting
The toggle lives in the Create Lobby modal, before any room exists, and its value goes out with `create`. The setter refused unless the client was already seated in a server lobby, so the modal read the unchanged preference back every frame and the checkbox snapped off. Refuse only in a LAN / Direct-IP room, which has no gallery to allow -- the SNES host's rule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FPXfGGhBBBxQPcEzaMsauF
This commit is contained in:
@@ -11590,7 +11590,14 @@ namespace {
|
||||
return psx_lobby_allow_spectators_pref();
|
||||
}
|
||||
int ae_np_allow_spectators_set(void*, int allow) {
|
||||
if (!ae_np_use_ws_members()) return -1;
|
||||
/* A PREFERENCE, read back by the Create Lobby modal and sent with
|
||||
* `create` -- so it has to be settable before any room exists.
|
||||
* Gating this on being seated (as it was) refused the toggle in the
|
||||
* one place it is offered, and the modal, reading the unchanged
|
||||
* value back each frame, snapped the switch off again. Only a LAN /
|
||||
* Direct-IP room refuses, because it has no gallery to allow: same
|
||||
* rule as the SNES host (snes_host_lobby.c cb_allow_spectators_set). */
|
||||
if (g_lnch_hosting_lan || g_lnch_joined_lan) return -1;
|
||||
psx_lobby_set_allow_spectators(allow);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user