为什么 Java 全屏独占模式不运行我的最大屏幕分辨率? [英] Why isn't Java Fullscreen Exclusive Mode running my max screen resolution?

查看:24
本文介绍了为什么 Java 全屏独占模式不运行我的最大屏幕分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让 Java 全屏独占模式在我的计算机上以 1080p 运行,但它只有 1536 x 864 的大小.显示模式也设置为 1920 x 1080.

I am trying to get the Java Fullscreen Exclusive Mode to run at 1080p on my computer, but it only has a size of 1536 x 864. The display mode is also set at 1920 x 1080.

GraphicsDevice device = GraphicsEnvironment
         .getLocalGraphicsEnvironment().getDefaultScreenDevice();
// device.getDisplayMode() returns 1920 x 1080 and some other stats
// device.getDefaultConfiguration().getBounds() returns 1536 x 864

我希望尝试让屏幕达到 1920 x 1080 而不是 1536 x 864.有实际的方法可以做到这一点还是正常的?

I'm hoping to try to get the screen to be at 1920 x 1080 rather than 1536 x 864. Is there an actual way to do this or is this normal?

提前致谢!

现在,我正在让它在 Windows 上运行

For now, I'm getting this to work on Windows

推荐答案

过了一段时间,我意识到我没有回答问题.我最终想通了,问题很可能是 Java 11 中的一个错误.当我回到 Java 8 开发环境(v221?)时,像素又回到了 1920 x 1080.

It's been a little bit of time and I realized that I didn't answer the question. I eventually figured it out and the issue was likely a bug in Java 11. When I reverted back to the Java 8 development environment (v221?), the pixels went back to 1920 x 1080.

这篇关于为什么 Java 全屏独占模式不运行我的最大屏幕分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆