Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get DirectDraw backend to work with real hardware #842

Open
wants to merge 2 commits into
base: vanilla
Choose a base branch
from

Conversation

giulianobelinassi
Copy link
Collaborator

This commit fixes the problem of DirectDraw failing to set the video mode because the card rejects 640x400 mode, as did my NVIDIA TNT2.

This also marks both DirectDraw and DirectSound backends as supported, as we now support Windows 9x and they work fine in those systems.

This seems to be actually related to some cards being unable to display
the 640x400 mode.  In that case we fallback ot a 640x480 resolution.

Signed-off-by: Giuliano Belinassi <[email protected]>
Both DirectDraw and DirectSound backends works fine under Win9x.

Signed-off-by: Giuliano Belinassi <[email protected]>
@@ -46,8 +46,19 @@ else()
set(OPENAL TRUE)
endif()

if(WIN32 AND WIN9X)
if(SDL2)
message("note: Use DSOUND or SDL1 for video support in Windows 9x.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message("note: Use DSOUND or SDL1 for video support in Windows 9x.")
message("note: Use DDRAW or SDL1 for video support in Windows 9x.")

Comment on lines +677 to +679
/* giulianob: C&C runs by default in 640x400 resolution, which is
by some videocards even back then. In failure to set the
resulution, try to fallback into 640x480. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* giulianob: C&C runs by default in 640x400 resolution, which is
by some videocards even back then. In failure to set the
resulution, try to fallback into 640x480. */
/* giulianob: C&C runs by default in 640x400 resolution, which isn't
supported by some video cards even back then. If it fails to set
the resolution, try to fall back to 640x480. */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the original code for 480 should be restored in InitDDraw, see original source repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants