libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
GameCubePlatform Class Reference

GameCube (HW_DOL) Platform: same driver set as WiiPlatform except for file system, which uses GameCubeFileSystemDriver (memory card/GC Loader/DVD) instead of SD/USB/DVD. More...

#include <GameCubePlatform.h>

Inheritance diagram for GameCubePlatform:
[legend]

Public Member Functions

void init (const PlatformConfig &config) override
 Constructs and initializes all five drivers for this platform.
 
void requestExit () override
 Tears down the platform (via shutdown()) and then performs whatever platform-appropriate action actually ends the app - return to loader/menu, power off, or just exit(), depending on how getSystemEvent() last reported and how the platform was reached.
 
SystemEvent getSystemEvent () override
 Current hardware/OS-level system event, if any.
 
Status getStatus () const override
 Current platform lifecycle state (Running, Paused, Exiting).
 
void triggerExit () override
 Transitions platform state to move to Exiting.
 
AudioDriver * getAudio () override
 
VideoDriver * getVideo () override
 
InputDriver * getInput () override
 
FileSystemDriver * getFileSystem () override
 
ThreadDriver * getThread () override
 
Logger * getLogger () override
 May return nullptr on a Platform that hasn't finished init() yet - LogPrintf()/LOG_*() already guard against this, but code calling platform->getLogger() directly should too.
 
- Public Member Functions inherited from Platform
const PlatformConfig & getConfig () const
 The PlatformConfig this platform was init()'d with.
 
bool shouldExit ()
 True once triggerExit() has been called, or the platform's own getSystemEvent() independently reports ShutdownRequested (eg.
 

Protected Member Functions

void shutdown () override
 Shuts down and releases all five drivers.
 

Additional Inherited Members

- Protected Attributes inherited from Platform
PlatformConfig config {}
 Set by init() in every concrete Platform - store the passed-in config as the very first line of the override.
 

Detailed Description

GameCube (HW_DOL) Platform: same driver set as WiiPlatform except for file system, which uses GameCubeFileSystemDriver (memory card/GC Loader/DVD) instead of SD/USB/DVD.

Examples
demo.cpp.

Definition at line 22 of file GameCubePlatform.h.

Constructor & Destructor Documentation

◆ GameCubePlatform()

GameCubePlatform::GameCubePlatform ( )
inline

Definition at line 25 of file GameCubePlatform.h.

Member Function Documentation

◆ getAudio()

AudioDriver * GameCubePlatform::getAudio ( )
inlineoverridevirtual
Returns
the audio driver, valid once init() has run

Implements Platform.

Definition at line 34 of file GameCubePlatform.h.

◆ getFileSystem()

FileSystemDriver * GameCubePlatform::getFileSystem ( )
inlineoverridevirtual
Returns
the storage driver, valid once init() has run

Implements Platform.

Definition at line 37 of file GameCubePlatform.h.

◆ getInput()

InputDriver * GameCubePlatform::getInput ( )
inlineoverridevirtual
Returns
the input driver, valid once init() has run

Implements Platform.

Definition at line 36 of file GameCubePlatform.h.

◆ getLogger()

Logger * GameCubePlatform::getLogger ( )
inlineoverridevirtual

May return nullptr on a Platform that hasn't finished init() yet - LogPrintf()/LOG_*() already guard against this, but code calling platform->getLogger() directly should too.

Implements Platform.

Definition at line 39 of file GameCubePlatform.h.

◆ getStatus()

Status GameCubePlatform::getStatus ( ) const
inlineoverridevirtual

Current platform lifecycle state (Running, Paused, Exiting).

Implements Platform.

Definition at line 31 of file GameCubePlatform.h.

◆ getSystemEvent()

SystemEvent GameCubePlatform::getSystemEvent ( )
inlineoverridevirtual

Current hardware/OS-level system event, if any.

A single query rather than independent shutdown/reset flags.

Implements Platform.

Definition at line 30 of file GameCubePlatform.h.

◆ getThread()

ThreadDriver * GameCubePlatform::getThread ( )
inlineoverridevirtual
Returns
the thread driver, valid once init() has run

Implements Platform.

Definition at line 38 of file GameCubePlatform.h.

◆ getVideo()

VideoDriver * GameCubePlatform::getVideo ( )
inlineoverridevirtual
Returns
the video driver, valid once init() has run

Implements Platform.

Definition at line 35 of file GameCubePlatform.h.

◆ init()

void GameCubePlatform::init ( const PlatformConfig & config)
overridevirtual

Constructs and initializes all five drivers for this platform.

Parameters
configGUI canvas size and asset scale for this platform

Implements Platform.

Definition at line 8 of file GameCubePlatform.cpp.

◆ requestExit()

void GameCubePlatform::requestExit ( )
overridevirtual

Tears down the platform (via shutdown()) and then performs whatever platform-appropriate action actually ends the app - return to loader/menu, power off, or just exit(), depending on how getSystemEvent() last reported and how the platform was reached.

It does not return.

Implements Platform.

Definition at line 88 of file GameCubePlatform.cpp.

◆ shutdown()

void GameCubePlatform::shutdown ( )
overrideprotectedvirtual

Shuts down and releases all five drivers.

Any background Thread that might still call into a driver must be stopped and joined (eg. via Thread::JoinAll()) before calling this, since the drivers it deletes may be in active use.

Implements Platform.

Definition at line 46 of file GameCubePlatform.cpp.

◆ triggerExit()

void GameCubePlatform::triggerExit ( )
inlineoverridevirtual

Transitions platform state to move to Exiting.

Implements Platform.

Definition at line 32 of file GameCubePlatform.h.


The documentation for this class was generated from the following files: