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

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

?? dalgdo.c

?? 此代碼為WCE5.0下顯示器的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
  ULONG    d;
//  BOOL     bRebuildModeTable;
  ULONG    ulConnected, ulOldFlags;


//  bRebuildModeTable = FALSE;
  ulConnected = 0;
  lpCRTDisplay = NULL;

  if (lpHDE->ulFlags & HDAL_SHARINGMODETABLE)
  {
    // since DAL is sharing the mode table from another DAL instance, the connected
    // displays are also shared

    return(lpHDE->ulConnectedDisplays);
  }

  // Zero initialize ulHotPluggableDisplays.
  lpHDE->ulHotPlaggableDisplays = 0;

  // loop through each of the displays, or the array of them

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

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

    // Store old flags for future comparison
    ulOldFlags = lpDisplay->ulFlags;
    vIsDisplayPhysicallyConnected(lpHDE, lpDisplay);

    if ((ulOldFlags & GDO_PHYSICALLY_CONNECTED) !=
        (lpDisplay->ulFlags & GDO_PHYSICALLY_CONNECTED))
    {
      // if the display was last detected as not connected, and has
      // now been connected, DAL assumes the display properties could
      // have changed between the last connected display, so the mode
      // table needs to be updated.
      lpHDE->ulFlags |= HDAL_UPDATEDISPLAYSMODESUPPORTED;

      // since the physical connection state of the displays has changed,
      // mark this data as dirty in the DAL.

      lpHDE->ulFlags |= HDAL_SAVECONNECTED;

      // if this display was not connected before but
      // now it is we must call the vDisplayQueryModeRestriction
      // to initialize DDC, ATI Monitor Info or OS Monitor Info
      // data. This then will be used later in the call
      // vAddDisplaysToModeTable(lpHDE)
      if (lpDisplay->ulFlags & GDO_PHYSICALLY_CONNECTED)
      {
        vDisplayQueryModeRestrictions(lpHDE, lpDisplay);
      }
      else //clear GDO_EDID flag if display not connected
      {
        lpDisplay->ulFlags &= ~(GDO_EDID | GDO_EDID_REPORT_TO_OS_ONLY);
      } 
      // This display is a newly detected device. If this device
      // hooks to the INITIALIZE_DEVICE hook and has EDID then the GDO
      // function will be called.
      if ((lpDisplay->lpHWED->ulFunctionHooks & GDO_HOOK_INITIALIZE_DEVICE) &&
          (lpDisplay->ulFlags & (GDO_EDID | GDO_EDID_REPORT_TO_OS_ONLY)))
      {
        (*lpDisplay->lpHWED->pfnInitializeDevice)(lpDisplay->hGDO, lpDisplay->sEDID);
      }
    }

    if (lpDisplay->ulFlags & GDO_PHYSICALLY_CONNECTED)
    {
      // if the display is connected, mark it in the returned bit vector
      // of the connected displays.

      ulConnected |= VECTORFROMINDEX(d);
      // This display was detected as connected. Mark it as hot 
      // pluggable if this GDO reports that 
      if (lpDisplay->lpHWED->ulFunctionHooks & GDO_HOOK_HOTPLUGABLEDEVICE)
      {
        // NOTE: some GDOs require an additional check for ACK for EDID 
        // before the conclusion about whether the monitor is hotpluggable or not. 
        // See EPR 34587. This particular workaround (and any similar workarounds)
        // must be the responsibility of GDO and as such it is skipped here.
        //
        if((*lpDisplay->lpHWED->pfnIsDeviceHotPluggable)(lpDisplay->hGDO))
        {
          lpHDE->ulHotPlaggableDisplays |= VECTORFROMINDEX(d);
        }
      }
    }
  }

  // Update the local dal structure it is used in subsequent functions.
  lpHDE->ulConnectedDisplays = ulConnected;

  // on 9x, it one trigger to cause DAL to rebuild the mode table, picking
  // up changes to the Monitor Information for the CRT, is when the ATI
  // property pages call DALCWDDE AdapterGetInfo, which triggers this
  // physical display detection routine.

  if (NULL != lpCRTDisplay)
  {
    if(bDisplayMonitorInfoModeRestrictions(lpHDE, lpCRTDisplay))
    {
      // some property of the Operating Systems MonitorInfo structure has
      // changed, so the DAL should update the mode list.
      lpHDE->ulFlags |= HDAL_UPDATEDISPLAYSMODESUPPORTED;
    }
  }

  // Update displays mode supported if required
  vUpdateDisplaysModeSupported(lpHDE);

/*
  if (bRebuildModeTable)
  {
    // clear the max mode information stored for each display

    for (d = 0; d < lpHDE->ulDisplaysCount; d++)
    {
      lpHDE->aDisplays[d].sMaxModeInfo.ulPelsWidth  = 0;
      lpHDE->aDisplays[d].sMaxModeInfo.ulPelsHeight = 0;
      lpHDE->aDisplays[d].sMaxModeInfo.ulDisplayFrequency = 0;
    }

    // DAL needs to rebuild the section of the mode table describing which
    // displays support which modes.

    vAddDisplaysToModeTable(lpHDE);
  }

  for (d = 0; d < lpHDE->ulDisplaysCount; d++)
  {
    // every time after the displays are queried for physical display
    // connection, the size of the DFP is programmed into the controller, so
    // the GCO knows how to set a centered mode.  This DAL makes the
    // assumption there is only one DFP per adapter.

    if (((lpHDE->aDisplays[d].lpHWED->ulDisplayType & HW_DISPLAY_TYPE_LCD)  &&
         (lpHDE->aDisplays[d].lpHWED->ulDisplayType & HW_DISPLAY_DFP)) ||
         (lpHDE->aDisplays[d].lpHWED->ulDisplayType & HW_DISPLAY_TYPES_DFP_MASK))
    {
      lpDisplay = (LPDEVGDO) &lpHDE->aDisplays[d];

      vControllersSetDFPSize(lpHDE, 
                             lpDisplay->sMaxModeInfo.ulPelsWidth,
                             lpDisplay->sMaxModeInfo.ulPelsHeight,
                             lpDisplay->lpHWED->ulDisplayType);

    }
  }
*/

  if (!(lpHDE->ulDalRule1 & DALRULE1_DONTSHAREMODETABLE))
  {
    // when the DAL can share the mode table with another DAL instance for an Aurora 
    // configuration, the DAL calls the DDL to pass the mode table and list of 
    // connected displays into the other DAL instance.

    DDLShareModeTable(lpHDE->hDDL, (LPVOID)lpHDE->lpaModes, ulConnected);
  }

  return(ulConnected);
}


/****************************Private*Routine*******************************\
*
* VOID vIsDisplayPhysicallyConnected()
*
* Determines if a display is physically connected.
*
* Note: If the display is not active as part of a mode, it is not easily
*       detected as part of the mode, and hence we may have difficulty
*       determining if it is connected.  In any case, if we cannot detect
*       with certainty if it is connected, we will rely on the last state
*       of the display.
*
\**************************************************************************/

VOID vIsDisplayPhysicallyConnected(
LPHW_DAL_EXTENSION lpHDE,
LPDEVGDO lpDisplay)
{
  LPDEVGCO             lpInactiveController;
  LPDEVGCO             lpActiveController;
  LPDEVGDO             lpActiveDisplay;
  DEVMODE_INFO         dmMode;
  GCO_QUERY_STRUCTURE  sQueryGCO;
  ULONG                ulSavedDisplays;
  ULONG                ulTempDisplays;
  ULONG                ulFlags;
  ULONG                ulOffset;
  ULONG                ulPitch;
  ULONG                i, j;
  LONG                 n;

  {
    // Perform Display detection to determine if it is connected
    if (lpDisplay->lpHWED->ulDisplayCaps & GDO_CAPS_ACTIVATE_BEFORE_DETECT)
    {
      // display must be active before detection can be performed

      if (lpDisplay->ulFlags & GDO_ACTIVE)
      {
        // display is active, but may turned off because of DPMS,
        // hence we must turn on the display before calling the physical
        // detection routine, and then restore the display to the off state.

        lpActiveController = (LPDEVGCO) &lpHDE->aControllers[lpDisplay->ulController];

        ulFlags = lpDisplay->ulFlags;

        if (ulFlags & GDO_DPMS_DISABLED)
        {
          // if the display was turned off by DPMS, restore the display to the
          // on state before testing for a physical connection.

        vSetDisplayPowerState(lpHDE, lpDisplay, POWERSTATE_ON);
        }

        // test to see if the display is physically connected

        if (bIsDisplayDDCPhysicallyConnected(lpHDE, lpDisplay))
        {
          lpDisplay->ulFlags |= GDO_PHYSICALLY_CONNECTED;
        } else
        {
          lpDisplay->ulFlags &= ~GDO_PHYSICALLY_CONNECTED;
        }

        if (ulFlags & GDO_DPMS_DISABLED)
        {
          // restore the DPMS state
          vSetDisplayPowerState(lpHDE, lpDisplay, lpHDE->ulPowerState);
        }

      } else
      {
        // display can't perform the test to determine if the display is
        // physically connected without being activated in a mode, hence
        // activate it before the detection test, and deactivate it after

        for (n = lpHDE->ulControllersCount -1; n >= 0 ; n--)
        {          
          if (!(lpHDE->aControllers[n].ulFlags & GCO_ACTIVE))
          {
            // found an inactive controller, which can be used to drive the
            // display as part of the physical connection detection.

            lpInactiveController = (LPDEVGCO) &lpHDE->aControllers[n];
            break;
          }
        }

        if (n >= 0)
        {
          // DAL will use the identified inactive controller to set a mode
          // to detection of the display.  If another active controller exists,
          // DAL wants to keep an acceptable image on the display, so the
          // inactive controller attempts to read from the same drawing surface
          // as another controller if one exists.

          ulOffset = 0;
          ulPitch = 0;

          for (n = lpHDE->ulControllersCount -1; n >= 0 ; n--)
          {
            if (lpHDE->aControllers[n].ulFlags & GCO_ACTIVE)
            {
              ulOffset = lpHDE->aControllers[n].ulOffset;
              ulPitch = lpHDE->aControllers[n].ulPitch;
              dmMode.ulBitsPerPixel = lpHDE->aControllers[n].sModeInfo.ulBitsPerPixel;
              break;
            }
          }

          // here DAL is making the assumption that all displays support at
          // least 640x480@60hz.

          dmMode.ulDisplayFrequency = 60;
          dmMode.ulPelsWidth = 640;
          dmMode.ulPelsHeight = 480;

          if (ulPitch == 0)
          {
            // since the pitch is zero, there are no active controllers whose
            // drawing surface could be shared with, so the DAL must choose it's
            // own surface defaults, and hope the memory is initialized to
            // blackness ... or we are going to have annoying visual effects
            // on the screen.

            ulOffset = 0;
            ulPitch = 640;
            dmMode.ulBitsPerPixel = 8;
          }

          vControllerSetMode(lpHDE,
                             (LPDEVMODE_INFO)&dmMode,
                             lpInactiveController,
                             (VECTORFROMINDEX(lpDisplay->ulDisplay)),
                             ulOffset,
                             ulPitch);

          // display is now active, so perform the detection.

          if (bIsDisplayDDCPhysicallyConnected(lpHDE, lpDisplay))
          {
            lpDisplay->ulFlags |= GDO_PHYSICALLY_CONNECTED;
          } else
          {
            lpDisplay->ulFlags &= ~GDO_PHYSICALLY_CONNECTED;
          }

          // this controller was not active, so reset it and power it down to
          // it's former state.

          vControllerSetMode(lpHDE,
                             (LPDEVMODE_INFO)&dmMode,
                             lpInactiveController,
                             0,
                             ulOffset,
                             ulPitch);

          vControllerResetMode(lpHDE, lpInactiveController);
          vControllerPowerDown(lpHDE, lpInactiveController);

        } else
        {

          // DAL could not find a controller which is not active to perfom the
          // detection of the display, so DAL will attach the display to
          // the an active controller along with the other displays attached
          // to it, so DAL can activate the display for the physical detection.

          for (i = 0; i < lpHDE->ulControllersCount; i++)
          {
            // next step, is for DAL to search through the list of active
            // controllers, and determine if the display is supported in
            // the mode on one of the currently active controllers

            if (lpHDE->aControllers[i].ulFlags & GCO_ACTIVE)
            {
              lpActiveController = (LPDEVGCO) &lpHDE->aControllers[i];
              if (bDisplayIsModeSupported(lpHDE, lpDisplay,
                                          (LPDEVMODE_INFO) &lpActiveController->sModeInfo,
                                          lpActiveController->ulController))
              {
                ulSavedDisplays = lpActiveController->ulDisplays;
                ulPitch = lpActiveController->ulPitch;

                // get the pertinent info from the GCO
                (*lpActiveController->lpHWED->pfnGetInfo)
                                      (lpActiveController->hGCO, i,
                                       (LPGCO_QUERY_STRUCTURE) &sQueryGCO);

                // Since the controller is already active we MUST first
                // call vControllerResetMode or will lead to bandwidth leak problems.
                vControllerResetMode(lpHDE, lpActiveController);

                if ((0 == lpActiveController->sModeInfo.ulPelsWidth) ||
                    (0 == lpActiveController->sModeInfo.ulPelsHeight) ||
                    (0 == lpActiveController->sModeInfo.ulBitsPerPixel) ||
                    (0 == lpActiveController->sModeInfo.ulDisplayFrequency))
                {
                  // the mode may be bogus if DAL has never set a mode before, in this case
                  // DAL defaults to 640x480 8bpp.  This behaviour is ugly!  the problem
                  // occurs on single CRTC devices, when a display is already active in VGA mode
                  // but another display needs to be connected for display detection.

                  lpActiveController->sModeInfo.ulPelsWidth = 640;
                  lpActiveController->sModeInfo.ulPelsHeight = 480;
                  lpActiveController->sModeInfo.ulBitsPerPixel = 8;
                  lpActiveController->sModeInfo.ulDisplayFrequency = 60;
                }

                // By default follow the old ways. Set mode with both 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合久久综合久久综合| 欧美日韩国产片| 亚洲精品成人悠悠色影视| 欧美一级高清大全免费观看| 丁香婷婷综合网| 蜜臀a∨国产成人精品| 亚洲品质自拍视频| 久久久av毛片精品| 亚洲伊人色欲综合网| 成人av电影观看| 中文字幕高清一区| 国产精品一区免费在线观看| 欧美日韩精品久久久| 一区在线中文字幕| 色综合天天综合给合国产| 国产精品系列在线| 国产一区二区三区黄视频| 欧美精品日韩一本| 成人午夜av电影| 国产三级精品三级在线专区| 欧美色综合影院| 99视频在线精品| 国产精品1区二区.| 乱中年女人伦av一区二区| 一个色在线综合| 国产精品国产a| 欧美激情在线观看视频免费| 精品国产乱码久久久久久夜甘婷婷| 色婷婷激情一区二区三区| 国产激情一区二区三区四区 | 成人免费小视频| 精品国产一区二区三区忘忧草 | 日韩欧美国产电影| 欧美日本一区二区在线观看| 色呦呦一区二区三区| 91亚洲国产成人精品一区二区三| 国产尤物一区二区在线 | 色哟哟日韩精品| 成人免费毛片片v| 粉嫩13p一区二区三区| 国产99久久久精品| 成人一区二区视频| 国产a区久久久| 波多野结衣的一区二区三区| 成人h版在线观看| 成人伦理片在线| 91理论电影在线观看| 色诱亚洲精品久久久久久| 色噜噜狠狠色综合中国| 91久久精品网| 欧美日韩国产高清一区二区 | 成人伦理片在线| 成人av网站在线| 色哟哟一区二区三区| 亚洲欧美国产高清| 国产视频一区二区在线观看| 欧美成人性战久久| 色伊人久久综合中文字幕| 国产老女人精品毛片久久| 麻豆精品久久精品色综合| 亚洲一区在线观看视频| 亚洲综合色噜噜狠狠| 国产精品久久久久桃色tv| 久久久精品中文字幕麻豆发布| 精品视频在线视频| 狠狠色狠狠色综合日日91app| 日韩影视精彩在线| 九九九久久久精品| 粉嫩嫩av羞羞动漫久久久 | 91成人网在线| 欧美日韩精品系列| 精品国免费一区二区三区| 国产亚洲美州欧州综合国| 综合久久给合久久狠狠狠97色 | 国产精品素人一区二区| 专区另类欧美日韩| 午夜欧美电影在线观看| 精品一区二区三区影院在线午夜 | 欧美日韩久久不卡| 精品美女被调教视频大全网站| 国产亚洲综合av| 亚洲成年人网站在线观看| 久久99精品国产| 99国产精品99久久久久久| 在线成人免费视频| 精品久久五月天| 亚洲激情在线激情| 国产一区二区精品久久| 色欧美片视频在线观看| 日韩欧美国产一区二区三区 | 91精品国产一区二区三区蜜臀 | 99re8在线精品视频免费播放| 欧美高清激情brazzers| 久久久久88色偷偷免费| 亚洲成av人片在线观看| 成人丝袜高跟foot| 6080亚洲精品一区二区| 国产精品欧美一区二区三区| 亚洲成年人网站在线观看| 成人福利视频在线看| 精品区一区二区| 亚洲成人资源网| av在线不卡免费看| 日韩手机在线导航| 国产成人在线观看免费网站| 91.com在线观看| 国产精品一线二线三线精华| 欧美一区二区三区性视频| 中文字幕中文字幕一区| 国产传媒欧美日韩成人| 日韩一区二区在线看片| 亚洲成人资源网| 欧美在线影院一区二区| 一区二区中文视频| 国产高清精品久久久久| 欧美一级在线视频| 国产一区二区主播在线| 9191成人精品久久| 亚洲主播在线播放| 97久久人人超碰| 国产精品久久久久影视| 国产91精品在线观看| 精品久久久久久最新网址| 日韩黄色小视频| 欧美在线视频日韩| 亚洲精品视频在线| av影院午夜一区| 中文字幕巨乱亚洲| 高清视频一区二区| 国产日韩欧美a| 国产成人亚洲精品青草天美| 精品国产a毛片| 国产原创一区二区三区| 亚洲日本va午夜在线电影| 亚洲第一电影网| 精品日韩一区二区三区免费视频| 亚洲成人www| 欧美老女人第四色| 亚洲成a人片综合在线| 欧美理论电影在线| 日本不卡视频在线观看| 日韩美女视频在线| 日本成人在线一区| 欧美成人高清电影在线| 韩国精品一区二区| 国产日韩三级在线| 成人激情av网| 亚洲欧美电影院| 欧美午夜精品一区二区蜜桃| 亚洲高清在线视频| 欧美日韩国产高清一区| 美腿丝袜亚洲一区| 久久人人爽人人爽| 丁香婷婷综合五月| 一区二区三区波多野结衣在线观看| 91麻豆国产香蕉久久精品| 亚洲mv大片欧洲mv大片精品| 欧美挠脚心视频网站| 捆绑变态av一区二区三区| 久久品道一品道久久精品| www.亚洲色图.com| 亚洲精品第1页| 91精品国产一区二区三区| 国产一区二区毛片| 亚洲欧洲精品一区二区精品久久久| 93久久精品日日躁夜夜躁欧美| 亚洲老司机在线| 欧美一级欧美三级在线观看| 国产乱码精品1区2区3区| 欧美性猛交一区二区三区精品| 国产91精品久久久久久久网曝门| 国产98色在线|日韩| 在线视频国内自拍亚洲视频| 成人黄色国产精品网站大全在线免费观看 | 国产精品国产三级国产aⅴ中文 | 国产人妖乱国产精品人妖| 国产不卡一区视频| 视频一区国产视频| 精品国产乱码久久久久久免费 | 亚洲午夜视频在线观看| 欧美成人性战久久| av电影在线不卡| 日韩av中文在线观看| 日本一区二区免费在线| 欧美日韩综合在线免费观看| 国内不卡的二区三区中文字幕| 综合激情成人伊人| 日韩欧美一级精品久久| 99久久精品国产观看| 精品在线观看免费| 一区二区三区中文字幕| 精品国产麻豆免费人成网站| 日本韩国精品一区二区在线观看| 美女www一区二区| 亚洲老妇xxxxxx| 久久久久99精品一区| 在线综合亚洲欧美在线视频 | 欧美成人女星排行榜| 91福利国产成人精品照片| 国产激情一区二区三区四区|