openMSX
Public Member Functions | Friends | List of all members
openmsx::ThrottleManager Class Referencefinal

Manages the throttle state of openMSX. More...

#include <ThrottleManager.hh>

Inheritance diagram for openmsx::ThrottleManager:
Inheritance graph
[legend]
Collaboration diagram for openmsx::ThrottleManager:
Collaboration graph
[legend]

Public Member Functions

 ThrottleManager (CommandController &commandController)
 
 ~ThrottleManager ()
 
bool isThrottled () const
 Ask if throttling is enabled.
 
auto & getFullSpeedLoadingSetting ()
 
- Public Member Functions inherited from openmsx::Subject< ThrottleManager >
 Subject (const Subject &)=delete
 
 Subject (Subject &&)=delete
 
Subjectoperator= (const Subject &)=delete
 
Subjectoperator= (Subject &&)=delete
 
void attach (Observer< ThrottleManager > &observer)
 
void detach (Observer< ThrottleManager > &observer)
 
bool anyObservers () const
 

Friends

class LoadingIndicator
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::Subject< ThrottleManager >
 Subject ()=default
 
 ~Subject ()
 
void notify () const
 

Detailed Description

Manages the throttle state of openMSX.

It depends on the throttle setting, but also on the fullspeedwhenfastloading setting and if the MSX has notified us that it is loading... If you want to know about the throttle status of openMSX, attach to me! (And not just to throttleSetting!)

Definition at line 17 of file ThrottleManager.hh.

Constructor & Destructor Documentation

◆ ThrottleManager()

openmsx::ThrottleManager::ThrottleManager ( CommandController commandController)
explicit

Definition at line 7 of file ThrottleManager.cc.

References openmsx::Subject< T >::attach().

◆ ~ThrottleManager()

openmsx::ThrottleManager::~ThrottleManager ( )

Definition at line 19 of file ThrottleManager.cc.

References openmsx::Subject< T >::detach().

Member Function Documentation

◆ getFullSpeedLoadingSetting()

auto & openmsx::ThrottleManager::getFullSpeedLoadingSetting ( )
inline

Definition at line 31 of file ThrottleManager.hh.

◆ isThrottled()

bool openmsx::ThrottleManager::isThrottled ( ) const
inline

Ask if throttling is enabled.

Depends on the throttle setting, but also on the fullspeedwhenfastloading setting and if the MSX has notified us that it is loading... To be used for the timing.

Definition at line 29 of file ThrottleManager.hh.

Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::SDLSoundDriver::uploadBuffer().

Friends And Related Symbol Documentation

◆ LoadingIndicator

friend class LoadingIndicator
friend

Definition at line 34 of file ThrottleManager.hh.


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