Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::RETRO::CGUIGameRenderManager Class Reference

Class to safely route commands between the GUI and RetroPlayer. More...

#include <GUIGameRenderManager.h>

Public Member Functions

 CGUIGameRenderManager ()=default
 
 ~CGUIGameRenderManager ()
 
void RegisterPlayer (CGUIRenderTargetFactory *factory, IRenderCallback *callback, IGameCallback *gameCallback)
 Register a RetroPlayer instance.
 
void UnregisterPlayer ()
 Unregister a RetroPlayer instance.
 
std::shared_ptr< CGUIRenderHandleRegisterControl (CGUIGameControl &control)
 Register a GUI game control ("gamewindow" skin control)
 
std::shared_ptr< CGUIRenderHandleRegisterWindow (CGameWindowFullScreen &window)
 Register a fullscreen game window ("FullscreenGame" window)
 
std::shared_ptr< CGUIGameVideoHandleRegisterDialog (GAME::CDialogGameVideoSelect &dialog)
 Register a video select dialog (for selecting video filters, view modes, etc.)
 
std::shared_ptr< CGUIGameSettingsHandleRegisterGameSettingsDialog ()
 Register a game settings dialog.
 

Protected Member Functions

void UnregisterHandle (CGUIRenderHandle *handle)
 
void Render (CGUIRenderHandle *handle)
 
void RenderEx (CGUIRenderHandle *handle)
 
void ClearBackground (CGUIRenderHandle *handle)
 
bool IsDirty (CGUIRenderHandle *handle)
 
void UnregisterHandle (CGUIGameVideoHandle *handle)
 
bool IsPlayingGame ()
 
bool SupportsRenderFeature (RENDERFEATURE feature)
 
bool SupportsScalingMethod (SCALINGMETHOD method)
 
void UnregisterHandle (CGUIGameSettingsHandle *handle)
 
std::string GameClientID ()
 
std::string GetPlayingGame ()
 
std::string CreateSavestate (bool autosave)
 
bool UpdateSavestate (const std::string &savestatePath)
 
bool LoadSavestate (const std::string &savestatePath)
 
void FreeSavestateResources (const std::string &savestatePath)
 
void CloseOSD ()
 

Friends

class CGUIGameSettingsHandle
 
class CGUIGameVideoHandle
 
class CGUIRenderHandle
 

Detailed Description

Class to safely route commands between the GUI and RetroPlayer.

This class is brought up before the GUI and player core factory. It provides the GUI with safe access to a registered player.

Access to the player is done through handles. When a handle is no longer needed, it should be destroyed.

Three kinds of handles are provided:

Each manager fulfills the following design requirements:

  1. No assumption of player lifetimes
  2. No assumption of GUI element lifetimes, as long as handles are destroyed before this class is destructed
  3. No limit on the number of handles

Constructor & Destructor Documentation

◆ CGUIGameRenderManager()

KODI::RETRO::CGUIGameRenderManager::CGUIGameRenderManager ( )
default

◆ ~CGUIGameRenderManager()

CGUIGameRenderManager::~CGUIGameRenderManager ( )
default

Member Function Documentation

◆ ClearBackground()

void CGUIGameRenderManager::ClearBackground ( CGUIRenderHandle * handle)
protected

◆ CloseOSD()

void CGUIGameRenderManager::CloseOSD ( )
protected

◆ CreateSavestate()

std::string CGUIGameRenderManager::CreateSavestate ( bool autosave)
protected

◆ FreeSavestateResources()

void CGUIGameRenderManager::FreeSavestateResources ( const std::string & savestatePath)
protected

◆ GameClientID()

std::string CGUIGameRenderManager::GameClientID ( )
protected

◆ GetPlayingGame()

std::string CGUIGameRenderManager::GetPlayingGame ( )
protected

◆ IsDirty()

bool CGUIGameRenderManager::IsDirty ( CGUIRenderHandle * handle)
protected

◆ IsPlayingGame()

bool CGUIGameRenderManager::IsPlayingGame ( )
protected

◆ LoadSavestate()

bool CGUIGameRenderManager::LoadSavestate ( const std::string & savestatePath)
protected

◆ RegisterControl()

std::shared_ptr< CGUIRenderHandle > CGUIGameRenderManager::RegisterControl ( CGUIGameControl & control)

Register a GUI game control ("gamewindow" skin control)

Parameters
controlThe game control
Returns
A handle to invoke render events

◆ RegisterDialog()

std::shared_ptr< CGUIGameVideoHandle > CGUIGameRenderManager::RegisterDialog ( GAME::CDialogGameVideoSelect & dialog)

Register a video select dialog (for selecting video filters, view modes, etc.)

Parameters
dialogThe video select dialog
Returns
A handle to query game and video properties

◆ RegisterGameSettingsDialog()

std::shared_ptr< CGUIGameSettingsHandle > CGUIGameRenderManager::RegisterGameSettingsDialog ( )

Register a game settings dialog.

Returns
A handle to query game properties

◆ RegisterPlayer()

void CGUIGameRenderManager::RegisterPlayer ( CGUIRenderTargetFactory * factory,
IRenderCallback * callback,
IGameCallback * gameCallback )

Register a RetroPlayer instance.

Parameters
factoryThe interface for creating render targets exposed to the GUI
callbackThe interface for querying video properties
gameCallbackThe interface for querying game properties

◆ RegisterWindow()

std::shared_ptr< CGUIRenderHandle > CGUIGameRenderManager::RegisterWindow ( CGameWindowFullScreen & window)

Register a fullscreen game window ("FullscreenGame" window)

Parameters
windowThe game window
Returns
A handle to invoke render events

◆ Render()

void CGUIGameRenderManager::Render ( CGUIRenderHandle * handle)
protected

◆ RenderEx()

void CGUIGameRenderManager::RenderEx ( CGUIRenderHandle * handle)
protected

◆ SupportsRenderFeature()

bool CGUIGameRenderManager::SupportsRenderFeature ( RENDERFEATURE feature)
protected

◆ SupportsScalingMethod()

bool CGUIGameRenderManager::SupportsScalingMethod ( SCALINGMETHOD method)
protected

◆ UnregisterHandle() [1/3]

void KODI::RETRO::CGUIGameRenderManager::UnregisterHandle ( CGUIGameSettingsHandle * handle)
inlineprotected

◆ UnregisterHandle() [2/3]

void KODI::RETRO::CGUIGameRenderManager::UnregisterHandle ( CGUIGameVideoHandle * handle)
inlineprotected

◆ UnregisterHandle() [3/3]

void CGUIGameRenderManager::UnregisterHandle ( CGUIRenderHandle * handle)
protected

◆ UnregisterPlayer()

void CGUIGameRenderManager::UnregisterPlayer ( )

Unregister a RetroPlayer instance.

◆ UpdateSavestate()

bool CGUIGameRenderManager::UpdateSavestate ( const std::string & savestatePath)
protected

Friends And Related Symbol Documentation

◆ CGUIGameSettingsHandle

friend class CGUIGameSettingsHandle
friend

◆ CGUIGameVideoHandle

friend class CGUIGameVideoHandle
friend

◆ CGUIRenderHandle

friend class CGUIRenderHandle
friend

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