FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.13k stars 143 forks source link

Port to x64? #256

Closed PghPxl closed 8 months ago

PghPxl commented 8 months ago

Hello,

I'm looking for a way to address some driver-related issues with some legacy code that uses DirectDraw from a 64 bit Windows environment. I'm wondering if it seems at all reasonable for me to consider porting your code to x64? I'm not asking you to do this, I'm simply wondering if you think this would be possible - are there any blocking issues that you can think of?

Many thanks for any thoughts you might wish to share on this.

FunkyFr3sh commented 8 months ago

It's probably not a old game I guess? cnc-ddraw does only work for fullscreen-exclusive applications, I assume that could probably already be a deal breaker for you.

I'm not sure if there's anything that couldn't be ported, would need to have a look through everything when I get some time

PghPxl commented 8 months ago

Thanks for the response! No, not an old game. An old machine-vision library used in some decades-old factory automation code. Could you elaborate on "... does only work for fullscreen-exclusive applications"? The code I'm dealing with puts an image and graphics in an MFC "control" that is rarely full screen.

FunkyFr3sh commented 8 months ago

Yeah, it wouldn't work with it. cnc-ddraw needs the application to call SetCooperativeLevel(x, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) and SetDsplayMode() otherwise it wouldn't render anything. It doesn't have logic to handle windowed mode applications.

cnc-ddraw isn't a full replacement for the original ddraw.dll, it's intended to work with old games only.

Maybe have a look into wine's ddraw instead?

PghPxl commented 8 months ago

Ah, okay. Again, thanks for the response. I'm actually now diving deeper into the legacy code to look for ways to avoid using the portion of the DirectDraw interface that we're having trouble with. But I appreciate the confirmation that cnc-ddraw is not the silver bullet that I might have hoped for.

On Fri, Oct 27, 2023 at 12:38 PM FunkyFr3sh @.***> wrote:

Yeah, it wouldn't work with it. cnc-ddraw needs the application to call SetCooperativeLevel(x, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) and SetDsplayMode() otherwise it wouldn't render anything. It doesn't have logic to handle windowed mode applications.

cnc-ddraw isn't a full replacement for the original ddraw.dll, it's intended to work with old games only.

Maybe have a look into wine's ddraw instead?

— Reply to this email directly, view it on GitHub https://github.com/FunkyFr3sh/cnc-ddraw/issues/256#issuecomment-1783204257, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDQZC3G3BWPJG7R45RC6UKDYBPPPPAVCNFSM6AAAAAA6PXEXZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGIYDIMRVG4 . You are receiving this because you authored the thread.Message ID: @.***>