summaryrefslogtreecommitdiff
path: root/src/video/video_driver.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-28 21:06:51 +0000
committerrubidium <rubidium@openttd.org>2014-04-28 21:06:51 +0000
commitb476086c394c6bcf893f292ef67565ef2b5496a2 (patch)
tree7bbdfcc4597cae1378070d82c5da36c8668171e0 /src/video/video_driver.hpp
parent3b634b628c8b8ce30cdd11d38a38cf2f455a1c73 (diff)
downloadopenttd-b476086c394c6bcf893f292ef67565ef2b5496a2.tar.xz
(svn r26538) -Codechange: remove double accounting of the drivers
Diffstat (limited to 'src/video/video_driver.hpp')
-rw-r--r--src/video/video_driver.hpp8
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];