Skip to main content

Add Launch Cancellation Support for Plugins

šŸ“‹ Summary

Add an official way for plugins to cancel a game launch before it begins.


ā— Problem

Plugin developers can currently respond to game launch events, but there is no clear supported way to stop a launch from continuing.

This forces developers to rely on unsafe workarounds, such as temporarily changing launch settings or redirecting the launch to a dummy application. These workarounds can be fragile and may risk altering a user’s emulator or game configuration.


šŸ’” Proposal

Add a supported launch cancellation option to the plugin API.

When a plugin runs before a game or additional app launches, it should be able to safely cancel that launch and optionally provide a reason that can be shown to the user.


🧩 Use Cases

  • A plugin blocks launching when required files are missing

  • A plugin prevents launch until a custom confirmation prompt is accepted

  • A parental control or playtime plugin cancels launches based on rules

  • A plugin checks dependencies before allowing an emulator to start


šŸ“¦ Benefits

  • Makes launch-related plugins safer

  • Prevents accidental changes to emulator or game configuration

  • Gives plugin developers a clean supported workflow

  • Improves reliability for custom launch validation tools

  • Helps users understand why a launch was stopped


āš ļø Considerations

The cancellation design should avoid breaking existing plugins. It may be better to add a new cancellable launch event or launch arguments object rather than changing existing plugin behavior directly. Cancellation should work consistently in both LaunchBox and Big Box.

Status: Open To Community3 comments

Log in to comment and vote

Comments3

  • AstroBob changed status to Open To Community
    Team•

    Jun 27

    Pinned

    Hi there!

    Thanks so much for submitting this request and for taking the time to explain your use case — that context is always super helpful.

    I’ve gone ahead and fleshed out the main idea using the info you provided, and I’m opening it up to the community for further discussion and feedback. Please let me know if this fleshed-out version doesn’t match your original intended request.

    Feel free to let me know if you have any extra thoughts, examples, or edge cases you think might be relevant!

    Cheers,
    The LaunchBox team

  • stigzler

    •

    Nov 10

    Damn. Really bummed that this still hasn’t been implemented for plugin designers yet. Am I missing something or is it really hard to implement? Functionally, I’d imagine something like this:

    public interface IGameLaunchingPlugin
    {
        void OnBeforeGameLaunching(IGame? game, IAdditionalApplication? app, IEmulator? emulator, GameLaunchingEventArgs e);
    }
    
    public class GameLaunchingEventArgs : EventArgs
    {
        /// <text>Set to true to abort the game launch.</text>
        public bool Cancel { get; set; }
        
        /// <text>Optional: A message to log or display to the user explaining why it was cancelled.</text>
        public string? CancelMessage { get; set; }
    }

    and implementation:

    internal class GameLaunchingPlugin : IGameLaunchingPlugin
    {
    	public void OnBeforeGameLaunching(IGame? game, IAdditionalApplication? app, IEmulator? emulator, GameLaunchingEventArgs e)
    	{
    		e.Cancelled = !PluginHost.Instance.IsGameRunnable(game);
    	}
    }

    I’m implementing an ā€˜Install’ system from RomM clouds and the game launch needs cancelling if the user presses the play button (which is changed on the fly to read ā€œInstallā€ if the game file is not installed - the metadata is in the local db, but not the game file).

    I’m having to do no end of hacks to work around this (using dummy emulators if an ā€˜install launch’ but then restoring the emu if the game file exists. But now the game laoding screen shows in bigbox even with those hacky work arounds.

    If I’m missing something and it is super complex to implement, then let me know. Otherwise, some showing some love to plugin developers wouldn’t go amiss!

  • stigzler

    •

    Jun 27

    Add a CancelLaunch facility to IGameLaunchingPlugin

    I recently had a need to cancel a Game launch in a plugin I was making. I couldn’t find any facility to do this natively in IGameLaunchingPlugin or IGameConfiguringPlugin.

    How hard would this be to implement? Unfortunately, I had to hack a way to do it (change and restore the emulator applicationPath to a silent dummy exe) which was less than ideal, risking corrupting the emulator setup.