-
Notifications
You must be signed in to change notification settings - Fork 56
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
base: vanilla
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -671,7 +671,21 @@ bool Set_Video_Mode(int w, int h, int bits_per_pixel) | |||||||||||||
// | ||||||||||||||
// Set the required display mode with 8 bits per pixel | ||||||||||||||
// | ||||||||||||||
result = DirectDrawObject->SetDisplayMode(w, h, bits_per_pixel); | ||||||||||||||
do { | ||||||||||||||
result = DirectDrawObject->SetDisplayMode(w, h, bits_per_pixel); | ||||||||||||||
if (result != DD_OK) { | ||||||||||||||
/* 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. */ | ||||||||||||||
Comment on lines
+677
to
+679
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||
if (h == 400) { | ||||||||||||||
h = 480; | ||||||||||||||
} else { | ||||||||||||||
/* Just give up. */ | ||||||||||||||
result = ~DD_OK; | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
} while (result != DD_OK); | ||||||||||||||
|
||||||||||||||
if (result != DD_OK) { | ||||||||||||||
DirectDrawObject->Release(); | ||||||||||||||
DirectDrawObject = NULL; | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.