You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Improve HiDPI handling, fix incorrect window viewport clipping.
This commit is contained in:
@@ -5277,7 +5277,7 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin_for_screen(in
|
|||||||
scissor.offset.x = 0;
|
scissor.offset.x = 0;
|
||||||
scissor.offset.y = 0;
|
scissor.offset.y = 0;
|
||||||
scissor.extent.width = size_x;
|
scissor.extent.width = size_x;
|
||||||
scissor.extent.height = size_x;
|
scissor.extent.height = size_y;
|
||||||
|
|
||||||
vkCmdSetScissor(command_buffer, 0, 1, &scissor);
|
vkCmdSetScissor(command_buffer, 0, 1, &scissor);
|
||||||
|
|
||||||
|
|||||||
@@ -345,6 +345,12 @@ static NSCursor *cursorFromSelector(SEL selector, SEL fallback = nil) {
|
|||||||
OS_OSX::singleton->window_size.width = fbRect.size.width * newDisplayScale;
|
OS_OSX::singleton->window_size.width = fbRect.size.width * newDisplayScale;
|
||||||
OS_OSX::singleton->window_size.height = fbRect.size.height * newDisplayScale;
|
OS_OSX::singleton->window_size.height = fbRect.size.height * newDisplayScale;
|
||||||
|
|
||||||
|
#if defined(VULKAN_ENABLED)
|
||||||
|
if (OS_OSX::singleton->video_driver_index == OS::VIDEO_DRIVER_VULKAN) {
|
||||||
|
CALayer* layer = [OS_OSX::singleton->window_view layer];
|
||||||
|
layer.contentsScale = OS_OSX::singleton->_display_scale();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
//Update context
|
//Update context
|
||||||
if (OS_OSX::singleton->main_loop) {
|
if (OS_OSX::singleton->main_loop) {
|
||||||
//Force window resize event
|
//Force window resize event
|
||||||
|
|||||||
Reference in New Issue
Block a user