亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dalmode.c

?? 此代碼為WCE5.0下顯示器的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/****************************************************************************\
*
*  Module Name    dalmode.c
*  Project        ATI Display Abstraction Layer
*  Device         RageProPNP / Rage128 (Win95/98 & WinNT 4.0/5.0)
*
*  Description    source file for Display Abstraction Layer 0.84
*                 contains functions related to getting and setting modes
*
*  Copyright (c) 1998-2002 ATI Technologies Inc. (unpublished)
*
*  All rights reserved.  This notice is intended as a precaution against
*  inadvertent publication and does not imply publication or any waiver
*  of confidentiality.  The year included in the foregoing notice is the
*  year of creation of the work.
*
*  Refer to DAL Developers Guide & Programming Reference Rev 0.84 for usage
*
\****************************************************************************/

#include "dal.h"
#include "daldef.h"
#include "dalddc.h"
#include "atimcode.h"

/******************************Public*Routine******************************\
*
* BOOL DALGetDefaultMode()
*
* Returns the default mode to the caller.  Function queries the registry
* to determine if an OEM specified default mode exists, and if not, the
* mode defaults to 640x480 8bpp, 60hz.
*
*
\**************************************************************************/

BOOL DALGetDefaultMode(
HDAL hDAL, 
ULONG ulDriverID,
LPDEVMODE_INFO lpMI)
{
  LPHW_DAL_EXTENSION lpHDE;
  BOOL               bRet;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetDefaultMode - Entry"));
  DALASSERT((hDAL != NULL), "DAL handle 'hDAL' is NULL!");

  // grab the structure for the DAL out of the DDL's handle to it
  lpHDE = (LPHW_DAL_EXTENSION)hDAL;
  bRet = TRUE;
  
  lpMI->ulModeFlags = 0;
  lpMI->ulPelsWidth = lpHDE->aDriverData[ulDriverID].sDefaultMode.ulPelsWidth;
  lpMI->ulPelsHeight = lpHDE->aDriverData[ulDriverID].sDefaultMode.ulPelsHeight;
  lpMI->ulBitsPerPixel = lpHDE->aDriverData[ulDriverID].sDefaultMode.ulBitsPerPixel;
  lpMI->ulDisplayFrequency = lpHDE->aDriverData[ulDriverID].sDefaultMode.ulDisplayFrequency;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetDefaultMode - Exit"));
  return(bRet);
}



/******************************Public*Routine******************************\
*
* ULONG DALGetNumberModesAvailable
*
* Returns the number of modes available for the adapter, so the caller can
* create a buffer of sufficient size to receive the mode list.
*
* Note:
*
\**************************************************************************/

ULONG DALGetNumberModesAvailable(
HDAL hDAL,
ULONG ulDriverID)
{
  LPHW_DAL_EXTENSION lpHDE;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetNumberModesAvailable - Entry"));
  DALASSERT((hDAL != NULL), "DAL handle 'hDAL' is NULL!");

  // grab the structure for the DAL out of the DDL's handle to it
  lpHDE = (LPHW_DAL_EXTENSION)hDAL;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetNumberModesAvailable - Exit"));
  return(lpHDE->ulModeCount);
}



/******************************Private*Routine*****************************\
*
* BOOL bFindCloneResolution()
*
\**************************************************************************/
BOOL bFindCloneResolution(LPHW_DAL_EXTENSION lpHDE, LPDEVMODE_INFO lpMode, LPULONG lpPanType)
{
  ULONG        i;

  // with current implementation of "pseudo" extended desktop,
  // the bigger dimension is always the extended side...
  if (lpMode->ulPelsHeight > lpMode->ulPelsWidth)
  {
    lpMode->ulPelsHeight >>= 1; // divide by 2
    *lpPanType = PSEUDO_LARGE_DESKTOP_VERTICAL;
  }
  else
  {
    lpMode->ulPelsWidth >>= 1; // divide by 2
    *lpPanType = PSEUDO_LARGE_DESKTOP_HORISONTAL;
  }

  if (bSearchModeTable(lpHDE, lpMode, &i))
  {
    return TRUE;
  }

  return FALSE;
}


/******************************Public*Routine******************************\
*
* DALGetModesAvailable
*
* Enumerates the list of modes available in a buffer allocated by the caller
*
* Note:
*
\**************************************************************************/

ULONG DALGetModesAvailable(
HDAL hDAL, 
ULONG ulDriverID,
LPDEVMODE_INFO lpaMI, 
ULONG ulModes)
{
  LPHW_DAL_EXTENSION lpHDE;
  ULONG              ulModesReturned;
  ULONG              ulControllers;
  ULONG              i, j;
  ULONG              ulDisplayActiveMask;
  ULONG              ulNumOfConnectedDisplays;
  LPDAL_MODEINFO     lpMode;
  LPDEVGDO           lpDisplay;
  BOOL               bModeSupported;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetModesAvailable - Entry"));
  DALASSERT((hDAL != NULL), "DAL handle 'hDAL' is NULL!");

  // grab the structure for the DAL out of the DDL's handle to it
  lpHDE = (LPHW_DAL_EXTENSION)hDAL;
  ulModesReturned = 0;

  if (ulModes < lpHDE->ulModeCount)
  {
    // number of DEVMODE_INFO structures passed in by the caller has
    // insufficient size to return all the modes, so the DAL does not return
    // any by returning with no modes enumerated.

    goto DALGetModesAvailable_Return;
  }

  // loop through the displays and find the CRT display to determine if the
  // MonitorInfo for this display has changed.

  for (i = 0; i < lpHDE->ulDisplaysCount; i++)
  {
    lpDisplay = (LPDEVGDO) &lpHDE->aDisplays[i];

    if (lpDisplay->lpHWED->ulDisplayType & HW_DISPLAY_TYPE_CRT)
    {
      break;
    }
  }

  // On 9X the user could at any time change what MonitorInfo is used 
  // for the monitor, if it is Plug and Play or not .... and so on.  To
  // ensure the DAL picks up the latest user changes, on every query of
  // the mode list, DAL goes out and checks to see if the mode list needs
  // be rebuild because the MonitorInfo changed.  If so, all monitor
  // properties are refreshed, and a new mode table is created [GG] 02/12/98

  if (bDisplayMonitorInfoModeRestrictions(lpHDE, lpDisplay))
  {
    // some property of the Operating Systems MonitorInfo structure has
    // changed, so the DAL should re-build the mode list.

    vAddDisplaysToModeTable(lpHDE);
  }

  ulControllers = lpHDE->aControllerMap[ulDriverID];

  // let return the modes that connected display devices support only
  ulDisplayActiveMask      = 0;
  ulNumOfConnectedDisplays = 0;
  for (i = 0; i < lpHDE->ulDisplaysCount; i++)
  {
    lpDisplay = (LPDEVGDO) &lpHDE->aDisplays[i];

    if (GDO_ACTIVE & lpDisplay->ulFlags)
    {
      ulDisplayActiveMask |= VECTORFROMINDEX(i);
    }

    if (GDO_PHYSICALLY_CONNECTED & lpDisplay->ulFlags)
    {
      ulNumOfConnectedDisplays++;
    }
  }

  // the ulDisplayActiveMask can be empty.
  if (0 == ulDisplayActiveMask)
  {
    if (lpHDE->ulConnectedDisplays)
    {
      ulDisplayActiveMask = lpHDE->ulConnectedDisplays;
    }
    else
    {
      ulDisplayActiveMask = VECTORFROMINDEX(ulGetDefaultWhenNoDisplayConnected(lpHDE, 0));
    }
  }

  // loop through the list of modes stored by the DAL and copy them into the
  // buffer allocated by the functions caller

  for (i = lpHDE->ulModeCount; i != 0; i--)
  {
    // since the DAL stores the modes in decreasing size, but WinNT looks for 
    // the default mode as the first mode, the modes should be enumerated in
    // order from smaller to bigger, hence DAL walks the mode structure
    // backwards!.

    lpMode = (LPDAL_MODEINFO) &lpHDE->lpaModes[i - 1];

    if ((lpMode->ulControllers & ulControllers) != 0)
    {
      // at least one of the contollers attached to this driver support the 
      // mode.

      bModeSupported = FALSE;

      for (j = 0; j < lpHDE->ulControllersCount; j++)
      {
        if (  (DALRULE1_DISPLAYSRESTRICTMODES       & lpHDE->ulDalRule1)
            ||(DALRULE2_DISPLAYSRESTRICTMODESLOWEST & lpHDE->ulDalRule2)
            ||(DALRULE3_ENUMDISPLAYSRESTRICTMODES   & lpHDE->ulDalRule3))
        {
          // mode is reported only if one of the active displays for this
          // controller actually supports the mode.  This prevents a 
          // virtual desktop on modes where none of the displays does not
          // support the mode. [GG] 29/11/98

          if (  (DEVMODEFLAG_LARGEDESKTOP & lpMode->sDevModeInfo.ulModeFlags)
              &&(DALRULE2_DISPLAYSRESTRICTMODESLARGEDESKTOP & lpHDE->ulDalRule2))
          {
            if (ulNumOfConnectedDisplays > 1)
            {
              DEVMODE_INFO sMode;
              ULONG        mT;
              ULONG        ulPanType;

              MOVEMEMORY(&sMode, &(lpMode->sDevModeInfo), sizeof(DEVMODE_INFO));

              // with current implementation of "pseudo" extended desktop,
              // the bigger dimension is always the extended side...
              if (bFindCloneResolution(lpHDE, (LPDEVMODE_INFO)&sMode, &ulPanType))
              {
                if (bSearchModeTable(lpHDE, (LPDEVMODE_INFO)&sMode, &mT))
                {
                  if ((lpHDE->lpaModes[mT].ulControllers & ulControllers) != 0)
                  {
                    // at least one of the contollers attached to this driver
                    // support the mode.

                    if (DALRULE2_DISPLAYSRESTRICTMODESLOWEST & lpHDE->ulDalRule2)
                    {
                      if ((ulDisplayActiveMask & lpHDE->lpaModes[mT].aulSupportedDisplays[j])
                                                                       == ulDisplayActiveMask)
                      {
                        bModeSupported = TRUE;
                      }
                    }
                    else
                    {
                      if ((ulDisplayActiveMask & lpHDE->lpaModes[mT].aulSupportedDisplays[j]) != 0)
                      {
                        bModeSupported = TRUE;
                      }
                    }
                  }
                }
              }
            }
          }
          else
          {
            if (DALRULE2_DISPLAYSRESTRICTMODESLOWEST & lpHDE->ulDalRule2)
            {
              if ((ulDisplayActiveMask & lpMode->aulSupportedDisplays[j]) == ulDisplayActiveMask)
              {
                bModeSupported = TRUE;
              }
            }
            else if (DALRULE3_ENUMDISPLAYSRESTRICTMODES & lpHDE->ulDalRule3)
            {
              if(lpMode->aulSupportedDisplays[j] != 0)
                bModeSupported = TRUE;

            }else
            {
              if ((ulDisplayActiveMask & lpMode->aulSupportedDisplays[j]) != 0) 
              {
                // at least one display on this controller supports this mode, so
                // DAL can report the mode as supported.

                bModeSupported = TRUE;
              }
            }
          }
        }
        else
        {
          if (DEVMODEFLAG_LARGEDESKTOP & lpMode->sDevModeInfo.ulModeFlags)
          {
            if (  (DALRULE2_DISPLAYSRESTRICTMODESLARGEDESKTOP & lpHDE->ulDalRule2)
                &&(ulNumOfConnectedDisplays > 1))
            {
              bModeSupported = TRUE;
            }
          }else if (DEVMODEFLAG_VIRTUALDESKTOP & lpMode->sDevModeInfo.ulModeFlags)
          {
            bModeSupported = TRUE;
          }
          else
          {
             if ((DALRULE3_DONOTREPORTCUSTOMREFRESHRATE & lpHDE->ulDalRule3)&&
                 (DEVMODEFLAG_CUSTOMREFRESHRATE & lpMode->sDevModeInfo.ulModeFlags)&&
                 (!(DEVMODEFLAG_CVMODE & lpMode->sDevModeInfo.ulModeFlags))) 
             {
               bModeSupported = FALSE; //not report to OS. For CV mode, we report to OS at this time.
             }
             else
             {
            // we will support the mode, independent of which displays are attached,
            // as long as a controller supports it.

            bModeSupported = TRUE;
             }
          }
        }
      }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
懂色av中文字幕一区二区三区 | 久久精品水蜜桃av综合天堂| 国产激情视频一区二区在线观看| 亚洲黄一区二区三区| 欧美一级艳片视频免费观看| 99riav久久精品riav| 国产一区高清在线| 男人的j进女人的j一区| 亚洲三级电影网站| 国产免费观看久久| 精品裸体舞一区二区三区| 欧美日本一区二区三区| 成人97人人超碰人人99| 国产一区91精品张津瑜| 免费在线观看不卡| 亚洲国产美女搞黄色| 亚洲欧美在线aaa| 久久久久久久网| 精品黑人一区二区三区久久| 欧美精品电影在线播放| 欧美在线三级电影| 色婷婷综合久色| 色综合久久久久综合| www.性欧美| 粉嫩久久99精品久久久久久夜 | 美女在线视频一区| 亚洲国产精品久久久久秋霞影院| 国产精品久久久久影视| 26uuu精品一区二区在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 色综合一区二区三区| 成人av网在线| 成人国产精品免费网站| 成人午夜免费视频| 丁香一区二区三区| 国产v综合v亚洲欧| 国产很黄免费观看久久| 国产一区啦啦啦在线观看| 国产一区二区三区高清播放| 国产专区综合网| 国产乱色国产精品免费视频| 国模大尺度一区二区三区| 黑人巨大精品欧美一区| 久88久久88久久久| 国产麻豆精品在线| 国产成人激情av| a4yy欧美一区二区三区| 色婷婷综合久久久中文一区二区| 色哟哟精品一区| 欧美午夜电影网| 9191精品国产综合久久久久久| 欧美剧情电影在线观看完整版免费励志电影| 欧美视频日韩视频| 日韩一区二区中文字幕| 久久亚洲捆绑美女| 国产精品看片你懂得| 亚洲日本在线视频观看| 亚洲高清视频的网址| 美女精品自拍一二三四| 国产成人免费高清| 日本丶国产丶欧美色综合| 欧美视频三区在线播放| 精品国产欧美一区二区| 国产精品福利影院| 无码av免费一区二区三区试看| 蜜桃精品在线观看| 不卡的电影网站| 欧美老年两性高潮| 国产香蕉久久精品综合网| 亚洲精品国产品国语在线app| 天天av天天翘天天综合网 | 欧美一卡二卡在线观看| 国产农村妇女精品| 亚洲午夜影视影院在线观看| 日本vs亚洲vs韩国一区三区二区| 国产盗摄女厕一区二区三区| 91色|porny| 日韩精品一区二区三区蜜臀| 欧美韩日一区二区三区| 亚洲成人av一区| 国产成人福利片| 欧美日韩精品二区第二页| 26uuu亚洲| 一区二区三区欧美在线观看| 久久国产精品色| 91久久精品一区二区| 精品国产青草久久久久福利| 一区二区三区丝袜| 国产精品影视在线| 欧美色网站导航| 日本一区二区不卡视频| 日本美女一区二区| 91成人国产精品| 中文字幕+乱码+中文字幕一区| 五月天一区二区| av资源网一区| 精品日韩99亚洲| 亚洲午夜视频在线| kk眼镜猥琐国模调教系列一区二区| 3d动漫精品啪啪一区二区竹菊 | 亚洲一区在线视频| 福利电影一区二区三区| 91精品福利在线一区二区三区| 亚洲视频 欧洲视频| 精东粉嫩av免费一区二区三区| 欧美日韩午夜在线视频| 亚洲人精品午夜| 国产成人综合网站| 久久综合丝袜日本网| 日韩成人一级片| 欧美三级午夜理伦三级中视频| 国产精品久久久久久久久久久免费看| 看电影不卡的网站| 欧美一区二区三区视频| 亚洲成va人在线观看| 色婷婷综合激情| 国产精品天美传媒| 国产成人精品网址| 国产午夜精品理论片a级大结局| 麻豆91精品视频| 51午夜精品国产| 日韩国产欧美在线视频| 欧美色视频在线| 亚洲一二三四区| 欧美性猛交xxxxxx富婆| 亚洲另类在线一区| 色综合久久久久久久久久久| 中文字幕亚洲在| 91首页免费视频| 亚洲免费毛片网站| 一本久久a久久免费精品不卡| 亚洲欧洲国产日本综合| 99国产精品久久久久久久久久| 国产精品久久国产精麻豆99网站| 不卡的电影网站| 自拍视频在线观看一区二区| 91在线精品秘密一区二区| 中文字幕一区二区三区在线播放| www.欧美日韩| 有码一区二区三区| 欧美亚洲愉拍一区二区| 亚洲3atv精品一区二区三区| 欧美肥大bbwbbw高潮| 免费观看91视频大全| 精品第一国产综合精品aⅴ| 国产一区二区在线免费观看| 久久人人超碰精品| 成人久久18免费网站麻豆 | 欧洲亚洲精品在线| 亚洲地区一二三色| 欧美大片顶级少妇| 国产高清亚洲一区| 亚洲人吸女人奶水| 欧美人与z0zoxxxx视频| 久久99久久99小草精品免视看| 欧美精品一区二区三区蜜桃| 国产成人h网站| 亚洲最大成人网4388xx| 日韩三级在线观看| 国产成人精品一区二| 一区二区三区成人在线视频| 6080午夜不卡| 国产.精品.日韩.另类.中文.在线.播放 | 日韩精品一区二区三区蜜臀| 国产精品系列在线观看| 一区二区三区中文免费| 日韩手机在线导航| 不卡一卡二卡三乱码免费网站| 樱花草国产18久久久久| 91精品国产全国免费观看| 国产精品一二二区| 亚洲九九爱视频| 日韩亚洲欧美综合| 99久久精品免费看| 日本美女一区二区三区| 中文子幕无线码一区tr| 欧美裸体一区二区三区| 国产aⅴ综合色| 亚洲va天堂va国产va久| 中文字幕乱码亚洲精品一区| 欧美剧情片在线观看| 东方欧美亚洲色图在线| 日韩国产在线观看一区| 亚洲婷婷综合色高清在线| 精品国产免费久久| 欧洲一区在线观看| 国产高清久久久久| 日韩电影免费在线| 亚洲精品国产精华液| 久久久久久久久久久黄色| 欧美影视一区在线| 成人av中文字幕| 久久成人久久鬼色| 亚洲国产一区二区视频| 国产三级一区二区三区| 69精品人人人人| 色噜噜狠狠色综合中国 | 欧美日韩国产精品自在自线| 成人教育av在线| 国产在线精品一区二区夜色|