LibretroApplication class
Application driven by a libretro frontend.
The frontend owns the main loop, the window and the input devices, so the entry points in libretro.cpp initialize the application once and then advance it by exactly one frame on every retro_run() call.
Base classes
- class nCine::Application
- Base class for the main entry point of an nCine application.
Public types
- struct HostPaths
- Directories advertised by the frontend, filled in before the initialization.
Public static variables
- static retro_environment_t EnvironmentCallback
- Frontend callback to query and configure the environment.
- static retro_video_refresh_t VideoRefreshCallback
- Frontend callback to present a finished frame.
- static retro_input_poll_t InputPollCallback
- Frontend callback to poll the input devices.
- static retro_input_state_t InputStateCallback
- Frontend callback to read the state of an input device.
- static bool IsInsideFrame
- Whether the frontend is inside
retro_run(), only then its video driver can be called.
Public static functions
- static void ShowMessage(const char* text)
- Shows a short notice on the frontend's on-screen display.
Public functions
- auto Init(CreateAppEventHandlerDelegate createAppEventHandler) -> bool
- Creates the graphics device and the input manager, then initializes the engine.
- void RunFrame()
- Advances the engine by exactly one frame.
- void Shutdown()
- Shuts the engine down, it cannot be initialized again afterwards.
- void SetFrameLimiter(bool enabled)
- Enables or disables the internal frame limiter.
-
auto SaveState(Death::
IO:: Stream& dest) -> bool - Writes a snapshot of the current session to a stream, see IAppEventHandler::
OnSaveState(). -
auto LoadState(std::
shared_ptr<Death:: IO:: Stream> src) -> bool - Restores a snapshot written by SaveState(), see IAppEventHandler::
OnLoadState(). - auto GetHostPaths() const -> const HostPaths&
- Returns the directories advertised by the frontend.
- void SetHostPaths(HostPaths&& hostPaths)
- Sets the directories advertised by the frontend, must be called before Init().