Nikolay Sivov (@nsivov) commented about dlls/d2d1/wic_render_target.c:
d2d_wic_render_target_present,
};
+static HRESULT check_invalid_formats(const WICPixelFormatGUID *wic_format,
const D2D1_PIXEL_FORMAT *pixel_format)
Could you rename wic_format -> bitmap_format, and pixel_format -> target_format, or something similar. The function itself seems fine otherwise, except it does look now that after doing all this conversion and resolving unknown values we might want to return resulting format from it, to use for texture creation.