mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
Ensure width/height/DPI are sent as integers. Properly adjust display scale for reported pixel size.
This commit is contained in:
@@ -117,8 +117,8 @@
|
||||
// Scale width/height to be at least 600x600
|
||||
if (optimal_width < 600 || optimal_height < 600) {
|
||||
var scale = Math.max(600 / optimal_width, 600 / optimal_height);
|
||||
optimal_width = Math.floor(optimal_width * scale);
|
||||
optimal_height = Math.floor(optimal_height * scale);
|
||||
optimal_width = optimal_width * scale;
|
||||
optimal_height = optimal_height * scale;
|
||||
}
|
||||
|
||||
// Get entire query string, and pass to connect().
|
||||
@@ -128,9 +128,9 @@
|
||||
|
||||
var connect_string =
|
||||
window.location.search.substring(1)
|
||||
+ "&width=" + optimal_width
|
||||
+ "&height=" + optimal_height
|
||||
+ "&dpi=" + optimal_dpi;
|
||||
+ "&width=" + Math.floor(optimal_width)
|
||||
+ "&height=" + Math.floor(optimal_height)
|
||||
+ "&dpi=" + Math.floor(optimal_dpi);
|
||||
|
||||
// Add audio mimetypes to connect_string
|
||||
GuacUI.Audio.supported.forEach(function(mimetype) {
|
||||
|
Reference in New Issue
Block a user