Skip to content

Add “Game Name” OBS source for active game title#62

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/add-active-game-source
Draft

Add “Game Name” OBS source for active game title#62
Copilot wants to merge 1 commit into
mainfrom
copilot/add-active-game-source

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

This PR adds a new source that renders the currently active game title, complementing existing profile/game overlays. The source updates on game-change events and persists its visual configuration like other text sources.

  • New source: Game Name

    • Added a new OBS text source (xbox_game_name_source) with display name Game Name.
    • Source text is driven by game_t.title from the active session and clears when no game is active.
    • Uses existing text rendering + auto show/hide infrastructure for consistent behavior.
  • Monitoring service surface

    • Added monitoring_get_current_active_game() to expose the current resolved active game.
    • Enables source creation to seed initial text immediately (without waiting for the next event).
  • Persistent source configuration

    • Added game_name_configuration_t and state APIs:
      • state_set_game_name_configuration(...)
      • state_get_game_name_configuration()
      • state_free_game_name_configuration(...)
    • Persists font, size, gradient colors, and auto-visibility settings using dedicated state keys.
  • Plugin + build integration

    • Registered and cleaned up the new source in module load/unload flow.
    • Added new source file to CMake target sources.
    • Updated README source list to include Game Name under Game sources.
// monitoring_service.h
const game_t *monitoring_get_current_active_game(void);

// game_name.c (source initialization path)
update_game_name(monitoring_get_current_active_game());
monitoring_subscribe_game_played(on_game_played);

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.

2 participants