[PATCH 2/2] d3dx10: Implement D3DX10GetImageInfoFromResource{A, W}().
Matteo Bruni
matteo.mystral at gmail.com
Wed Nov 11 13:02:49 CST 2020
On Mon, Nov 9, 2020 at 5:14 AM Ziqing Hui <zhui at codeweavers.com> wrote:
>
>
> Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
> ---
> dlls/d3dx10_43/tests/d3dx10.c | 7 +---
> dlls/d3dx10_43/texture.c | 69 +++++++++++++++++++++++++++++++++--
> 2 files changed, 67 insertions(+), 9 deletions(-)
+ *size = SizeofResource(module, res_info);
+ if (*size == 0)
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ resource = LoadResource(module, res_info);
+ if (!resource)
+ return HRESULT_FROM_WIN32(GetLastError());
+
+ *buffer = LockResource(resource);
+ if (*buffer == NULL)
+ return HRESULT_FROM_WIN32(GetLastError());
I'd prefer if these all looked like "if (!expression)" instead of
using 3 slightly different styles for the 3 if conditions. You can
also inline the assignments inside the respective ifs, in parentheses
to avoid the gcc warning.
More information about the wine-devel
mailing list