zenilib
0.5.3.0
|
#include <pspctrl.h>
#include <pspkernel.h>
#include <stdio.h>
#include <stdlib.h>
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"
#include "SDL_events.h"
#include "SDL_error.h"
#include "SDL_thread.h"
#include "SDL_mutex.h"
#include "SDL_timer.h"
Go to the source code of this file.
Functions | |
static int | calc_bezier_y (float t) |
int | JoystickUpdate (void *data) |
static __inline__ void | lerp (point *dest, point *a, point *b, float t) |
SDL_JoystickID | SDL_SYS_GetInstanceIdOfDeviceIndex (int device_index) |
SDL_bool | SDL_SYS_JoystickAttached (SDL_Joystick *joystick) |
void | SDL_SYS_JoystickClose (SDL_Joystick *joystick) |
void | SDL_SYS_JoystickDetect () |
SDL_JoystickGUID | SDL_SYS_JoystickGetDeviceGUID (int device_index) |
SDL_JoystickGUID | SDL_SYS_JoystickGetGUID (SDL_Joystick *joystick) |
int | SDL_SYS_JoystickInit (void) |
const char * | SDL_SYS_JoystickName (int index) |
const char * | SDL_SYS_JoystickNameForDeviceIndex (int device_index) |
SDL_bool | SDL_SYS_JoystickNeedsPolling () |
int | SDL_SYS_JoystickOpen (SDL_Joystick *joystick, int device_index) |
void | SDL_SYS_JoystickQuit (void) |
void | SDL_SYS_JoystickUpdate (SDL_Joystick *joystick) |
int | SDL_SYS_NumJoysticks () |
Variables | |
static point | a = { 0, 0 } |
static int | analog_map [256] |
static point | b = { 50, 0 } |
static enum PspCtrlButtons | button_map [] |
static point | c = { 78, 32767 } |
static point | d = { 128, 32767 } |
static SceCtrlData | pad = { .Lx = 0, .Ly = 0, .Buttons = 0 } |
static SDL_sem * | pad_sem = NULL |
static int | running = 0 |
static SDL_Thread * | thread = NULL |
|
static |
Definition at line 70 of file SDL_sysjoystick.c.
Referenced by SDL_SYS_JoystickInit().
Definition at line 85 of file SDL_sysjoystick.c.
References pad, pad_sem, running, SDL_SemPost(), and SDL_SemWait().
Referenced by SDL_SYS_JoystickInit().
|
static |
Definition at line 63 of file SDL_sysjoystick.c.
Referenced by calc_bezier_y().
SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex | ( | int | device_index | ) |
Definition at line 156 of file SDL_sysjoystick.c.
SDL_bool SDL_SYS_JoystickAttached | ( | SDL_Joystick * | joystick | ) |
Definition at line 186 of file SDL_sysjoystick.c.
References SDL_TRUE.
void SDL_SYS_JoystickClose | ( | SDL_Joystick * | joystick | ) |
Definition at line 239 of file SDL_sysjoystick.c.
References SDL_SetError(), sharedDelegate, SDLUIAccelerationDelegate::sharedDelegate, and SDLUIAccelerationDelegate::shutdown.
void SDL_SYS_JoystickDetect | ( | ) |
Definition at line 140 of file SDL_sysjoystick.c.
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID | ( | int | device_index | ) |
Definition at line 253 of file SDL_sysjoystick.c.
References SDL_memcpy(), SDL_min, SDL_strlen(), SDL_SYS_JoystickNameForDeviceIndex(), and SDL_zero.
SDL_JoystickGUID SDL_SYS_JoystickGetGUID | ( | SDL_Joystick * | joystick | ) |
Definition at line 263 of file SDL_sysjoystick.c.
References _SDL_Joystick::name, SDL_memcpy(), SDL_min, SDL_strlen(), and SDL_zero.
Definition at line 104 of file SDL_sysjoystick.c.
References analog_map, calc_bezier_y(), i, JoystickUpdate(), NULL, pad_sem, running, SDL_CreateSemaphore(), SDL_CreateThread(), and SDL_SetError().
Definition at line 162 of file SDL_sysjoystick.c.
References NULL, and SDL_SetError().
Definition at line 150 of file SDL_sysjoystick.c.
References accelerometerName.
SDL_bool SDL_SYS_JoystickNeedsPolling | ( | ) |
Definition at line 144 of file SDL_sysjoystick.c.
References SDL_FALSE.
int SDL_SYS_JoystickOpen | ( | SDL_Joystick * | joystick, |
int | device_index | ||
) |
Definition at line 176 of file SDL_sysjoystick.c.
References _SDL_Joystick::naxes, _SDL_Joystick::nballs, _SDL_Joystick::nbuttons, _SDL_Joystick::nhats, SDLUIAccelerationDelegate::sharedDelegate, and SDLUIAccelerationDelegate::startup.
Definition at line 245 of file SDL_sysjoystick.c.
References NULL, pad_sem, running, SDL_DestroySemaphore(), and SDL_WaitThread().
void SDL_SYS_JoystickUpdate | ( | SDL_Joystick * | joystick | ) |
Definition at line 196 of file SDL_sysjoystick.c.
References analog_map, button_map, SDLUIAccelerationDelegate::getLastOrientation:, i, pad, pad_sem, SDL_PRESSED, SDL_PrivateJoystickAxis(), SDL_PrivateJoystickButton(), SDL_RELEASED, SDL_SemPost(), SDL_SemWait(), SDLUIAccelerationDelegate::setHasNewData:, sharedDelegate, and SDLUIAccelerationDelegate::sharedDelegate.
int SDL_SYS_NumJoysticks | ( | ) |
Definition at line 135 of file SDL_sysjoystick.c.
|
static |
Definition at line 57 of file SDL_sysjoystick.c.
|
static |
Definition at line 48 of file SDL_sysjoystick.c.
Referenced by SDL_SYS_JoystickInit(), and SDL_SYS_JoystickUpdate().
|
static |
Definition at line 58 of file SDL_sysjoystick.c.
|
static |
Definition at line 43 of file SDL_sysjoystick.c.
Referenced by SDL_SYS_JoystickUpdate().
|
static |
Definition at line 59 of file SDL_sysjoystick.c.
|
static |
Definition at line 60 of file SDL_sysjoystick.c.
Referenced by calc_bezier_y().
|
static |
Definition at line 39 of file SDL_sysjoystick.c.
Referenced by FT_Bitmap_Convert(), JoystickUpdate(), PS_Conv_ASCIIHexDecode(), SDL_LoadBMP_RW(), SDL_SaveBMP_RW(), and SDL_SYS_JoystickUpdate().
Definition at line 40 of file SDL_sysjoystick.c.
Referenced by JoystickUpdate(), SDL_SYS_JoystickInit(), SDL_SYS_JoystickQuit(), and SDL_SYS_JoystickUpdate().
|
static |
Definition at line 42 of file SDL_sysjoystick.c.
Referenced by JoystickUpdate(), SDL_SYS_JoystickInit(), and SDL_SYS_JoystickQuit().
|
static |
Definition at line 41 of file SDL_sysjoystick.c.
Referenced by SDL_CreateThread(), SDL_Generic_GetTLSData(), SDL_Generic_SetTLSData(), SDL_SYS_SetThreadPriority(), and StopThread().