Code Monkey home page Code Monkey logo

Comments (2)

comp500 avatar comp500 commented on August 24, 2024

Wow, this bug is horrible... I managed to reproduce it, but I have no idea how it could be fixed. The issue seems to occur somewhere between GLFW and Windows, as if Windows thinks GLFW isn't DPI-aware? I don't think I will be able to fix this in Borderless Mining. If you don't mind having smaller GUIs you could try setting your first monitor to 100% display scale... but if it's not that big a monitor you probably don't want to do that.

To reproduce it on my system (I have an internal 1080p monitor and external 1080p monitor) I set the GPU to do display scaling and added 2160p as a custom resolution for the external 1080p monitor. Then I set the external monitor as the primary monitor, and arranged them as follows:
image

My observations:

  • My laptop appears to have vastly different performance characteristics depending on which monitor is the primary monitor? Eh, probably a hybrid graphics thing.
  • For some reason, GLFW.glfwGetWindowMonitor always returns the 2160p monitor in this setup, regardless of which screen the window is actually on (so Vanilla won't even let you do normal fullscreen on the second monitor)
  • GLFW reports the correct size and position of the monitors: Monitor 0 at (0, 0) with size 3840x2160 and Monitor 1 at (3840, 1080) with size 1920x1080, however:
    • GLFW reports garbage values for Monitor 1's content scale, like 3.4267972E7 (2.0 as expected for Monitor 0)
    • As you have observed, the actual framebuffer and window size reported by GLFW for the window when properly placed on Monitor 1 is 3840x2160, even though external tools report it as having a 1920x1080 window size
      • This suggests that Windows is assuming that the window isn't DPI-aware... but I presume it's getting DPI change events? I'd probably have to set up C debugging to troubleshoot this
      • GLFW also thinks that the window has 2.0 content scale regardless of which monitor it's on
    • When offsetting the window to (3840, 1080) with size 1920x1080 the window gets scaled and placed as if it were on the first monitor?
    • When offsetting the window to (7680, 2160) with size 3840x2160 the window gets placed on the second monitor, but scaling as if it were on the first monitor

image

I did find a bug in Borderless Mining where custom coordinates containing 0 weren't applied properly, but that wasn't causing this issue anyway...

from borderlessmining.

comp500 avatar comp500 commented on August 24, 2024

Closing: either I won't be able to fix this, or the other solutions I'm considering to improve fullscreen compat (inc #19) will fix it at the same time :)

from borderlessmining.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.