From 4d8a212de7f0a9707cf6be250756052b347bf4b8 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 13 Aug 2024 10:35:47 +0800 Subject: [PATCH] Fix device-manager.ts --- cocos/gfx/device-manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/gfx/device-manager.ts b/cocos/gfx/device-manager.ts index 7fc9b5f8c8b..5b581a34841 100644 --- a/cocos/gfx/device-manager.ts +++ b/cocos/gfx/device-manager.ts @@ -24,7 +24,7 @@ */ import { EDITOR, JSB } from 'internal:constants'; -import { cclegacy, getError, sys, screen, settings, errorID, SettingsCategory } from '../core'; +import { cclegacy, getError, sys, screen, settings, errorID, Settings } from '../core'; import { BindingMappingInfo, DeviceInfo, SwapchainInfo } from './base/define'; import { Device } from './base/device'; import { Swapchain } from './base/swapchain'; @@ -140,7 +140,7 @@ export class DeviceManager { public init (canvas: HTMLCanvasElement | null, bindingMappingInfo: BindingMappingInfo): boolean | Promise { // Avoid setup to be called twice. if (this.initialized) { return true; } - const renderMode = settings.querySettings(SettingsCategory.RENDERING, 'renderMode') as LegacyRenderMode; + const renderMode = settings.querySettings(Settings.Category.RENDERING, 'renderMode') as LegacyRenderMode; this._canvas = canvas; if (this._canvas) { this._canvas.oncontextmenu = (): boolean => false; } this._renderType = this._determineRenderType(renderMode);