Пример #1
0
/*
*       Part 1 of early emudesk.inf processing
*
*       This has one function: determine if we need to change resolutions
*       (from #E).  If so, we set gl_changerez and gl_nextrez appropriately.
*/
static void process_inf1(void)
{
        WORD    env1, env2;
#if CONF_WITH_SHIFTER
        WORD    mode;
#endif
        char    *pcurr;

        gl_changerez = 0;       /* assume no change */

        for (pcurr = infbuf; *pcurr; )
        {
          if ( *pcurr++ != '#' )
            continue;
          if (*pcurr++ == 'E')          /* #E 3A 11 FF 02               */
          {                             /* desktop environment          */
            pcurr = scan_2(pcurr, &env1);
            ev_dclick(env1 & 0x07, TRUE);
            pcurr = scan_2(pcurr, &env2);
            if (*pcurr == '\r')         /* no video info saved */
              break;

#if CONF_WITH_SHIFTER
            pcurr = scan_2(pcurr, &env1);
            pcurr = scan_2(pcurr, &env2);
            mode = (env1 << 8) | (env2 & 0x00ff);
            mode = check_moderez(mode);
            if (mode == 0)              /* no change required */
              break;
            if (mode > 0)               /* need to set Falcon mode */
            {
              gl_changerez = 2;
              gl_nextrez = mode;
            }
            else                        /* set ST/TT rez */
            {
              gl_changerez = 1;
              gl_nextrez = (mode & 0x00ff) + 2;
            }
#endif /* CONF_WITH_SHIFTER */
          }
        }
}
Пример #2
0
/*
 *  Part 1 of early emudesk.inf processing
 *
 *  This has one function: determine if we need to change resolutions
 *  (from #E).  If so, we set gl_changerez and gl_nextrez appropriately.
 */
static void process_inf1(void)
{
#if CONF_WITH_ATARI_VIDEO
    WORD    env1, env2;
    WORD    mode;
#endif
    char    *pcurr;

    gl_changerez = 0;           /* assume no change */

    for (pcurr = infbuf; *pcurr; )
    {
        if ( *pcurr++ != '#' )
            continue;
        if (*pcurr++ == 'E')            /* #E 3A 11 FF 02               */
        {                               /* desktop environment          */
            pcurr += 6;                 /* skip over non-video preferences */
            if (*pcurr == '\r')         /* no video info saved */
                break;

#if CONF_WITH_ATARI_VIDEO
            pcurr = scan_2(pcurr, &env1);
            pcurr = scan_2(pcurr, &env2);
            mode = (env1 << 8) | (env2 & 0x00ff);
            mode = check_moderez(mode);
            if (mode == 0)              /* no change required */
                break;
            if (mode > 0)               /* need to set Falcon mode */
            {
                gl_changerez = 2;
                gl_nextrez = mode;
            }
            else                        /* set ST/TT rez */
            {
                gl_changerez = 1;
                gl_nextrez = (mode & 0x00ff) + 2;
            }
#endif /* CONF_WITH_ATARI_VIDEO */
        }
    }
}