Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

透過登錄啟用/停用 DirectDraw 硬體加速:批次檔一鍵切換

編輯:系統常見問題解答

某些舊版應用程式或遊戲在顯示卡驅動程式相容性不佳時,可能需要關閉 DirectDraw 硬體加速以避免畫面異常或當機。本文提供兩支批次檔,透過修改登錄鍵值快速切換硬體加速狀態。

關閉硬體加速(啟用軟體模擬)

@echo off
title 關閉 DirectDraw
mode con:cols=50 lines=12
color 0A
echo   正在關閉 DirectDraw 加速...
reg add "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers" /v SoftwareOnly /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Microsoft\DirectDraw" /v EmulationOnly /t REG_DWORD /d 1 /f >nul 2>&1
gpupdate /force >nul 2>&1
echo 完成,請重新啟動電腦生效。
pause

開啟硬體加速(預設模式)

@echo off
title 開啟 DirectDraw
mode con:cols=50 lines=12
color 0A
echo   正在開啟 DirectDraw 加速...
reg add "HKLM\SOFTWARE\Microsoft\Direct3D\Drivers" /v SoftwareOnly /t REG_DWORD /d 0 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Microsoft\DirectDraw" /v EmulationOnly /t REG_DWORD /d 0 /f >nul 2>&1
gpupdate /force >nul 2>&1
echo 完成,請重新啟動電腦生效。
pause

使用說明

  1. 將上述程式碼分別存為 disable_hw_accel.bat 與 enable_hw_accel.bat。
  2. 以「系統管理員身分執行」批次檔。
  3. 執行完成後需重新開機或重新登入才會生效。

登錄鍵值說明

路徑值名稱類型資料 (0=開啟/1=關閉)用途
HKLM\SOFTWARE\Microsoft\Direct3D\DriversSoftwareOnlyREG_DWORD1 / 0強制 Direct3D 使用軟體渲染
HKLM\SOFTWARE\Microsoft\DirectDrawEmulationOnlyREG_DWORD1 / 0強制 DirectDraw 使用模擬模式

適用情境

  • 舊版遊戲(如 DirectX 7/8 時代)在新顯卡上出現畫面撕裂、閃爍或當機。
  • 遠端桌面連線時,某些 3D 應用程式無法正確渲染。
  • 疑似顯示卡驅動程式 Bug 導致的圖形異常排查。

注意:現代應用程式多使用 DirectX 9/10/11/12,此設定主要影響 DirectDraw/Direct3D 7 以下版本。若問題持續,建議更新顯示卡驅動程式或嘗試相容性模式執行。

Copyright © Windows教程網 All Rights Reserved