Add: Option to (dis-)allow accelerated video drivers. (#8819)

The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
This commit is contained in:
Patric Stout
2021-03-08 15:42:39 +01:00
committed by GitHub
parent 6e2a96c133
commit b93d7dd3cb
12 changed files with 76 additions and 6 deletions

View File

@@ -54,6 +54,9 @@ class FVideoDriver_CocoaOpenGL : public DriverFactoryBase {
public:
FVideoDriver_CocoaOpenGL() : DriverFactoryBase(Driver::DT_VIDEO, 9, "cocoa-opengl", "Cocoa OpenGL Video Driver") {}
Driver *CreateInstance() const override { return new VideoDriver_CocoaOpenGL(); }
protected:
bool UsesHardwareAcceleration() const override { return true; }
};
#endif /* VIDEO_COCOA_OGL_H */

View File

@@ -122,7 +122,7 @@ protected:
class FVideoDriver_CocoaQuartz : public DriverFactoryBase {
public:
FVideoDriver_CocoaQuartz() : DriverFactoryBase(Driver::DT_VIDEO, 10, "cocoa", "Cocoa Video Driver") {}
FVideoDriver_CocoaQuartz() : DriverFactoryBase(Driver::DT_VIDEO, 8, "cocoa", "Cocoa Video Driver") {}
Driver *CreateInstance() const override { return new VideoDriver_CocoaQuartz(); }
};