Changeset 1656 for trunk/dll/defview.c


Ignore:
Timestamp:
Jan 8, 2012, 7:19:22 PM (14 years ago)
Author:
Gregg Young
Message:

Completely rework ShowMultimedia to only test and try to open files with known multimedia extensions. This fixes some traps in GBM.DLL and PMCTLS.DLL; mmioIdentifyFile appears to pretty much be broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/defview.c

    r1645 r1656  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2003, 2008 Steven H.Levine
     7  Copyright (c) 2003, 2012 Steven H.Levine
    88
    99  Default file viewer
     
    2828                It was redundant.
    2929  12 Dec 09 GKY Pass .WPI files to PM for default handling.
     30  02 Jan 12 GKY Completely rework ShowMultimedia to only test and try to open files with known multimedia extensions
     31                This fixes some traps in GBM.DLL and PMCTLS.DLL; mmioIdentifyFile appears to pretty much be broken.
    3032
    3133***********************************************************************/
     
    143145        return played;
    144146    }
     147    else
     148        return played;
    145149  }
    146150  memset(&mmFormatInfo, 0, sizeof(MMFORMATINFO));
     
    150154                         MMIO_FORCE_IDENTIFY_FF);
    151155  DosFreeModule(MMIOModHandle);
    152   p = strrchr(filename, '.');
    153   if (!p)
    154     p = ".";
    155   /* if identified and not FOURCC_DOS  MPEGs are misidentified as DOS*/
     156
     157  // if identified and not FOURCC_DOS  MPEGs are misidentified as DOS
    156158  //DbgMsg(pszSrcFile, __LINE__, "FOUCC %x %s %i", mmFormatInfo.fccIOProc,
    157159  //       mmFormatInfo.szDefaultFormatExt, mmFormatInfo.ulMediaType);
     
    167169    }
    168170    else if (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) {
    169         /* is a multimedia file (WAV, MID, AVI, etc.) */
     171        // is a multimedia file (WAV, MID, AVI, etc.)
    170172      if (!stricmp(p, PCSZ_DOTOGG) || !stricmp(p, PCSZ_DOTMP3) || !stricmp(p, PCSZ_DOTFLAC))
    171173        OpenObject(filename, Default, hwnd);  //FM2Play fails to play these
Note: See TracChangeset for help on using the changeset viewer.