diff --git a/audio/audio_driver.c b/audio/audio_driver.c
index e4bc07a957..d369928eb6 100644
--- a/audio/audio_driver.c
+++ b/audio/audio_driver.c
@@ -28,6 +28,7 @@
#include "audio_thread_wrapper.h"
#include "../command.h"
+#include "../driver.h"
#include "../configuration.h"
#include "../retroarch.h"
#include "../runloop.h"
diff --git a/audio/drivers/openal.c b/audio/drivers/openal.c
index f812c9e91d..34ee8c5503 100644
--- a/audio/drivers/openal.c
+++ b/audio/drivers/openal.c
@@ -13,6 +13,7 @@
* If not, see .
*/
+#include
#include
#include
diff --git a/camera/camera_driver.c b/camera/camera_driver.c
index 71672ac441..cdd8aa380e 100644
--- a/camera/camera_driver.c
+++ b/camera/camera_driver.c
@@ -23,6 +23,7 @@
#include "camera_driver.h"
#include "../configuration.h"
+#include "../driver.h"
#include "../retroarch.h"
#include "../runloop.h"
#include "../list_special.h"
diff --git a/configuration.h b/configuration.h
index cdb2c4f979..4559781fbe 100644
--- a/configuration.h
+++ b/configuration.h
@@ -23,7 +23,7 @@
#include
#include "gfx/video_driver.h"
-#include "driver.h"
+#include "input/input_defines.h"
enum override_type
{
@@ -32,10 +32,6 @@ enum override_type
OVERRIDE_GAME
};
-#ifndef MAX_USERS
-#define MAX_USERS 16
-#endif
-
RETRO_BEGIN_DECLS
typedef struct settings
diff --git a/driver.h b/driver.h
index 7d604dd251..7bcf7a5aa7 100644
--- a/driver.h
+++ b/driver.h
@@ -42,66 +42,6 @@ RETRO_BEGIN_DECLS
| DRIVER_MENU \
| DRIVERS_VIDEO_INPUT )
-/* RetroArch specific bind IDs. */
-enum
-{
- /* Custom binds that extend the scope of RETRO_DEVICE_JOYPAD for
- * RetroArch specifically.
- * Analogs (RETRO_DEVICE_ANALOG) */
- RARCH_ANALOG_LEFT_X_PLUS = RARCH_FIRST_CUSTOM_BIND,
- RARCH_ANALOG_LEFT_X_MINUS,
- RARCH_ANALOG_LEFT_Y_PLUS,
- RARCH_ANALOG_LEFT_Y_MINUS,
- RARCH_ANALOG_RIGHT_X_PLUS,
- RARCH_ANALOG_RIGHT_X_MINUS,
- RARCH_ANALOG_RIGHT_Y_PLUS,
- RARCH_ANALOG_RIGHT_Y_MINUS,
-
- /* Turbo */
- RARCH_TURBO_ENABLE,
-
- RARCH_CUSTOM_BIND_LIST_END,
-
- /* Command binds. Not related to game input,
- * only usable for port 0. */
- RARCH_FAST_FORWARD_KEY = RARCH_FIRST_META_KEY,
- RARCH_FAST_FORWARD_HOLD_KEY,
- RARCH_LOAD_STATE_KEY,
- RARCH_SAVE_STATE_KEY,
- RARCH_FULLSCREEN_TOGGLE_KEY,
- RARCH_QUIT_KEY,
- RARCH_STATE_SLOT_PLUS,
- RARCH_STATE_SLOT_MINUS,
- RARCH_REWIND,
- RARCH_MOVIE_RECORD_TOGGLE,
- RARCH_PAUSE_TOGGLE,
- RARCH_FRAMEADVANCE,
- RARCH_RESET,
- RARCH_SHADER_NEXT,
- RARCH_SHADER_PREV,
- RARCH_CHEAT_INDEX_PLUS,
- RARCH_CHEAT_INDEX_MINUS,
- RARCH_CHEAT_TOGGLE,
- RARCH_SCREENSHOT,
- RARCH_MUTE,
- RARCH_OSK,
- RARCH_NETPLAY_FLIP,
- RARCH_SLOWMOTION,
- RARCH_ENABLE_HOTKEY,
- RARCH_VOLUME_UP,
- RARCH_VOLUME_DOWN,
- RARCH_OVERLAY_NEXT,
- RARCH_DISK_EJECT_TOGGLE,
- RARCH_DISK_NEXT,
- RARCH_DISK_PREV,
- RARCH_GRAB_MOUSE_TOGGLE,
-
- RARCH_MENU_TOGGLE,
-
- RARCH_BIND_LIST_END,
- RARCH_BIND_LIST_END_NULL
-};
-
enum
{
DRIVER_AUDIO = 1 << 0,
diff --git a/input/drivers/linuxraw_input.c b/input/drivers/linuxraw_input.c
index 076cd52e41..e54fab2b36 100644
--- a/input/drivers/linuxraw_input.c
+++ b/input/drivers/linuxraw_input.c
@@ -14,6 +14,7 @@
* If not, see .
*/
+#include
#include
#include
diff --git a/input/drivers_hid/btstack_hid.c b/input/drivers_hid/btstack_hid.c
index e20ad566a0..ca62a37954 100644
--- a/input/drivers_hid/btstack_hid.c
+++ b/input/drivers_hid/btstack_hid.c
@@ -16,6 +16,7 @@
#include
#include
+#include
#include
#include
#include
diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c
index 2bd29f8006..ef7ab25035 100644
--- a/input/drivers_hid/iohidmanager_hid.c
+++ b/input/drivers_hid/iohidmanager_hid.c
@@ -14,6 +14,8 @@
* If not, see .
*/
+#include
+
#include
#include
diff --git a/input/drivers_hid/null_hid.c b/input/drivers_hid/null_hid.c
index 1ce26033a3..79d15fd6a9 100644
--- a/input/drivers_hid/null_hid.c
+++ b/input/drivers_hid/null_hid.c
@@ -14,6 +14,8 @@
* If not, see .
*/
+#include
+
#include "../../runloop.h"
#include "../input_hid_driver.h"
diff --git a/input/drivers_hid/wiiusb_hid.c b/input/drivers_hid/wiiusb_hid.c
index f9c04cc1cc..dc5e6cbc3b 100644
--- a/input/drivers_hid/wiiusb_hid.c
+++ b/input/drivers_hid/wiiusb_hid.c
@@ -13,6 +13,8 @@
* If not, see .
*/
+#include
+
#include
#include
diff --git a/input/input_defines.h b/input/input_defines.h
index 1a6aad3577..859f8e6475 100644
--- a/input/input_defines.h
+++ b/input/input_defines.h
@@ -23,6 +23,71 @@
RETRO_BEGIN_DECLS
+#define MAX_USERS 16
+
+#define RARCH_FIRST_CUSTOM_BIND 16
+#define RARCH_FIRST_META_KEY RARCH_CUSTOM_BIND_LIST_END
+
+/* RetroArch specific bind IDs. */
+enum
+{
+ /* Custom binds that extend the scope of RETRO_DEVICE_JOYPAD for
+ * RetroArch specifically.
+ * Analogs (RETRO_DEVICE_ANALOG) */
+ RARCH_ANALOG_LEFT_X_PLUS = RARCH_FIRST_CUSTOM_BIND,
+ RARCH_ANALOG_LEFT_X_MINUS,
+ RARCH_ANALOG_LEFT_Y_PLUS,
+ RARCH_ANALOG_LEFT_Y_MINUS,
+ RARCH_ANALOG_RIGHT_X_PLUS,
+ RARCH_ANALOG_RIGHT_X_MINUS,
+ RARCH_ANALOG_RIGHT_Y_PLUS,
+ RARCH_ANALOG_RIGHT_Y_MINUS,
+
+ /* Turbo */
+ RARCH_TURBO_ENABLE,
+
+ RARCH_CUSTOM_BIND_LIST_END,
+
+ /* Command binds. Not related to game input,
+ * only usable for port 0. */
+ RARCH_FAST_FORWARD_KEY = RARCH_FIRST_META_KEY,
+ RARCH_FAST_FORWARD_HOLD_KEY,
+ RARCH_LOAD_STATE_KEY,
+ RARCH_SAVE_STATE_KEY,
+ RARCH_FULLSCREEN_TOGGLE_KEY,
+ RARCH_QUIT_KEY,
+ RARCH_STATE_SLOT_PLUS,
+ RARCH_STATE_SLOT_MINUS,
+ RARCH_REWIND,
+ RARCH_MOVIE_RECORD_TOGGLE,
+ RARCH_PAUSE_TOGGLE,
+ RARCH_FRAMEADVANCE,
+ RARCH_RESET,
+ RARCH_SHADER_NEXT,
+ RARCH_SHADER_PREV,
+ RARCH_CHEAT_INDEX_PLUS,
+ RARCH_CHEAT_INDEX_MINUS,
+ RARCH_CHEAT_TOGGLE,
+ RARCH_SCREENSHOT,
+ RARCH_MUTE,
+ RARCH_OSK,
+ RARCH_NETPLAY_FLIP,
+ RARCH_SLOWMOTION,
+ RARCH_ENABLE_HOTKEY,
+ RARCH_VOLUME_UP,
+ RARCH_VOLUME_DOWN,
+ RARCH_OVERLAY_NEXT,
+ RARCH_DISK_EJECT_TOGGLE,
+ RARCH_DISK_NEXT,
+ RARCH_DISK_PREV,
+ RARCH_GRAB_MOUSE_TOGGLE,
+
+ RARCH_MENU_TOGGLE,
+
+ RARCH_BIND_LIST_END,
+ RARCH_BIND_LIST_END_NULL
+};
+
enum analog_dpad_mode
{
ANALOG_DPAD_NONE = 0,
@@ -48,8 +113,6 @@ enum analog_dpad_mode
* Analog binds use RETRO_DEVICE_ANALOG, but we follow the same scheme
* internally in RetroArch for simplicity, so they are mapped into [16, 23].
*/
-#define RARCH_FIRST_CUSTOM_BIND 16
-#define RARCH_FIRST_META_KEY RARCH_CUSTOM_BIND_LIST_END
#define AXIS_NEG(x) (((uint32_t)(x) << 16) | UINT16_C(0xFFFF))
#define AXIS_POS(x) ((uint32_t)(x) | UINT32_C(0xFFFF0000))
diff --git a/input/input_driver.c b/input/input_driver.c
index 8a17b8b641..34e1c0e919 100644
--- a/input/input_driver.c
+++ b/input/input_driver.c
@@ -20,6 +20,7 @@
#include "input_keyboard.h"
#include "input_remapping.h"
+#include "../driver.h"
#include "../retroarch.h"
#include "../runloop.h"
#include "../movie.h"
diff --git a/input/input_driver.h b/input/input_driver.h
index cc6fcdcadb..c9722fc35a 100644
--- a/input/input_driver.h
+++ b/input/input_driver.h
@@ -25,15 +25,12 @@
#include
#include "input_joypad_driver.h"
+#include "input_defines.h"
#ifdef HAVE_OVERLAY
#include "input_overlay.h"
#endif
-#ifndef MAX_USERS
-#define MAX_USERS 16
-#endif
-
RETRO_BEGIN_DECLS
typedef struct retro_input
diff --git a/location/location_driver.c b/location/location_driver.c
index a15773674d..d4adca0a45 100644
--- a/location/location_driver.c
+++ b/location/location_driver.c
@@ -23,6 +23,7 @@
#include "location_driver.h"
#include "../configuration.h"
+#include "../driver.h"
#include "../retroarch.h"
#include "../runloop.h"
#include "../system.h"
diff --git a/system.h b/system.h
index 3ee1113fbe..914bf7f972 100644
--- a/system.h
+++ b/system.h
@@ -20,11 +20,7 @@
#include
#include
-#include "driver.h"
-
-#ifndef MAX_USERS
-#define MAX_USERS 16
-#endif
+#include "input/input_defines.h"
RETRO_BEGIN_DECLS