Skip to content
Permalink
Browse files

New input gui (#1713)

  • Loading branch information...
ergo720 authored and RadWolfie committed Sep 5, 2019
1 parent 1522640 commit d8b0075c9364ccdf459519b14add5b530908033a
Showing with 5,051 additions and 4,489 deletions.
  1. +1 −1 .appveyor.yml
  2. +1 −1 .azure-pipelines.yml
  3. +3 −0 .gitmodules
  4. +1 −1 .travis.yml
  5. +25 −19 CMakeLists.txt
  6. +1 −0 import/SDL2
  7. +2 −1 projects/cxbx/CMakeLists.txt
  8. +100 −93 resource/Cxbx.rc
  9. +1 −0 src/common/IPCHybrid.hpp
  10. +2 −1 src/common/Logging.cpp
  11. +2 −1 src/common/Logging.h
  12. +168 −145 src/common/Settings.cpp
  13. +27 −92 src/common/Settings.hpp
  14. +80 −0 src/common/input/Button.cpp
  15. +61 −0 src/common/input/Button.h
  16. +312 −0 src/common/input/DInputKeyboardCodes.h
  17. +262 −0 src/common/input/DInputKeyboardMouse.cpp
  18. +105 −0 src/common/input/DInputKeyboardMouse.h
  19. +146 −0 src/common/input/EmuDevice.cpp
  20. +25 −14 src/{core/hle/XAPI/OHCI/XInput/XInput.h → common/input/EmuDevice.h}
  21. +0 −460 src/common/input/InputConfig.cpp
  22. +0 −119 src/common/input/InputConfig.h
  23. +133 −0 src/common/input/InputDevice.cpp
  24. +185 −0 src/common/input/InputDevice.h
  25. +511 −0 src/common/input/InputManager.cpp
  26. +112 −0 src/common/input/InputManager.h
  27. +465 −0 src/common/input/InputWindow.cpp
  28. +100 −0 src/common/input/InputWindow.h
  29. +0 −212 src/common/input/SDL2_Device.cpp
  30. +0 −114 src/common/input/SDL2_Device.h
  31. +532 −0 src/common/input/SdlJoystick.cpp
  32. +218 −0 src/common/input/SdlJoystick.h
  33. +320 −0 src/common/input/XInputPad.cpp
  34. +144 −0 src/common/input/XInputPad.h
  35. +18 −0 src/common/util/CxbxUtil.cpp
  36. +17 −0 src/common/util/CxbxUtil.h
  37. +0 −978 src/common/win32/DInputController.cpp
  38. +0 −234 src/common/win32/DInputController.h
  39. +5 −0 src/common/win32/EmuShared.cpp
  40. +32 −12 src/common/win32/EmuShared.h
  41. +4 −0 src/common/win32/IPCWindows.cpp
  42. +0 −80 src/common/win32/XBPortMapping.cpp
  43. +0 −44 src/common/win32/XBPortMapping.h
  44. +13 −40 src/core/hle/D3D8/Direct3D9/Direct3D9.cpp
  45. +0 −81 src/core/hle/XAPI/OHCI/XInput/DInput.cpp
  46. +0 −46 src/core/hle/XAPI/OHCI/XInput/DInput.h
  47. +0 −167 src/core/hle/XAPI/OHCI/XInput/XInput.cpp
  48. +182 −541 src/core/hle/XAPI/Xapi.cpp
  49. +43 −235 src/core/hle/XAPI/Xapi.h
  50. +175 −0 src/core/hle/XAPI/XapiCxbxr.h
  51. +5 −13 src/core/kernel/init/CxbxKrnl.cpp
  52. +1 −1 src/core/kernel/memory-manager/VMManager.cpp
  53. +0 −18 src/core/kernel/support/Emu.h
  54. +0 −2 src/core/kernel/support/EmuXTL.h
  55. +3 −3 src/devices/usb/XidGamepad.cpp
  56. +0 −16 src/devices/video/nv2a_int.h
  57. +0 −378 src/gui/DlgControllerConfig.cpp
  58. +247 −0 src/gui/DlgDukeControllerConfig.cpp
  59. +5 −8 src/gui/{DlgXboxControllerPortMapping.h → DlgDukeControllerConfig.h}
  60. +204 −0 src/gui/DlgInputConfig.cpp
  61. +7 −6 src/gui/{DlgControllerConfig.h → DlgInputConfig.h}
  62. +5 −3 src/gui/DlgLoggingConfig.cpp
  63. +0 −263 src/gui/DlgXboxControllerPortMapping.cpp
  64. +36 −37 src/gui/ResCxbx.h
  65. +3 −8 src/gui/WndMain.cpp
  66. +1 −1 src/gui/WndMain.h
@@ -32,7 +32,7 @@ on_success:
If ($env:configuration -eq 'Release') {
cd "bin\${env:configuration}"
7z u "${env:configuration}.zip" ..\..\..\COPYING ..\..\..\README.md
7z u "${env:configuration}.zip" Cxbx.exe glew32.dll subhook.dll CxbxVSBC.dll
7z u "${env:configuration}.zip" Cxbx.exe glew32.dll subhook.dll SDL2.dll
7z u "${env:configuration}.zip" cxbxr-debugger.exe capstone.dll cs_x86.dll
Get-ChildItem .\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}
@@ -50,7 +50,7 @@ jobs:
build\bin\$(configuration)\Cxbx.exe
build\bin\$(configuration)\glew32.dll
build\bin\$(configuration)\subhook.dll
build\bin\$(configuration)\CxbxVSBC.dll
build\bin\$(configuration)\SDL2.dll
build\bin\$(configuration)\cxbxr-debugger.exe
build\bin\$(configuration)\capstone.dll
build\bin\$(configuration)\cx_x86.dll
@@ -18,3 +18,6 @@
path = import/libtomcrypt
url = https://github.com/libtom/libtomcrypt
branch = master
[submodule "import/SDL2"]
path = import/SDL2
url = https://github.com/SDL-mirror/SDL
@@ -31,7 +31,7 @@ script:
# - mkdir export
# - 7z u export/${configuration} COPYING README.md
# - cd build/win32/${configuration}
# - 7z u ../../../export/${configuration} Cxbx.exe glew32.dll subhook.dll CxbxVSBC.dll
# - 7z u ../../../export/${configuration} Cxbx.exe glew32.dll subhook.dll SDL2.dll
# - 7z u ../../../export/${configuration} CxbxDebugger.exe capstone.dll cs_x86.dll
# - cd ../../../

@@ -20,7 +20,7 @@ add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/XbSymbolDatabase")
# Not require since only include a header file
#add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/simpleini")

#add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/SDL2")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/SDL2")

if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/cs_x86")
@@ -54,7 +54,7 @@ configure_file(
NEWLINE_STYLE LF
)

add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/projects/vsbc")
#add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/projects/vsbc")

# Split the files into group for which project is likely
# going to be used for both header and source files.
@@ -73,8 +73,15 @@ file (GLOB CXBXR_HEADER_COMMON
"${CXBXR_ROOT_DIR}/src/common/CxbxDebugger.h"
"${CXBXR_ROOT_DIR}/src/common/EmuEEPROM.h"
"${CXBXR_ROOT_DIR}/src/common/Error.h"
"${CXBXR_ROOT_DIR}/src/common/input/InputConfig.h"
"${CXBXR_ROOT_DIR}/src/common/input/SDL2_Device.h"
"${CXBXR_ROOT_DIR}/src/common/input/Button.h"
"${CXBXR_ROOT_DIR}/src/common/input/DInputKeyboardCodes.h"
"${CXBXR_ROOT_DIR}/src/common/input/DInputKeyboardMouse.h"
"${CXBXR_ROOT_DIR}/src/common/input/EmuDevice.h"
"${CXBXR_ROOT_DIR}/src/common/input/InputDevice.h"
"${CXBXR_ROOT_DIR}/src/common/input/InputManager.h"
"${CXBXR_ROOT_DIR}/src/common/input/InputWindow.h"
"${CXBXR_ROOT_DIR}/src/common/input/SdlJoystick.h"
"${CXBXR_ROOT_DIR}/src/common/input/XInputPad.h"
"${CXBXR_ROOT_DIR}/src/common/IPCHybrid.hpp"
"${CXBXR_ROOT_DIR}/src/common/Logging.h"
"${CXBXR_ROOT_DIR}/src/common/ReservedMemory.h"
@@ -85,11 +92,9 @@ file (GLOB CXBXR_HEADER_COMMON
"${CXBXR_ROOT_DIR}/src/common/util/CxbxUtil.h"
"${CXBXR_ROOT_DIR}/src/common/win32/AlignPosfix1.h"
"${CXBXR_ROOT_DIR}/src/common/win32/AlignPrefix1.h"
"${CXBXR_ROOT_DIR}/src/common/win32/DInputController.h"
"${CXBXR_ROOT_DIR}/src/common/win32/EmuShared.h"
"${CXBXR_ROOT_DIR}/src/common/win32/Mutex.h"
"${CXBXR_ROOT_DIR}/src/common/win32/Threads.h"
"${CXBXR_ROOT_DIR}/src/common/win32/XBPortMapping.h"
"${CXBXR_ROOT_DIR}/src/common/xbdm/CxbxXbdm.h"
"${CXBXR_ROOT_DIR}/src/common/xbe/Xbe.h"
"${CXBXR_ROOT_DIR}/src/common/xbe/XbePrinter.h"
@@ -105,12 +110,12 @@ file (GLOB CXBXR_HEADER_GUIv1
"${CXBXR_ROOT_DIR}/src/gui/DbgConsole.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgAbout.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgAudioConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgControllerConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgInputConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgDukeControllerConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgEepromConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgLoggingConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgNetworkConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgVideoConfig.h"
"${CXBXR_ROOT_DIR}/src/gui/DlgXboxControllerPortMapping.h"
"${CXBXR_ROOT_DIR}/src/gui/ResCxbx.h"
"${CXBXR_ROOT_DIR}/src/gui/Wnd.h"
"${CXBXR_ROOT_DIR}/src/gui/WndMain.h"
@@ -140,9 +145,8 @@ file (GLOB CXBXR_HEADER_EMU
"${CXBXR_ROOT_DIR}/src/core/hle/Intercept.hpp"
"${CXBXR_ROOT_DIR}/src/core/hle/Patches.hpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XACTENG/XactEng.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/OHCI/XInput/DInput.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/OHCI/XInput/XInput.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/Xapi.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/XapiCxbxr.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XGRAPHIC/XGraphic.h"
"${CXBXR_ROOT_DIR}/src/core/hle/XONLINE/XOnline.h"
"${CXBXR_ROOT_DIR}/src/core/kernel/common/strings.hpp"
@@ -199,21 +203,25 @@ file (GLOB CXBXR_SOURCE_COMMON
"${CXBXR_ROOT_DIR}/src/common/CxbxDebugger.cpp"
"${CXBXR_ROOT_DIR}/src/common/EmuEEPROM.cpp"
"${CXBXR_ROOT_DIR}/src/common/Error.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/InputConfig.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/SDL2_Device.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/Button.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/DInputKeyboardMouse.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/EmuDevice.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/InputDevice.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/InputManager.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/InputWindow.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/SdlJoystick.cpp"
"${CXBXR_ROOT_DIR}/src/common/input/XInputPad.cpp"
"${CXBXR_ROOT_DIR}/src/common/Logging.cpp"
"${CXBXR_ROOT_DIR}/src/common/Settings.cpp"
"${CXBXR_ROOT_DIR}/src/common/Timer.cpp"
"${CXBXR_ROOT_DIR}/src/common/util/crc32c.cpp"
"${CXBXR_ROOT_DIR}/src/common/util/CxbxUtil.cpp"
"${CXBXR_ROOT_DIR}/src/common/util/hasher.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/DInputController.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/EmuShared.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/InlineFunc.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/IPCWindows.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/Mutex.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/Threads.cpp"
"${CXBXR_ROOT_DIR}/src/common/win32/XBPortMapping.cpp"
"${CXBXR_ROOT_DIR}/src/common/xbdm/CxbxXbdm.cpp"
"${CXBXR_ROOT_DIR}/src/common/xbe/Xbe.cpp"
"${CXBXR_ROOT_DIR}/src/common/xbe/XbePrinter.cpp"
@@ -227,12 +235,12 @@ file (GLOB CXBXR_SOURCE_COMMON
file (GLOB CXBXR_SOURCE_GUIv1
"${CXBXR_ROOT_DIR}/src/gui/DlgAbout.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgAudioConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgControllerConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgInputConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgDukeControllerConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgEepromConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgLoggingConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgNetworkConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgVideoConfig.cpp"
"${CXBXR_ROOT_DIR}/src/gui/DlgXboxControllerPortMapping.cpp"
"${CXBXR_ROOT_DIR}/src/gui/WinMain.cpp"
"${CXBXR_ROOT_DIR}/src/gui/Wnd.cpp"
"${CXBXR_ROOT_DIR}/src/gui/WndMain.cpp"
@@ -265,8 +273,6 @@ file (GLOB CXBXR_SOURCE_EMU
"${CXBXR_ROOT_DIR}/src/core/hle/Intercept.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/Patches.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XACTENG/XactEng.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/OHCI/XInput/DInput.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/OHCI/XInput/XInput.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XAPI/Xapi.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XGRAPHIC/XGraphic.cpp"
"${CXBXR_ROOT_DIR}/src/core/hle/XONLINE/XOnline.cpp"
@@ -374,6 +380,6 @@ if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])")
endif()

# Cxbx-Reloaded project with third-party libraries
set_target_properties(cxbx subhook XbSymbolDatabase vsbc libtommath libtomcrypt
set_target_properties(cxbx subhook XbSymbolDatabase libtommath libtomcrypt
PROPERTIES FOLDER Cxbx-Reloaded
)
Submodule SDL2 added at c7b8b4
@@ -21,6 +21,7 @@ include_directories(
"${CXBXR_ROOT_DIR}/import/libtommath"
"${CXBXR_ROOT_DIR}/import/libtomcrypt/src/headers"
"${CXBXR_ROOT_DIR}/import/winpcap/Include"
"${CXBXR_ROOT_DIR}/import/SDL2/include"
)

link_directories(
@@ -175,12 +176,12 @@ set(WINS_LIB
XINPUT9_1_0
Iphlpapi
wpcap
SDL2
)

target_link_libraries(cxbx
PUBLIC XbSymbolDatabase
subhook
vsbc
libtomcrypt

${WINS_LIB}

0 comments on commit d8b0075

Please sign in to comment.
You can’t perform that action at this time.