Skip to content

fix(platform): dispatch BigBox PlayGame calls to WPF UI thread#527

Open
wizzomafizzo wants to merge 3 commits intomainfrom
fix/bigbox-game-launch-threading
Open

fix(platform): dispatch BigBox PlayGame calls to WPF UI thread#527
wizzomafizzo wants to merge 3 commits intomainfrom
fix/bigbox-game-launch-threading

Conversation

@wizzomafizzo
Copy link
Member

@wizzomafizzo wizzomafizzo commented Feb 7, 2026

Summary

  • Fix game launching in BigBox mode by marshaling PlayGame calls to the WPF UI thread via Dispatcher.Invoke() — the named pipe reader runs on a background thread which causes BigBox to silently fail
  • Capture the WPF Dispatcher during plugin initialization (PluginInitialized, LaunchBoxStartupCompleted, BigBoxStartupCompleted) for reliable access from background threads
  • Add null-conditional operators on ViewModel access to prevent NullReferenceException
  • Call ShowGame() before PlayGame() in BigBox mode so LEDBlinky receives Event 9 (game selection) for the NFC-scanned game — without this, LEDBlinky shows controls for whichever game was highlighted in the BigBox menu
  • Bump plugin version to 1.1.0

Closes #509

LaunchGameById is called from a background thread (named pipe reader),
but BigBoxMainViewModel.PlayGame requires the WPF UI thread. Capture
the Dispatcher during plugin init and use Invoke() to marshal PlayGame
calls onto it.

Closes #509
ShowGame navigates BigBox UI to the NFC-scanned game, firing LEDBlinky
Event 9 (game selection). Without this, LEDBlinky shows controls for
whichever game the user had highlighted in the BigBox menu rather than
the game actually being launched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NFC launching not working in BigBox with version 2.9.0 core and plugins

1 participant