全屏Libgdx HTML5无法在移动设备上运行 [英] Fullscreen Libgdx HTML5 not working on mobile

查看:92
本文介绍了全屏Libgdx HTML5无法在移动设备上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的全屏切换功能:

public void toggleFullScreen() {

        if(!Gdx.graphics.isFullscreen())
            Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
        else
            Gdx.graphics.setWindowedMode(App.WIDTH, App.HEIGHT);

    }

可以在台式机上工作,但不能在移动设备上工作,为什么?

Works on desktop but not on mobile, why?

推荐答案

不起作用,因为libgdx的HTML后端不支持该功能.可以更改,您应该打开一个问题或PR.

Does not work because the functionality is not supported by libgdx' HTML backend. Could be changed, you should open an issue or PR.

在检查了后端源代码之后,我必须更改关于SO的声明.该代码自2015年以来一直在后端使用,适用于除iOS之外的所有系统.

After checking the backend source code, I must change my statement on SO. The code is in the backend since 2015 and is working for me on all systems except iOS.

这篇关于全屏Libgdx HTML5无法在移动设备上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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