能否在isDisplayChangeSupported()显示不可用时启用全屏独占模式?

huangapple go评论61阅读模式
英文:

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

你正在混淆两个完全不同的功能:

  1. 全屏窗口模式:设置全屏窗口始终有效。正如文档中所述:

    进入全屏模式可以是排他的或模拟的。仅当isFullScreenSupported返回true时,才可用排他模式。

    因此,当isFullScreenSupported返回false时,仍然可以工作,但是是模拟模式。

  2. 显示模式更改:用于更改屏幕的分辨率和/或色彩深度。它们可能要求首先设置全屏窗口作为先决条件,但当不支持显示模式更改时,全屏窗口仍然可以工作:

    设置此图形设备的显示模式。仅当isDisplayChangeSupported()返回true时才允许这样做,可能需要首先使用setFullScreenWindow(java.awt.Window)进入全屏排他模式,前提是支持全屏排他模式(即isFullScreenSupported()返回true)。

英文:

You are confusing two entirely different features:

  1. Full Screen Window

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.

  1. Display mode changes

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).

huangapple
  • 本文由 发表于 2020年5月30日 08:20:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/62096343.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定