Skip to content

Commit

Permalink
fix: wasm first slot state init accidentally was running on non-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxCWhitehead committed Nov 2, 2024
1 parent 52205a6 commit 1f6ea8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/main_menu/player_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ pub fn widget(
// transition to map select. Transition slots of required players from empty to initial state.
//
// In Offline, we have one required player. Other slots are optional.
#[cfg(not(target_arch = "wasm32"))]
#[cfg(target_arch = "wasm32")]
{
let first_slot = &mut state.slots[0];
if first_slot.is_empty() {
Expand All @@ -360,7 +360,7 @@ pub fn widget(
// unused slots in online don't need to be initialized
break;
} else if is_local_player_slot && is_empty {
*slot = PlayerSlot::SelectingLocalControlSource
*slot = PlayerSlot::SelectingLocalControlSource;
} else if !is_local_player_slot && is_empty {
*slot = PlayerSlot::SelectingPlayer {
control_source: PlayerSlotControlSource::Remote,
Expand Down

0 comments on commit 1f6ea8f

Please sign in to comment.