Ignore:
Timestamp:
Aug 26, 2001, 10:44:19 AM (24 years ago)
Author:
umoeller
Message:

Misc updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/apps.c

    r95 r101  
    564564 *      --  PROG_PM
    565565 *
    566  *      --  PROG_31_ENH
     566 *      --  PROG_31_ENHSEAMLESSCOMMON
    567567 *
    568568 *      --  PROG_WINDOWABLEVIO
     
    764764 *@@changed V0.9.12 (2001-05-27) [umoeller]: moved from winh.c to apps.c
    765765 *@@changed V0.9.14 (2001-08-07) [pr]: removed some env. strings for Win. apps.
     766 *@@changed V0.9.14 (2001-08-23) [pr]: added session type options
    766767 */
    767768
    768769HAPP appStartApp(HWND hwndNotify,                  // in: notify window (as with WinStartApp)
    769                  const PROGDETAILS *pcProgDetails) // in: program data
     770                 const PROGDETAILS *pcProgDetails, // in: program data
     771                 ULONG ulFlags)                    // in: session type options
    770772{
    771773    HAPP            happ = NULLHANDLE;
     
    820822        }
    821823
    822         ulIsWinApp = appIsWindowsApp(ProgDetails.progt.progc);
    823 
    824         // now try again...
     824        // Set session type from option flags
     825        if (ulFlags & APP_RUN_FULLSCREEN)
     826        {
     827            if (ProgDetails.progt.progc == PROG_WINDOWABLEVIO)
     828                ProgDetails.progt.progc = PROG_FULLSCREEN;
     829
     830            if (ProgDetails.progt.progc == PROG_WINDOWEDVDM)
     831                ProgDetails.progt.progc = PROG_VDM;
     832        }
     833
     834        if (ulIsWinApp = appIsWindowsApp(ProgDetails.progt.progc))
     835        {
     836            if (ulFlags & APP_RUN_FULLSCREEN)
     837                ProgDetails.progt.progc = (ulFlags & APP_RUN_ENHANCED)
     838                                                ? PROG_31_ENH
     839                                                : PROG_31_STD;
     840            else
     841            {
     842                if (ulFlags & APP_RUN_STANDARD)
     843                    ProgDetails.progt.progc = (ulFlags & APP_RUN_SEPARATE)
     844                                                ? PROG_31_STDSEAMLESSVDM
     845                                                : PROG_31_STDSEAMLESSCOMMON;
     846
     847                if (ulFlags & APP_RUN_ENHANCED)
     848                    ProgDetails.progt.progc = (ulFlags & APP_RUN_SEPARATE)
     849                                                ? PROG_31_ENHSEAMLESSVDM
     850                                                : PROG_31_ENHSEAMLESSCOMMON;
     851            }
     852        }
    825853
    826854        /*
     
    829857         */
    830858
    831         if (strcmp(ProgDetails.pszExecutable, "*") == 0)
     859        if (!strcmp(ProgDetails.pszExecutable, "*"))
    832860        {
    833861            /*
     
    870898        } // end if (strcmp(pProgDetails->pszExecutable, "*") == 0)
    871899        else
     900        {
     901            PSZ pszExtension;
    872902            switch (ProgDetails.progt.progc)
    873903            {
     
    880910                case PROG_WINDOWABLEVIO:    // OS/2 window
    881911                {
    882                     PSZ pszExtension = doshGetExtension(ProgDetails.pszExecutable);
    883                     if (pszExtension)
     912                    if (    (pszExtension = doshGetExtension(ProgDetails.pszExecutable))
     913                         && (!stricmp(pszExtension, "CMD"))
     914                       )
    884915                    {
    885                         if (stricmp(pszExtension, "CMD") == 0)
    886                         {
    887                             CallBatchCorrectly(&ProgDetails,
    888                                                &strParamsPatched,
    889                                                "OS2_SHELL",
    890                                                "CMD.EXE");
    891                         }
     916                        CallBatchCorrectly(&ProgDetails,
     917                                           &strParamsPatched,
     918                                           "OS2_SHELL",
     919                                           "CMD.EXE");
    892920                    }
    893921                break; }
     
    896924                case PROG_WINDOWEDVDM:      // DOS window
    897925                {
    898                     PSZ pszExtension = doshGetExtension(ProgDetails.pszExecutable);
    899                     if (pszExtension)
     926                    if (    (pszExtension = doshGetExtension(ProgDetails.pszExecutable))
     927                         && (!stricmp(pszExtension, "BAT"))
     928                       )
    900929                    {
    901                         if (stricmp(pszExtension, "BAT") == 0)
    902                         {
    903                             CallBatchCorrectly(&ProgDetails,
    904                                                &strParamsPatched,
    905                                                NULL,
    906                                                "COMMAND.COM");
    907                         }
     930                        CallBatchCorrectly(&ProgDetails,
     931                                           &strParamsPatched,
     932                                           NULL,
     933                                           "COMMAND.COM");
    908934                    }
    909935                break; }
    910936            } // end switch (ProgDetails.progt.progc)
     937        }
    911938
    912939        if (    (ulIsWinApp)
     
    9761003        ProgDetails.pszParameters = strParamsPatched.psz;
    9771004
    978         _Pmpf(("progt.progc: %d", ProgDetails.progt.progc));
     1005        /*  _Pmpf(("progt.progc: %d", ProgDetails.progt.progc));
    9791006        _Pmpf(("progt.fbVisible: 0x%lX", ProgDetails.progt.fbVisible));
    9801007        _Pmpf(("progt.pszTitle: \"%s\"", (ProgDetails.pszTitle) ? ProgDetails.pszTitle : "NULL"));
     
    10041031                    ProgDetails.swpInitial.ulReserved1,
    10051032                    ProgDetails.swpInitial.ulReserved2));
     1033            */
    10061034
    10071035        /* if (WinMessageBox(HWND_DESKTOP,
Note: See TracChangeset for help on using the changeset viewer.