early-access version 2835

This commit is contained in:
pineappleEA
2022-07-15 04:00:50 +02:00
parent 5c0ee5eba6
commit 0e7aef7e36
1173 changed files with 55320 additions and 18881 deletions

View File

@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -147,7 +147,7 @@ int VITA_JoystickInit(void)
// after the app has already started.
SDL_numjoysticks = 1;
SDL_PrivateJoystickAdded(0);
// How many additional paired controllers are there?
sceCtrlGetControllerPortInfo(&myPortInfo);
@@ -157,6 +157,7 @@ int VITA_JoystickInit(void)
{
if (myPortInfo.port[i]!=SCE_CTRL_TYPE_UNPAIRED)
{
SDL_PrivateJoystickAdded(SDL_numjoysticks);
SDL_numjoysticks++;
}
}
@@ -178,7 +179,6 @@ SDL_JoystickID VITA_JoystickGetDeviceInstanceID(int device_index)
return device_index;
}
/* Function to get the device-dependent name of a joystick */
const char *VITA_JoystickGetDeviceName(int index)
{
if (index == 0)
@@ -194,7 +194,12 @@ const char *VITA_JoystickGetDeviceName(int index)
return "PSVita Controller";
SDL_SetError("No joystick available with that index");
return(NULL);
return NULL;
}
const char *VITA_JoystickGetDevicePath(int index)
{
return NULL;
}
static int
@@ -399,6 +404,7 @@ SDL_JoystickDriver SDL_VITA_JoystickDriver =
VITA_JoystickGetCount,
VITA_JoystickDetect,
VITA_JoystickGetDeviceName,
VITA_JoystickGetDevicePath,
VITA_JoystickGetDevicePlayerIndex,
VITA_JoystickSetDevicePlayerIndex,
VITA_JoystickGetDeviceGUID,