Hello, This patch increases the reference count of a DirectDraw object when a Surface is created, like Windows does. It also adds a test which tests this functionality.
This time with the !FAILED() -> SUCCEEDED() suggestion from Robert Shearman. I kept adding a secound refcount in case of DDSCAPS_TEXTURE surfaces to achieve more compatiblity with Windows.
Stefan