Is this really the correct behaviour when windowed is FALSE and the backbuffer width / height is 0? That may just not be allowed at all, but it seems weird to use the window's dimensions in that case, instead of e.g. the current display mode.
if (!swapchain_desc->backbuffer_width || !swapchain_desc->backbuffer_height || swapchain_desc->backbuffer_width != swapchain->desc.backbuffer_width || swapchain_desc->backbuffer_height != swapchain->desc.backbuffer_height)
Double indent for line continuations, please.
window = swapchain_desc->device_window ? swapchain_desc->device_window : device->create_parms.focus_window;
This is really just the same as "window = swapchain->device_window;".
if(swapchain_desc->backbuffer_width)
Space between control statements and '('.