diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 83de5d75a..86d5cf9cc 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- DUCK videos now play correctly after a video mode change; bug #734 - Alex - Cancel key will now quit out of the Manifest Menu (Bug #838) - Michael - Added -w and -x commandline options, to counter -f and -o; used these to implement "Safe Mode" links in the Win32 installer (Bug #946) diff --git a/sc2/src/sc2code/cleanup.c b/sc2/src/sc2code/cleanup.c index 2c21610f1..df2b60701 100644 --- a/sc2/src/sc2code/cleanup.c +++ b/sc2/src/sc2code/cleanup.c @@ -53,7 +53,7 @@ FreeKernel (void) DestroyDrawable (ReleaseDrawable (Screen)); DestroyContext (ReleaseContext (ScreenContext)); - UninitVideo (); + UninitVideoPlayer (); UninitSound (); UninitGraphics (); } diff --git a/sc2/src/sc2code/libs/video/video.c b/sc2/src/sc2code/libs/video/video.c index 15a76a568..cc5b7eba8 100644 --- a/sc2/src/sc2code/libs/video/video.c +++ b/sc2/src/sc2code/libs/video/video.c @@ -25,7 +25,7 @@ static VIDEO_REF _cur_video = NULL_VIDEO_REF; BOOLEAN -InitVideo (BOOLEAN useCDROM) +InitVideoPlayer (BOOLEAN useCDROM) //useCDROM doesn't really apply to us { TFB_PixelFormat fmt; @@ -41,7 +41,7 @@ InitVideo (BOOLEAN useCDROM) } void -UninitVideo () +UninitVideoPlayer (void) { TFB_UninitVideoPlayer (); VideoDecoder_Uninit (); diff --git a/sc2/src/sc2code/libs/vidlib.h b/sc2/src/sc2code/libs/vidlib.h index 8404d3238..11b9806b1 100644 --- a/sc2/src/sc2code/libs/vidlib.h +++ b/sc2/src/sc2code/libs/vidlib.h @@ -28,15 +28,10 @@ typedef enum SOFTWARE_FMV } VIDEO_TYPE; -#define MODES_UNDEFINED ((BYTE)~0) - typedef DWORD VIDEO_REF; -extern BOOLEAN InitVideo (BOOLEAN UseCDROM); -extern void UninitVideo (void); - -extern BYTE SetVideoMode (BYTE new_mode); -extern BYTE GetVideoMode (void); +extern BOOLEAN InitVideoPlayer (BOOLEAN UseCDROM); +extern void UninitVideoPlayer (void); extern VIDEO_REF LoadVideoFile (const char *pStr); extern BOOLEAN DestroyVideo (VIDEO_REF VideoRef); diff --git a/sc2/src/sc2code/setup.c b/sc2/src/sc2code/setup.c index e29f5615d..d894a88ee 100644 --- a/sc2/src/sc2code/setup.c +++ b/sc2/src/sc2code/setup.c @@ -96,7 +96,7 @@ LoadKernel (int argc, char *argv[]) if (!InitGraphics (argc, argv, MIN_K_REQUIRED)) return FALSE; InitSound (argc, argv); - InitVideo (TRUE); + InitVideoPlayer (TRUE); ScreenContext = CaptureContext (CreateContext ()); if (ScreenContext == NULL) diff --git a/sc2/src/sc2code/setupmenu.c b/sc2/src/sc2code/setupmenu.c index e68f51325..39cc73f5e 100644 --- a/sc2/src/sc2code/setupmenu.c +++ b/sc2/src/sc2code/setupmenu.c @@ -1289,8 +1289,10 @@ SetGlobalOptions (GLOBALOPTS *opts) (NewGfxFlags != GfxFlags)) { FlushGraphics (); + UninitVideoPlayer (); TFB_DrawScreen_ReinitVideo (NewDriver, NewGfxFlags, NewWidth, NewHeight); FlushGraphics (); + InitVideoPlayer (TRUE); } optSubtitles = (opts->subtitles == OPTVAL_ENABLED) ? TRUE : FALSE; // optWhichMusic = (opts->music == OPTVAL_3DO) ? OPT_3DO : OPT_PC;