@echo off
title 禁用和开启DirectDraw加速批处理(精彩库游戏网提供)
mode con:cols=55 lines=15
color 4e
:choice
echo.   精彩库游戏网为你提供,有问题请联系QQ:7236234
echo.
echo    禁用DirectDraw加速,请选择   "1"
echo.
echo    开启DirectDraw加速,请选择   "2"
echo.
echo    ************************************************
echo.


set choice=
Set /P Choice=   请选择后回车: 
If "A%Choice%A"=="AA" goto 启用DirectDraw加速
If "A%Choice%A"=="A1A" GOTO 禁止DirectDraw加速
If "A%Choice%A"=="A2A" GOTO 启用DirectDraw加速
If /i "A%Choice%A"=="AexitA" exit
cls
goto choice

:启用DirectDraw加速
reg add "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers" /v SoftwareOnly /t REG_DWORD /d 0 /f 0>nul 1>nul
reg add "HKLM\SOFTWARE\Microsoft\DirectDraw" /v EmulationOnly /t REG_DWORD /d 0 /f 0>nul 1>nul
gpupdate /force 0>nul 1>nul
goto :eof

:禁止DirectDraw加速
reg add "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers" /v SoftwareOnly /t REG_DWORD /d 1 /f 0>nul 1>nul
reg add "HKLM\SOFTWARE\Microsoft\DirectDraw" /v EmulationOnly /t REG_DWORD /d 1 /f 0>nul 1>nul
gpupdate /force 0>nul 1>nul

goto :eof
