Add: Show current video driver info in Options window
This commit is contained in:
@@ -18,11 +18,12 @@ class VideoDriver_CocoaOpenGL : public VideoDriver_Cocoa {
|
||||
CGLContextObj gl_context;
|
||||
|
||||
uint8 *anim_buffer; ///< Animation buffer from OpenGL back-end.
|
||||
std::string driver_info; ///< Information string about selected driver.
|
||||
|
||||
const char *AllocateContext(bool allow_software);
|
||||
|
||||
public:
|
||||
VideoDriver_CocoaOpenGL() : gl_context(nullptr), anim_buffer(nullptr) {}
|
||||
VideoDriver_CocoaOpenGL() : gl_context(nullptr), anim_buffer(nullptr), driver_info(this->GetName()) {}
|
||||
|
||||
const char *Start(const StringList ¶m) override;
|
||||
void Stop() override;
|
||||
@@ -41,6 +42,8 @@ public:
|
||||
/** Return driver name */
|
||||
const char *GetName() const override { return "cocoa-opengl"; }
|
||||
|
||||
const char *GetInfoString() const override { return this->driver_info.c_str(); }
|
||||
|
||||
void AllocateBackingStore(bool force = false) override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -203,6 +203,11 @@ const char *VideoDriver_CocoaOpenGL::Start(const StringList ¶m)
|
||||
return err;
|
||||
}
|
||||
|
||||
this->driver_info = GetName();
|
||||
this->driver_info += " (";
|
||||
this->driver_info += OpenGLBackend::Get()->GetDriverName();
|
||||
this->driver_info += ")";
|
||||
|
||||
bool fullscreen = _fullscreen;
|
||||
if (!this->MakeWindow(_cur_resolution.width, _cur_resolution.height)) {
|
||||
this->Stop();
|
||||
|
||||
Reference in New Issue
Block a user