Schiffbruch icon indicating copy to clipboard operation
Schiffbruch copied to clipboard

DirectDraw init

Open FSMaxB opened this issue 7 years ago • 8 comments

Running Schiffbruch fails with the error DirectDraw Init FAILED: -2147467263.

Then there seems to be a null pointer dereference of lpDDSBack here

Build environment:

  • Windows 10
  • Visual Studio 2017 15.2 (26430.14)
  • Running inside Virtualbox

FSMaxB avatar Jun 27 '17 13:06 FSMaxB

It works fine on my (native) Windows 10 machine.

The number is the error code returned by either GetAttachedSurface or some other DirectDraw function. Unfortunately MSDN doesn't tell you what the actual values of these macros are, so I can't map your number to the error.

Since you're running things inside a VirtualBox, you may have to activate hardware acceleration or "2D support" or similar. Try to play around with some of the VirtualBox's graphics settings.

Odd that you report the crash at the linked location, because once you get the error, the window should be destroyed/closed and the game should stop working or rather never start working.

eXpl0it3r avatar Jun 27 '17 15:06 eXpl0it3r

The windows pops up inside of InitDDraw here.

Not sure how to get access to the error code since it is a void function.

FSMaxB avatar Jun 27 '17 18:06 FSMaxB

I'm currently setting up a native windows installation.

FSMaxB avatar Jun 27 '17 18:06 FSMaxB

The error messge gets generated here, maybe if you set a break point you can see what the code resolves to.

eXpl0it3r avatar Jun 27 '17 18:06 eXpl0it3r

Oh, I mistakingly thought this was a Microsoft function. Sure, I'll look into it further.

FSMaxB avatar Jun 27 '17 18:06 FSMaxB

It is the call to SetDisplayMode, the error is E_NOTIMPL Not implemented. The function SetDisplayMode is called with the proper parameters as it seems.

FSMaxB avatar Jun 27 '17 19:06 FSMaxB

Seems like I don't need any native windows after all. It's really strange but changing the resolution from 1280x720 to 1024x768 solved the problem and Schiffbruch runs fine (except there is no sound, but that doesn't really matter at the moment).

FSMaxB avatar Jun 27 '17 19:06 FSMaxB

Hmm there was a limitation as what resolution could be used. Given the SFML window with DirectDraw surface hack, it's a limitation we'll have to live with until things are properly ported to SFML.

eXpl0it3r avatar Jun 27 '17 19:06 eXpl0it3r