mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
(Input) Move console input drivers to input/ directory - should start getting rid of
all these platform-specific folders cluttering up the codebase tree (GL) Build fix for PS3 - current MiniGL implementation doesn't support SRGB (Griffin) shader_common only baked in if HAVE_SHADERS defined
This commit is contained in:
parent
3a3bc7c667
commit
f8e40f613b
@ -30,10 +30,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HW_RVL
|
||||
#include "gx/gx_input.h"
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
VIDEO_GL = 0,
|
||||
|
2
gfx/gl.c
2
gfx/gl.c
@ -519,6 +519,7 @@ static void gl_create_fbo_textures(void *data)
|
||||
RARCH_ERR("[GL]: Floating-point FBO was requested, but is not supported. Falling back to UNORM.\n");
|
||||
}
|
||||
|
||||
#ifndef HAVE_PSGL
|
||||
if (srgb_fbo && gl->has_srgb_fbo)
|
||||
{
|
||||
RARCH_LOG("[GL]: FBO pass #%d is sRGB.\n", i);
|
||||
@ -535,6 +536,7 @@ static void gl_create_fbo_textures(void *data)
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifndef HAVE_OPENGLES2
|
||||
if (fp_fbo && gl->has_fp_fbo)
|
||||
|
@ -145,9 +145,8 @@ VIDEO CONTEXT
|
||||
/*============================================================
|
||||
VIDEO SHADERS
|
||||
============================================================ */
|
||||
#include "../gfx/shader_common.c"
|
||||
|
||||
#ifdef HAVE_SHADERS
|
||||
#include "../gfx/shader_common.c"
|
||||
#include "../gfx/shader_parse.c"
|
||||
|
||||
#ifdef HAVE_CG
|
||||
@ -297,16 +296,16 @@ INPUT
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include "../ps3/ps3_input.c"
|
||||
#include "../input/ps3_input.c"
|
||||
#elif defined(SN_TARGET_PSP2) || defined(PSP)
|
||||
#include "../psp/psp_input.c"
|
||||
#include "../input/psp_input.c"
|
||||
#elif defined(GEKKO)
|
||||
#ifdef HAVE_LIBSICKSAXIS
|
||||
#include "../gx/sicksaxis.c"
|
||||
#endif
|
||||
#include "../gx/gx_input.c"
|
||||
#include "../input/gx_input.c"
|
||||
#elif defined(_XBOX)
|
||||
#include "../xdk/xdk_xinput_input.c"
|
||||
#include "../input/xdk_xinput_input.c"
|
||||
#elif defined(XENON)
|
||||
#include "../xenon/xenon360_input.c"
|
||||
#elif defined(ANDROID)
|
||||
@ -323,7 +322,7 @@ INPUT
|
||||
|
||||
#ifdef HAVE_OSK
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include "../ps3/ps3_input_osk.c"
|
||||
#include "../input/ps3_input_osk.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
125
gx/gx_input.h
125
gx/gx_input.h
@ -1,125 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2014 - Daniel De Matteis
|
||||
* Copyright (C) 2012-2014 - Michael Lelli
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _GX_INPUT_H
|
||||
#define _GX_INPUT_H
|
||||
|
||||
enum
|
||||
{
|
||||
GX_GC_A = 0,
|
||||
GX_GC_B = 1,
|
||||
GX_GC_X = 2,
|
||||
GX_GC_Y = 3,
|
||||
GX_GC_START = 4,
|
||||
GX_GC_Z_TRIGGER = 5,
|
||||
GX_GC_L_TRIGGER = 6,
|
||||
GX_GC_R_TRIGGER = 7,
|
||||
GX_GC_UP = 8,
|
||||
GX_GC_DOWN = 9,
|
||||
GX_GC_LEFT = 10,
|
||||
GX_GC_RIGHT = 11,
|
||||
#ifdef HW_RVL
|
||||
GX_CLASSIC_A = 20,
|
||||
GX_CLASSIC_B = 21,
|
||||
GX_CLASSIC_X = 22,
|
||||
GX_CLASSIC_Y = 23,
|
||||
GX_CLASSIC_PLUS = 24,
|
||||
GX_CLASSIC_MINUS = 25,
|
||||
GX_CLASSIC_HOME = 26,
|
||||
GX_CLASSIC_L_TRIGGER = 27,
|
||||
GX_CLASSIC_R_TRIGGER = 28,
|
||||
GX_CLASSIC_ZL_TRIGGER = 29,
|
||||
GX_CLASSIC_ZR_TRIGGER = 30,
|
||||
GX_CLASSIC_UP = 31,
|
||||
GX_CLASSIC_DOWN = 32,
|
||||
GX_CLASSIC_LEFT = 33,
|
||||
GX_CLASSIC_RIGHT = 34,
|
||||
GX_WIIMOTE_A = 43,
|
||||
GX_WIIMOTE_B = 44,
|
||||
GX_WIIMOTE_1 = 45,
|
||||
GX_WIIMOTE_2 = 46,
|
||||
GX_WIIMOTE_PLUS = 47,
|
||||
GX_WIIMOTE_MINUS = 48,
|
||||
//GX_WIIMOTE_HOME = 49,
|
||||
GX_WIIMOTE_UP = 50,
|
||||
GX_WIIMOTE_DOWN = 51,
|
||||
GX_WIIMOTE_LEFT = 52,
|
||||
GX_WIIMOTE_RIGHT = 53,
|
||||
GX_NUNCHUK_Z = 54,
|
||||
GX_NUNCHUK_C = 55,
|
||||
GX_NUNCHUK_UP = 56,
|
||||
GX_NUNCHUK_DOWN = 57,
|
||||
GX_NUNCHUK_LEFT = 58,
|
||||
GX_NUNCHUK_RIGHT = 59,
|
||||
#endif
|
||||
GX_WIIMOTE_HOME = 49, // needed on GameCube as "fake" menu button
|
||||
GX_QUIT_KEY = 60,
|
||||
};
|
||||
|
||||
enum gx_device_id
|
||||
{
|
||||
GX_DEVICE_GC_ID_JOYPAD_A = 0,
|
||||
GX_DEVICE_GC_ID_JOYPAD_B,
|
||||
GX_DEVICE_GC_ID_JOYPAD_X,
|
||||
GX_DEVICE_GC_ID_JOYPAD_Y,
|
||||
GX_DEVICE_GC_ID_JOYPAD_UP,
|
||||
GX_DEVICE_GC_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_GC_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_GC_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_GC_ID_JOYPAD_Z_TRIGGER,
|
||||
GX_DEVICE_GC_ID_JOYPAD_START,
|
||||
GX_DEVICE_GC_ID_JOYPAD_L_TRIGGER,
|
||||
GX_DEVICE_GC_ID_JOYPAD_R_TRIGGER,
|
||||
|
||||
#ifdef HW_RVL
|
||||
// CLASSIC CONTROLLER
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_A,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_B,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_X,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_Y,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_UP,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_PLUS,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_MINUS,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_HOME,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_L_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_R_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_ZL_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_ZR_TRIGGER,
|
||||
|
||||
// WIIMOTE (PLUS OPTIONAL NUNCHUK)
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_A,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_B,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_1,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_2,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_UP,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_HOME,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_Z,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_C,
|
||||
#endif
|
||||
|
||||
RARCH_LAST_PLATFORM_KEY
|
||||
};
|
||||
|
||||
#endif
|
@ -28,11 +28,114 @@
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
#endif
|
||||
|
||||
#include "gx_input.h"
|
||||
#include "../driver.h"
|
||||
#include "../libretro.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
enum
|
||||
{
|
||||
GX_GC_A = 0,
|
||||
GX_GC_B = 1,
|
||||
GX_GC_X = 2,
|
||||
GX_GC_Y = 3,
|
||||
GX_GC_START = 4,
|
||||
GX_GC_Z_TRIGGER = 5,
|
||||
GX_GC_L_TRIGGER = 6,
|
||||
GX_GC_R_TRIGGER = 7,
|
||||
GX_GC_UP = 8,
|
||||
GX_GC_DOWN = 9,
|
||||
GX_GC_LEFT = 10,
|
||||
GX_GC_RIGHT = 11,
|
||||
#ifdef HW_RVL
|
||||
GX_CLASSIC_A = 20,
|
||||
GX_CLASSIC_B = 21,
|
||||
GX_CLASSIC_X = 22,
|
||||
GX_CLASSIC_Y = 23,
|
||||
GX_CLASSIC_PLUS = 24,
|
||||
GX_CLASSIC_MINUS = 25,
|
||||
GX_CLASSIC_HOME = 26,
|
||||
GX_CLASSIC_L_TRIGGER = 27,
|
||||
GX_CLASSIC_R_TRIGGER = 28,
|
||||
GX_CLASSIC_ZL_TRIGGER = 29,
|
||||
GX_CLASSIC_ZR_TRIGGER = 30,
|
||||
GX_CLASSIC_UP = 31,
|
||||
GX_CLASSIC_DOWN = 32,
|
||||
GX_CLASSIC_LEFT = 33,
|
||||
GX_CLASSIC_RIGHT = 34,
|
||||
GX_WIIMOTE_A = 43,
|
||||
GX_WIIMOTE_B = 44,
|
||||
GX_WIIMOTE_1 = 45,
|
||||
GX_WIIMOTE_2 = 46,
|
||||
GX_WIIMOTE_PLUS = 47,
|
||||
GX_WIIMOTE_MINUS = 48,
|
||||
//GX_WIIMOTE_HOME = 49,
|
||||
GX_WIIMOTE_UP = 50,
|
||||
GX_WIIMOTE_DOWN = 51,
|
||||
GX_WIIMOTE_LEFT = 52,
|
||||
GX_WIIMOTE_RIGHT = 53,
|
||||
GX_NUNCHUK_Z = 54,
|
||||
GX_NUNCHUK_C = 55,
|
||||
GX_NUNCHUK_UP = 56,
|
||||
GX_NUNCHUK_DOWN = 57,
|
||||
GX_NUNCHUK_LEFT = 58,
|
||||
GX_NUNCHUK_RIGHT = 59,
|
||||
#endif
|
||||
GX_WIIMOTE_HOME = 49, // needed on GameCube as "fake" menu button
|
||||
GX_QUIT_KEY = 60,
|
||||
};
|
||||
|
||||
enum gx_device_id
|
||||
{
|
||||
GX_DEVICE_GC_ID_JOYPAD_A = 0,
|
||||
GX_DEVICE_GC_ID_JOYPAD_B,
|
||||
GX_DEVICE_GC_ID_JOYPAD_X,
|
||||
GX_DEVICE_GC_ID_JOYPAD_Y,
|
||||
GX_DEVICE_GC_ID_JOYPAD_UP,
|
||||
GX_DEVICE_GC_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_GC_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_GC_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_GC_ID_JOYPAD_Z_TRIGGER,
|
||||
GX_DEVICE_GC_ID_JOYPAD_START,
|
||||
GX_DEVICE_GC_ID_JOYPAD_L_TRIGGER,
|
||||
GX_DEVICE_GC_ID_JOYPAD_R_TRIGGER,
|
||||
|
||||
#ifdef HW_RVL
|
||||
// CLASSIC CONTROLLER
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_A,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_B,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_X,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_Y,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_UP,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_PLUS,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_MINUS,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_HOME,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_L_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_R_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_ZL_TRIGGER,
|
||||
GX_DEVICE_CLASSIC_ID_JOYPAD_ZR_TRIGGER,
|
||||
|
||||
// WIIMOTE (PLUS OPTIONAL NUNCHUK)
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_A,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_B,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_1,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_2,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_UP,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_HOME,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_Z,
|
||||
GX_DEVICE_WIIMOTE_ID_JOYPAD_C,
|
||||
#endif
|
||||
|
||||
RARCH_LAST_PLATFORM_KEY
|
||||
};
|
||||
|
||||
#define GC_JOYSTICK_THRESHOLD (48 * 256)
|
||||
#define WII_JOYSTICK_THRESHOLD (40 * 256)
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <sdk_version.h>
|
||||
#include "../boolean.h"
|
||||
|
||||
#include "sdk_defines.h"
|
||||
#include "../ps3/sdk_defines.h"
|
||||
|
||||
#include "../driver.h"
|
||||
#include "../libretro.h"
|
@ -25,13 +25,37 @@
|
||||
#include <pspctrl.h>
|
||||
#endif
|
||||
|
||||
#include "sdk_defines.h"
|
||||
#include "psp_input.h"
|
||||
#include "../psp/sdk_defines.h"
|
||||
|
||||
#include "../driver.h"
|
||||
#include "../libretro.h"
|
||||
#include "../general.h"
|
||||
|
||||
enum {
|
||||
PSP_GAMEPAD_CROSS = 1ULL << 0,
|
||||
PSP_GAMEPAD_SQUARE = 1ULL << 1,
|
||||
PSP_GAMEPAD_SELECT = 1ULL << 2,
|
||||
PSP_GAMEPAD_START = 1ULL << 3,
|
||||
PSP_GAMEPAD_DPAD_UP = 1ULL << 4,
|
||||
PSP_GAMEPAD_DPAD_DOWN = 1ULL << 5,
|
||||
PSP_GAMEPAD_DPAD_LEFT = 1ULL << 6,
|
||||
PSP_GAMEPAD_DPAD_RIGHT = 1ULL << 7,
|
||||
PSP_GAMEPAD_CIRCLE = 1ULL << 8,
|
||||
PSP_GAMEPAD_TRIANGLE = 1ULL << 9,
|
||||
PSP_GAMEPAD_L = 1ULL << 10,
|
||||
PSP_GAMEPAD_R = 1ULL << 11,
|
||||
PSP_GAMEPAD_LSTICK_LEFT_MASK = 1ULL << 16,
|
||||
PSP_GAMEPAD_LSTICK_RIGHT_MASK = 1ULL << 17,
|
||||
PSP_GAMEPAD_LSTICK_UP_MASK = 1ULL << 18,
|
||||
PSP_GAMEPAD_LSTICK_DOWN_MASK = 1ULL << 19,
|
||||
#ifdef SN_TARGET_PSP2
|
||||
PSP_GAMEPAD_RSTICK_LEFT_MASK = 1ULL << 20,
|
||||
PSP_GAMEPAD_RSTICK_RIGHT_MASK = 1ULL << 21,
|
||||
PSP_GAMEPAD_RSTICK_UP_MASK = 1ULL << 22,
|
||||
PSP_GAMEPAD_RSTICK_DOWN_MASK = 1ULL << 23,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define ANALOGSTICK_DEADZONE_LOW (0x40)
|
||||
#define ANALOGSTICK_DEADZONE_HIGH (0xc0)
|
||||
|
@ -1,45 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2014 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _PSP_INPUT_H_
|
||||
#define _PSP_INPUT_H_
|
||||
|
||||
enum {
|
||||
PSP_GAMEPAD_CROSS = 1ULL << 0,
|
||||
PSP_GAMEPAD_SQUARE = 1ULL << 1,
|
||||
PSP_GAMEPAD_SELECT = 1ULL << 2,
|
||||
PSP_GAMEPAD_START = 1ULL << 3,
|
||||
PSP_GAMEPAD_DPAD_UP = 1ULL << 4,
|
||||
PSP_GAMEPAD_DPAD_DOWN = 1ULL << 5,
|
||||
PSP_GAMEPAD_DPAD_LEFT = 1ULL << 6,
|
||||
PSP_GAMEPAD_DPAD_RIGHT = 1ULL << 7,
|
||||
PSP_GAMEPAD_CIRCLE = 1ULL << 8,
|
||||
PSP_GAMEPAD_TRIANGLE = 1ULL << 9,
|
||||
PSP_GAMEPAD_L = 1ULL << 10,
|
||||
PSP_GAMEPAD_R = 1ULL << 11,
|
||||
PSP_GAMEPAD_LSTICK_LEFT_MASK = 1ULL << 16,
|
||||
PSP_GAMEPAD_LSTICK_RIGHT_MASK = 1ULL << 17,
|
||||
PSP_GAMEPAD_LSTICK_UP_MASK = 1ULL << 18,
|
||||
PSP_GAMEPAD_LSTICK_DOWN_MASK = 1ULL << 19,
|
||||
#ifdef SN_TARGET_PSP2
|
||||
PSP_GAMEPAD_RSTICK_LEFT_MASK = 1ULL << 20,
|
||||
PSP_GAMEPAD_RSTICK_RIGHT_MASK = 1ULL << 21,
|
||||
PSP_GAMEPAD_RSTICK_UP_MASK = 1ULL << 22,
|
||||
PSP_GAMEPAD_RSTICK_DOWN_MASK = 1ULL << 23,
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user