[Bug 6181] C&C Cutsceens and Menus Run Slow

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Nov 5 10:46:21 CDT 2010


--- Comment #21 from Toni Spets <toni.spets at iki.fi> 2010-11-05 10:46:19 CDT ---
During my work on cnc-ddraw (https://github.com/hifi/cnc-ddraw) one of my goals
was to fix this issue. It is true the game does a whole lot of front buffer
locking when its drawing the menu. It also does that during the game but a lot
less which makes the game somewhat playable on a recently powerful PC.

What I did to address this was to create a separate drawing loop that flips the
software surface to a OpenGL texture (or lately a real ddraw surface).

This way the async API is fully asynchronous for the game, locks and unlocks
are instant and it works very well.

One problem was that the game worked too well, especially scrolling. Somehow in
Red Alert the scrolling speed depends on how fast the game can Blt the whole
scene on the screen. This issue was addressed by synchronizing Blt with a
emulated vblank wait triggered by the drawing loop after each frame which can
be limited to slow it down even further without affecting the visual quality.

C&C has a bit newer drawing engine (the Windows port was done after RA) and it
actually calls WaitForVblank which does a similar wait between frames drawn.

Overall the results are enjoyable. The game runs fast with minimal flickering
(if at all), scrolling works slow enough and some of the other bugs that affect
this series are also avoided.

So, what Wine needs is probably something similar to support the async API

cnc-ddraw is still a work in progress.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list