diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index f3b6fe8b..2d5742ee 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -328,6 +328,11 @@ configure_file(../res/tilepatch.bin ./res/tilepatch.bin
)
#VITA
+if(VITA)
+configure_file(../res/config_vita.xml ./config.xml
+ COPYONLY
+)
+endif()
vita_create_self(${PROJECT_NAME}.self ${PROJECT_NAME} ${UNSAFE_FLAG})
add_custom_target(${PROJECT_NAME}.vpk
DEPENDS ${PROJECT_NAME}.self
diff --git a/cmake/vita.cmake b/cmake/vita.cmake
index bbde903b..5e228f11 100644
--- a/cmake/vita.cmake
+++ b/cmake/vita.cmake
@@ -48,6 +48,7 @@ set(sdl_flags "0")
# Set SDL2 instead of SDL1
set(SDL2 1)
+set(VITA 1)
#set(OPENGL 1)
set(FLAGS
diff --git a/res/config_vita.xml b/res/config_vita.xml
new file mode 100644
index 00000000..b6faaea3
--- /dev/null
+++ b/res/config_vita.xml
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+
+ MAGICAL SOUND SHOWER REMIX
+ track1.wav
+
+
+
+ PASSING BREEZE REMIX
+ track2.wav
+
+
+
+ SPLASH WAVE REMIX
+ track3.wav
+
+
+ LAST WAVE REMIX
+ track4.wav
+
+
+
+
+
+
+
+
+ COM6
+
+
+ 57600
+
+
+ 0
+
+
+ 1
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+
+ 1073741906
+ 1073741905
+ 1073741904
+ 1073741903
+ 122
+ 120
+ 32
+ 32
+ 49
+ 53
+
+ 304
+
+
+
+
+ 0
+ 1
+ 2
+ 2
+ 3
+ 4
+
+ 10
+
+
+
+ 3
+
+
+ 4
+
+
+
+
+
+ 0
+ 2
+ 3
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+ 8500
+
+
+ 7000
+
+
+ 20
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 0
+
+
+
+
+
+ 3
+
+
+ 3
+
+
+
+
+
+ 3
+
+
+
+
diff --git a/src/main/sdl2/input.cpp b/src/main/sdl2/input.cpp
index ab1a9fc7..4cc9f211 100644
--- a/src/main/sdl2/input.cpp
+++ b/src/main/sdl2/input.cpp
@@ -301,4 +301,21 @@ void Input::handle_joy(const uint8_t button, const bool is_pressed)
if (button == pad_config[7])
keys[VIEWPOINT] = is_pressed;
+
+#ifdef __vita__
+ //map dpad to digital directions to allow menu control
+ //even when analog wheel is enabled
+ if (button == 6)
+ keys[DOWN] = is_pressed;
+
+ if (button == 7)
+ keys[LEFT] = is_pressed;
+
+ if (button == 8)
+ keys[UP] = is_pressed;
+
+ if (button == 9)
+ keys[RIGHT] = is_pressed;
+#endif
+
}