Changeset - r24798:b9ee83bbe580
[Not reviewed]
master
0 2 0
Michael Lutz - 3 years ago 2021-02-14 12:26:46
michi@icosahedron.de
Add: [OSX] Automatic zoom level suggestion for Cocoa video driver.
2 files changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/video/cocoa/cocoa_v.h
Show inline comments
 
@@ -73,6 +73,7 @@ public:
 

	
 
protected:
 
	Dimension GetScreenSize() const override;
 
	float GetDPIScale() override;
 

	
 
private:
 
	bool PollEvent();
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -294,6 +294,12 @@ Dimension VideoDriver_Cocoa::GetScreenSi
 
	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?
 
 * @return whether fullscreen mode is currently used
0 comments (0 inline, 0 general)