UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FScreenSaverInhibitor Class Reference
+ Inheritance diagram for FScreenSaverInhibitor:

Public Member Functions

 FScreenSaverInhibitor ()
 
- Public Member Functions inherited from FRunnable
virtual void Exit ()
 
virtual class FSingleThreadRunnableGetSingleThreadInterface ()
 
virtual ~FRunnable ()
 

Protected Member Functions

bool Init () override
 
void Stop () override
 
uint32 Run () override
 

Protected Attributes

std::atomic< boolbEnabled { true }
 

Detailed Description

Helper class inhibiting screen saver by e.g. moving the mouse by 0 pixels every 50 seconds.

Constructor & Destructor Documentation

◆ FScreenSaverInhibitor()

FScreenSaverInhibitor::FScreenSaverInhibitor ( )
inline

Default constructor.

Member Function Documentation

◆ Init()

bool FScreenSaverInhibitor::Init ( void  )
inlineoverrideprotectedvirtual

Initializes the runnable object.

This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.

Returns
True if initialization was successful, false otherwise
See also
Run, Stop, Exit

Reimplemented from FRunnable.

◆ Run()

uint32 FScreenSaverInhibitor::Run ( void  )
inlineoverrideprotectedvirtual

Prevents screensaver from kicking in by calling FPlatformMisc::PreventScreenSaver every 50 seconds.

Implements FRunnable.

◆ Stop()

void FScreenSaverInhibitor::Stop ( void  )
inlineoverrideprotectedvirtual

Stops the runnable object.

This is called if a thread is requested to terminate early.

See also
Init, Run, Exit

Reimplemented from FRunnable.

Member Data Documentation

◆ bEnabled

std::atomic<bool> FScreenSaverInhibitor::bEnabled { true }
protected

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