Determine desktop width and height correctly

If starting in windowed mode, desktopwidth and desktopheight weren't
being set, causing problems when using them in SetWindowPositionVars().