- added HiDPI support to Cocoa backend with Vulkan renderer

This commit is contained in:
alexey.lysiuk 2019-03-10 13:24:01 +02:00
parent 0909a67676
commit 34cbb7c276

View file

@ -557,6 +557,10 @@ void SystemBaseFrameBuffer::SetWindowedMode()
void SystemBaseFrameBuffer::SetMode(const bool fullscreen, const bool hiDPI) void SystemBaseFrameBuffer::SetMode(const bool fullscreen, const bool hiDPI)
{ {
assert(m_window.screen != nil);
assert(m_window.contentView.layer != nil);
m_window.contentView.layer.contentsScale = hiDPI ? m_window.screen.backingScaleFactor : 1.0;
if (fullscreen) if (fullscreen)
{ {
SetFullscreenMode(); SetFullscreenMode();