英文:
Is it possible to Enable full screen exclusive mode if isDisplayChangeSupported() shows its not available
问题
我是Java游戏开发的新手。
如果isDisplayChangeSupported()显示不可用,那么请告诉我是否可以启用全屏独占模式。
关于isDisplayChangeSupported():通过获取GraphicalEnvironment(),我们可以对图形进行许多修改,并更改显示模式(例如获得完全访问全屏的权限)。
我们使用isDisplayChangeSupported()来验证编写的显示模式更改是否被应用,只需检查系统是否支持显示模式的更改。
如果可能的话,请告诉我如何启用它。
谢谢!
英文:
I'm new to java Game development.
Please let me know if its possible to Enable full screen exclusive mode if isDisplayChangeSupported() shows its not available.
about isDisplayChangeSupported() : By getting GraphicalEnvironment() we can perform many modifications in the graphics and change the display mode(like getting full access of the full-screen).
We use isDisplayChangeSupported() to verify if the written displaymode changes is getting applied or not, by simply checking does the system supports changes in Display mode.
If its possible to enable it then please tell me how.
Thank you!
答案1
得分: 2
你正在混淆两个完全不同的功能:
-
全屏窗口模式:设置全屏窗口始终有效。正如文档中所述:
进入全屏模式可以是排他的或模拟的。仅当
isFullScreenSupported
返回true
时,才可用排他模式。因此,当
isFullScreenSupported
返回false
时,仍然可以工作,但是是模拟模式。 -
显示模式更改:用于更改屏幕的分辨率和/或色彩深度。它们可能要求首先设置全屏窗口作为先决条件,但当不支持显示模式更改时,全屏窗口仍然可以工作:
设置此图形设备的显示模式。仅当
isDisplayChangeSupported()
返回true
时才允许这样做,可能需要首先使用setFullScreenWindow(java.awt.Window)
进入全屏排他模式,前提是支持全屏排他模式(即isFullScreenSupported()
返回true
)。
英文:
You are confusing two entirely different features:
Setting a full screen window always works. As the documentation says:
> The entered full-screen mode may be either exclusive or simulated. Exclusive mode is only available if isFullScreenSupported
returns true
.
So when isFullScreenSupported
returns false
, it still works but is simulated.
are about changing the resolution and/or color depth of the screen. They may require setting a full screen window first, as a prerequisite, but when display mode changes are not supported, full screen window still works:
> 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).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论