如果 isDisplayChangeSupported() 显示其不可用,是否可以启用全屏独占模式
Is it possible to Enable full screen exclusive mode if isDisplayChangeSupported() shows its not available
我是 java 游戏开发的新手。
如果 isDisplayChangeSupported() 显示其不可用,请告诉我是否可以启用全屏独占模式。
关于 isDisplayChangeSupported() :通过获取 GraphicalEnvironment() 我们可以在图形中执行许多修改并更改显示模式(例如获得全屏的完全访问权限)。
我们使用 isDisplayChangeSupported() 来验证是否应用了写入的显示模式更改,只需检查系统是否支持显示模式更改。
如果可以启用它,请告诉我如何启用它。
谢谢!
您混淆了两个完全不同的功能:
-
设置全屏window始终有效。正如 the documentation 所说:
The entered full-screen mode may be either exclusive or simulated. Exclusive mode is only available if isFullScreenSupported
returns true
.
所以当isFullScreenSupported
returnsfalse
时,它仍然有效但被模拟了。
-
关于更改屏幕的分辨率 and/or 颜色深度。他们可能需要先设置全屏 window 作为先决条件,但是当不支持显示模式更改时,全屏 window 仍然有效:
Sets the display mode of this graphics device. This is only allowed if isDisplayChangeSupported()
returns true and may require first entering full-screen exclusive mode using setFullScreenWindow(java.awt.Window)
providing that full-screen exclusive mode is supported (i.e., isFullScreenSupported()
returns true).
我是 java 游戏开发的新手。 如果 isDisplayChangeSupported() 显示其不可用,请告诉我是否可以启用全屏独占模式。
关于 isDisplayChangeSupported() :通过获取 GraphicalEnvironment() 我们可以在图形中执行许多修改并更改显示模式(例如获得全屏的完全访问权限)。 我们使用 isDisplayChangeSupported() 来验证是否应用了写入的显示模式更改,只需检查系统是否支持显示模式更改。
如果可以启用它,请告诉我如何启用它。 谢谢!
您混淆了两个完全不同的功能:
-
设置全屏window始终有效。正如 the documentation 所说:
The entered full-screen mode may be either exclusive or simulated. Exclusive mode is only available if
isFullScreenSupported
returnstrue
.所以当
isFullScreenSupported
returnsfalse
时,它仍然有效但被模拟了。 -
关于更改屏幕的分辨率 and/or 颜色深度。他们可能需要先设置全屏 window 作为先决条件,但是当不支持显示模式更改时,全屏 window 仍然有效:
Sets the display mode of this graphics device. This is only allowed if
isDisplayChangeSupported()
returns true and may require first entering full-screen exclusive mode usingsetFullScreenWindow(java.awt.Window)
providing that full-screen exclusive mode is supported (i.e.,isFullScreenSupported()
returns true).