LaunchBoxContributors
On this page

EmulatorLaunchPreparationRequest14.1

Class in Unbroken.LaunchBox.Plugins.Components.Emulators

C#
public sealed class EmulatorLaunchPreparationRequest
Provides the context for preparing an emulator immediately before launch.

Constructors

EmulatorLaunchPreparationRequest

C#
public EmulatorLaunchPreparationRequest(
    IEmulator emulator,
    IGame game,
    string commandLine,
    IAdditionalApplication? application,
    EmulatorRetroAchievementsCredentials? retroAchievementsCredentials,
    IPluginConfigurationValues? emulatorSettings
)
Initializes an emulator launch-preparation request.
emulator
The configured emulator being launched.
game
The game being launched.
commandLine
The current emulator command line.
application
The additional application being launched, when applicable.
retroAchievementsCredentials
The RetroAchievements launch credentials, when available.
emulatorSettings
The settings the user saved for this emulator, when LaunchBox has settings to supply.

Properties

AppBeingLaunched

C#
public IAdditionalApplication? AppBeingLaunched { get; }
Gets the additional application being launched, when applicable.

CurrentCommandLine

C#
public string CurrentCommandLine { get; }
Gets the current emulator command line.

EmulatorBeingLaunched

C#
public IEmulator EmulatorBeingLaunched { get; }
Gets the configured emulator being launched.

EmulatorSettings

C#
public IPluginConfigurationValues? EmulatorSettings { get; }
Gets the settings the user saved for this emulator, or null when LaunchBox has none to supply.

Remarks

This is null whenever the integration does not implement IEmulatorSettingsCapability, and whenever the user has left the page's master switch off, which is how an emulator configured by hand keeps launching exactly as it did before the page existed. Prepare the launch from EmulatorLaunchPreparationRequest.CurrentCommandLine alone when it is null. The values cannot resolve a declared PluginFormField.DefaultValue, because the page is never built at launch, so pass the declared default at every read site.

GameBeingLaunched

C#
public IGame GameBeingLaunched { get; }
Gets the game being launched.

RetroAchievementCredentials

C#
public EmulatorRetroAchievementsCredentials? RetroAchievementCredentials { get; }
Gets the RetroAchievements launch credentials, when available.