DrazharLn / pracx

PlotinusRedux's Patch for SMACX
Other
102 stars 6 forks source link

Movies change the desktop resolution #26

Open andrew-vant opened 5 years ago

andrew-vant commented 5 years ago

In stock SMAX, movies crash the game for me.

With PRACX, they do run (yay!), but they change the desktop resolution while running. It's much more annoying than it sounds like. I use three monitors, and changing one tends to rearrange and resize all the windows on the others.

It looks like I might be able to work around the problem with the MoviePlayerCommand setting, but it's unclear what sort of values it expects (a path to an external video app, a la VLC? That seems unlikely).

For now I'm just disabling movies, but I did like them -- more for the voiceovers than anything else. A fix or workaround would be nice.

DrazharLn commented 5 years ago

You can fix this by changing the MoviePlayerCommand.

The default is here:

https://github.com/DrazharLn/pracx/blob/4bfbac8228d6babde8e273a557f010d3f6d422a2/shared/pracxsettings.h#L69

".\movies\playuv15.exe -software"

The double backslashes get replaced by single ones, so they should be single slashes in the ini. You can use playuv15 with either the window argument or by setting xres and yres appropriately. Or you can use vlc or whatever.

I experimented with playing the videos with ffplay + filters and mpv but the source files are very low res (can't really scale them up) and the available open source codecs for uv2 aren't very good, so I stuck with playuv15 in the end.

Pracx will take the command line given by movieplayercommand, append the name of the movie file, and exec the new command line.

You might try setting MoviePlayerCommand=.\movies\playuv15.exe -software -xres 1920 -yres 1080 -doublex -doubley

in movies on master
› ./playuv15.exe -h
000b:fixme:winediag:start_process Wine Staging 4.6 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
Play uV v1.50a - uV/uV2/TGV/ASF Player
by Martin Griffiths, Electronic Arts (UK), 1997.

usage: playuv [<options>] videofile
<options> = 
 -xres <n>           video mode resolution (x)
 -yres <n>           video mode resolution (y)
 -gamma <n>          gamma level (default:100))
 -doublex            horizontal x2
 -doubley            line doubled
 -skipy              line skipped
 -xsize <n>          stretch movie to x size <n>
 -ysize <n>          stretch movie to y size <n>
 -loop               play looping
 -window             don't use fullscreen
 -8                   8bit(tgv only)
 -16                 16bit(all formats)
 -32                 32bit(all formats)
 -nodoublebuffer     Don't double buffer
 -software           Disable YUV hardware acceleration
 -noaudio            disable audio
 -ddraw <n>          direct draw device <n>
 -verbose            output more info.