mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
6246f6e815
This contains a new, hand-written expression parser to replace the old hack language based on string munging. The new approach is a simple AST-based evaluation approach, instead of the "list of operations" infix-based hack that there was before. The new language for configuration has support for parentheses, and counts "!" as a unary operator instead of the binary "NOT OR" operator it was before. A simple example: (X & Y) | !B Explicit device references, and complex device names ("Right Y+") are handled with backticks and colons: (`SDL/0/6 axis joystick:Right X+` & `DInput/0/Keyboard Mouse:A`) The basic editor UI that inserts tokens has not been updated to reflect the new language.
32 lines
993 B
CMake
32 lines
993 B
CMake
set(SRCS Src/ControllerEmu.cpp
|
|
Src/InputConfig.cpp
|
|
Src/UDPWiimote.cpp
|
|
Src/UDPWrapper.cpp
|
|
Src/ControllerInterface/ControllerInterface.cpp
|
|
Src/ControllerInterface/Device.cpp
|
|
Src/ControllerInterface/ExpressionParser.cpp)
|
|
|
|
if(WIN32)
|
|
set(SRCS ${SRCS}
|
|
Src/ControllerInterface/DInput/DInput.cpp
|
|
Src/ControllerInterface/DInput/DInputJoystick.cpp
|
|
Src/ControllerInterface/DInput/DInputKeyboardMouse.cpp
|
|
Src/ControllerInterface/SDL/SDL.cpp
|
|
Src/ControllerInterface/XInput/XInput.cpp)
|
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
set(SRCS ${SRCS}
|
|
Src/ControllerInterface/OSX/OSX.mm
|
|
Src/ControllerInterface/OSX/OSXKeyboard.mm
|
|
Src/ControllerInterface/OSX/OSXJoystick.mm
|
|
Src/ControllerInterface/SDL/SDL.cpp)
|
|
elseif(X11_FOUND)
|
|
set(SRCS ${SRCS}
|
|
Src/ControllerInterface/SDL/SDL.cpp
|
|
Src/ControllerInterface/Xlib/Xlib.cpp)
|
|
elseif(ANDROID)
|
|
set(SRCS ${SRCS}
|
|
Src/ControllerInterface/Android/Android.cpp)
|
|
endif()
|
|
|
|
add_library(inputcommon ${SRCS})
|