On Wed Jan 4 08:10:29 2023 +0000, Huw Davies wrote:
While I guess this is ok, did we try caching the current display mode as suggested by @hverbeet in https://bugs.winehq.org/show_bug.cgi?id=51420#c44 ?
Well, for RandR 1.4 the display mode is already cached. For RandR 1.0, there are no device change notifications. So for the NVIDIA devices falling back to RandR 1.0 we need to use RandR 1.0 display device handlers and meanwhile, RandR 1.4 device change notifications, which seems a bit messy. Using a separate GetDisplayDepth() helper avoids using RandR at all and has a much lower overhead. So it's not necessary to cache the current mode for RandR 1.0 in this case. It could be beneficial in other cases, but it's not in the scope of this bug fix.