diff options
Diffstat (limited to 'src/video/video_driver.hpp')
-rw-r--r-- | src/video/video_driver.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index 190bfcc10..916044d35 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -78,9 +78,15 @@ public: * An edit box lost the input focus. Abort character compositing if necessary. */ virtual void EditBoxLostFocus() {} + + /** + * Get the currently active instance of the video driver. + */ + static VideoDriver *GetInstance() { + return static_cast<VideoDriver*>(*DriverFactoryBase::GetActiveDriver(Driver::DT_VIDEO)); + } }; -extern VideoDriver *_video_driver; extern char *_ini_videodriver; extern int _num_resolutions; extern Dimension _resolutions[32]; |