From: Jeff Smith Subject: Re: [PATCH] d3d9: CreateDevice() requires a valid window to be passed in. Message-Id: Date: Fri, 11 Sep 2020 10:03:58 -0500 In-Reply-To: References: <20200908060212.463849-1-whydoubt@gmail.com> On Fri, Sep 11, 2020 at 4:56 AM Henri Verbeet wrote: > > On Fri, 11 Sep 2020 at 04:29, Jeff Smith wrote: > > > > I'm thinking of testing and correcting the first three, but if > > someone has a strong sense that it should be otherwise, > > it would be great to know sooner rather than later. > > > Well, the first question I'd have would be why we care about fixing > this issue in particular. What led me to this in the first place is an application that tries to call CreateDevice with the focus window and device window both set to zero. This returns an (invalid call) error in Windows. With Wine, it usual fails (with a memory error) from attempting a huge memory allocation, though it could also return success (which is clearly not right) My original patch did not consider D3DDEVTYPE_NULLREF, which apparently ignores the windows, and so CreateDevice should succeed for that device type. Since I had missed that, I am trying to generalize the tests for device types besides HAL.