【发布时间】:2014-08-09 08:29:36
【问题描述】:
我最近刚刚更新到最新的 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 驱动程序)。崩溃也有同样的问题。
【问题讨论】:
标签: java input libgdx joystick