有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Libgdx 1.2.0控制器扩展崩溃

我最近刚刚更新了最新的Libgdx,并与Gradle一起建立了我的项目。其他一切似乎都在运行,但我在尝试向游戏添加控制器支持时遇到了一个问题。当我试图获取控制器或对控制器对象执行任何操作时,游戏崩溃并出现此错误

Error creating joystick: Win32JoyStick::_initialize() >> failed to set cooperation level!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000068904483, pid=2248, tid=716
#
# JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.11-b03 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [gdx-controllers-desktop64.dll+0x4483]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
AL lib: (EE) alc_cleanup: 1 device not closed

我在Android/Desktop的项目文件夹中看到了所有控制器依赖项,并指定在设置Gradle项目时使用控制器扩展。我使用的是PS3控制器,它在其他游戏中运行良好

有人有什么想法吗

编辑:仅使用PS2控制器和USB适配器进行了尝试(不使用xbox360驱动程序)。这次坠机也有同样的问题


共 (1) 个答案

  1. # 1 楼答案

    修正了将DesktopLauncher类更改为不使用自定义JFrame显示游戏的问题。您可以看到有关我为什么首先更改此选项的更多信息:https://stackoverflow.com/a/21731002/487578

    这意味着我需要找到另一种方法来解决我的另一个问题。。但我想控制器支持远比一个小错误重要