On Thu Jul 28 10:39:14 2022 +0000, Zhiyi Zhang wrote:
I don't like the way the nulldrv display settings handler code is mixing with the normal code path. You should place nulldrv's ChangeDisplaySettings implementation in nulldrv_ChangeDisplaySettingsEx(), even at the expense of code duplication. Same for the force parameter in update_display_cache(). There should be a nulldrv_UpdateDisplayDevices that always succeeds. Then you don't need to check E_NOTIMPL everywhere. Same for below.
There's been a similar discussion before when implementing better keyboard layout support, and @julliard explicitly asked to have code in the generic part of `user32` rather than in nulldrv.
The `nulldrv` isn't supposed to implement anything, and the generic part of `user32` / `win32u` should implement the correct behavior unless the driver indicates that it took over.