[Scummvm-tracker] [ScummVM] #9994: SCI: GK2 Demo: Surface:: convertTo() Crash for Windowed Movie (was: SCI: GK2 Demo: Surface:: convertTO() Crash for Widescreen Movie)
Colin Snover
trac at scummvm.org
Tue Jul 25 04:32:20 CEST 2017
#9994: SCI: GK2 Demo: Surface:: convertTo() Crash for Windowed Movie
-------------------------------+-------------------------
Reporter: dafioram | Owner: (none)
Type: defect | Status: new
Priority: low | Component: Engine: SCI
Resolution: | Keywords: sci32
Game: Gabriel Knight 2 |
-------------------------------+-------------------------
Old description:
> Tester OS: Win7-64
> Game: GK2 Demo from ScummVM website
> ScummVM: 1.10.0git-4054-g96a1b70
>
> If I try to watch the Movie in the demo on Windowed then scummvm crashes.
>
> After I click widescreen it says "Could not Initialize color format".
>
> Then it crashes and says
> Error: Surface:: convertTO() Can only convert to 2Bpp and 4Bpp!
New description:
Tester OS: Win7-64
Game: GK2 Demo from ScummVM website
ScummVM: 1.10.0git-4054-g96a1b70
If I try to watch the Movie in the demo on Windowed then scummvm crashes.
After I click Windowed it says "Could not Initialize color format".
Then it crashes and says
Error: Surface::convertTo() Can only convert to 2Bpp and 4Bpp!
--
Comment (by csnover):
When a game calls to play a video at its original resolution, the video
player tries to optimise rendering by setting the backend pixel format to
the pixel format of the video (which is 32bpp) so it can be sent directly
without any intermediate conversion step.
The OpenGL backend cannot handle the pixel format given by the decoder for
this video, so fails, shows that alert, and the system pixel format
remains 8bpp. At this point the game scripts will continue to try to play
the video, and then the convertTo error happens because the system surface
is 8bpp but the video is 32bpp so there is no way to down-convert to the
system surface for rendering.
There is supposed to be an API for negotiating supported pixel formats
between the backend and frontend, but this API is currently broken for
SDL; 32bpp formats that are supported by SDL are not added to the
supported list because ScummVM starts SDL at 16bpp and then only allows
formats that are <= the currently set colour depth onto the supported
formats list. When I was looking, it seems that all the engines that use
32bpp work around this by blindly setting a hard-coded 32bpp pixel format
and assuming it will succeed. (The OSystem API for setting the surface
format also doesn’t actually have any mechanism for communicating
success/failure.)
I was hoping to avoid doing more work on backend but I just don’t know
that there is any other way to resolve this (except to say not to use the
OpenGL backend…).
--
Ticket URL: <https://bugs.scummvm.org/ticket/9994#comment:1>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list