You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
B - bugDang, that shouldn't have happenedC - in progressImplementation is proceeding smoothlyD - hardLikely harder than most tasks hereDS - win32Affects the Win32/Windows backendP - highVital to have
(Related?) app-level hack, Vulkano on Windows with 250% scaling (high DPI laptop):
// Hack to make Vulkano window the same size as the screen when scaling is 250%
let monitor_id: winit::MonitorId = {
//TODO Find the most appropriate monitor, for example the one selected last time
for (num, monitor) in winit::get_available_monitors().enumerate() {
println!("Monitor #{}: {:?} {:?}", num, monitor.get_name(), monitor.get_dimensions());
}
let num = 0;
let monitor = winit::get_available_monitors().nth(num).expect("Invalid monitor ID");
monitor
};
let monitor_dimensions = monitor_id.get_dimensions();
let k = (10, 25); // 2.5 safe integer division
*** let window_dimensions = (monitor_dimensions.0 k.0/k.1, monitor_dimensions.1k.0/k.1); ***
let window = winit::WindowBuilder::new()
.with_title("Slice")
.with_multitouch()
.with_dimensions(window_dimensions.0, window_dimensions.1)
.with_decorations(true)
.build_vk_surface(&instance)
.expect("Could not build Vulkan window");
I'm going to give this issue a try, as I hit the hidpi inaccuracy the other day.
To be backwards compatible with Windows Vista and 7, you can pass TRUE to SetProcessDpiAwareness to be per-monitor DPI aware on 8.1+ and system API aware on 8-. EDIT: Shcore.dll isn't present on Windows 8 and older, need to dynamically link against it
B - bugDang, that shouldn't have happenedC - in progressImplementation is proceeding smoothlyD - hardLikely harder than most tasks hereDS - win32Affects the Win32/Windows backendP - highVital to have
Activity
paulirotta commentedon Dec 13, 2016
This may be the same issue I'm seeing with Windows 10 DPI awareness settings. I think the solution is something along the lines of SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE) to get Windows to give 1:1 on virtual pixels and real pixels. Some APIs use scaled pixels, some not...
https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/dn302122(v=vs.85).aspx
(Related?) app-level hack, Vulkano on Windows with 250% scaling (high DPI laptop):
// Hack to make Vulkano window the same size as the screen when scaling is 250%
let monitor_id: winit::MonitorId = {
//TODO Find the most appropriate monitor, for example the one selected last time
for (num, monitor) in winit::get_available_monitors().enumerate() {
println!("Monitor #{}: {:?} {:?}", num, monitor.get_name(), monitor.get_dimensions());
}
let num = 0;
let monitor = winit::get_available_monitors().nth(num).expect("Invalid monitor ID");
monitor
};
let monitor_dimensions = monitor_id.get_dimensions();
let k = (10, 25); // 2.5 safe integer division
*** let window_dimensions = (monitor_dimensions.0 k.0/k.1, monitor_dimensions.1k.0/k.1); ***
let window = winit::WindowBuilder::new()
.with_title("Slice")
.with_multitouch()
.with_dimensions(window_dimensions.0, window_dimensions.1)
.with_decorations(true)
.build_vk_surface(&instance)
.expect("Could not build Vulkan window");
Merge pull request rust-windowing#62 from ecoal95/servo-merge
LPGhatguy commentedon May 22, 2017
I'm going to give this issue a try, as I hit the hidpi inaccuracy the other day.
To be backwards compatible with Windows Vista and 7, you can passEDIT:TRUEtoSetProcessDpiAwarenessto be per-monitor DPI aware on 8.1+ and system API aware on 8-.Shcore.dllisn't present on Windows 8 and older, need to dynamically link against it