cleaned up clientd3d/dibutil.c