|
ReXGlue SDK
|
#include <rex/app/title_app.h>
Public Member Functions | |
| TitleApp (std::string_view app_name, const ppc::PPCImage &image) | |
| Result< void > | LaunchTitle () |
| void | UnloadTitle () |
| rex::kernel::TitleRuntime & | GetTitleRuntime () |
| Public Member Functions inherited from rex::app::App | |
| REX_SETTING (std::string, name, "", "App name, set by the constructor", kStartupOnly, kNoSave) | |
| REX_SETTING (std::filesystem::path, root, "", "Folder the app keeps its files in, the folder of the executable when empty", kStartupOnly) | |
| REX_SETTING (std::filesystem::path, log_root, "{app.root}/logs", "Log folder", kStartupOnly) | |
| REX_SETTING (std::string, single_instance, "", "Lock name only one running copy may hold, empty for none", kStartupOnly) | |
| App (std::string_view name) | |
| App (const App &)=delete | |
| App & | operator= (const App &)=delete |
| std::string_view | GetName () const |
| AppPhase | GetPhase () const |
| std::span< const std::string > | GetArgs () const |
| rex::hid::IInputSystem & | GetInput () |
| rex::gpu::IGraphicsSystem & | GetGraphics () |
| rex::apu::IAudioSystem & | GetAudio () |
| rex::ui::IUISystem & | GetUI () |
| void | RequestShutdown () |
| void | RequestRestart () |
| Result< void > | Init (const CLIArgList &args) |
| bool | RunFrame () |
| void | Run () |
| int | Shutdown () |
| Public Member Functions inherited from rex::SettingOwner | |
| SettingOwner (std::string_view scope) | |
| virtual | ~SettingOwner () |
| const std::string & | GetScope () const |
| std::span< SettingBase *const > | GetOwnedSettings () const |
Protected Member Functions | |
| AppSysRequirements | GetRequirements () const override |
| virtual Result< void > | OnTitleLaunch (rex::kernel::TitleRuntime &title) |
| virtual void | OnTitleExit (rex::kernel::TitleExitReason reason) |
| void | OnRun () override |
| void | ReportError (std::string_view message) override |
| platform::CrashReporterOptions | GetCrashOptions () override |
| void | OnStop () final |
| void | OnRelease () override |
| void | RestartTitle () |
| Protected Member Functions inherited from rex::app::App | |
| virtual Result< void > | OnConfigure (SettingsRegistry &settings) |
| virtual std::span< const CLIAction > | GetActions () const |
| virtual Result< void > | OnAction (const CLIActionHit &hit) |
| virtual void | OnModules (std::vector< std::string > &modules) |
| virtual void | OnRegisterModules (std::vector< IModule * > &modules) |
| virtual Result< void > | OnInit () |
| virtual void | OnShutdown () |
| rex::ui::IUISystem * | FindUI () |
| bool | IsHeadlessRequested () const |
| Result< void > | Fail (std::string_view step, Error error) |
| IInterfaceFactory & | GetControlFactory () |
| void | SetPhase (AppPhase phase) |
| Protected Member Functions inherited from rex::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
An app that runs a title. REX_TITLE_APP calls Init, LaunchTitle, Run and Shutdown in order. A project with an installer or a launcher uses REX_TITLE_APP_MAIN, calling RunFrame until it is ready to launch. LaunchTitle and UnloadTitle may run any number of times, each launch from a fresh mapping. When the title exits on its own the app asks the player to restart it or exit, or shuts down when headless. Every step and hook runs on the UI thread that called Init.
| rex::app::TitleApp::TitleApp | ( | std::string_view | app_name, |
| const ppc::PPCImage & | image ) |
| image | The recompiled image the codegen header declares. |
|
overrideprotectedvirtual |
Returns the options the crash reporter starts with.
Reimplemented from rex::app::App.
|
overrideprotectedvirtual |
Requires the Xenos graphics family, audio, input and UI.
Reimplemented from rex::app::App.
| rex::kernel::TitleRuntime & rex::app::TitleApp::GetTitleRuntime | ( | ) |
Returns the title runtime, loaded or not.
|
nodiscard |
The launch phase. Runs TitleRuntime::Load, OnTitleLaunch, then TitleRuntime::Launch. Call on the UI thread after Init. Returns Ok and does nothing once shutdown is requested.
|
overrideprotectedvirtual |
Releases what a derived app type created after Init. Runs after OnShutdown.
Reimplemented from rex::app::App.
|
overrideprotectedvirtual |
Runs the title until it exits or shutdown is requested.
Reimplemented from rex::app::App.
|
finalprotectedvirtual |
Stops what a derived app type runs. Shutdown calls it first, before OnShutdown.
Reimplemented from rex::app::App.
|
protectedvirtual |
The title exited on its own. The default asks the player to restart or exit.
|
nodiscardprotectedvirtual |
Runs after TitleRuntime::Load and before the guest starts.
|
overrideprotectedvirtual |
Reports an error through the host.
| message | The error text. |
Reimplemented from rex::app::App.
| void rex::app::TitleApp::UnloadTitle | ( | ) |
The unload phase runs TitleRuntime::Unload and returns to running. Call on the UI thread.