Skip to content

Commit

Permalink
Fix device-manager.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Aug 13, 2024
1 parent 5035f0b commit 099d775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos/gfx/device-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -140,7 +140,7 @@ export class DeviceManager {
public init (canvas: HTMLCanvasElement | null, bindingMappingInfo: BindingMappingInfo): boolean | Promise<boolean> {
// 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);
Expand Down

0 comments on commit 099d775

Please sign in to comment.