Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call OnGameSelected until OnApplicationStarted is fired #3844

Open
nikolay-borzov opened this issue Oct 5, 2024 · 0 comments
Open
Labels

Comments

@nikolay-borzov
Copy link

Bug Description

OnGameSelected event is fired before OnApplicationStarted that looks like wrong order of events.

Consider an extension (GameSpeak) that reads a text when application started and a different text when a game is selected. With current behavior first you'll hear first letters of the game name spoken and then application start text interrupts

It would be great if the first (from Playnite launch) OnGameSelected is postponed until OnApplicationStarted occurs

To Reproduce

  1. Create a GenricPlugin with code:
private static readonly ILogger logger = LogManager.GetLogger();

public override void OnApplicationStarted(OnApplicationStartedEventArgs args)
{
  logger.Info("OnApplicationStarted");
}

public override void OnGameSelected(OnGameSelectedEventArgs args)
{
  logger.Info("OnGameSelected");
}
  1. Build the plugin and add its build path to Settings > For developers
  2. Restart Planite
  3. Examine extensions.log
  4. Notice "OnGameSelected" printed before OnApplicationStarted

Diagnostics ID

d36e4edc-5f51-4688-943c-bff4f3ddc58f

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant