Add: [OSX] Automatic zoom level suggestion for Cocoa video driver.
This commit is contained in:
@@ -73,6 +73,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
Dimension GetScreenSize() const override;
|
Dimension GetScreenSize() const override;
|
||||||
|
float GetDPIScale() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool PollEvent();
|
bool PollEvent();
|
||||||
|
|||||||
@@ -294,6 +294,12 @@ Dimension VideoDriver_Cocoa::GetScreenSize() const
|
|||||||
return { static_cast<uint>(NSWidth(frame)), static_cast<uint>(NSHeight(frame)) };
|
return { static_cast<uint>(NSWidth(frame)), static_cast<uint>(NSHeight(frame)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get DPI scale of our window. */
|
||||||
|
float VideoDriver_Cocoa::GetDPIScale()
|
||||||
|
{
|
||||||
|
return this->cocoaview != nil ? [ this->cocoaview getContentsScale ] : 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Are we in fullscreen mode?
|
* Are we in fullscreen mode?
|
||||||
* @return whether fullscreen mode is currently used
|
* @return whether fullscreen mode is currently used
|
||||||
|
|||||||
Reference in New Issue
Block a user