subsoap / defos

Extra native OS functions for games written using the Defold game engine
Creative Commons Zero v1.0 Universal
121 stars 16 forks source link

Windows 11, using defos.get_view_size() immediatly after defos.set_view_size() return different values. #133

Open Awasaky opened 11 months ago

Awasaky commented 11 months ago

изображение

after: defos.set_view_size( 320, 180, 1280, 720)

defos.get_view_size() --returns: 328, 211, 1280, 720

Displays info

{ --[[000001A8C22307C0]]
  1 = { --[[000001A8C2230810]]
    mode = { --[[000001A8C22309A0]]
      reflect_y = false,
      orientation = 90,
      refresh_rate = 144,
      scaling_factor = 1,
      bits_per_pixel = 32,
      width = 1080,
      reflect_x = false,
      height = 1920
    },
    id = "\\.\DISPLAY1",
    name = "HP X27 IPS 165Hz FHD Gaming Monitor",
    bounds = { --[[000001A8C22308A0]]
      y = -480,
      width = 1080,
      x = -1080,
      height = 1920
    }
  },
  2 = { --[[000001A8C2230CC0]]
    mode = { --[[000001A8C2230E80]]
      reflect_y = false,
      orientation = 0,
      refresh_rate = 144,
      scaling_factor = 1,
      bits_per_pixel = 32,
      width = 1920,
      reflect_x = false,
      height = 1080
    },
    id = "\\.\DISPLAY2",
    name = "ASUS VG279QM(DisplayPort)",
    bounds = { --[[000001A8C2230D80]]
      y = 0,
      width = 1920,
      x = 0,
      height = 1080
    }
  },
  \\.\DISPLAY2 = { --[[000001A8C2230CC0]]
    mode = { --[[000001A8C2230E80]]
      reflect_y = false,
      orientation = 0,
      refresh_rate = 144,
      scaling_factor = 1,
      bits_per_pixel = 32,
      width = 1920,
      reflect_x = false,
      height = 1080
    },
    id = "\\.\DISPLAY2",
    name = "ASUS VG279QM(DisplayPort)",
    bounds = { --[[000001A8C2230D80]]
      y = 0,
      width = 1920,
      x = 0,
      height = 1080
    }
  },
  \\.\DISPLAY1 = { --[[000001A8C2230810]]
    mode = { --[[000001A8C22309A0]]
      reflect_y = false,
      orientation = 90,
      refresh_rate = 144,
      scaling_factor = 1,
      bits_per_pixel = 32,
      width = 1080,
      reflect_x = false,
      height = 1920
    },
    id = "\\.\DISPLAY1",
    name = "HP X27 IPS 165Hz FHD Gaming Monitor",
    bounds = { --[[000001A8C22308A0]]
      y = -480,
      width = 1080,
      x = -1080,
      height = 1920
    }
  }
}
Awasaky commented 11 months ago

here is screenshot with launched project build. Here is some offset Снимок экрана 2023-12-15 032415 Differences betweeen set and returned data always are: X: -8 Y: -31 And don't change after reposition of window