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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dalgco.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    dalgco.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 graphics controller objects
*
*  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 <stdlib.h>
#include "dal.h"
#include "daldef.h"
#include "dalddc.h"
#include "vpmv7.h"
#include "atimcode.h"

extern DAL_GDOGCO_ADJUSTMENT aGCO_Adjustment[];


BOOL bFindControllerAdjIdxFromDI(ULONG ulOverlayAdjust, LPULONG lpIndex)
{
  ULONG i =0, ulHookAdjust, ulHookIndex;
  
  switch(ulOverlayAdjust)
  {
    case CWDDEDI_CONTROLLER_OVERLAY_BRIGHTNESS:
    {
      ulHookAdjust = GCO_HOOK_OVERLAY_GAMMA_ADJUSTMENT;
      ulHookIndex =0;
      break;
    }

    case CWDDEDI_CONTROLLER_OVERLAY_GAMMA:
    {
      ulHookAdjust = GCO_HOOK_OVERLAY_COLOR_GAMMA_ADJUSTMENT;
      ulHookIndex =0;
      break;
    }

    case CWDDEDI_CONTROLLER_OVERLAY_CONTRAST:
    {
      ulHookAdjust = GCO_HOOK_OVERLAY_CONTRAST_ADJUSTMENT;
      ulHookIndex =0;
      break;
    }

    case CWDDEDI_CONTROLLER_OVERLAY_SATURATION:
    {
      ulHookAdjust = GCO_HOOK_OVERLAY_SATURATION_ADJUSTMENT;
      ulHookIndex =0;
      break;
    }

    case CWDDEDI_CONTROLLER_OVERLAY_HUE:
    {
      ulHookAdjust = GCO_HOOK_OVERLAY_HUE_ADJUSTMENT;
      ulHookIndex =0;
      break;
    }
    case CWDDEDI_CONTROLLER_OVERLAY_ALPHA:
    {
      ulHookAdjust = GCO_HOOK2_OVERLAY_ALPHA_ADJUSTMENT;
      ulHookIndex =1;
      break;
    }
    default:
    {
      ulHookAdjust = 0;
      return FALSE;
    }
 
  }

  for (i = 0; i < DAL_MAX_GCO_ADJUSTMENTS; i++)
  {
    if((aGCO_Adjustment[i].ulHook == ulHookAdjust)&&
      (aGCO_Adjustment[i].ulHookIndex == ulHookIndex))
    {
      *lpIndex = i;
      return TRUE;
    }
   
  }
  
  return FALSE;

}


/****************************Private*Routine*******************************\
*
* BOOL bEnableController
*
* Enables a graphics controller object (GCO) via the pfnEnable call to the
* object, and stores the appropriate state information in the DAL structures
* for the controller object
*
* Note: this function has side effects which modify the DAL global structure
*       including the following fields - pReservedFree
*                                        ulControllerCount
*
\**************************************************************************/

BOOL bEnableController(LPHW_DAL_EXTENSION lpHDE, PFNGCOENABLE pfnEnable)
{
  LPHW_CONTROLLER_ENABLEDATA lpHWED;
  LPDEVGCO                   lpController;
  HGCO                       hGCO;
  ULONG                      i;

  // ensure the GCO Handle memory is Zero initialized, since this handle may
  // have been used to attempt to enable a previous GCO and could contain
  // non-zero entries.
  ZEROMEMORY(lpHDE->lpReservedFree, sizeof(HW_CONTROLLER_ENABLEDATA));

  lpHWED = (LPHW_CONTROLLER_ENABLEDATA)(lpHDE->lpReservedFree);

  // HWED structure may be mismatched between DAL and the GCO.  DAL programs the 
  // ulSize field as an indicator of a structure mismatch, so the GCO can fail the
  // enable call, if the libraries were compiled with different versions of dal.h.

  lpHWED->ulSize = sizeof(HW_CONTROLLER_ENABLEDATA);

  hGCO = (HGCO)(lpHDE->sAdditionalMemSeg.aMemSeg[lpHDE->ulControllersCount+DAL_GCO_MEMSEG_MIN_INDEX].lpMem);
  ZEROMEMORY(hGCO, sizeof(HW_CONTROLLER_EXTENSION_SIZE));

  if (!(*pfnEnable)(lpHDE->hDDL, hGCO, (LPHW_ASIC_ID)&lpHDE->hwAsicID, lpHWED))
  {
    // this controller failed the pfnEnable call, so fail to enable it.
    return(FALSE);
  }

  // produce an assertion if only one of the Get/Set XYPos functions is hooked.
  // Both of them should be hooked or none of them should be hooked.
  DALASSERT((((!(GCO_HOOK2_GETDISPLAYXYPOS & lpHWED->ulFunctionHooks2)) ||
              (  GCO_HOOK2_SETDISPLAYXYPOS & lpHWED->ulFunctionHooks2 )   ) &&
             ((  GCO_HOOK2_GETDISPLAYXYPOS & lpHWED->ulFunctionHooks2 ) ||
              (!(GCO_HOOK2_SETDISPLAYXYPOS & lpHWED->ulFunctionHooks2))   )   ),
            "DAL - Can't hook one of the Get/SetXYMode without the other!");

  // the display was sucessfully enabled, so the structured need be updated
  // to indicate this display is present, and account for the resources
  // this graphics display object ha reserved or is using.

  lpHDE->lpReservedFree += sizeof(HW_CONTROLLER_ENABLEDATA);

  for (i = 0; i < lpHWED->ulNumberOfControllers; i++)
  {
    // since the DAL requires that all controllers be supported in
    // one graphics controller object, the DAL must independantly build
    // what appear to be independant GCO's for the controllers
    // in future the controllers could really be independant, but for now
    // what the heck so they are not.

    lpController = (LPDEVGCO)&lpHDE->aControllers[lpHDE->ulControllersCount];
    lpController->hGCO = hGCO;
    lpController->lpHWED = lpHWED;

    if (lpController->lpHWED->bEnabledAtBoot[i])
    {
      // controller is already active in a mode programmed by the BIOS at
      // boot time, so the DAL needs store this state to ensure the DAL
      // preserves the VGA display configuration during physical display
      // detection
      lpController->ulFlags |= GCO_ACTIVE;
    }

    // controller index is 0 based.
    lpController->ulController = lpHDE->ulControllersCount;

    // Increment the controller index before calling the set controller
    // adjustements.
    vInitializeControllerAdjustments(lpHDE, lpController);

    lpHDE->ulControllersCount += 1;
  }

  return(TRUE);
}

/****************************Private*Routine*******************************\
*
* VOID vGetAdapterPowerState
*
* The function retreives adapter power state capabilities from GCO and saves
* it the DAL extension structure.
*
* Note: 
\**************************************************************************/
VOID vGetAdapterPowerState(LPHW_DAL_EXTENSION lpHDE)
{
  LPDEVGCO  lpController;
  ULONG     ulSize;
  ULONG     ulTemp;

  lpController = (LPDEVGCO)&lpHDE->aControllers[0];  // sr - Changed to 1 from 0.  Need to verify this.

  // By default power play feature is not supported.
  lpHDE->bPowerPlaySupported = FALSE;

  // If dalrule to disable powerplay feature is set then disable the feature.
  // DAL RULES !!!
  if (!(lpHDE->ulDalRule2 & DALRULE2_DISABLEPOWERPLAYFEATURE))
  {
    // This GCO supports power play functionality. It means the optional
    // power play call function are supported and could be called to get
    // power play related information.
    if (lpController->lpHWED->ulFunctionHooks2 & GCO_HOOK2_POWERPLAY)
    {
      (*lpController->lpHWED->pfnGetPowerState)(lpController->hGCO,
                                                (LPULONG)&lpHDE->ulCurrentPowerState,
                                                (LPULONG)&lpHDE->ulNumberOfPowerStates,
                                                (LPDAL_ADAPTERPOWERSTATES)&lpHDE->sAdapterPowerStates);

      if(lpHDE->ulCurrentPowerState && lpHDE->ulNumberOfPowerStates)
      {
        // Returned Max number of power state and current power state is non-zero.
        // Flag power play feature as supported.
        lpHDE->bPowerPlaySupported = TRUE;
      
        // Get the options from the registry if it is there else apply the default.
        lpHDE->ulPowerStateOptions = 0;
        ulSize = sizeof(ULONG);

        if (!(DDLGetRegistryParameters(lpHDE->hDDL,
                                       (LPUCHAR) DALREGKEY_POWERPLAYOPTIONS,
                                       (LPVOID)  &ulTemp,
                                       (LPULONG) &ulSize)) && 
            (ulSize == (sizeof(ULONG))))
        {
          // Option is not in the registry get the default from the registry.
          if (lpHDE->ulDalRule2 & DALRULE2_POWERPLAYOPTIONENABLEDBYDEFAULT)
          {
            lpHDE->ulPowerStateOptions |= DAL_PWRSTATEOPTION_POWERPLAYFEATUREENABLE;
          }          

          // Save the value in the registry for next time.
          ulSize = sizeof(ULONG);

          DDLSetRegistryParameters(lpHDE->hDDL,
                                   (LPUCHAR) DALREGKEY_POWERPLAYOPTIONS,
                                   (LPVOID)  &lpHDE->ulPowerStateOptions,
                                   ulSize);

        }
        else
        {
          // use the saved option.
          lpHDE->ulPowerStateOptions = ulTemp;
        }


        // Initially the requested and current is the same until some one specifically sets
        // a different state via the CWDDE interface.
        lpHDE->ulRequestedPowerState = lpHDE->ulCurrentPowerState;
      }
    }
  }
}




/****************************Private*Routine*******************************\
*
* VOID vDisableController
*
* Disables a previously enabled graphics controller object
*
* Note: vDisableController does not return the memory reserved for this GCO
*       to the ReservedFree pool, and hence should only be called when the
*       DAL itself is being disabled.
*
*       As a side effect to this function, the following variables in the
*       in the lpHDE are modified - ulControllerCount
*
\**************************************************************************/

VOID vDisableController(LPHW_DAL_EXTENSION lpHDE, LPDEVGCO lpController)
{
  lpHDE->ulControllersCount -= lpController->lpHWED->ulNumberOfControllers;
  (*lpController->lpHWED->pfnDisable)(lpController->hGCO);
}



/******************************Public*Routine******************************\
*
* DEVPOWER_STATE DALGetDPMS(HDAL hDAL)
*
* returns the current display power management state for the adapter
*
\**************************************************************************/

ULONG DALGetDPMS(HDAL hDAL)
{
  LPHW_DAL_EXTENSION lpHDE;

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

  lpHDE = (LPHW_DAL_EXTENSION)hDAL;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetDPMS - Exit"));
  return(lpHDE->ulPowerState);
}



/******************************Public*Routine******************************\
*
* VOID DALGetGammaCorrection()
*
* Copies the current gamma settings for the controller from the DAL's
* private structure into a caller specified array
*
\**************************************************************************/

VOID DALGetGammaCorrection(HDAL hDAL, ULONG ulDriverID, LPDEVCLUT lpaGamma)
{
  LPHW_DAL_EXTENSION lpHDE;

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetGammaCorrection - 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;

  if (lpHDE->aDriverData[ulDriverID].ulFlags & DRIVERDATA_USEGAMEGAMMA)
  {
    vConvert16To8Gamma((LPDEVCLUT16)lpHDE->aDriverData[ulDriverID].aGameGamma16,
                       lpaGamma);
  } else
  {
    vConvert16To8Gamma((LPDEVCLUT16)lpHDE->aDriverData[ulDriverID].aGamma16,
                       lpaGamma);
  }

  DALDEBUG((DALDBG_ENTRY_EXIT, "DALGetGammaCorrection - Exit"));
}



/******************************Public*Routine******************************\
*
* VOID DALGetGamma16Correction()
*
* Copies the current gamma settings for the controller from the DAL's
* private structure into a caller specified array
*
\**************************************************************************/

VOID DALGetGamma16Correction(
HDAL hDAL, 
ULONG ulDriverID, 
LPDEVCLUT16 lpaGamma16)
{
  LPHW_DAL_EXTENSION lpHDE;

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

  // grab the structure for the DAL out of the DDL's handle to it

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产成人一区二区三区| 在线播放日韩导航| 免费观看日韩av| **欧美大码日韩| 欧美成人女星排名| 在线视频中文字幕一区二区| 久久精品99久久久| 亚洲尤物在线视频观看| 久久综合丝袜日本网| 欧美精品一二三| 色婷婷av一区二区三区大白胸 | 久久人人爽爽爽人久久久| 欧美性一区二区| 成人精品视频一区二区三区尤物| 亚洲午夜视频在线| 亚洲视频一区在线观看| 国产蜜臀97一区二区三区| 欧美tickling挠脚心丨vk| 欧美巨大另类极品videosbest| 99久久精品免费| 91一区二区在线| 在线观看欧美黄色| 精品1区2区3区| 欧美日本国产视频| 欧美三级电影网| 欧美麻豆精品久久久久久| 欧美三级在线播放| 欧美精品tushy高清| 91精品国产麻豆| 亚洲精品视频观看| 亚洲曰韩产成在线| 精品嫩草影院久久| 欧美高清www午色夜在线视频| 91网站在线播放| 精品视频一区三区九区| 337p亚洲精品色噜噜噜| 日韩欧美一区电影| 亚洲国产经典视频| 亚洲免费观看高清在线观看| 亚洲一区在线观看免费观看电影高清 | 久久精品国产一区二区三区免费看 | 91尤物视频在线观看| 在线亚洲一区二区| 日韩免费在线观看| 国产精品久久99| 精品一区二区三区香蕉蜜桃| 精品亚洲国产成人av制服丝袜| 久草热8精品视频在线观看| 成人高清免费在线播放| 欧美日韩一区二区三区在线| 欧美一区二区三区电影| 亚洲天天做日日做天天谢日日欢| 亚洲bt欧美bt精品| 成人h动漫精品| www久久精品| 亚洲欧美日韩中文播放| 国产福利精品一区二区| 3atv在线一区二区三区| 亚洲日本一区二区三区| 美女网站一区二区| 欧美日韩五月天| 亚洲欧美日韩国产中文在线| 国产一区二区三区美女| 日韩一区二区麻豆国产| 日韩专区欧美专区| 精品视频一区二区不卡| 亚洲精品免费在线观看| 成人黄色免费短视频| 久久久精品2019中文字幕之3| 日韩在线一区二区三区| 欧美网站一区二区| 午夜私人影院久久久久| 日韩欧美色综合| 日日夜夜精品免费视频| 欧美军同video69gay| 亚洲午夜精品在线| 欧美精品久久99| 久久精品二区亚洲w码| 欧美tickling网站挠脚心| 久久精品国产99| 中文字幕欧美日本乱码一线二线| 成人午夜看片网址| 亚洲综合视频在线| 欧美一区二区在线观看| 韩国成人精品a∨在线观看| 久久九九久久九九| 在线这里只有精品| 日韩福利电影在线| 久久精品一级爱片| 色综合久久久久综合| 亚洲午夜激情网页| 久久婷婷色综合| 91一区二区在线| 另类小说色综合网站| 国产精品第一页第二页第三页| 91国偷自产一区二区使用方法| 亚洲国产精品一区二区www在线| 欧美一级片在线| www.综合网.com| 免费看日韩a级影片| 最新久久zyz资源站| 久久精品日韩一区二区三区| 91年精品国产| 国产精品中文欧美| 三级成人在线视频| 中文在线资源观看网站视频免费不卡 | 26uuuu精品一区二区| 在线亚洲+欧美+日本专区| 国产91精品免费| 蜜桃av一区二区三区电影| 一区二区三区在线观看动漫| 国产亚洲一区字幕| 69久久夜色精品国产69蝌蚪网| 成人激情开心网| 国产精品一区二区久久精品爱涩| 日韩在线卡一卡二| 午夜精品久久久| 五月天亚洲精品| 日日夜夜免费精品| 午夜精品久久久久久久久| 亚洲小说春色综合另类电影| 国产精品久久久久毛片软件| 国产三级精品视频| 精品国产欧美一区二区| 欧美成人一区二区三区片免费| 91蜜桃网址入口| 欧美中文字幕一区| 欧美日韩一卡二卡三卡| 欧美午夜精品电影| 7777精品伊人久久久大香线蕉的| 欧美综合在线视频| 欧美精品v日韩精品v韩国精品v| 91精品国产一区二区人妖| 在线播放/欧美激情| 26uuu久久天堂性欧美| 久久综合久久鬼色| 中文字幕欧美一区| 亚洲一二三四区| 日日骚欧美日韩| 成人一区在线观看| 91极品视觉盛宴| 欧美不卡视频一区| 国产精品成人一区二区艾草 | 国产三级精品三级| 一区二区三区精密机械公司| 香蕉成人啪国产精品视频综合网 | 日本视频一区二区| 国产69精品久久99不卡| 91激情五月电影| 久久亚洲二区三区| 洋洋av久久久久久久一区| 精品中文字幕一区二区小辣椒| 国产成a人无v码亚洲福利| 欧美日韩精品一区二区三区四区 | 亚洲欧美另类小说视频| 美女久久久精品| 在线观看三级视频欧美| 久久久久国产一区二区三区四区| 中文字幕中文乱码欧美一区二区 | 日韩影视精彩在线| 99久久99久久精品免费观看 | 国产精品免费观看视频| 日韩精品国产精品| 欧美日韩综合在线免费观看| 国产精品久久影院| 成人性视频网站| 国产98色在线|日韩| 亚洲国产一区二区在线播放| 日本不卡的三区四区五区| 男人的天堂久久精品| 欧美日韩在线播放三区| 国产精品麻豆欧美日韩ww| 国内成+人亚洲+欧美+综合在线| 欧美三电影在线| 天天亚洲美女在线视频| 欧美精品在线一区二区三区| 亚洲成在线观看| 欧美日韩不卡视频| 日韩av中文字幕一区二区| 欧美精品第1页| 久久成人综合网| 日韩欧美国产1| 成人小视频在线观看| 国产精品久久久久aaaa樱花 | 国产精品一区二区91| 久久色.com| 成人精品免费视频| 亚洲欧洲精品天堂一级| 99久久亚洲一区二区三区青草 | 色综合色综合色综合色综合色综合| 国产精品萝li| 欧美群妇大交群中文字幕| 奇米一区二区三区| 久久久久久久久久电影| 欧美日韩精品欧美日韩精品| 日本视频一区二区三区| 国产精品盗摄一区二区三区| 欧美网站大全在线观看| 韩国毛片一区二区三区| 中文字幕中文字幕在线一区 |