remove obsolete files

This commit is contained in:
mgthepro
2022-07-31 12:49:57 +02:00
parent 117076fd71
commit de846fb71e
3631 changed files with 0 additions and 9433291 deletions

View File

@@ -1,91 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#include "SDL_guid.h"
/* convert the guid to a printable string */
void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)
{
static const char k_rgchHexToASCII[] = "0123456789abcdef";
int i;
if ((pszGUID == NULL) || (cbGUID <= 0)) {
return;
}
for (i = 0; i < sizeof(guid.data) && i < (cbGUID-1)/2; i++) {
/* each input byte writes 2 ascii chars, and might write a null byte. */
/* If we don't have room for next input byte, stop */
unsigned char c = guid.data[i];
*pszGUID++ = k_rgchHexToASCII[c >> 4];
*pszGUID++ = k_rgchHexToASCII[c & 0x0F];
}
*pszGUID = '\0';
}
/*-----------------------------------------------------------------------------
* Purpose: Returns the 4 bit nibble for a hex character
* Input : c -
* Output : unsigned char
*-----------------------------------------------------------------------------*/
static unsigned char nibble(unsigned char c)
{
if ((c >= '0') && (c <= '9')) {
return (c - '0');
}
if ((c >= 'A') && (c <= 'F')) {
return (c - 'A' + 0x0a);
}
if ((c >= 'a') && (c <= 'f')) {
return (c - 'a' + 0x0a);
}
/* received an invalid character, and no real way to return an error */
/* AssertMsg1(false, "Q_nibble invalid hex character '%c' ", c); */
return 0;
}
/* convert the string version of a guid to the struct */
SDL_GUID SDL_GUIDFromString(const char *pchGUID)
{
SDL_GUID guid;
int maxoutputbytes= sizeof(guid);
size_t len = SDL_strlen(pchGUID);
Uint8 *p;
size_t i;
/* Make sure it's even */
len = (len) & ~0x1;
SDL_memset(&guid, 0x00, sizeof(guid));
p = (Uint8 *)&guid;
for (i = 0; (i < len) && ((p - (Uint8 *)&guid) < maxoutputbytes); i+=2, p++) {
*p = (nibble((unsigned char)pchGUID[i]) << 4) | nibble((unsigned char)pchGUID[i+1]);
}
return guid;
}

View File

@@ -1,93 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "./SDL_internal.h"
#include "SDL.h"
#include "./SDL_list.h"
/* Push */
int
SDL_ListAdd(SDL_ListNode **head, void *ent)
{
SDL_ListNode *node = SDL_malloc(sizeof (*node));
if (node == NULL) {
return SDL_OutOfMemory();
}
node->entry = ent;
node->next = *head;
*head = node;
return 0;
}
/* Pop from end as a FIFO (if add with SDL_ListAdd) */
void
SDL_ListPop(SDL_ListNode **head, void **ent)
{
SDL_ListNode **ptr = head;
/* Invalid or empty */
if (head == NULL || *head == NULL) {
return;
}
while ((*ptr)->next) {
ptr = &(*ptr)->next;
}
if (ent) {
*ent = (*ptr)->entry;
}
SDL_free(*ptr);
*ptr = NULL;
}
void
SDL_ListRemove(SDL_ListNode **head, void *ent)
{
SDL_ListNode **ptr = head;
while (*ptr) {
if ((*ptr)->entry == ent) {
SDL_ListNode *tmp = *ptr;
*ptr = (*ptr)->next;
SDL_free(tmp);
return;
}
ptr = &(*ptr)->next;
}
}
void
SDL_ListClear(SDL_ListNode **head)
{
SDL_ListNode *l = *head;
*head = NULL;
while (l) {
SDL_ListNode *tmp = l;
l = l->next;
SDL_free(tmp);
}
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,39 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_list_h_
#define SDL_list_h_
typedef struct SDL_ListNode
{
void *entry;
struct SDL_ListNode *next;
} SDL_ListNode;
int SDL_ListAdd(SDL_ListNode **head, void *ent);
void SDL_ListPop(SDL_ListNode **head, void **ent);
void SDL_ListRemove(SDL_ListNode **head, void *ent);
void SDL_ListClear(SDL_ListNode **head);
#endif /* SDL_list_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,33 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "./SDL_internal.h"
/* This file defines useful function for working with SDL logging */
#ifndef SDL_log_c_h_
#define SDL_log_c_h_
extern void SDL_LogInit(void);
extern void SDL_LogQuit(void);
#endif /* SDL_log_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

File diff suppressed because it is too large Load Diff

View File

@@ -1,851 +0,0 @@
# Windows exports file for Watcom
# DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl.
++'_SDL_DYNAPI_entry'.'SDL2.dll'.'SDL_DYNAPI_entry'
++'_SDL_SetError'.'SDL2.dll'.'SDL_SetError'
++'_SDL_Log'.'SDL2.dll'.'SDL_Log'
++'_SDL_LogVerbose'.'SDL2.dll'.'SDL_LogVerbose'
++'_SDL_LogDebug'.'SDL2.dll'.'SDL_LogDebug'
++'_SDL_LogInfo'.'SDL2.dll'.'SDL_LogInfo'
++'_SDL_LogWarn'.'SDL2.dll'.'SDL_LogWarn'
++'_SDL_LogError'.'SDL2.dll'.'SDL_LogError'
++'_SDL_LogCritical'.'SDL2.dll'.'SDL_LogCritical'
++'_SDL_LogMessage'.'SDL2.dll'.'SDL_LogMessage'
++'_SDL_sscanf'.'SDL2.dll'.'SDL_sscanf'
++'_SDL_snprintf'.'SDL2.dll'.'SDL_snprintf'
++'_SDL_CreateThread'.'SDL2.dll'.'SDL_CreateThread'
++'_SDL_RWFromFP'.'SDL2.dll'.'SDL_RWFromFP'
++'_SDL_RegisterApp'.'SDL2.dll'.'SDL_RegisterApp'
++'_SDL_UnregisterApp'.'SDL2.dll'.'SDL_UnregisterApp'
++'_SDL_Direct3D9GetAdapterIndex'.'SDL2.dll'.'SDL_Direct3D9GetAdapterIndex'
++'_SDL_RenderGetD3D9Device'.'SDL2.dll'.'SDL_RenderGetD3D9Device'
# ++'_SDL_iPhoneSetAnimationCallback'.'SDL2.dll'.'SDL_iPhoneSetAnimationCallback'
# ++'_SDL_iPhoneSetEventPump'.'SDL2.dll'.'SDL_iPhoneSetEventPump'
# ++'_SDL_AndroidGetJNIEnv'.'SDL2.dll'.'SDL_AndroidGetJNIEnv'
# ++'_SDL_AndroidGetActivity'.'SDL2.dll'.'SDL_AndroidGetActivity'
# ++'_SDL_AndroidGetInternalStoragePath'.'SDL2.dll'.'SDL_AndroidGetInternalStoragePath'
# ++'_SDL_AndroidGetExternalStorageState'.'SDL2.dll'.'SDL_AndroidGetExternalStorageState'
# ++'_SDL_AndroidGetExternalStoragePath'.'SDL2.dll'.'SDL_AndroidGetExternalStoragePath'
++'_SDL_Init'.'SDL2.dll'.'SDL_Init'
++'_SDL_InitSubSystem'.'SDL2.dll'.'SDL_InitSubSystem'
++'_SDL_QuitSubSystem'.'SDL2.dll'.'SDL_QuitSubSystem'
++'_SDL_WasInit'.'SDL2.dll'.'SDL_WasInit'
++'_SDL_Quit'.'SDL2.dll'.'SDL_Quit'
++'_SDL_ReportAssertion'.'SDL2.dll'.'SDL_ReportAssertion'
++'_SDL_SetAssertionHandler'.'SDL2.dll'.'SDL_SetAssertionHandler'
++'_SDL_GetAssertionReport'.'SDL2.dll'.'SDL_GetAssertionReport'
++'_SDL_ResetAssertionReport'.'SDL2.dll'.'SDL_ResetAssertionReport'
++'_SDL_AtomicTryLock'.'SDL2.dll'.'SDL_AtomicTryLock'
++'_SDL_AtomicLock'.'SDL2.dll'.'SDL_AtomicLock'
++'_SDL_AtomicUnlock'.'SDL2.dll'.'SDL_AtomicUnlock'
++'_SDL_AtomicCAS'.'SDL2.dll'.'SDL_AtomicCAS'
++'_SDL_AtomicSet'.'SDL2.dll'.'SDL_AtomicSet'
++'_SDL_AtomicGet'.'SDL2.dll'.'SDL_AtomicGet'
++'_SDL_AtomicAdd'.'SDL2.dll'.'SDL_AtomicAdd'
++'_SDL_AtomicCASPtr'.'SDL2.dll'.'SDL_AtomicCASPtr'
++'_SDL_AtomicSetPtr'.'SDL2.dll'.'SDL_AtomicSetPtr'
++'_SDL_AtomicGetPtr'.'SDL2.dll'.'SDL_AtomicGetPtr'
++'_SDL_GetNumAudioDrivers'.'SDL2.dll'.'SDL_GetNumAudioDrivers'
++'_SDL_GetAudioDriver'.'SDL2.dll'.'SDL_GetAudioDriver'
++'_SDL_AudioInit'.'SDL2.dll'.'SDL_AudioInit'
++'_SDL_AudioQuit'.'SDL2.dll'.'SDL_AudioQuit'
++'_SDL_GetCurrentAudioDriver'.'SDL2.dll'.'SDL_GetCurrentAudioDriver'
++'_SDL_OpenAudio'.'SDL2.dll'.'SDL_OpenAudio'
++'_SDL_GetNumAudioDevices'.'SDL2.dll'.'SDL_GetNumAudioDevices'
++'_SDL_GetAudioDeviceName'.'SDL2.dll'.'SDL_GetAudioDeviceName'
++'_SDL_OpenAudioDevice'.'SDL2.dll'.'SDL_OpenAudioDevice'
++'_SDL_GetAudioStatus'.'SDL2.dll'.'SDL_GetAudioStatus'
++'_SDL_GetAudioDeviceStatus'.'SDL2.dll'.'SDL_GetAudioDeviceStatus'
++'_SDL_PauseAudio'.'SDL2.dll'.'SDL_PauseAudio'
++'_SDL_PauseAudioDevice'.'SDL2.dll'.'SDL_PauseAudioDevice'
++'_SDL_LoadWAV_RW'.'SDL2.dll'.'SDL_LoadWAV_RW'
++'_SDL_FreeWAV'.'SDL2.dll'.'SDL_FreeWAV'
++'_SDL_BuildAudioCVT'.'SDL2.dll'.'SDL_BuildAudioCVT'
++'_SDL_ConvertAudio'.'SDL2.dll'.'SDL_ConvertAudio'
++'_SDL_MixAudio'.'SDL2.dll'.'SDL_MixAudio'
++'_SDL_MixAudioFormat'.'SDL2.dll'.'SDL_MixAudioFormat'
++'_SDL_LockAudio'.'SDL2.dll'.'SDL_LockAudio'
++'_SDL_LockAudioDevice'.'SDL2.dll'.'SDL_LockAudioDevice'
++'_SDL_UnlockAudio'.'SDL2.dll'.'SDL_UnlockAudio'
++'_SDL_UnlockAudioDevice'.'SDL2.dll'.'SDL_UnlockAudioDevice'
++'_SDL_CloseAudio'.'SDL2.dll'.'SDL_CloseAudio'
++'_SDL_CloseAudioDevice'.'SDL2.dll'.'SDL_CloseAudioDevice'
++'_SDL_SetClipboardText'.'SDL2.dll'.'SDL_SetClipboardText'
++'_SDL_GetClipboardText'.'SDL2.dll'.'SDL_GetClipboardText'
++'_SDL_HasClipboardText'.'SDL2.dll'.'SDL_HasClipboardText'
++'_SDL_GetCPUCount'.'SDL2.dll'.'SDL_GetCPUCount'
++'_SDL_GetCPUCacheLineSize'.'SDL2.dll'.'SDL_GetCPUCacheLineSize'
++'_SDL_HasRDTSC'.'SDL2.dll'.'SDL_HasRDTSC'
++'_SDL_HasAltiVec'.'SDL2.dll'.'SDL_HasAltiVec'
++'_SDL_HasMMX'.'SDL2.dll'.'SDL_HasMMX'
++'_SDL_Has3DNow'.'SDL2.dll'.'SDL_Has3DNow'
++'_SDL_HasSSE'.'SDL2.dll'.'SDL_HasSSE'
++'_SDL_HasSSE2'.'SDL2.dll'.'SDL_HasSSE2'
++'_SDL_HasSSE3'.'SDL2.dll'.'SDL_HasSSE3'
++'_SDL_HasSSE41'.'SDL2.dll'.'SDL_HasSSE41'
++'_SDL_HasSSE42'.'SDL2.dll'.'SDL_HasSSE42'
++'_SDL_GetSystemRAM'.'SDL2.dll'.'SDL_GetSystemRAM'
++'_SDL_GetError'.'SDL2.dll'.'SDL_GetError'
++'_SDL_ClearError'.'SDL2.dll'.'SDL_ClearError'
++'_SDL_Error'.'SDL2.dll'.'SDL_Error'
++'_SDL_PumpEvents'.'SDL2.dll'.'SDL_PumpEvents'
++'_SDL_PeepEvents'.'SDL2.dll'.'SDL_PeepEvents'
++'_SDL_HasEvent'.'SDL2.dll'.'SDL_HasEvent'
++'_SDL_HasEvents'.'SDL2.dll'.'SDL_HasEvents'
++'_SDL_FlushEvent'.'SDL2.dll'.'SDL_FlushEvent'
++'_SDL_FlushEvents'.'SDL2.dll'.'SDL_FlushEvents'
++'_SDL_PollEvent'.'SDL2.dll'.'SDL_PollEvent'
++'_SDL_WaitEvent'.'SDL2.dll'.'SDL_WaitEvent'
++'_SDL_WaitEventTimeout'.'SDL2.dll'.'SDL_WaitEventTimeout'
++'_SDL_PushEvent'.'SDL2.dll'.'SDL_PushEvent'
++'_SDL_SetEventFilter'.'SDL2.dll'.'SDL_SetEventFilter'
++'_SDL_GetEventFilter'.'SDL2.dll'.'SDL_GetEventFilter'
++'_SDL_AddEventWatch'.'SDL2.dll'.'SDL_AddEventWatch'
++'_SDL_DelEventWatch'.'SDL2.dll'.'SDL_DelEventWatch'
++'_SDL_FilterEvents'.'SDL2.dll'.'SDL_FilterEvents'
++'_SDL_EventState'.'SDL2.dll'.'SDL_EventState'
++'_SDL_RegisterEvents'.'SDL2.dll'.'SDL_RegisterEvents'
++'_SDL_GetBasePath'.'SDL2.dll'.'SDL_GetBasePath'
++'_SDL_GetPrefPath'.'SDL2.dll'.'SDL_GetPrefPath'
++'_SDL_GameControllerAddMapping'.'SDL2.dll'.'SDL_GameControllerAddMapping'
++'_SDL_GameControllerMappingForGUID'.'SDL2.dll'.'SDL_GameControllerMappingForGUID'
++'_SDL_GameControllerMapping'.'SDL2.dll'.'SDL_GameControllerMapping'
++'_SDL_IsGameController'.'SDL2.dll'.'SDL_IsGameController'
++'_SDL_GameControllerNameForIndex'.'SDL2.dll'.'SDL_GameControllerNameForIndex'
++'_SDL_GameControllerOpen'.'SDL2.dll'.'SDL_GameControllerOpen'
++'_SDL_GameControllerName'.'SDL2.dll'.'SDL_GameControllerName'
++'_SDL_GameControllerGetAttached'.'SDL2.dll'.'SDL_GameControllerGetAttached'
++'_SDL_GameControllerGetJoystick'.'SDL2.dll'.'SDL_GameControllerGetJoystick'
++'_SDL_GameControllerEventState'.'SDL2.dll'.'SDL_GameControllerEventState'
++'_SDL_GameControllerUpdate'.'SDL2.dll'.'SDL_GameControllerUpdate'
++'_SDL_GameControllerGetAxisFromString'.'SDL2.dll'.'SDL_GameControllerGetAxisFromString'
++'_SDL_GameControllerGetStringForAxis'.'SDL2.dll'.'SDL_GameControllerGetStringForAxis'
++'_SDL_GameControllerGetBindForAxis'.'SDL2.dll'.'SDL_GameControllerGetBindForAxis'
++'_SDL_GameControllerGetAxis'.'SDL2.dll'.'SDL_GameControllerGetAxis'
++'_SDL_GameControllerGetButtonFromString'.'SDL2.dll'.'SDL_GameControllerGetButtonFromString'
++'_SDL_GameControllerGetStringForButton'.'SDL2.dll'.'SDL_GameControllerGetStringForButton'
++'_SDL_GameControllerGetBindForButton'.'SDL2.dll'.'SDL_GameControllerGetBindForButton'
++'_SDL_GameControllerGetButton'.'SDL2.dll'.'SDL_GameControllerGetButton'
++'_SDL_GameControllerClose'.'SDL2.dll'.'SDL_GameControllerClose'
++'_SDL_RecordGesture'.'SDL2.dll'.'SDL_RecordGesture'
++'_SDL_SaveAllDollarTemplates'.'SDL2.dll'.'SDL_SaveAllDollarTemplates'
++'_SDL_SaveDollarTemplate'.'SDL2.dll'.'SDL_SaveDollarTemplate'
++'_SDL_LoadDollarTemplates'.'SDL2.dll'.'SDL_LoadDollarTemplates'
++'_SDL_NumHaptics'.'SDL2.dll'.'SDL_NumHaptics'
++'_SDL_HapticName'.'SDL2.dll'.'SDL_HapticName'
++'_SDL_HapticOpen'.'SDL2.dll'.'SDL_HapticOpen'
++'_SDL_HapticOpened'.'SDL2.dll'.'SDL_HapticOpened'
++'_SDL_HapticIndex'.'SDL2.dll'.'SDL_HapticIndex'
++'_SDL_MouseIsHaptic'.'SDL2.dll'.'SDL_MouseIsHaptic'
++'_SDL_HapticOpenFromMouse'.'SDL2.dll'.'SDL_HapticOpenFromMouse'
++'_SDL_JoystickIsHaptic'.'SDL2.dll'.'SDL_JoystickIsHaptic'
++'_SDL_HapticOpenFromJoystick'.'SDL2.dll'.'SDL_HapticOpenFromJoystick'
++'_SDL_HapticClose'.'SDL2.dll'.'SDL_HapticClose'
++'_SDL_HapticNumEffects'.'SDL2.dll'.'SDL_HapticNumEffects'
++'_SDL_HapticNumEffectsPlaying'.'SDL2.dll'.'SDL_HapticNumEffectsPlaying'
++'_SDL_HapticQuery'.'SDL2.dll'.'SDL_HapticQuery'
++'_SDL_HapticNumAxes'.'SDL2.dll'.'SDL_HapticNumAxes'
++'_SDL_HapticEffectSupported'.'SDL2.dll'.'SDL_HapticEffectSupported'
++'_SDL_HapticNewEffect'.'SDL2.dll'.'SDL_HapticNewEffect'
++'_SDL_HapticUpdateEffect'.'SDL2.dll'.'SDL_HapticUpdateEffect'
++'_SDL_HapticRunEffect'.'SDL2.dll'.'SDL_HapticRunEffect'
++'_SDL_HapticStopEffect'.'SDL2.dll'.'SDL_HapticStopEffect'
++'_SDL_HapticDestroyEffect'.'SDL2.dll'.'SDL_HapticDestroyEffect'
++'_SDL_HapticGetEffectStatus'.'SDL2.dll'.'SDL_HapticGetEffectStatus'
++'_SDL_HapticSetGain'.'SDL2.dll'.'SDL_HapticSetGain'
++'_SDL_HapticSetAutocenter'.'SDL2.dll'.'SDL_HapticSetAutocenter'
++'_SDL_HapticPause'.'SDL2.dll'.'SDL_HapticPause'
++'_SDL_HapticUnpause'.'SDL2.dll'.'SDL_HapticUnpause'
++'_SDL_HapticStopAll'.'SDL2.dll'.'SDL_HapticStopAll'
++'_SDL_HapticRumbleSupported'.'SDL2.dll'.'SDL_HapticRumbleSupported'
++'_SDL_HapticRumbleInit'.'SDL2.dll'.'SDL_HapticRumbleInit'
++'_SDL_HapticRumblePlay'.'SDL2.dll'.'SDL_HapticRumblePlay'
++'_SDL_HapticRumbleStop'.'SDL2.dll'.'SDL_HapticRumbleStop'
++'_SDL_SetHintWithPriority'.'SDL2.dll'.'SDL_SetHintWithPriority'
++'_SDL_SetHint'.'SDL2.dll'.'SDL_SetHint'
++'_SDL_GetHint'.'SDL2.dll'.'SDL_GetHint'
++'_SDL_AddHintCallback'.'SDL2.dll'.'SDL_AddHintCallback'
++'_SDL_DelHintCallback'.'SDL2.dll'.'SDL_DelHintCallback'
++'_SDL_ClearHints'.'SDL2.dll'.'SDL_ClearHints'
++'_SDL_NumJoysticks'.'SDL2.dll'.'SDL_NumJoysticks'
++'_SDL_JoystickNameForIndex'.'SDL2.dll'.'SDL_JoystickNameForIndex'
++'_SDL_JoystickOpen'.'SDL2.dll'.'SDL_JoystickOpen'
++'_SDL_JoystickName'.'SDL2.dll'.'SDL_JoystickName'
++'_SDL_JoystickGetDeviceGUID'.'SDL2.dll'.'SDL_JoystickGetDeviceGUID'
++'_SDL_JoystickGetGUID'.'SDL2.dll'.'SDL_JoystickGetGUID'
++'_SDL_JoystickGetGUIDString'.'SDL2.dll'.'SDL_JoystickGetGUIDString'
++'_SDL_JoystickGetGUIDFromString'.'SDL2.dll'.'SDL_JoystickGetGUIDFromString'
++'_SDL_JoystickGetAttached'.'SDL2.dll'.'SDL_JoystickGetAttached'
++'_SDL_JoystickInstanceID'.'SDL2.dll'.'SDL_JoystickInstanceID'
++'_SDL_JoystickNumAxes'.'SDL2.dll'.'SDL_JoystickNumAxes'
++'_SDL_JoystickNumBalls'.'SDL2.dll'.'SDL_JoystickNumBalls'
++'_SDL_JoystickNumHats'.'SDL2.dll'.'SDL_JoystickNumHats'
++'_SDL_JoystickNumButtons'.'SDL2.dll'.'SDL_JoystickNumButtons'
++'_SDL_JoystickUpdate'.'SDL2.dll'.'SDL_JoystickUpdate'
++'_SDL_JoystickEventState'.'SDL2.dll'.'SDL_JoystickEventState'
++'_SDL_JoystickGetAxis'.'SDL2.dll'.'SDL_JoystickGetAxis'
++'_SDL_JoystickGetHat'.'SDL2.dll'.'SDL_JoystickGetHat'
++'_SDL_JoystickGetBall'.'SDL2.dll'.'SDL_JoystickGetBall'
++'_SDL_JoystickGetButton'.'SDL2.dll'.'SDL_JoystickGetButton'
++'_SDL_JoystickClose'.'SDL2.dll'.'SDL_JoystickClose'
++'_SDL_GetKeyboardFocus'.'SDL2.dll'.'SDL_GetKeyboardFocus'
++'_SDL_GetKeyboardState'.'SDL2.dll'.'SDL_GetKeyboardState'
++'_SDL_GetModState'.'SDL2.dll'.'SDL_GetModState'
++'_SDL_SetModState'.'SDL2.dll'.'SDL_SetModState'
++'_SDL_GetKeyFromScancode'.'SDL2.dll'.'SDL_GetKeyFromScancode'
++'_SDL_GetScancodeFromKey'.'SDL2.dll'.'SDL_GetScancodeFromKey'
++'_SDL_GetScancodeName'.'SDL2.dll'.'SDL_GetScancodeName'
++'_SDL_GetScancodeFromName'.'SDL2.dll'.'SDL_GetScancodeFromName'
++'_SDL_GetKeyName'.'SDL2.dll'.'SDL_GetKeyName'
++'_SDL_GetKeyFromName'.'SDL2.dll'.'SDL_GetKeyFromName'
++'_SDL_StartTextInput'.'SDL2.dll'.'SDL_StartTextInput'
++'_SDL_IsTextInputActive'.'SDL2.dll'.'SDL_IsTextInputActive'
++'_SDL_StopTextInput'.'SDL2.dll'.'SDL_StopTextInput'
++'_SDL_SetTextInputRect'.'SDL2.dll'.'SDL_SetTextInputRect'
++'_SDL_HasScreenKeyboardSupport'.'SDL2.dll'.'SDL_HasScreenKeyboardSupport'
++'_SDL_IsScreenKeyboardShown'.'SDL2.dll'.'SDL_IsScreenKeyboardShown'
++'_SDL_LoadObject'.'SDL2.dll'.'SDL_LoadObject'
++'_SDL_LoadFunction'.'SDL2.dll'.'SDL_LoadFunction'
++'_SDL_UnloadObject'.'SDL2.dll'.'SDL_UnloadObject'
++'_SDL_LogSetAllPriority'.'SDL2.dll'.'SDL_LogSetAllPriority'
++'_SDL_LogSetPriority'.'SDL2.dll'.'SDL_LogSetPriority'
++'_SDL_LogGetPriority'.'SDL2.dll'.'SDL_LogGetPriority'
++'_SDL_LogResetPriorities'.'SDL2.dll'.'SDL_LogResetPriorities'
++'_SDL_LogMessageV'.'SDL2.dll'.'SDL_LogMessageV'
++'_SDL_LogGetOutputFunction'.'SDL2.dll'.'SDL_LogGetOutputFunction'
++'_SDL_LogSetOutputFunction'.'SDL2.dll'.'SDL_LogSetOutputFunction'
++'_SDL_SetMainReady'.'SDL2.dll'.'SDL_SetMainReady'
++'_SDL_ShowMessageBox'.'SDL2.dll'.'SDL_ShowMessageBox'
++'_SDL_ShowSimpleMessageBox'.'SDL2.dll'.'SDL_ShowSimpleMessageBox'
++'_SDL_GetMouseFocus'.'SDL2.dll'.'SDL_GetMouseFocus'
++'_SDL_GetMouseState'.'SDL2.dll'.'SDL_GetMouseState'
++'_SDL_GetRelativeMouseState'.'SDL2.dll'.'SDL_GetRelativeMouseState'
++'_SDL_WarpMouseInWindow'.'SDL2.dll'.'SDL_WarpMouseInWindow'
++'_SDL_SetRelativeMouseMode'.'SDL2.dll'.'SDL_SetRelativeMouseMode'
++'_SDL_GetRelativeMouseMode'.'SDL2.dll'.'SDL_GetRelativeMouseMode'
++'_SDL_CreateCursor'.'SDL2.dll'.'SDL_CreateCursor'
++'_SDL_CreateColorCursor'.'SDL2.dll'.'SDL_CreateColorCursor'
++'_SDL_CreateSystemCursor'.'SDL2.dll'.'SDL_CreateSystemCursor'
++'_SDL_SetCursor'.'SDL2.dll'.'SDL_SetCursor'
++'_SDL_GetCursor'.'SDL2.dll'.'SDL_GetCursor'
++'_SDL_GetDefaultCursor'.'SDL2.dll'.'SDL_GetDefaultCursor'
++'_SDL_FreeCursor'.'SDL2.dll'.'SDL_FreeCursor'
++'_SDL_ShowCursor'.'SDL2.dll'.'SDL_ShowCursor'
++'_SDL_CreateMutex'.'SDL2.dll'.'SDL_CreateMutex'
++'_SDL_LockMutex'.'SDL2.dll'.'SDL_LockMutex'
++'_SDL_TryLockMutex'.'SDL2.dll'.'SDL_TryLockMutex'
++'_SDL_UnlockMutex'.'SDL2.dll'.'SDL_UnlockMutex'
++'_SDL_DestroyMutex'.'SDL2.dll'.'SDL_DestroyMutex'
++'_SDL_CreateSemaphore'.'SDL2.dll'.'SDL_CreateSemaphore'
++'_SDL_DestroySemaphore'.'SDL2.dll'.'SDL_DestroySemaphore'
++'_SDL_SemWait'.'SDL2.dll'.'SDL_SemWait'
++'_SDL_SemTryWait'.'SDL2.dll'.'SDL_SemTryWait'
++'_SDL_SemWaitTimeout'.'SDL2.dll'.'SDL_SemWaitTimeout'
++'_SDL_SemPost'.'SDL2.dll'.'SDL_SemPost'
++'_SDL_SemValue'.'SDL2.dll'.'SDL_SemValue'
++'_SDL_CreateCond'.'SDL2.dll'.'SDL_CreateCond'
++'_SDL_DestroyCond'.'SDL2.dll'.'SDL_DestroyCond'
++'_SDL_CondSignal'.'SDL2.dll'.'SDL_CondSignal'
++'_SDL_CondBroadcast'.'SDL2.dll'.'SDL_CondBroadcast'
++'_SDL_CondWait'.'SDL2.dll'.'SDL_CondWait'
++'_SDL_CondWaitTimeout'.'SDL2.dll'.'SDL_CondWaitTimeout'
++'_SDL_GetPixelFormatName'.'SDL2.dll'.'SDL_GetPixelFormatName'
++'_SDL_PixelFormatEnumToMasks'.'SDL2.dll'.'SDL_PixelFormatEnumToMasks'
++'_SDL_MasksToPixelFormatEnum'.'SDL2.dll'.'SDL_MasksToPixelFormatEnum'
++'_SDL_AllocFormat'.'SDL2.dll'.'SDL_AllocFormat'
++'_SDL_FreeFormat'.'SDL2.dll'.'SDL_FreeFormat'
++'_SDL_AllocPalette'.'SDL2.dll'.'SDL_AllocPalette'
++'_SDL_SetPixelFormatPalette'.'SDL2.dll'.'SDL_SetPixelFormatPalette'
++'_SDL_SetPaletteColors'.'SDL2.dll'.'SDL_SetPaletteColors'
++'_SDL_FreePalette'.'SDL2.dll'.'SDL_FreePalette'
++'_SDL_MapRGB'.'SDL2.dll'.'SDL_MapRGB'
++'_SDL_MapRGBA'.'SDL2.dll'.'SDL_MapRGBA'
++'_SDL_GetRGB'.'SDL2.dll'.'SDL_GetRGB'
++'_SDL_GetRGBA'.'SDL2.dll'.'SDL_GetRGBA'
++'_SDL_CalculateGammaRamp'.'SDL2.dll'.'SDL_CalculateGammaRamp'
++'_SDL_GetPlatform'.'SDL2.dll'.'SDL_GetPlatform'
++'_SDL_GetPowerInfo'.'SDL2.dll'.'SDL_GetPowerInfo'
++'_SDL_HasIntersection'.'SDL2.dll'.'SDL_HasIntersection'
++'_SDL_IntersectRect'.'SDL2.dll'.'SDL_IntersectRect'
++'_SDL_UnionRect'.'SDL2.dll'.'SDL_UnionRect'
++'_SDL_EnclosePoints'.'SDL2.dll'.'SDL_EnclosePoints'
++'_SDL_IntersectRectAndLine'.'SDL2.dll'.'SDL_IntersectRectAndLine'
++'_SDL_GetNumRenderDrivers'.'SDL2.dll'.'SDL_GetNumRenderDrivers'
++'_SDL_GetRenderDriverInfo'.'SDL2.dll'.'SDL_GetRenderDriverInfo'
++'_SDL_CreateWindowAndRenderer'.'SDL2.dll'.'SDL_CreateWindowAndRenderer'
++'_SDL_CreateRenderer'.'SDL2.dll'.'SDL_CreateRenderer'
++'_SDL_CreateSoftwareRenderer'.'SDL2.dll'.'SDL_CreateSoftwareRenderer'
++'_SDL_GetRenderer'.'SDL2.dll'.'SDL_GetRenderer'
++'_SDL_GetRendererInfo'.'SDL2.dll'.'SDL_GetRendererInfo'
++'_SDL_GetRendererOutputSize'.'SDL2.dll'.'SDL_GetRendererOutputSize'
++'_SDL_CreateTexture'.'SDL2.dll'.'SDL_CreateTexture'
++'_SDL_CreateTextureFromSurface'.'SDL2.dll'.'SDL_CreateTextureFromSurface'
++'_SDL_QueryTexture'.'SDL2.dll'.'SDL_QueryTexture'
++'_SDL_SetTextureColorMod'.'SDL2.dll'.'SDL_SetTextureColorMod'
++'_SDL_GetTextureColorMod'.'SDL2.dll'.'SDL_GetTextureColorMod'
++'_SDL_SetTextureAlphaMod'.'SDL2.dll'.'SDL_SetTextureAlphaMod'
++'_SDL_GetTextureAlphaMod'.'SDL2.dll'.'SDL_GetTextureAlphaMod'
++'_SDL_SetTextureBlendMode'.'SDL2.dll'.'SDL_SetTextureBlendMode'
++'_SDL_GetTextureBlendMode'.'SDL2.dll'.'SDL_GetTextureBlendMode'
++'_SDL_UpdateTexture'.'SDL2.dll'.'SDL_UpdateTexture'
++'_SDL_UpdateYUVTexture'.'SDL2.dll'.'SDL_UpdateYUVTexture'
++'_SDL_LockTexture'.'SDL2.dll'.'SDL_LockTexture'
++'_SDL_UnlockTexture'.'SDL2.dll'.'SDL_UnlockTexture'
++'_SDL_RenderTargetSupported'.'SDL2.dll'.'SDL_RenderTargetSupported'
++'_SDL_SetRenderTarget'.'SDL2.dll'.'SDL_SetRenderTarget'
++'_SDL_GetRenderTarget'.'SDL2.dll'.'SDL_GetRenderTarget'
++'_SDL_RenderSetLogicalSize'.'SDL2.dll'.'SDL_RenderSetLogicalSize'
++'_SDL_RenderGetLogicalSize'.'SDL2.dll'.'SDL_RenderGetLogicalSize'
++'_SDL_RenderSetViewport'.'SDL2.dll'.'SDL_RenderSetViewport'
++'_SDL_RenderGetViewport'.'SDL2.dll'.'SDL_RenderGetViewport'
++'_SDL_RenderSetClipRect'.'SDL2.dll'.'SDL_RenderSetClipRect'
++'_SDL_RenderGetClipRect'.'SDL2.dll'.'SDL_RenderGetClipRect'
++'_SDL_RenderSetScale'.'SDL2.dll'.'SDL_RenderSetScale'
++'_SDL_RenderGetScale'.'SDL2.dll'.'SDL_RenderGetScale'
++'_SDL_SetRenderDrawColor'.'SDL2.dll'.'SDL_SetRenderDrawColor'
++'_SDL_GetRenderDrawColor'.'SDL2.dll'.'SDL_GetRenderDrawColor'
++'_SDL_SetRenderDrawBlendMode'.'SDL2.dll'.'SDL_SetRenderDrawBlendMode'
++'_SDL_GetRenderDrawBlendMode'.'SDL2.dll'.'SDL_GetRenderDrawBlendMode'
++'_SDL_RenderClear'.'SDL2.dll'.'SDL_RenderClear'
++'_SDL_RenderDrawPoint'.'SDL2.dll'.'SDL_RenderDrawPoint'
++'_SDL_RenderDrawPoints'.'SDL2.dll'.'SDL_RenderDrawPoints'
++'_SDL_RenderDrawLine'.'SDL2.dll'.'SDL_RenderDrawLine'
++'_SDL_RenderDrawLines'.'SDL2.dll'.'SDL_RenderDrawLines'
++'_SDL_RenderDrawRect'.'SDL2.dll'.'SDL_RenderDrawRect'
++'_SDL_RenderDrawRects'.'SDL2.dll'.'SDL_RenderDrawRects'
++'_SDL_RenderFillRect'.'SDL2.dll'.'SDL_RenderFillRect'
++'_SDL_RenderFillRects'.'SDL2.dll'.'SDL_RenderFillRects'
++'_SDL_RenderCopy'.'SDL2.dll'.'SDL_RenderCopy'
++'_SDL_RenderCopyEx'.'SDL2.dll'.'SDL_RenderCopyEx'
++'_SDL_RenderReadPixels'.'SDL2.dll'.'SDL_RenderReadPixels'
++'_SDL_RenderPresent'.'SDL2.dll'.'SDL_RenderPresent'
++'_SDL_DestroyTexture'.'SDL2.dll'.'SDL_DestroyTexture'
++'_SDL_DestroyRenderer'.'SDL2.dll'.'SDL_DestroyRenderer'
++'_SDL_GL_BindTexture'.'SDL2.dll'.'SDL_GL_BindTexture'
++'_SDL_GL_UnbindTexture'.'SDL2.dll'.'SDL_GL_UnbindTexture'
++'_SDL_RWFromFile'.'SDL2.dll'.'SDL_RWFromFile'
++'_SDL_RWFromMem'.'SDL2.dll'.'SDL_RWFromMem'
++'_SDL_RWFromConstMem'.'SDL2.dll'.'SDL_RWFromConstMem'
++'_SDL_AllocRW'.'SDL2.dll'.'SDL_AllocRW'
++'_SDL_FreeRW'.'SDL2.dll'.'SDL_FreeRW'
++'_SDL_ReadU8'.'SDL2.dll'.'SDL_ReadU8'
++'_SDL_ReadLE16'.'SDL2.dll'.'SDL_ReadLE16'
++'_SDL_ReadBE16'.'SDL2.dll'.'SDL_ReadBE16'
++'_SDL_ReadLE32'.'SDL2.dll'.'SDL_ReadLE32'
++'_SDL_ReadBE32'.'SDL2.dll'.'SDL_ReadBE32'
++'_SDL_ReadLE64'.'SDL2.dll'.'SDL_ReadLE64'
++'_SDL_ReadBE64'.'SDL2.dll'.'SDL_ReadBE64'
++'_SDL_WriteU8'.'SDL2.dll'.'SDL_WriteU8'
++'_SDL_WriteLE16'.'SDL2.dll'.'SDL_WriteLE16'
++'_SDL_WriteBE16'.'SDL2.dll'.'SDL_WriteBE16'
++'_SDL_WriteLE32'.'SDL2.dll'.'SDL_WriteLE32'
++'_SDL_WriteBE32'.'SDL2.dll'.'SDL_WriteBE32'
++'_SDL_WriteLE64'.'SDL2.dll'.'SDL_WriteLE64'
++'_SDL_WriteBE64'.'SDL2.dll'.'SDL_WriteBE64'
++'_SDL_CreateShapedWindow'.'SDL2.dll'.'SDL_CreateShapedWindow'
++'_SDL_IsShapedWindow'.'SDL2.dll'.'SDL_IsShapedWindow'
++'_SDL_SetWindowShape'.'SDL2.dll'.'SDL_SetWindowShape'
++'_SDL_GetShapedWindowMode'.'SDL2.dll'.'SDL_GetShapedWindowMode'
++'_SDL_malloc'.'SDL2.dll'.'SDL_malloc'
++'_SDL_calloc'.'SDL2.dll'.'SDL_calloc'
++'_SDL_realloc'.'SDL2.dll'.'SDL_realloc'
++'_SDL_free'.'SDL2.dll'.'SDL_free'
++'_SDL_getenv'.'SDL2.dll'.'SDL_getenv'
++'_SDL_setenv'.'SDL2.dll'.'SDL_setenv'
++'_SDL_qsort'.'SDL2.dll'.'SDL_qsort'
++'_SDL_abs'.'SDL2.dll'.'SDL_abs'
++'_SDL_isdigit'.'SDL2.dll'.'SDL_isdigit'
++'_SDL_isspace'.'SDL2.dll'.'SDL_isspace'
++'_SDL_toupper'.'SDL2.dll'.'SDL_toupper'
++'_SDL_tolower'.'SDL2.dll'.'SDL_tolower'
++'_SDL_memset'.'SDL2.dll'.'SDL_memset'
++'_SDL_memcpy'.'SDL2.dll'.'SDL_memcpy'
++'_SDL_memmove'.'SDL2.dll'.'SDL_memmove'
++'_SDL_memcmp'.'SDL2.dll'.'SDL_memcmp'
++'_SDL_wcslen'.'SDL2.dll'.'SDL_wcslen'
++'_SDL_wcslcpy'.'SDL2.dll'.'SDL_wcslcpy'
++'_SDL_wcslcat'.'SDL2.dll'.'SDL_wcslcat'
++'_SDL_strlen'.'SDL2.dll'.'SDL_strlen'
++'_SDL_strlcpy'.'SDL2.dll'.'SDL_strlcpy'
++'_SDL_utf8strlcpy'.'SDL2.dll'.'SDL_utf8strlcpy'
++'_SDL_strlcat'.'SDL2.dll'.'SDL_strlcat'
++'_SDL_strdup'.'SDL2.dll'.'SDL_strdup'
++'_SDL_strrev'.'SDL2.dll'.'SDL_strrev'
++'_SDL_strupr'.'SDL2.dll'.'SDL_strupr'
++'_SDL_strlwr'.'SDL2.dll'.'SDL_strlwr'
++'_SDL_strchr'.'SDL2.dll'.'SDL_strchr'
++'_SDL_strrchr'.'SDL2.dll'.'SDL_strrchr'
++'_SDL_strstr'.'SDL2.dll'.'SDL_strstr'
++'_SDL_itoa'.'SDL2.dll'.'SDL_itoa'
++'_SDL_uitoa'.'SDL2.dll'.'SDL_uitoa'
++'_SDL_ltoa'.'SDL2.dll'.'SDL_ltoa'
++'_SDL_ultoa'.'SDL2.dll'.'SDL_ultoa'
++'_SDL_lltoa'.'SDL2.dll'.'SDL_lltoa'
++'_SDL_ulltoa'.'SDL2.dll'.'SDL_ulltoa'
++'_SDL_atoi'.'SDL2.dll'.'SDL_atoi'
++'_SDL_atof'.'SDL2.dll'.'SDL_atof'
++'_SDL_strtol'.'SDL2.dll'.'SDL_strtol'
++'_SDL_strtoul'.'SDL2.dll'.'SDL_strtoul'
++'_SDL_strtoll'.'SDL2.dll'.'SDL_strtoll'
++'_SDL_strtoull'.'SDL2.dll'.'SDL_strtoull'
++'_SDL_strtod'.'SDL2.dll'.'SDL_strtod'
++'_SDL_strcmp'.'SDL2.dll'.'SDL_strcmp'
++'_SDL_strncmp'.'SDL2.dll'.'SDL_strncmp'
++'_SDL_strcasecmp'.'SDL2.dll'.'SDL_strcasecmp'
++'_SDL_strncasecmp'.'SDL2.dll'.'SDL_strncasecmp'
++'_SDL_vsnprintf'.'SDL2.dll'.'SDL_vsnprintf'
++'_SDL_acos'.'SDL2.dll'.'SDL_acos'
++'_SDL_asin'.'SDL2.dll'.'SDL_asin'
++'_SDL_atan'.'SDL2.dll'.'SDL_atan'
++'_SDL_atan2'.'SDL2.dll'.'SDL_atan2'
++'_SDL_ceil'.'SDL2.dll'.'SDL_ceil'
++'_SDL_copysign'.'SDL2.dll'.'SDL_copysign'
++'_SDL_cos'.'SDL2.dll'.'SDL_cos'
++'_SDL_cosf'.'SDL2.dll'.'SDL_cosf'
++'_SDL_fabs'.'SDL2.dll'.'SDL_fabs'
++'_SDL_floor'.'SDL2.dll'.'SDL_floor'
++'_SDL_log'.'SDL2.dll'.'SDL_log'
++'_SDL_pow'.'SDL2.dll'.'SDL_pow'
++'_SDL_scalbn'.'SDL2.dll'.'SDL_scalbn'
++'_SDL_sin'.'SDL2.dll'.'SDL_sin'
++'_SDL_sinf'.'SDL2.dll'.'SDL_sinf'
++'_SDL_sqrt'.'SDL2.dll'.'SDL_sqrt'
++'_SDL_iconv_open'.'SDL2.dll'.'SDL_iconv_open'
++'_SDL_iconv_close'.'SDL2.dll'.'SDL_iconv_close'
++'_SDL_iconv'.'SDL2.dll'.'SDL_iconv'
++'_SDL_iconv_string'.'SDL2.dll'.'SDL_iconv_string'
++'_SDL_CreateRGBSurface'.'SDL2.dll'.'SDL_CreateRGBSurface'
++'_SDL_CreateRGBSurfaceFrom'.'SDL2.dll'.'SDL_CreateRGBSurfaceFrom'
++'_SDL_FreeSurface'.'SDL2.dll'.'SDL_FreeSurface'
++'_SDL_SetSurfacePalette'.'SDL2.dll'.'SDL_SetSurfacePalette'
++'_SDL_LockSurface'.'SDL2.dll'.'SDL_LockSurface'
++'_SDL_UnlockSurface'.'SDL2.dll'.'SDL_UnlockSurface'
++'_SDL_LoadBMP_RW'.'SDL2.dll'.'SDL_LoadBMP_RW'
++'_SDL_SaveBMP_RW'.'SDL2.dll'.'SDL_SaveBMP_RW'
++'_SDL_SetSurfaceRLE'.'SDL2.dll'.'SDL_SetSurfaceRLE'
++'_SDL_SetColorKey'.'SDL2.dll'.'SDL_SetColorKey'
++'_SDL_GetColorKey'.'SDL2.dll'.'SDL_GetColorKey'
++'_SDL_SetSurfaceColorMod'.'SDL2.dll'.'SDL_SetSurfaceColorMod'
++'_SDL_GetSurfaceColorMod'.'SDL2.dll'.'SDL_GetSurfaceColorMod'
++'_SDL_SetSurfaceAlphaMod'.'SDL2.dll'.'SDL_SetSurfaceAlphaMod'
++'_SDL_GetSurfaceAlphaMod'.'SDL2.dll'.'SDL_GetSurfaceAlphaMod'
++'_SDL_SetSurfaceBlendMode'.'SDL2.dll'.'SDL_SetSurfaceBlendMode'
++'_SDL_GetSurfaceBlendMode'.'SDL2.dll'.'SDL_GetSurfaceBlendMode'
++'_SDL_SetClipRect'.'SDL2.dll'.'SDL_SetClipRect'
++'_SDL_GetClipRect'.'SDL2.dll'.'SDL_GetClipRect'
++'_SDL_ConvertSurface'.'SDL2.dll'.'SDL_ConvertSurface'
++'_SDL_ConvertSurfaceFormat'.'SDL2.dll'.'SDL_ConvertSurfaceFormat'
++'_SDL_ConvertPixels'.'SDL2.dll'.'SDL_ConvertPixels'
++'_SDL_FillRect'.'SDL2.dll'.'SDL_FillRect'
++'_SDL_FillRects'.'SDL2.dll'.'SDL_FillRects'
++'_SDL_UpperBlit'.'SDL2.dll'.'SDL_UpperBlit'
++'_SDL_LowerBlit'.'SDL2.dll'.'SDL_LowerBlit'
++'_SDL_SoftStretch'.'SDL2.dll'.'SDL_SoftStretch'
++'_SDL_UpperBlitScaled'.'SDL2.dll'.'SDL_UpperBlitScaled'
++'_SDL_LowerBlitScaled'.'SDL2.dll'.'SDL_LowerBlitScaled'
++'_SDL_GetWindowWMInfo'.'SDL2.dll'.'SDL_GetWindowWMInfo'
++'_SDL_GetThreadName'.'SDL2.dll'.'SDL_GetThreadName'
++'_SDL_ThreadID'.'SDL2.dll'.'SDL_ThreadID'
++'_SDL_GetThreadID'.'SDL2.dll'.'SDL_GetThreadID'
++'_SDL_SetThreadPriority'.'SDL2.dll'.'SDL_SetThreadPriority'
++'_SDL_WaitThread'.'SDL2.dll'.'SDL_WaitThread'
++'_SDL_DetachThread'.'SDL2.dll'.'SDL_DetachThread'
++'_SDL_TLSCreate'.'SDL2.dll'.'SDL_TLSCreate'
++'_SDL_TLSGet'.'SDL2.dll'.'SDL_TLSGet'
++'_SDL_TLSSet'.'SDL2.dll'.'SDL_TLSSet'
++'_SDL_GetTicks'.'SDL2.dll'.'SDL_GetTicks'
++'_SDL_GetPerformanceCounter'.'SDL2.dll'.'SDL_GetPerformanceCounter'
++'_SDL_GetPerformanceFrequency'.'SDL2.dll'.'SDL_GetPerformanceFrequency'
++'_SDL_Delay'.'SDL2.dll'.'SDL_Delay'
++'_SDL_AddTimer'.'SDL2.dll'.'SDL_AddTimer'
++'_SDL_RemoveTimer'.'SDL2.dll'.'SDL_RemoveTimer'
++'_SDL_GetNumTouchDevices'.'SDL2.dll'.'SDL_GetNumTouchDevices'
++'_SDL_GetTouchDevice'.'SDL2.dll'.'SDL_GetTouchDevice'
++'_SDL_GetNumTouchFingers'.'SDL2.dll'.'SDL_GetNumTouchFingers'
++'_SDL_GetTouchFinger'.'SDL2.dll'.'SDL_GetTouchFinger'
++'_SDL_GetVersion'.'SDL2.dll'.'SDL_GetVersion'
++'_SDL_GetRevision'.'SDL2.dll'.'SDL_GetRevision'
++'_SDL_GetRevisionNumber'.'SDL2.dll'.'SDL_GetRevisionNumber'
++'_SDL_GetNumVideoDrivers'.'SDL2.dll'.'SDL_GetNumVideoDrivers'
++'_SDL_GetVideoDriver'.'SDL2.dll'.'SDL_GetVideoDriver'
++'_SDL_VideoInit'.'SDL2.dll'.'SDL_VideoInit'
++'_SDL_VideoQuit'.'SDL2.dll'.'SDL_VideoQuit'
++'_SDL_GetCurrentVideoDriver'.'SDL2.dll'.'SDL_GetCurrentVideoDriver'
++'_SDL_GetNumVideoDisplays'.'SDL2.dll'.'SDL_GetNumVideoDisplays'
++'_SDL_GetDisplayName'.'SDL2.dll'.'SDL_GetDisplayName'
++'_SDL_GetDisplayBounds'.'SDL2.dll'.'SDL_GetDisplayBounds'
++'_SDL_GetDisplayDPI'.'SDL2.dll'.'SDL_GetDisplayDPI'
++'_SDL_GetNumDisplayModes'.'SDL2.dll'.'SDL_GetNumDisplayModes'
++'_SDL_GetDisplayMode'.'SDL2.dll'.'SDL_GetDisplayMode'
++'_SDL_GetDesktopDisplayMode'.'SDL2.dll'.'SDL_GetDesktopDisplayMode'
++'_SDL_GetCurrentDisplayMode'.'SDL2.dll'.'SDL_GetCurrentDisplayMode'
++'_SDL_GetClosestDisplayMode'.'SDL2.dll'.'SDL_GetClosestDisplayMode'
++'_SDL_GetWindowDisplayIndex'.'SDL2.dll'.'SDL_GetWindowDisplayIndex'
++'_SDL_SetWindowDisplayMode'.'SDL2.dll'.'SDL_SetWindowDisplayMode'
++'_SDL_GetWindowDisplayMode'.'SDL2.dll'.'SDL_GetWindowDisplayMode'
++'_SDL_GetWindowPixelFormat'.'SDL2.dll'.'SDL_GetWindowPixelFormat'
++'_SDL_CreateWindow'.'SDL2.dll'.'SDL_CreateWindow'
++'_SDL_CreateWindowFrom'.'SDL2.dll'.'SDL_CreateWindowFrom'
++'_SDL_GetWindowID'.'SDL2.dll'.'SDL_GetWindowID'
++'_SDL_GetWindowFromID'.'SDL2.dll'.'SDL_GetWindowFromID'
++'_SDL_GetWindowFlags'.'SDL2.dll'.'SDL_GetWindowFlags'
++'_SDL_SetWindowTitle'.'SDL2.dll'.'SDL_SetWindowTitle'
++'_SDL_GetWindowTitle'.'SDL2.dll'.'SDL_GetWindowTitle'
++'_SDL_SetWindowIcon'.'SDL2.dll'.'SDL_SetWindowIcon'
++'_SDL_SetWindowData'.'SDL2.dll'.'SDL_SetWindowData'
++'_SDL_GetWindowData'.'SDL2.dll'.'SDL_GetWindowData'
++'_SDL_SetWindowPosition'.'SDL2.dll'.'SDL_SetWindowPosition'
++'_SDL_GetWindowPosition'.'SDL2.dll'.'SDL_GetWindowPosition'
++'_SDL_SetWindowSize'.'SDL2.dll'.'SDL_SetWindowSize'
++'_SDL_GetWindowSize'.'SDL2.dll'.'SDL_GetWindowSize'
++'_SDL_SetWindowMinimumSize'.'SDL2.dll'.'SDL_SetWindowMinimumSize'
++'_SDL_GetWindowMinimumSize'.'SDL2.dll'.'SDL_GetWindowMinimumSize'
++'_SDL_SetWindowMaximumSize'.'SDL2.dll'.'SDL_SetWindowMaximumSize'
++'_SDL_GetWindowMaximumSize'.'SDL2.dll'.'SDL_GetWindowMaximumSize'
++'_SDL_SetWindowBordered'.'SDL2.dll'.'SDL_SetWindowBordered'
++'_SDL_ShowWindow'.'SDL2.dll'.'SDL_ShowWindow'
++'_SDL_HideWindow'.'SDL2.dll'.'SDL_HideWindow'
++'_SDL_RaiseWindow'.'SDL2.dll'.'SDL_RaiseWindow'
++'_SDL_MaximizeWindow'.'SDL2.dll'.'SDL_MaximizeWindow'
++'_SDL_MinimizeWindow'.'SDL2.dll'.'SDL_MinimizeWindow'
++'_SDL_RestoreWindow'.'SDL2.dll'.'SDL_RestoreWindow'
++'_SDL_SetWindowFullscreen'.'SDL2.dll'.'SDL_SetWindowFullscreen'
++'_SDL_GetWindowSurface'.'SDL2.dll'.'SDL_GetWindowSurface'
++'_SDL_UpdateWindowSurface'.'SDL2.dll'.'SDL_UpdateWindowSurface'
++'_SDL_UpdateWindowSurfaceRects'.'SDL2.dll'.'SDL_UpdateWindowSurfaceRects'
++'_SDL_SetWindowGrab'.'SDL2.dll'.'SDL_SetWindowGrab'
++'_SDL_GetWindowGrab'.'SDL2.dll'.'SDL_GetWindowGrab'
++'_SDL_SetWindowBrightness'.'SDL2.dll'.'SDL_SetWindowBrightness'
++'_SDL_GetWindowBrightness'.'SDL2.dll'.'SDL_GetWindowBrightness'
++'_SDL_SetWindowGammaRamp'.'SDL2.dll'.'SDL_SetWindowGammaRamp'
++'_SDL_GetWindowGammaRamp'.'SDL2.dll'.'SDL_GetWindowGammaRamp'
++'_SDL_DestroyWindow'.'SDL2.dll'.'SDL_DestroyWindow'
++'_SDL_IsScreenSaverEnabled'.'SDL2.dll'.'SDL_IsScreenSaverEnabled'
++'_SDL_EnableScreenSaver'.'SDL2.dll'.'SDL_EnableScreenSaver'
++'_SDL_DisableScreenSaver'.'SDL2.dll'.'SDL_DisableScreenSaver'
++'_SDL_GL_LoadLibrary'.'SDL2.dll'.'SDL_GL_LoadLibrary'
++'_SDL_GL_GetProcAddress'.'SDL2.dll'.'SDL_GL_GetProcAddress'
++'_SDL_GL_UnloadLibrary'.'SDL2.dll'.'SDL_GL_UnloadLibrary'
++'_SDL_GL_ExtensionSupported'.'SDL2.dll'.'SDL_GL_ExtensionSupported'
++'_SDL_GL_SetAttribute'.'SDL2.dll'.'SDL_GL_SetAttribute'
++'_SDL_GL_GetAttribute'.'SDL2.dll'.'SDL_GL_GetAttribute'
++'_SDL_GL_CreateContext'.'SDL2.dll'.'SDL_GL_CreateContext'
++'_SDL_GL_MakeCurrent'.'SDL2.dll'.'SDL_GL_MakeCurrent'
++'_SDL_GL_GetCurrentWindow'.'SDL2.dll'.'SDL_GL_GetCurrentWindow'
++'_SDL_GL_GetCurrentContext'.'SDL2.dll'.'SDL_GL_GetCurrentContext'
++'_SDL_GL_GetDrawableSize'.'SDL2.dll'.'SDL_GL_GetDrawableSize'
++'_SDL_GL_SetSwapInterval'.'SDL2.dll'.'SDL_GL_SetSwapInterval'
++'_SDL_GL_GetSwapInterval'.'SDL2.dll'.'SDL_GL_GetSwapInterval'
++'_SDL_GL_SwapWindow'.'SDL2.dll'.'SDL_GL_SwapWindow'
++'_SDL_GL_DeleteContext'.'SDL2.dll'.'SDL_GL_DeleteContext'
++'_SDL_vsscanf'.'SDL2.dll'.'SDL_vsscanf'
++'_SDL_GameControllerAddMappingsFromRW'.'SDL2.dll'.'SDL_GameControllerAddMappingsFromRW'
++'_SDL_GL_ResetAttributes'.'SDL2.dll'.'SDL_GL_ResetAttributes'
++'_SDL_HasAVX'.'SDL2.dll'.'SDL_HasAVX'
++'_SDL_GetDefaultAssertionHandler'.'SDL2.dll'.'SDL_GetDefaultAssertionHandler'
++'_SDL_GetAssertionHandler'.'SDL2.dll'.'SDL_GetAssertionHandler'
++'_SDL_DXGIGetOutputInfo'.'SDL2.dll'.'SDL_DXGIGetOutputInfo'
++'_SDL_RenderIsClipEnabled'.'SDL2.dll'.'SDL_RenderIsClipEnabled'
# ++'_SDL_WinRTRunApp'.'SDL2.dll'.'SDL_WinRTRunApp'
++'_SDL_WarpMouseGlobal'.'SDL2.dll'.'SDL_WarpMouseGlobal'
# ++'_SDL_WinRTGetFSPathUNICODE'.'SDL2.dll'.'SDL_WinRTGetFSPathUNICODE'
# ++'_SDL_WinRTGetFSPathUTF8'.'SDL2.dll'.'SDL_WinRTGetFSPathUTF8'
++'_SDL_sqrtf'.'SDL2.dll'.'SDL_sqrtf'
++'_SDL_tan'.'SDL2.dll'.'SDL_tan'
++'_SDL_tanf'.'SDL2.dll'.'SDL_tanf'
++'_SDL_CaptureMouse'.'SDL2.dll'.'SDL_CaptureMouse'
++'_SDL_SetWindowHitTest'.'SDL2.dll'.'SDL_SetWindowHitTest'
++'_SDL_GetGlobalMouseState'.'SDL2.dll'.'SDL_GetGlobalMouseState'
++'_SDL_HasAVX2'.'SDL2.dll'.'SDL_HasAVX2'
++'_SDL_QueueAudio'.'SDL2.dll'.'SDL_QueueAudio'
++'_SDL_GetQueuedAudioSize'.'SDL2.dll'.'SDL_GetQueuedAudioSize'
++'_SDL_ClearQueuedAudio'.'SDL2.dll'.'SDL_ClearQueuedAudio'
++'_SDL_GetGrabbedWindow'.'SDL2.dll'.'SDL_GetGrabbedWindow'
++'_SDL_SetWindowsMessageHook'.'SDL2.dll'.'SDL_SetWindowsMessageHook'
++'_SDL_JoystickCurrentPowerLevel'.'SDL2.dll'.'SDL_JoystickCurrentPowerLevel'
++'_SDL_GameControllerFromInstanceID'.'SDL2.dll'.'SDL_GameControllerFromInstanceID'
++'_SDL_JoystickFromInstanceID'.'SDL2.dll'.'SDL_JoystickFromInstanceID'
++'_SDL_GetDisplayUsableBounds'.'SDL2.dll'.'SDL_GetDisplayUsableBounds'
++'_SDL_GetWindowBordersSize'.'SDL2.dll'.'SDL_GetWindowBordersSize'
++'_SDL_SetWindowOpacity'.'SDL2.dll'.'SDL_SetWindowOpacity'
++'_SDL_GetWindowOpacity'.'SDL2.dll'.'SDL_GetWindowOpacity'
++'_SDL_SetWindowInputFocus'.'SDL2.dll'.'SDL_SetWindowInputFocus'
++'_SDL_SetWindowModalFor'.'SDL2.dll'.'SDL_SetWindowModalFor'
++'_SDL_RenderSetIntegerScale'.'SDL2.dll'.'SDL_RenderSetIntegerScale'
++'_SDL_RenderGetIntegerScale'.'SDL2.dll'.'SDL_RenderGetIntegerScale'
++'_SDL_DequeueAudio'.'SDL2.dll'.'SDL_DequeueAudio'
++'_SDL_SetWindowResizable'.'SDL2.dll'.'SDL_SetWindowResizable'
++'_SDL_CreateRGBSurfaceWithFormat'.'SDL2.dll'.'SDL_CreateRGBSurfaceWithFormat'
++'_SDL_CreateRGBSurfaceWithFormatFrom'.'SDL2.dll'.'SDL_CreateRGBSurfaceWithFormatFrom'
++'_SDL_GetHintBoolean'.'SDL2.dll'.'SDL_GetHintBoolean'
++'_SDL_JoystickGetDeviceVendor'.'SDL2.dll'.'SDL_JoystickGetDeviceVendor'
++'_SDL_JoystickGetDeviceProduct'.'SDL2.dll'.'SDL_JoystickGetDeviceProduct'
++'_SDL_JoystickGetDeviceProductVersion'.'SDL2.dll'.'SDL_JoystickGetDeviceProductVersion'
++'_SDL_JoystickGetVendor'.'SDL2.dll'.'SDL_JoystickGetVendor'
++'_SDL_JoystickGetProduct'.'SDL2.dll'.'SDL_JoystickGetProduct'
++'_SDL_JoystickGetProductVersion'.'SDL2.dll'.'SDL_JoystickGetProductVersion'
++'_SDL_GameControllerGetVendor'.'SDL2.dll'.'SDL_GameControllerGetVendor'
++'_SDL_GameControllerGetProduct'.'SDL2.dll'.'SDL_GameControllerGetProduct'
++'_SDL_GameControllerGetProductVersion'.'SDL2.dll'.'SDL_GameControllerGetProductVersion'
++'_SDL_HasNEON'.'SDL2.dll'.'SDL_HasNEON'
++'_SDL_GameControllerNumMappings'.'SDL2.dll'.'SDL_GameControllerNumMappings'
++'_SDL_GameControllerMappingForIndex'.'SDL2.dll'.'SDL_GameControllerMappingForIndex'
++'_SDL_JoystickGetAxisInitialState'.'SDL2.dll'.'SDL_JoystickGetAxisInitialState'
++'_SDL_JoystickGetDeviceType'.'SDL2.dll'.'SDL_JoystickGetDeviceType'
++'_SDL_JoystickGetType'.'SDL2.dll'.'SDL_JoystickGetType'
++'_SDL_MemoryBarrierReleaseFunction'.'SDL2.dll'.'SDL_MemoryBarrierReleaseFunction'
++'_SDL_MemoryBarrierAcquireFunction'.'SDL2.dll'.'SDL_MemoryBarrierAcquireFunction'
++'_SDL_JoystickGetDeviceInstanceID'.'SDL2.dll'.'SDL_JoystickGetDeviceInstanceID'
++'_SDL_utf8strlen'.'SDL2.dll'.'SDL_utf8strlen'
++'_SDL_LoadFile_RW'.'SDL2.dll'.'SDL_LoadFile_RW'
++'_SDL_wcscmp'.'SDL2.dll'.'SDL_wcscmp'
++'_SDL_ComposeCustomBlendMode'.'SDL2.dll'.'SDL_ComposeCustomBlendMode'
++'_SDL_DuplicateSurface'.'SDL2.dll'.'SDL_DuplicateSurface'
++'_SDL_Vulkan_LoadLibrary'.'SDL2.dll'.'SDL_Vulkan_LoadLibrary'
++'_SDL_Vulkan_GetVkGetInstanceProcAddr'.'SDL2.dll'.'SDL_Vulkan_GetVkGetInstanceProcAddr'
++'_SDL_Vulkan_UnloadLibrary'.'SDL2.dll'.'SDL_Vulkan_UnloadLibrary'
++'_SDL_Vulkan_GetInstanceExtensions'.'SDL2.dll'.'SDL_Vulkan_GetInstanceExtensions'
++'_SDL_Vulkan_CreateSurface'.'SDL2.dll'.'SDL_Vulkan_CreateSurface'
++'_SDL_Vulkan_GetDrawableSize'.'SDL2.dll'.'SDL_Vulkan_GetDrawableSize'
++'_SDL_LockJoysticks'.'SDL2.dll'.'SDL_LockJoysticks'
++'_SDL_UnlockJoysticks'.'SDL2.dll'.'SDL_UnlockJoysticks'
++'_SDL_GetMemoryFunctions'.'SDL2.dll'.'SDL_GetMemoryFunctions'
++'_SDL_SetMemoryFunctions'.'SDL2.dll'.'SDL_SetMemoryFunctions'
++'_SDL_GetNumAllocations'.'SDL2.dll'.'SDL_GetNumAllocations'
++'_SDL_NewAudioStream'.'SDL2.dll'.'SDL_NewAudioStream'
++'_SDL_AudioStreamPut'.'SDL2.dll'.'SDL_AudioStreamPut'
++'_SDL_AudioStreamGet'.'SDL2.dll'.'SDL_AudioStreamGet'
++'_SDL_AudioStreamClear'.'SDL2.dll'.'SDL_AudioStreamClear'
++'_SDL_AudioStreamAvailable'.'SDL2.dll'.'SDL_AudioStreamAvailable'
++'_SDL_FreeAudioStream'.'SDL2.dll'.'SDL_FreeAudioStream'
++'_SDL_AudioStreamFlush'.'SDL2.dll'.'SDL_AudioStreamFlush'
++'_SDL_acosf'.'SDL2.dll'.'SDL_acosf'
++'_SDL_asinf'.'SDL2.dll'.'SDL_asinf'
++'_SDL_atanf'.'SDL2.dll'.'SDL_atanf'
++'_SDL_atan2f'.'SDL2.dll'.'SDL_atan2f'
++'_SDL_ceilf'.'SDL2.dll'.'SDL_ceilf'
++'_SDL_copysignf'.'SDL2.dll'.'SDL_copysignf'
++'_SDL_fabsf'.'SDL2.dll'.'SDL_fabsf'
++'_SDL_floorf'.'SDL2.dll'.'SDL_floorf'
++'_SDL_logf'.'SDL2.dll'.'SDL_logf'
++'_SDL_powf'.'SDL2.dll'.'SDL_powf'
++'_SDL_scalbnf'.'SDL2.dll'.'SDL_scalbnf'
++'_SDL_fmod'.'SDL2.dll'.'SDL_fmod'
++'_SDL_fmodf'.'SDL2.dll'.'SDL_fmodf'
++'_SDL_SetYUVConversionMode'.'SDL2.dll'.'SDL_SetYUVConversionMode'
++'_SDL_GetYUVConversionMode'.'SDL2.dll'.'SDL_GetYUVConversionMode'
++'_SDL_GetYUVConversionModeForResolution'.'SDL2.dll'.'SDL_GetYUVConversionModeForResolution'
++'_SDL_RenderGetMetalLayer'.'SDL2.dll'.'SDL_RenderGetMetalLayer'
++'_SDL_RenderGetMetalCommandEncoder'.'SDL2.dll'.'SDL_RenderGetMetalCommandEncoder'
# ++'_SDL_IsAndroidTV'.'SDL2.dll'.'SDL_IsAndroidTV'
# ++'_SDL_WinRTGetDeviceFamily'.'SDL2.dll'.'SDL_WinRTGetDeviceFamily'
++'_SDL_log10'.'SDL2.dll'.'SDL_log10'
++'_SDL_log10f'.'SDL2.dll'.'SDL_log10f'
++'_SDL_GameControllerMappingForDeviceIndex'.'SDL2.dll'.'SDL_GameControllerMappingForDeviceIndex'
# ++'_SDL_LinuxSetThreadPriority'.'SDL2.dll'.'SDL_LinuxSetThreadPriority'
++'_SDL_HasAVX512F'.'SDL2.dll'.'SDL_HasAVX512F'
# ++'_SDL_IsChromebook'.'SDL2.dll'.'SDL_IsChromebook'
# ++'_SDL_IsDeXMode'.'SDL2.dll'.'SDL_IsDeXMode'
# ++'_SDL_AndroidBackButton'.'SDL2.dll'.'SDL_AndroidBackButton'
++'_SDL_exp'.'SDL2.dll'.'SDL_exp'
++'_SDL_expf'.'SDL2.dll'.'SDL_expf'
++'_SDL_wcsdup'.'SDL2.dll'.'SDL_wcsdup'
++'_SDL_GameControllerRumble'.'SDL2.dll'.'SDL_GameControllerRumble'
++'_SDL_JoystickRumble'.'SDL2.dll'.'SDL_JoystickRumble'
++'_SDL_NumSensors'.'SDL2.dll'.'SDL_NumSensors'
++'_SDL_SensorGetDeviceName'.'SDL2.dll'.'SDL_SensorGetDeviceName'
++'_SDL_SensorGetDeviceType'.'SDL2.dll'.'SDL_SensorGetDeviceType'
++'_SDL_SensorGetDeviceNonPortableType'.'SDL2.dll'.'SDL_SensorGetDeviceNonPortableType'
++'_SDL_SensorGetDeviceInstanceID'.'SDL2.dll'.'SDL_SensorGetDeviceInstanceID'
++'_SDL_SensorOpen'.'SDL2.dll'.'SDL_SensorOpen'
++'_SDL_SensorFromInstanceID'.'SDL2.dll'.'SDL_SensorFromInstanceID'
++'_SDL_SensorGetName'.'SDL2.dll'.'SDL_SensorGetName'
++'_SDL_SensorGetType'.'SDL2.dll'.'SDL_SensorGetType'
++'_SDL_SensorGetNonPortableType'.'SDL2.dll'.'SDL_SensorGetNonPortableType'
++'_SDL_SensorGetInstanceID'.'SDL2.dll'.'SDL_SensorGetInstanceID'
++'_SDL_SensorGetData'.'SDL2.dll'.'SDL_SensorGetData'
++'_SDL_SensorClose'.'SDL2.dll'.'SDL_SensorClose'
++'_SDL_SensorUpdate'.'SDL2.dll'.'SDL_SensorUpdate'
++'_SDL_IsTablet'.'SDL2.dll'.'SDL_IsTablet'
++'_SDL_GetDisplayOrientation'.'SDL2.dll'.'SDL_GetDisplayOrientation'
++'_SDL_HasColorKey'.'SDL2.dll'.'SDL_HasColorKey'
++'_SDL_CreateThreadWithStackSize'.'SDL2.dll'.'SDL_CreateThreadWithStackSize'
++'_SDL_JoystickGetDevicePlayerIndex'.'SDL2.dll'.'SDL_JoystickGetDevicePlayerIndex'
++'_SDL_JoystickGetPlayerIndex'.'SDL2.dll'.'SDL_JoystickGetPlayerIndex'
++'_SDL_GameControllerGetPlayerIndex'.'SDL2.dll'.'SDL_GameControllerGetPlayerIndex'
++'_SDL_RenderFlush'.'SDL2.dll'.'SDL_RenderFlush'
++'_SDL_RenderDrawPointF'.'SDL2.dll'.'SDL_RenderDrawPointF'
++'_SDL_RenderDrawPointsF'.'SDL2.dll'.'SDL_RenderDrawPointsF'
++'_SDL_RenderDrawLineF'.'SDL2.dll'.'SDL_RenderDrawLineF'
++'_SDL_RenderDrawLinesF'.'SDL2.dll'.'SDL_RenderDrawLinesF'
++'_SDL_RenderDrawRectF'.'SDL2.dll'.'SDL_RenderDrawRectF'
++'_SDL_RenderDrawRectsF'.'SDL2.dll'.'SDL_RenderDrawRectsF'
++'_SDL_RenderFillRectF'.'SDL2.dll'.'SDL_RenderFillRectF'
++'_SDL_RenderFillRectsF'.'SDL2.dll'.'SDL_RenderFillRectsF'
++'_SDL_RenderCopyF'.'SDL2.dll'.'SDL_RenderCopyF'
++'_SDL_RenderCopyExF'.'SDL2.dll'.'SDL_RenderCopyExF'
++'_SDL_GetTouchDeviceType'.'SDL2.dll'.'SDL_GetTouchDeviceType'
# ++'_SDL_UIKitRunApp'.'SDL2.dll'.'SDL_UIKitRunApp'
++'_SDL_SIMDGetAlignment'.'SDL2.dll'.'SDL_SIMDGetAlignment'
++'_SDL_SIMDAlloc'.'SDL2.dll'.'SDL_SIMDAlloc'
++'_SDL_SIMDFree'.'SDL2.dll'.'SDL_SIMDFree'
++'_SDL_RWsize'.'SDL2.dll'.'SDL_RWsize'
++'_SDL_RWseek'.'SDL2.dll'.'SDL_RWseek'
++'_SDL_RWtell'.'SDL2.dll'.'SDL_RWtell'
++'_SDL_RWread'.'SDL2.dll'.'SDL_RWread'
++'_SDL_RWwrite'.'SDL2.dll'.'SDL_RWwrite'
++'_SDL_RWclose'.'SDL2.dll'.'SDL_RWclose'
++'_SDL_LoadFile'.'SDL2.dll'.'SDL_LoadFile'
++'_SDL_Metal_CreateView'.'SDL2.dll'.'SDL_Metal_CreateView'
++'_SDL_Metal_DestroyView'.'SDL2.dll'.'SDL_Metal_DestroyView'
++'_SDL_LockTextureToSurface'.'SDL2.dll'.'SDL_LockTextureToSurface'
++'_SDL_HasARMSIMD'.'SDL2.dll'.'SDL_HasARMSIMD'
++'_SDL_strtokr'.'SDL2.dll'.'SDL_strtokr'
++'_SDL_wcsstr'.'SDL2.dll'.'SDL_wcsstr'
++'_SDL_wcsncmp'.'SDL2.dll'.'SDL_wcsncmp'
++'_SDL_GameControllerTypeForIndex'.'SDL2.dll'.'SDL_GameControllerTypeForIndex'
++'_SDL_GameControllerGetType'.'SDL2.dll'.'SDL_GameControllerGetType'
++'_SDL_GameControllerFromPlayerIndex'.'SDL2.dll'.'SDL_GameControllerFromPlayerIndex'
++'_SDL_GameControllerSetPlayerIndex'.'SDL2.dll'.'SDL_GameControllerSetPlayerIndex'
++'_SDL_JoystickFromPlayerIndex'.'SDL2.dll'.'SDL_JoystickFromPlayerIndex'
++'_SDL_JoystickSetPlayerIndex'.'SDL2.dll'.'SDL_JoystickSetPlayerIndex'
++'_SDL_SetTextureScaleMode'.'SDL2.dll'.'SDL_SetTextureScaleMode'
++'_SDL_GetTextureScaleMode'.'SDL2.dll'.'SDL_GetTextureScaleMode'
++'_SDL_OnApplicationWillTerminate'.'SDL2.dll'.'SDL_OnApplicationWillTerminate'
++'_SDL_OnApplicationDidReceiveMemoryWarning'.'SDL2.dll'.'SDL_OnApplicationDidReceiveMemoryWarning'
++'_SDL_OnApplicationWillResignActive'.'SDL2.dll'.'SDL_OnApplicationWillResignActive'
++'_SDL_OnApplicationDidEnterBackground'.'SDL2.dll'.'SDL_OnApplicationDidEnterBackground'
++'_SDL_OnApplicationWillEnterForeground'.'SDL2.dll'.'SDL_OnApplicationWillEnterForeground'
++'_SDL_OnApplicationDidBecomeActive'.'SDL2.dll'.'SDL_OnApplicationDidBecomeActive'
# ++'_SDL_OnApplicationDidChangeStatusBarOrientation'.'SDL2.dll'.'SDL_OnApplicationDidChangeStatusBarOrientation'
# ++'_SDL_GetAndroidSDKVersion'.'SDL2.dll'.'SDL_GetAndroidSDKVersion'
++'_SDL_isupper'.'SDL2.dll'.'SDL_isupper'
++'_SDL_islower'.'SDL2.dll'.'SDL_islower'
++'_SDL_JoystickAttachVirtual'.'SDL2.dll'.'SDL_JoystickAttachVirtual'
++'_SDL_JoystickDetachVirtual'.'SDL2.dll'.'SDL_JoystickDetachVirtual'
++'_SDL_JoystickIsVirtual'.'SDL2.dll'.'SDL_JoystickIsVirtual'
++'_SDL_JoystickSetVirtualAxis'.'SDL2.dll'.'SDL_JoystickSetVirtualAxis'
++'_SDL_JoystickSetVirtualButton'.'SDL2.dll'.'SDL_JoystickSetVirtualButton'
++'_SDL_JoystickSetVirtualHat'.'SDL2.dll'.'SDL_JoystickSetVirtualHat'
++'_SDL_GetErrorMsg'.'SDL2.dll'.'SDL_GetErrorMsg'
++'_SDL_LockSensors'.'SDL2.dll'.'SDL_LockSensors'
++'_SDL_UnlockSensors'.'SDL2.dll'.'SDL_UnlockSensors'
++'_SDL_Metal_GetLayer'.'SDL2.dll'.'SDL_Metal_GetLayer'
++'_SDL_Metal_GetDrawableSize'.'SDL2.dll'.'SDL_Metal_GetDrawableSize'
++'_SDL_trunc'.'SDL2.dll'.'SDL_trunc'
++'_SDL_truncf'.'SDL2.dll'.'SDL_truncf'
++'_SDL_GetPreferredLocales'.'SDL2.dll'.'SDL_GetPreferredLocales'
++'_SDL_SIMDRealloc'.'SDL2.dll'.'SDL_SIMDRealloc'
# ++'_SDL_AndroidRequestPermission'.'SDL2.dll'.'SDL_AndroidRequestPermission'
++'_SDL_OpenURL'.'SDL2.dll'.'SDL_OpenURL'
++'_SDL_HasSurfaceRLE'.'SDL2.dll'.'SDL_HasSurfaceRLE'
++'_SDL_GameControllerHasLED'.'SDL2.dll'.'SDL_GameControllerHasLED'
++'_SDL_GameControllerSetLED'.'SDL2.dll'.'SDL_GameControllerSetLED'
++'_SDL_JoystickHasLED'.'SDL2.dll'.'SDL_JoystickHasLED'
++'_SDL_JoystickSetLED'.'SDL2.dll'.'SDL_JoystickSetLED'
++'_SDL_GameControllerRumbleTriggers'.'SDL2.dll'.'SDL_GameControllerRumbleTriggers'
++'_SDL_JoystickRumbleTriggers'.'SDL2.dll'.'SDL_JoystickRumbleTriggers'
++'_SDL_GameControllerHasAxis'.'SDL2.dll'.'SDL_GameControllerHasAxis'
++'_SDL_GameControllerHasButton'.'SDL2.dll'.'SDL_GameControllerHasButton'
++'_SDL_GameControllerGetNumTouchpads'.'SDL2.dll'.'SDL_GameControllerGetNumTouchpads'
++'_SDL_GameControllerGetNumTouchpadFingers'.'SDL2.dll'.'SDL_GameControllerGetNumTouchpadFingers'
++'_SDL_GameControllerGetTouchpadFinger'.'SDL2.dll'.'SDL_GameControllerGetTouchpadFinger'
++'_SDL_crc32'.'SDL2.dll'.'SDL_crc32'
++'_SDL_GameControllerGetSerial'.'SDL2.dll'.'SDL_GameControllerGetSerial'
++'_SDL_JoystickGetSerial'.'SDL2.dll'.'SDL_JoystickGetSerial'
++'_SDL_GameControllerHasSensor'.'SDL2.dll'.'SDL_GameControllerHasSensor'
++'_SDL_GameControllerSetSensorEnabled'.'SDL2.dll'.'SDL_GameControllerSetSensorEnabled'
++'_SDL_GameControllerIsSensorEnabled'.'SDL2.dll'.'SDL_GameControllerIsSensorEnabled'
++'_SDL_GameControllerGetSensorData'.'SDL2.dll'.'SDL_GameControllerGetSensorData'
++'_SDL_wcscasecmp'.'SDL2.dll'.'SDL_wcscasecmp'
++'_SDL_wcsncasecmp'.'SDL2.dll'.'SDL_wcsncasecmp'
++'_SDL_round'.'SDL2.dll'.'SDL_round'
++'_SDL_roundf'.'SDL2.dll'.'SDL_roundf'
++'_SDL_lround'.'SDL2.dll'.'SDL_lround'
++'_SDL_lroundf'.'SDL2.dll'.'SDL_lroundf'
++'_SDL_SoftStretchLinear'.'SDL2.dll'.'SDL_SoftStretchLinear'
++'_SDL_RenderGetD3D11Device'.'SDL2.dll'.'SDL_RenderGetD3D11Device'
++'_SDL_UpdateNVTexture'.'SDL2.dll'.'SDL_UpdateNVTexture'
++'_SDL_SetWindowKeyboardGrab'.'SDL2.dll'.'SDL_SetWindowKeyboardGrab'
++'_SDL_SetWindowMouseGrab'.'SDL2.dll'.'SDL_SetWindowMouseGrab'
++'_SDL_GetWindowKeyboardGrab'.'SDL2.dll'.'SDL_GetWindowKeyboardGrab'
++'_SDL_GetWindowMouseGrab'.'SDL2.dll'.'SDL_GetWindowMouseGrab'
++'_SDL_isalpha'.'SDL2.dll'.'SDL_isalpha'
++'_SDL_isalnum'.'SDL2.dll'.'SDL_isalnum'
++'_SDL_isblank'.'SDL2.dll'.'SDL_isblank'
++'_SDL_iscntrl'.'SDL2.dll'.'SDL_iscntrl'
++'_SDL_isxdigit'.'SDL2.dll'.'SDL_isxdigit'
++'_SDL_ispunct'.'SDL2.dll'.'SDL_ispunct'
++'_SDL_isprint'.'SDL2.dll'.'SDL_isprint'
++'_SDL_isgraph'.'SDL2.dll'.'SDL_isgraph'
# ++'_SDL_AndroidShowToast'.'SDL2.dll'.'SDL_AndroidShowToast'
++'_SDL_GetAudioDeviceSpec'.'SDL2.dll'.'SDL_GetAudioDeviceSpec'
++'_SDL_TLSCleanup'.'SDL2.dll'.'SDL_TLSCleanup'
++'_SDL_SetWindowAlwaysOnTop'.'SDL2.dll'.'SDL_SetWindowAlwaysOnTop'
++'_SDL_FlashWindow'.'SDL2.dll'.'SDL_FlashWindow'
++'_SDL_GameControllerSendEffect'.'SDL2.dll'.'SDL_GameControllerSendEffect'
++'_SDL_JoystickSendEffect'.'SDL2.dll'.'SDL_JoystickSendEffect'
++'_SDL_GameControllerGetSensorDataRate'.'SDL2.dll'.'SDL_GameControllerGetSensorDataRate'
++'_SDL_SetTextureUserData'.'SDL2.dll'.'SDL_SetTextureUserData'
++'_SDL_GetTextureUserData'.'SDL2.dll'.'SDL_GetTextureUserData'
++'_SDL_RenderGeometry'.'SDL2.dll'.'SDL_RenderGeometry'
++'_SDL_RenderGeometryRaw'.'SDL2.dll'.'SDL_RenderGeometryRaw'
++'_SDL_RenderSetVSync'.'SDL2.dll'.'SDL_RenderSetVSync'
++'_SDL_asprintf'.'SDL2.dll'.'SDL_asprintf'
++'_SDL_vasprintf'.'SDL2.dll'.'SDL_vasprintf'
++'_SDL_GetWindowICCProfile'.'SDL2.dll'.'SDL_GetWindowICCProfile'
++'_SDL_GetTicks64'.'SDL2.dll'.'SDL_GetTicks64'
# ++'_SDL_LinuxSetThreadPriorityAndPolicy'.'SDL2.dll'.'SDL_LinuxSetThreadPriorityAndPolicy'
++'_SDL_GameControllerGetAppleSFSymbolsNameForButton'.'SDL2.dll'.'SDL_GameControllerGetAppleSFSymbolsNameForButton'
++'_SDL_GameControllerGetAppleSFSymbolsNameForAxis'.'SDL2.dll'.'SDL_GameControllerGetAppleSFSymbolsNameForAxis'
++'_SDL_hid_init'.'SDL2.dll'.'SDL_hid_init'
++'_SDL_hid_exit'.'SDL2.dll'.'SDL_hid_exit'
++'_SDL_hid_device_change_count'.'SDL2.dll'.'SDL_hid_device_change_count'
++'_SDL_hid_enumerate'.'SDL2.dll'.'SDL_hid_enumerate'
++'_SDL_hid_free_enumeration'.'SDL2.dll'.'SDL_hid_free_enumeration'
++'_SDL_hid_open'.'SDL2.dll'.'SDL_hid_open'
++'_SDL_hid_open_path'.'SDL2.dll'.'SDL_hid_open_path'
++'_SDL_hid_write'.'SDL2.dll'.'SDL_hid_write'
++'_SDL_hid_read_timeout'.'SDL2.dll'.'SDL_hid_read_timeout'
++'_SDL_hid_read'.'SDL2.dll'.'SDL_hid_read'
++'_SDL_hid_set_nonblocking'.'SDL2.dll'.'SDL_hid_set_nonblocking'
++'_SDL_hid_send_feature_report'.'SDL2.dll'.'SDL_hid_send_feature_report'
++'_SDL_hid_get_feature_report'.'SDL2.dll'.'SDL_hid_get_feature_report'
++'_SDL_hid_close'.'SDL2.dll'.'SDL_hid_close'
++'_SDL_hid_get_manufacturer_string'.'SDL2.dll'.'SDL_hid_get_manufacturer_string'
++'_SDL_hid_get_product_string'.'SDL2.dll'.'SDL_hid_get_product_string'
++'_SDL_hid_get_serial_number_string'.'SDL2.dll'.'SDL_hid_get_serial_number_string'
++'_SDL_hid_get_indexed_string'.'SDL2.dll'.'SDL_hid_get_indexed_string'
++'_SDL_SetWindowMouseRect'.'SDL2.dll'.'SDL_SetWindowMouseRect'
++'_SDL_GetWindowMouseRect'.'SDL2.dll'.'SDL_GetWindowMouseRect'
++'_SDL_RenderWindowToLogical'.'SDL2.dll'.'SDL_RenderWindowToLogical'
++'_SDL_RenderLogicalToWindow'.'SDL2.dll'.'SDL_RenderLogicalToWindow'
++'_SDL_JoystickHasRumble'.'SDL2.dll'.'SDL_JoystickHasRumble'
++'_SDL_JoystickHasRumbleTriggers'.'SDL2.dll'.'SDL_JoystickHasRumbleTriggers'
++'_SDL_GameControllerHasRumble'.'SDL2.dll'.'SDL_GameControllerHasRumble'
++'_SDL_GameControllerHasRumbleTriggers'.'SDL2.dll'.'SDL_GameControllerHasRumbleTriggers'
++'_SDL_hid_ble_scan'.'SDL2.dll'.'SDL_hid_ble_scan'
++'_SDL_PremultiplyAlpha'.'SDL2.dll'.'SDL_PremultiplyAlpha'
# ++'_SDL_AndroidSendMessage'.'SDL2.dll'.'SDL_AndroidSendMessage'
++'_SDL_GetTouchName'.'SDL2.dll'.'SDL_GetTouchName'
++'_SDL_ClearComposition'.'SDL2.dll'.'SDL_ClearComposition'
++'_SDL_IsTextInputShown'.'SDL2.dll'.'SDL_IsTextInputShown'
++'_SDL_HasIntersectionF'.'SDL2.dll'.'SDL_HasIntersectionF'
++'_SDL_IntersectFRect'.'SDL2.dll'.'SDL_IntersectFRect'
++'_SDL_UnionFRect'.'SDL2.dll'.'SDL_UnionFRect'
++'_SDL_EncloseFPoints'.'SDL2.dll'.'SDL_EncloseFPoints'
++'_SDL_IntersectFRectAndLine'.'SDL2.dll'.'SDL_IntersectFRectAndLine'
++'_SDL_RenderGetWindow'.'SDL2.dll'.'SDL_RenderGetWindow'
++'_SDL_bsearch'.'SDL2.dll'.'SDL_bsearch'
++'_SDL_GameControllerPathForIndex'.'SDL2.dll'.'SDL_GameControllerPathForIndex'
++'_SDL_GameControllerPath'.'SDL2.dll'.'SDL_GameControllerPath'
++'_SDL_JoystickPathForIndex'.'SDL2.dll'.'SDL_JoystickPathForIndex'
++'_SDL_JoystickPath'.'SDL2.dll'.'SDL_JoystickPath'
++'_SDL_JoystickAttachVirtualEx'.'SDL2.dll'.'SDL_JoystickAttachVirtualEx'
++'_SDL_GameControllerGetFirmwareVersion'.'SDL2.dll'.'SDL_GameControllerGetFirmwareVersion'
++'_SDL_JoystickGetFirmwareVersion'.'SDL2.dll'.'SDL_JoystickGetFirmwareVersion'
++'_SDL_GUIDToString'.'SDL2.dll'.'SDL_GUIDToString'
++'_SDL_GUIDFromString'.'SDL2.dll'.'SDL_GUIDFromString'
++'_SDL_HasLSX'.'SDL2.dll'.'SDL_HasLSX'
++'_SDL_HasLASX'.'SDL2.dll'.'SDL_HasLASX'
++'_SDL_RenderGetD3D12Device'.'SDL2.dll'.'SDL_RenderGetD3D12Device'
++'_SDL_utf8strnlen'.'SDL2.dll'.'SDL_utf8strnlen'

View File

@@ -1,81 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#include <sys/stat.h>
#include <unistd.h>
#if defined(SDL_FILESYSTEM_PS2)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent filesystem routines */
#include "SDL_error.h"
#include "SDL_filesystem.h"
char *
SDL_GetBasePath(void)
{
char *retval;
size_t len;
char cwd[FILENAME_MAX];
getcwd(cwd, sizeof(cwd));
len = SDL_strlen(cwd) + 1;
retval = (char *) SDL_malloc(len);
if (retval)
SDL_memcpy(retval, cwd, len);
return retval;
}
char *
SDL_GetPrefPath(const char *org, const char *app)
{
char *retval = NULL;
size_t len;
char *base = SDL_GetBasePath();
if (!app) {
SDL_InvalidParamError("app");
return NULL;
}
if(!org) {
org = "";
}
len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
retval = (char *) SDL_malloc(len);
if (*org) {
SDL_snprintf(retval, len, "%s%s/%s/", base, org, app);
} else {
SDL_snprintf(retval, len, "%s%s/", base, app);
}
free(base);
mkdir(retval, 0x0755);
return retval;
}
#endif /* SDL_FILESYSTEM_PS2 */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,689 +0,0 @@
/*
Copyright (C) Valve Corporation
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
#include "SDL_hints.h"
#include "SDL_gamecontroller.h"
#include "controller_type.h"
#define MAKE_CONTROLLER_ID( nVID, nPID ) (unsigned int)( (unsigned int)nVID << 16 | (unsigned int)nPID )
static const ControllerDescription_t arrControllers[] = {
{ MAKE_CONTROLLER_ID( 0x0079, 0x181a ), k_eControllerType_PS3Controller, NULL }, // Venom Arcade Stick
{ MAKE_CONTROLLER_ID( 0x0079, 0x1844 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x044f, 0xb315 ), k_eControllerType_PS3Controller, NULL }, // Firestorm Dual Analog 3
{ MAKE_CONTROLLER_ID( 0x044f, 0xd007 ), k_eControllerType_PS3Controller, NULL }, // Thrustmaster wireless 3-1
{ MAKE_CONTROLLER_ID( 0x054c, 0x0268 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller
{ MAKE_CONTROLLER_ID( 0x056e, 0x200f ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x056e, 0x2013 ), k_eControllerType_PS3Controller, NULL }, // JC-U4113SBK
{ MAKE_CONTROLLER_ID( 0x05b8, 0x1004 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x05b8, 0x1006 ), k_eControllerType_PS3Controller, NULL }, // JC-U3412SBK
{ MAKE_CONTROLLER_ID( 0x06a3, 0xf622 ), k_eControllerType_PS3Controller, NULL }, // Cyborg V3
{ MAKE_CONTROLLER_ID( 0x0738, 0x3180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS3 mode
{ MAKE_CONTROLLER_ID( 0x0738, 0x3250 ), k_eControllerType_PS3Controller, NULL }, // madcats fightpad pro ps3
{ MAKE_CONTROLLER_ID( 0x0738, 0x8180 ), k_eControllerType_PS3Controller, NULL }, // Mad Catz Alpha PS4 mode (no touchpad on device)
{ MAKE_CONTROLLER_ID( 0x0738, 0x8838 ), k_eControllerType_PS3Controller, NULL }, // Madcatz Fightstick Pro
{ MAKE_CONTROLLER_ID( 0x0810, 0x0001 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later
{ MAKE_CONTROLLER_ID( 0x0810, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // actually ps2 - maybe break out later
{ MAKE_CONTROLLER_ID( 0x0925, 0x0005 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller
{ MAKE_CONTROLLER_ID( 0x0925, 0x8866 ), k_eControllerType_PS3Controller, NULL }, // PS2 maybe break out later
{ MAKE_CONTROLLER_ID( 0x0925, 0x8888 ), k_eControllerType_PS3Controller, NULL }, // Actually ps2 -maybe break out later Lakeview Research WiseGroup Ltd, MP-8866 Dual Joypad
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0109 ), k_eControllerType_PS3Controller, NULL }, // PDP Versus Fighting Pad
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x011e ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS4
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0128 ), k_eControllerType_PS3Controller, NULL }, // Rock Candy PS3
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0203 ), k_eControllerType_PS3Controller, NULL }, // Victrix Pro FS (PS4 peripheral but no trackpad/lightbar)
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0214 ), k_eControllerType_PS3Controller, NULL }, // afterglow ps3
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x1314 ), k_eControllerType_PS3Controller, NULL }, // PDP Afterglow Wireless PS3 controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x6302 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x0e8f, 0x0008 ), k_eControllerType_PS3Controller, NULL }, // Green Asia
{ MAKE_CONTROLLER_ID( 0x0e8f, 0x3075 ), k_eControllerType_PS3Controller, NULL }, // SpeedLink Strike FX
{ MAKE_CONTROLLER_ID( 0x0e8f, 0x310d ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0009 ), k_eControllerType_PS3Controller, NULL }, // HORI BDA GP1
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x004d ), k_eControllerType_PS3Controller, NULL }, // Horipad 3
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x005e ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting commander ps4
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x005f ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting commander ps3
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x006a ), k_eControllerType_PS3Controller, NULL }, // Real Arcade Pro 4
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x006e ), k_eControllerType_PS3Controller, NULL }, // HORI horipad4 ps3
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0085 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PS3
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0086 ), k_eControllerType_PS3Controller, NULL }, // HORI Fighting Commander PC (Uses the Xbox 360 protocol, but has PS3 buttons)
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0087 ), k_eControllerType_PS3Controller, NULL }, // HORI fighting mini stick
{ MAKE_CONTROLLER_ID( 0x0f30, 0x1100 ), k_eControllerType_PS3Controller, NULL }, // Qanba Q1 fight stick
{ MAKE_CONTROLLER_ID( 0x11ff, 0x3331 ), k_eControllerType_PS3Controller, NULL }, // SRXJ-PH2400
{ MAKE_CONTROLLER_ID( 0x1345, 0x1000 ), k_eControllerType_PS3Controller, NULL }, // PS2 ACME GA-D5
{ MAKE_CONTROLLER_ID( 0x1345, 0x6005 ), k_eControllerType_PS3Controller, NULL }, // ps2 maybe break out later
{ MAKE_CONTROLLER_ID( 0x146b, 0x0603 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x146b, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x1a34, 0x0836 ), k_eControllerType_PS3Controller, NULL }, // Afterglow PS3
{ MAKE_CONTROLLER_ID( 0x20bc, 0x5500 ), k_eControllerType_PS3Controller, NULL }, // ShanWan PS3
{ MAKE_CONTROLLER_ID( 0x20d6, 0x576d ), k_eControllerType_PS3Controller, NULL }, // Power A PS3
{ MAKE_CONTROLLER_ID( 0x20d6, 0xca6d ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x2563, 0x0523 ), k_eControllerType_PS3Controller, NULL }, // Digiflip GP006
{ MAKE_CONTROLLER_ID( 0x2563, 0x0575 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x25f0, 0x83c3 ), k_eControllerType_PS3Controller, NULL }, // gioteck vx2
{ MAKE_CONTROLLER_ID( 0x25f0, 0xc121 ), k_eControllerType_PS3Controller, NULL }, //
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2000 ), k_eControllerType_PS3Controller, NULL }, // Qanba Drone
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2003 ), k_eControllerType_PS3Controller, NULL }, // From SDL
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2302 ), k_eControllerType_PS3Controller, NULL }, // Qanba Obsidian
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2502 ), k_eControllerType_PS3Controller, NULL }, // Qanba Dragon
{ MAKE_CONTROLLER_ID( 0x8380, 0x0003 ), k_eControllerType_PS3Controller, NULL }, // BTP 2163
{ MAKE_CONTROLLER_ID( 0x8888, 0x0308 ), k_eControllerType_PS3Controller, NULL }, // Sony PS3 Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x181b ), k_eControllerType_PS4Controller, NULL }, // Venom Arcade Stick - XXX:this may not work and may need to be called a ps3 controller
{ MAKE_CONTROLLER_ID( 0x054c, 0x05c4 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller
{ MAKE_CONTROLLER_ID( 0x054c, 0x05c5 ), k_eControllerType_PS4Controller, NULL }, // STRIKEPAD PS4 Grip Add-on
{ MAKE_CONTROLLER_ID( 0x054c, 0x09cc ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Slim Controller
{ MAKE_CONTROLLER_ID( 0x054c, 0x0ba0 ), k_eControllerType_PS4Controller, NULL }, // Sony PS4 Controller (Wireless dongle)
{ MAKE_CONTROLLER_ID( 0x0738, 0x8250 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightPad Pro PS4
{ MAKE_CONTROLLER_ID( 0x0738, 0x8384 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE S+ PS4
{ MAKE_CONTROLLER_ID( 0x0738, 0x8480 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2 PS4
{ MAKE_CONTROLLER_ID( 0x0738, 0x8481 ), k_eControllerType_PS4Controller, NULL }, // Mad Catz FightStick TE 2+ PS4
{ MAKE_CONTROLLER_ID( 0x0C12, 0x0E10 ), k_eControllerType_PS4Controller, NULL }, // Armor Armor 3 Pad PS4
{ MAKE_CONTROLLER_ID( 0x0C12, 0x1CF6 ), k_eControllerType_PS4Controller, NULL }, // EMIO PS4 Elite Controller
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0e15 ), k_eControllerType_PS4Controller, NULL }, // Game:Pad 4
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0ef6 ), k_eControllerType_PS4Controller, NULL }, // Hitbox Arcade Stick
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0055 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0066 ), k_eControllerType_PS4Controller, NULL }, // HORIPAD 4 FPS Plus
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0084 ), k_eControllerType_PS4Controller, NULL }, // HORI Fighting Commander PS4
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x008a ), k_eControllerType_PS4Controller, NULL }, // HORI Real Arcade Pro 4
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x009c ), k_eControllerType_PS4Controller, NULL }, // HORI TAC PRO mousething
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00a0 ), k_eControllerType_PS4Controller, NULL }, // HORI TAC4 mousething
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00ee ), k_eControllerType_PS4Controller, NULL }, // Hori mini wired https://www.playstation.com/en-us/explore/accessories/gaming-controllers/mini-wired-gamepad/
{ MAKE_CONTROLLER_ID( 0x11c0, 0x4001 ), k_eControllerType_PS4Controller, NULL }, // "PS4 Fun Controller" added from user log
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d01 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller - has gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d02 ), k_eControllerType_PS4Controller, NULL }, // Nacon Revolution Pro Controller v2 - has gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Infinite - has gyro
{ MAKE_CONTROLLER_ID( 0x1532, 0X0401 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera PS4 Controller
{ MAKE_CONTROLLER_ID( 0x1532, 0x1000 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju PS4 Controller
{ MAKE_CONTROLLER_ID( 0x1532, 0x1004 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate USB
{ MAKE_CONTROLLER_ID( 0x1532, 0x1007 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition USB
{ MAKE_CONTROLLER_ID( 0x1532, 0x1008 ), k_eControllerType_PS4Controller, NULL }, // Razer Panthera Evo Fightstick
{ MAKE_CONTROLLER_ID( 0x1532, 0x1009 ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Ultimate BT
{ MAKE_CONTROLLER_ID( 0x1532, 0x100A ), k_eControllerType_PS4Controller, NULL }, // Razer Raiju 2 Tournament edition BT
{ MAKE_CONTROLLER_ID( 0x1532, 0x1100 ), k_eControllerType_PS4Controller, NULL }, // Razer RAION Fightpad - Trackpad, no gyro, lightbar hardcoded to green
{ MAKE_CONTROLLER_ID( 0x20d6, 0x792a ), k_eControllerType_PS4Controller, NULL }, // PowerA Fusion Fight Pad
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2300 ), k_eControllerType_PS4Controller, "Qanba Obsidian Arcade Joystick" }, // Qanba Obsidian
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2500 ), k_eControllerType_PS4Controller, "Qanba Dragon Arcade Joystick" }, // Qanba Dragon
{ MAKE_CONTROLLER_ID( 0x7545, 0x0104 ), k_eControllerType_PS4Controller, NULL }, // Armor 3 or Level Up Cobra - At least one variant has gyro
{ MAKE_CONTROLLER_ID( 0x9886, 0x0025 ), k_eControllerType_PS4Controller, NULL }, // Astro C40
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0207 ), k_eControllerType_PS4Controller, NULL }, // Victrix Pro Fightstick w/ Touchpad for PS4
// Removing the Giotek because there were a bunch of help tickets from users w/ issues including from non-PS4 controller users. This VID/PID is probably used in different FW's
// { MAKE_CONTROLLER_ID( 0x7545, 0x1122 ), k_eControllerType_PS4Controller, NULL }, // Giotek VX4 - trackpad/gyro don't work. Had to not filter on interface info. Light bar is flaky, but works.
{ MAKE_CONTROLLER_ID( 0x044f, 0xd00e ), k_eControllerType_PS4Controller, NULL }, // Thrustmast Eswap Pro - No gyro and lightbar doesn't change color. Works otherwise
{ MAKE_CONTROLLER_ID( 0x0c12, 0x1e10 ), k_eControllerType_PS4Controller, NULL }, // P4 Wired Gamepad generic knock off - lightbar but not trackpad or gyro
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d09 ), k_eControllerType_PS4Controller, NULL }, // NACON Daija Fight Stick - touchpad but no gyro/rumble
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d10 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d08 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution Unlimited Wireless Dongle
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d06 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller Wireless Dongle -- show up as ps4 until you connect controller to it then it reboots into Xbox controller with different vvid/pid
{ MAKE_CONTROLLER_ID( 0x146b, 0x1103 ), k_eControllerType_PS4Controller, NULL }, // NACON Asymetrical Controller -- on windows this doesn't enumerate
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0123 ), k_eControllerType_PS4Controller, NULL }, // HORI Wireless Controller Light (Japan only) - only over bt- over usb is xbox and pid 0x0124
{ MAKE_CONTROLLER_ID( 0x146b, 0x0d13 ), k_eControllerType_PS4Controller, NULL }, // NACON Revolution 3
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0e20 ), k_eControllerType_PS4Controller, NULL }, // Brook Mars Controller - needs FW update to show up as Ps4 controller on PC. Has Gyro but touchpad is a single button.
{ MAKE_CONTROLLER_ID( 0x054c, 0x0ce6 ), k_eControllerType_PS5Controller, NULL }, // Sony PS5 Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x0006 ), k_eControllerType_UnknownNonSteamController, NULL }, // DragonRise Generic USB PCB, sometimes configured as a PC Twin Shock Controller - looks like a DS3 but the face buttons are 1-4 instead of symbols
{ MAKE_CONTROLLER_ID( 0x0079, 0x18d4 ), k_eControllerType_XBox360Controller, NULL }, // GPD Win 2 X-Box Controller
{ MAKE_CONTROLLER_ID( 0x03eb, 0xff02 ), k_eControllerType_XBox360Controller, NULL }, // Wooting Two
{ MAKE_CONTROLLER_ID( 0x044f, 0xb326 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Gamepad GP XID
{ MAKE_CONTROLLER_ID( 0x045e, 0x028e ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x028f ), k_eControllerType_XBox360Controller, "Xbox 360 Controller" }, // Microsoft X-Box 360 pad v2
{ MAKE_CONTROLLER_ID( 0x045e, 0x0291 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (XBOX)
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Big Button IR
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a1 ), k_eControllerType_XBox360Controller, NULL }, // Microsoft X-Box 360 Wireless Controller with XUSB driver on Windows
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a9 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver (third party knockoff)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0719 ), k_eControllerType_XBox360Controller, "Xbox 360 Wireless Controller" }, // Xbox 360 Wireless Receiver
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21d ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F310
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21e ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F510
{ MAKE_CONTROLLER_ID( 0x046d, 0xc21f ), k_eControllerType_XBox360Controller, NULL }, // Logitech Gamepad F710
{ MAKE_CONTROLLER_ID( 0x046d, 0xc242 ), k_eControllerType_XBox360Controller, NULL }, // Logitech Chillstream Controller
{ MAKE_CONTROLLER_ID( 0x056e, 0x2004 ), k_eControllerType_XBox360Controller, NULL }, // Elecom JC-U3613M
{ MAKE_CONTROLLER_ID( 0x06a3, 0xf51a ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3600
{ MAKE_CONTROLLER_ID( 0x0738, 0x4716 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller
{ MAKE_CONTROLLER_ID( 0x0738, 0x4718 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightStick SE
{ MAKE_CONTROLLER_ID( 0x0738, 0x4726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller
{ MAKE_CONTROLLER_ID( 0x0738, 0x4728 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV FightPad
{ MAKE_CONTROLLER_ID( 0x0738, 0x4736 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon Gamepad
{ MAKE_CONTROLLER_ID( 0x0738, 0x4738 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Wired Xbox 360 Controller (SFIV)
{ MAKE_CONTROLLER_ID( 0x0738, 0x4740 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Beat Pad
{ MAKE_CONTROLLER_ID( 0x0738, 0xb726 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox controller - MW2
{ MAKE_CONTROLLER_ID( 0x0738, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz JOYTECH NEO SE Advanced GamePad
{ MAKE_CONTROLLER_ID( 0x0738, 0xcb02 ), k_eControllerType_XBox360Controller, NULL }, // Saitek Cyborg Rumble Pad - PC/Xbox 360
{ MAKE_CONTROLLER_ID( 0x0738, 0xcb03 ), k_eControllerType_XBox360Controller, NULL }, // Saitek P3200 Rumble Pad - PC/Xbox 360
{ MAKE_CONTROLLER_ID( 0x0738, 0xf738 ), k_eControllerType_XBox360Controller, NULL }, // Super SFIV FightStick TE S
{ MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller, NULL }, // Nvidia Shield local controller
{ MAKE_CONTROLLER_ID( 0x0955, 0xb400 ), k_eControllerType_XBox360Controller, NULL }, // NVIDIA Shield streaming controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0105 ), k_eControllerType_XBox360Controller, NULL }, // HSM3 Xbox360 dancepad
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0113 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x011f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0125 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightStick" }, // PDP INJUSTICE FightStick for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0127 ), k_eControllerType_XBox360Controller, "PDP INJUSTICE FightPad" }, // PDP INJUSTICE FightPad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0131 ), k_eControllerType_XBox360Controller, "PDP EA Soccer Controller" }, // PDP EA Soccer Gamepad
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0133 ), k_eControllerType_XBox360Controller, "PDP Battlefield 4 Controller" }, // PDP Battlefield 4 Gamepad
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0143 ), k_eControllerType_XBox360Controller, "PDP MK X Fight Stick" }, // PDP MK X Fight Stick for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0147 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Marvel Controller" }, // PDP Marvel Controller for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0201 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0213 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x021f ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Rock Candy" }, // PDP Rock Candy Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0301 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0313 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0314 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Afterglow" }, // PDP Afterglow Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0401 ), k_eControllerType_XBox360Controller, "PDP Xbox 360 Controller" }, // PDP Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0413 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted)
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0501 ), k_eControllerType_XBox360Controller, NULL }, // PDP Xbox 360 Controller (unlisted)
{ MAKE_CONTROLLER_ID( 0x0e6f, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // PDP Afterglow AX.1 (unlisted)
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x000a ), k_eControllerType_XBox360Controller, NULL }, // Hori Co. DOA4 FightStick
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x000c ), k_eControllerType_XBox360Controller, NULL }, // Hori PadEX Turbo
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x000d ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0016 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x001b ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x008c ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro 4
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00db ), k_eControllerType_XBox360Controller, "HORI Slime Controller" }, // Hori Dragon Quest Slime Controller
{ MAKE_CONTROLLER_ID( 0x1038, 0x1430 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo
{ MAKE_CONTROLLER_ID( 0x1038, 0x1431 ), k_eControllerType_XBox360Controller, "SteelSeries Stratus Duo" }, // SteelSeries Stratus Duo
{ MAKE_CONTROLLER_ID( 0x1038, 0xb360 ), k_eControllerType_XBox360Controller, NULL }, // SteelSeries Nimbus/Stratus XL
{ MAKE_CONTROLLER_ID( 0x11c9, 0x55f0 ), k_eControllerType_XBox360Controller, NULL }, // Nacon GC-100XF
{ MAKE_CONTROLLER_ID( 0x12ab, 0x0004 ), k_eControllerType_XBox360Controller, NULL }, // Honey Bee Xbox360 dancepad
{ MAKE_CONTROLLER_ID( 0x12ab, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // PDP AFTERGLOW AX.1
{ MAKE_CONTROLLER_ID( 0x12ab, 0x0303 ), k_eControllerType_XBox360Controller, NULL }, // Mortal Kombat Klassic FightStick
{ MAKE_CONTROLLER_ID( 0x1430, 0x02a0 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller Adapter
{ MAKE_CONTROLLER_ID( 0x1430, 0x4748 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Guitar Hero X-plorer
{ MAKE_CONTROLLER_ID( 0x1430, 0xf801 ), k_eControllerType_XBox360Controller, NULL }, // RedOctane Controller
{ MAKE_CONTROLLER_ID( 0x146b, 0x0601 ), k_eControllerType_XBox360Controller, NULL }, // BigBen Interactive XBOX 360 Controller
// { MAKE_CONTROLLER_ID( 0x1532, 0x0037 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth
{ MAKE_CONTROLLER_ID( 0x15e4, 0x3f00 ), k_eControllerType_XBox360Controller, NULL }, // Power A Mini Pro Elite
{ MAKE_CONTROLLER_ID( 0x15e4, 0x3f0a ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller
{ MAKE_CONTROLLER_ID( 0x15e4, 0x3f10 ), k_eControllerType_XBox360Controller, NULL }, // Batarang Xbox 360 controller
{ MAKE_CONTROLLER_ID( 0x162e, 0xbeef ), k_eControllerType_XBox360Controller, NULL }, // Joytech Neo-Se Take2
{ MAKE_CONTROLLER_ID( 0x1689, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Tournament Edition
{ MAKE_CONTROLLER_ID( 0x1689, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza Classic Edition
{ MAKE_CONTROLLER_ID( 0x1689, 0xfe00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth
{ MAKE_CONTROLLER_ID( 0x1949, 0x041a ), k_eControllerType_XBox360Controller, "Amazon Luna Controller" }, // Amazon Luna Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0002 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Guitar
{ MAKE_CONTROLLER_ID( 0x1bad, 0x0003 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Rock Band Drumkit
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf016 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Xbox 360 Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf018 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Street Fighter IV SE Fighting Stick
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf019 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Brawlstick for Xbox 360
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf021 ), k_eControllerType_XBox360Controller, NULL }, // Mad Cats Ghost Recon FS GamePad
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf023 ), k_eControllerType_XBox360Controller, NULL }, // MLG Pro Circuit Controller (Xbox)
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf025 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Call Of Duty
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf027 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FPS Pro
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf028 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightPad
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf02e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Fightpad
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf036 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MicroCon GamePad Pro
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf038 ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV FightStick TE
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf039 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MvC2 TE
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf03a ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz SFxT Fightstick Pro
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf03d ), k_eControllerType_XBox360Controller, NULL }, // Street Fighter IV Arcade Stick TE - Chun Li
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf03e ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz MLG FightStick TE
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf03f ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick SoulCaliber
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf042 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TES+
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf080 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz FightStick TE2
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf501 ), k_eControllerType_XBox360Controller, NULL }, // HoriPad EX2 Turbo
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.VX SA
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf504 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro. EX
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf505 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick EX2B
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf506 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro.EX Premium VLX
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf900 ), k_eControllerType_XBox360Controller, NULL }, // Harmonix Xbox 360 Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf901 ), k_eControllerType_XBox360Controller, NULL }, // Gamestop Xbox 360 Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf902 ), k_eControllerType_XBox360Controller, NULL }, // Mad Catz Gamepad2
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf903 ), k_eControllerType_XBox360Controller, NULL }, // Tron Xbox 360 controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf904 ), k_eControllerType_XBox360Controller, NULL }, // PDP Versus Fighting Pad
{ MAKE_CONTROLLER_ID( 0x1bad, 0xf906 ), k_eControllerType_XBox360Controller, NULL }, // MortalKombat FightStick
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfa01 ), k_eControllerType_XBox360Controller, NULL }, // MadCatz GamePad
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfd00 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza TE
{ MAKE_CONTROLLER_ID( 0x1bad, 0xfd01 ), k_eControllerType_XBox360Controller, NULL }, // Razer Onza
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5000 ), k_eControllerType_XBox360Controller, NULL }, // Razer Atrox Arcade Stick
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5300 ), k_eControllerType_XBox360Controller, NULL }, // PowerA MINI PROEX Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5303 ), k_eControllerType_XBox360Controller, NULL }, // Xbox Airflo wired controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x530a ), k_eControllerType_XBox360Controller, NULL }, // Xbox 360 Pro EX Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x531a ), k_eControllerType_XBox360Controller, NULL }, // PowerA Pro Ex
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5397 ), k_eControllerType_XBox360Controller, NULL }, // FUS1ON Tournament Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5500 ), k_eControllerType_XBox360Controller, NULL }, // Hori XBOX 360 EX 2 with Turbo
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5501 ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro VX-SA
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5502 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Stick VX Alt
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5503 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Edge
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5506 ), k_eControllerType_XBox360Controller, NULL }, // Hori SOULCALIBUR V Stick
{ MAKE_CONTROLLER_ID( 0x24c6, 0x550d ), k_eControllerType_XBox360Controller, NULL }, // Hori GEM Xbox controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x550e ), k_eControllerType_XBox360Controller, NULL }, // Hori Real Arcade Pro V Kai 360
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5508 ), k_eControllerType_XBox360Controller, NULL }, // Hori PAD A
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5510 ), k_eControllerType_XBox360Controller, NULL }, // Hori Fighting Commander ONE
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5b00 ), k_eControllerType_XBox360Controller, NULL }, // ThrustMaster Ferrari Italia 458 Racing Wheel
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5b02 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster, Inc. GPX Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5b03 ), k_eControllerType_XBox360Controller, NULL }, // Thrustmaster Ferrari 458 Racing Wheel
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5d04 ), k_eControllerType_XBox360Controller, NULL }, // Razer Sabertooth
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafa ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafb ), k_eControllerType_XBox360Controller, NULL }, // Aplay Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 1
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller, NULL }, // Afterglow Gamepad 3
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller, NULL }, // Rock Candy Gamepad for Xbox 360
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2303 ), k_eControllerType_XInputPS4Controller, "Qanba Obsidian Arcade Joystick" }, // Qanba Obsidian Arcade Joystick
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2503 ), k_eControllerType_XInputPS4Controller, "Qanba Dragon Arcade Joystick" }, // Qanba Dragon Arcade Joystick
{ MAKE_CONTROLLER_ID( 0x045e, 0x02d1 ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x02dd ), k_eControllerType_XBoxOneController, "Xbox One Controller" }, // Microsoft X-Box One pad (Firmware 2015)
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e0 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth)
{ MAKE_CONTROLLER_ID( 0x045e, 0x02e3 ), k_eControllerType_XBoxOneController, "Xbox One Elite Controller" }, // Microsoft X-Box One Elite pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ea ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x02fd ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (Bluetooth)
{ MAKE_CONTROLLER_ID( 0x045e, 0x02ff ), k_eControllerType_XBoxOneController, NULL }, // Microsoft X-Box One controller with XBOXGIP driver on Windows
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b00 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b02 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (Bluetooth)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b05 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (Bluetooth)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0a ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b0c ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (Bluetooth)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b12 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b13 ), k_eControllerType_XBoxOneController, "Xbox Series X Controller" }, // Microsoft X-Box Series X pad (BLE)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b20 ), k_eControllerType_XBoxOneController, "Xbox One S Controller" }, // Microsoft X-Box One S pad (BLE)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b21 ), k_eControllerType_XBoxOneController, "Xbox Adaptive Controller" }, // Microsoft X-Box Adaptive pad (BLE)
{ MAKE_CONTROLLER_ID( 0x045e, 0x0b22 ), k_eControllerType_XBoxOneController, "Xbox One Elite 2 Controller" }, // Microsoft X-Box One Elite Series 2 pad (BLE)
{ MAKE_CONTROLLER_ID( 0x0738, 0x4a01 ), k_eControllerType_XBoxOneController, NULL }, // Mad Catz FightStick TE 2
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0139 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x013B ), k_eControllerType_XBoxOneController, "PDP Xbox One Face-Off Controller" }, // PDP Face-Off Gamepad for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x013a ), k_eControllerType_XBoxOneController, NULL }, // PDP Xbox One Controller (unlisted)
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0145 ), k_eControllerType_XBoxOneController, "PDP MK X Fight Pad" }, // PDP MK X Fight Pad for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0146 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x015b ), k_eControllerType_XBoxOneController, "PDP Fallout 4 Vault Boy Controller" }, // PDP Fallout 4 Vault Boy Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x015c ), k_eControllerType_XBoxOneController, "PDP Xbox One @Play Controller" }, // PDP @Play Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x015d ), k_eControllerType_XBoxOneController, "PDP Mirror's Edge Controller" }, // PDP Mirror's Edge Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x015f ), k_eControllerType_XBoxOneController, "PDP Metallic Controller" }, // PDP Metallic Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0160 ), k_eControllerType_XBoxOneController, "PDP NFL Face-Off Controller" }, // PDP NFL Official Face-Off Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0161 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0162 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0163 ), k_eControllerType_XBoxOneController, "PDP Deliverer of Truth" }, // PDP Legendary Collection: Deliverer of Truth
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0164 ), k_eControllerType_XBoxOneController, "PDP Battlefield 1 Controller" }, // PDP Battlefield 1 Official Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0165 ), k_eControllerType_XBoxOneController, "PDP Titanfall 2 Controller" }, // PDP Titanfall 2 Official Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0166 ), k_eControllerType_XBoxOneController, "PDP Mass Effect: Andromeda Controller" }, // PDP Mass Effect: Andromeda Official Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0167 ), k_eControllerType_XBoxOneController, "PDP Halo Wars 2 Face-Off Controller" }, // PDP Halo Wars 2 Official Face-Off Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0205 ), k_eControllerType_XBoxOneController, "PDP Victrix Pro Fight Stick" }, // PDP Victrix Pro Fight Stick
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0206 ), k_eControllerType_XBoxOneController, "PDP Mortal Kombat Controller" }, // PDP Mortal Kombat 25 Anniversary Edition Stick (Xbox One)
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0246 ), k_eControllerType_XBoxOneController, "PDP Xbox One Rock Candy" }, // PDP Rock Candy Wired Controller for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0261 ), k_eControllerType_XBoxOneController, "PDP Xbox One Camo" }, // PDP Camo Wired Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0262 ), k_eControllerType_XBoxOneController, "PDP Xbox One Controller" }, // PDP Wired Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a8 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Wired Controller for Xbox One - Midnight Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02aa ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Wired Controller for Xbox One - Verdant Green
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ab ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Wired Controller for Xbox One - Crimson Red
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ac ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Wired Controller for Xbox One - Ember Orange
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ad ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Wired Controller for Xbox One - Stealth Series | Phantom Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ae ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Wired Controller for Xbox One - Stealth Series | Ghost White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02af ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Wired Controller for Xbox One - Stealth Series | Revenant Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02b0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Wired Controller for Xbox One - Raven Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02b1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Wired Controller for Xbox One - Arctic White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02b3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Afterglow" }, // PDP Afterglow Prismatic Wired Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02b5 ), k_eControllerType_XBoxOneController, "PDP Xbox One GAMEware Controller" }, // PDP GAMEware Wired Controller Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02b6 ), k_eControllerType_XBoxOneController, NULL }, // PDP One-Handed Joystick Adaptive Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02bd ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Wired Controller for Xbox One - Royal Purple
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02be ), k_eControllerType_XBoxOneController, "PDP Xbox One Raven Black" }, // PDP Deluxe Wired Controller for Xbox One - Raven Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02bf ), k_eControllerType_XBoxOneController, "PDP Xbox One Midnight Blue" }, // PDP Deluxe Wired Controller for Xbox One - Midnight Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c0 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantom Black" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantom Black
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c1 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ghost White" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Ghost White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c2 ), k_eControllerType_XBoxOneController, "PDP Xbox One Revenant Blue" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Revenant Blue
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c3 ), k_eControllerType_XBoxOneController, "PDP Xbox One Verdant Green" }, // PDP Deluxe Wired Controller for Xbox One - Verdant Green
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c4 ), k_eControllerType_XBoxOneController, "PDP Xbox One Ember Orange" }, // PDP Deluxe Wired Controller for Xbox One - Ember Orange
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Royal Purple" }, // PDP Deluxe Wired Controller for Xbox One - Royal Purple
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c6 ), k_eControllerType_XBoxOneController, "PDP Xbox One Crimson Red" }, // PDP Deluxe Wired Controller for Xbox One - Crimson Red
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c7 ), k_eControllerType_XBoxOneController, "PDP Xbox One Arctic White" }, // PDP Deluxe Wired Controller for Xbox One - Arctic White
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c8 ), k_eControllerType_XBoxOneController, "PDP Kingdom Hearts Controller" }, // PDP Kingdom Hearts Wired Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02c9 ), k_eControllerType_XBoxOneController, "PDP Xbox One Phantasm Red" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Phantasm Red
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ca ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Deluxe Wired Controller for Xbox One - Stealth Series | Specter Violet
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02cb ), k_eControllerType_XBoxOneController, "PDP Xbox One Specter Violet" }, // PDP Wired Controller for Xbox One - Stealth Series | Specter Violet
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02cd ), k_eControllerType_XBoxOneController, "PDP Xbox One Blu-merang" }, // PDP Rock Candy Wired Controller for Xbox One - Blu-merang
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ce ), k_eControllerType_XBoxOneController, "PDP Xbox One Cranblast" }, // PDP Rock Candy Wired Controller for Xbox One - Cranblast
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02cf ), k_eControllerType_XBoxOneController, "PDP Xbox One Aqualime" }, // PDP Rock Candy Wired Controller for Xbox One - Aqualime
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02d5 ), k_eControllerType_XBoxOneController, "PDP Xbox One Red Camo" }, // PDP Wired Controller for Xbox One - Red Camo
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0346 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0446 ), k_eControllerType_XBoxOneController, "PDP Xbox One RC Gamepad" }, // PDP RC Gamepad for Xbox One
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02da ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Afterglow" }, // PDP Xbox Series X Afterglow
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02d6 ), k_eControllerType_XBoxOneController, "Victrix Gambit Tournament Controller" }, // Victrix Gambit Tournament Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02d9 ), k_eControllerType_XBoxOneController, "PDP Xbox Series X Midnight Blue" }, // PDP Xbox Series X Midnight Blue
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0063 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro Hayabusa (USA) Xbox One
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0067 ), k_eControllerType_XBoxOneController, NULL }, // HORIPAD ONE
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0078 ), k_eControllerType_XBoxOneController, NULL }, // Hori Real Arcade Pro V Kai Xbox One
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00c5 ), k_eControllerType_XBoxOneController, NULL }, // HORI Fighting Commander
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a00 ), k_eControllerType_XBoxOneController, NULL }, // Razer Atrox Arcade Stick
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a03 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wildcat
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a14 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Ultimate
{ MAKE_CONTROLLER_ID( 0x1532, 0x0a15 ), k_eControllerType_XBoxOneController, NULL }, // Razer Wolverine Tournament Edition
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2001 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Black Inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2002 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Gray/White Inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2003 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Green Inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2004 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Pink inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2005 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - Black
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2006 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Wired Controller Core - White
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2009 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Red inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Blue inline
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200b ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Red
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200c ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Camo Metallic Blue
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200d ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Seafoam Fade
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200e ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Midnight Blue
{ MAKE_CONTROLLER_ID( 0x20d6, 0x200f ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Soldier Green
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2011 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired - Metallic Ice
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2012 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X Cuphead EnWired Controller - Mugman
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2015 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Blue Hint
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2016 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller - Green Hint
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2017 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Cntroller - Arctic Camo
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2018 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Arc Lightning
{ MAKE_CONTROLLER_ID( 0x20d6, 0x2019 ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Royal Purple
{ MAKE_CONTROLLER_ID( 0x20d6, 0x201a ), k_eControllerType_XBoxOneController, "PowerA Xbox Series X Controller" }, // PowerA Xbox Series X EnWired Controller Nebula
{ MAKE_CONTROLLER_ID( 0x20d6, 0x4001 ), k_eControllerType_XBoxOneController, "PowerA Fusion Pro 2 Controller" }, // PowerA Fusion Pro 2 Wired Controller (Xbox Series X style)
{ MAKE_CONTROLLER_ID( 0x20d6, 0x4002 ), k_eControllerType_XBoxOneController, "PowerA Spectra Infinity Controller" }, // PowerA Spectra Infinity Wired Controller (Xbox Series X style)
{ MAKE_CONTROLLER_ID( 0x24c6, 0x541a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Xbox One Mini Wired Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x542a ), k_eControllerType_XBoxOneController, NULL }, // Xbox ONE spectra
{ MAKE_CONTROLLER_ID( 0x24c6, 0x543a ), k_eControllerType_XBoxOneController, "PowerA Xbox One Controller" }, // PowerA Xbox ONE liquid metal controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x551a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x561a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x581a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Classic Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x591a ), k_eControllerType_XBoxOneController, NULL }, // PowerA FUSION Pro Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x592a ), k_eControllerType_XBoxOneController, NULL }, // BDA XB1 Spectra Pro
{ MAKE_CONTROLLER_ID( 0x24c6, 0x791a ), k_eControllerType_XBoxOneController, NULL }, // PowerA Fusion Fight Pad
{ MAKE_CONTROLLER_ID( 0x2e24, 0x0652 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke
{ MAKE_CONTROLLER_ID( 0x2e24, 0x1618 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin Duke
{ MAKE_CONTROLLER_ID( 0x2e24, 0x1688 ), k_eControllerType_XBoxOneController, NULL }, // Hyperkin X91
{ MAKE_CONTROLLER_ID( 0x146b, 0x0611 ), k_eControllerType_XBoxOneController, NULL }, // Xbox Controller Mode for NACON Revolution 3
// These have been added via Minidump for unrecognized Xinput controller assert
{ MAKE_CONTROLLER_ID( 0x0000, 0x0000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x045e, 0x02a2 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller - Microsoft VID
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x1414 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0159 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0xfaff ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x006d ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00a4 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x1832 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x187f ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x1883 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x03eb, 0xff01 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0c12, 0x0ef8 ), k_eControllerType_XBox360Controller, NULL }, // Homemade fightstick based on brook pcb (with XInput driver??)
{ MAKE_CONTROLLER_ID( 0x046d, 0x1000 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1345, 0x6006 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x056e, 0x2012 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x146b, 0x0602 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00ae ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x046d, 0x0401 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
{ MAKE_CONTROLLER_ID( 0x046d, 0x0301 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
{ MAKE_CONTROLLER_ID( 0x046d, 0xcaa3 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
{ MAKE_CONTROLLER_ID( 0x046d, 0xc261 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
{ MAKE_CONTROLLER_ID( 0x046d, 0x0291 ), k_eControllerType_XBox360Controller, NULL }, // logitech xinput
{ MAKE_CONTROLLER_ID( 0x0079, 0x18d3 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00b1 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0001, 0x0001 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x188e ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x187c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x189c ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x0079, 0x1874 ), k_eControllerType_XBox360Controller, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x0050 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x2e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x9886, 0x24 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x91 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1430, 0x719 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xf0d, 0xed ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xf0d, 0xc0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x152 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x46d, 0x1007 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2b8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x79, 0x18a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
/* Added from Minidumps 10-9-19 */
{ MAKE_CONTROLLER_ID( 0x0, 0x6686 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x11ff, 0x511 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x12ab, 0x304 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1430, 0x291 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1430, 0x2a9 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1430, 0x70b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x146b, 0x604 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x146b, 0x605 ), k_eControllerType_XBoxOneController, NULL }, // NACON PS4 controller in Xbox mode - might also be other bigben brand xbox controllers
{ MAKE_CONTROLLER_ID( 0x146b, 0x606 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x146b, 0x609 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0x28e ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x1bad, 0x5500 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x20ab, 0x55ef ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x24c6, 0x5509 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2516, 0x69 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x25b1, 0x360 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2c22, 0x2203 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x11 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x53 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0xb7 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x46d, 0x0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x46d, 0x1004 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x46d, 0x1008 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x46d, 0xf301 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x738, 0x2a0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x738, 0x7263 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x738, 0xb738 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x738, 0xcb29 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x738, 0xf401 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x79, 0x18c2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x79, 0x18c8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x79, 0x18cf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xc12, 0xe17 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xc12, 0xe1c ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xc12, 0xe22 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xc12, 0xe30 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xd2d2, 0xd2d2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xd62, 0x9a1a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xd62, 0x9a1b ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe00, 0xe00 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x12a ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2a5 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2b2 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2bd ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2bf ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2c0 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0x2c6 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xf0d, 0x97 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xf0d, 0xba ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xf0d, 0xd8 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xfff, 0x2a1 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x45e, 0x867 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
// Added 12-17-2020
{ MAKE_CONTROLLER_ID( 0x16d0, 0xf3f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x2f24, 0x8f ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0xe6f, 0xf501 ), k_eControllerType_XBoxOneController, NULL }, // Unknown Controller
//{ MAKE_CONTROLLER_ID( 0x1949, 0x0402 ), /*android*/, NULL }, // Unknown Controller
{ MAKE_CONTROLLER_ID( 0x05ac, 0x0001 ), k_eControllerType_AppleController, NULL }, // MFI Extended Gamepad (generic entry for iOS/tvOS)
{ MAKE_CONTROLLER_ID( 0x05ac, 0x0002 ), k_eControllerType_AppleController, NULL }, // MFI Standard Gamepad (generic entry for iOS/tvOS)
// We now support Joy-Cons if SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is set to "1", but they won't be combined into one controller.
{ MAKE_CONTROLLER_ID( 0x057e, 0x2006 ), k_eControllerType_SwitchJoyConLeft, NULL }, // Nintendo Switch Joy-Con (Left)
{ MAKE_CONTROLLER_ID( 0x057e, 0x2007 ), k_eControllerType_SwitchJoyConRight, NULL }, // Nintendo Switch Joy-Con (Right)
// This same controller ID is spoofed by many 3rd-party Switch controllers.
// The ones we currently know of are:
// * Any 8bitdo controller with Switch support
// * ORTZ Gaming Wireless Pro Controller
// * ZhiXu Gamepad Wireless
// * Sunwaytek Wireless Motion Controller for Nintendo Switch
{ MAKE_CONTROLLER_ID( 0x057e, 0x2009 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Switch Pro Controller
{ MAKE_CONTROLLER_ID( 0x057e, 0x2017 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SNES Controller
{ MAKE_CONTROLLER_ID( 0x057e, 0x2019 ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online N64 Controller
{ MAKE_CONTROLLER_ID( 0x057e, 0x201e ), k_eControllerType_SwitchProController, NULL }, // Nintendo Online SEGA Genesis Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00c1 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORIPAD for Nintendo Switch
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x0092 ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Pokken Tournament DX Pro Pad
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00f6 ), k_eControllerType_SwitchProController, NULL }, // HORI Wireless Switch Pad
#ifdef _WIN32
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_XInputSwitchController, NULL }, // HORI Fighting Commander - Is a Switch controller but shows up through XInput on Windows.
#else
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00dc ), k_eControllerType_SwitchProController, "HORI Fighting Commander" },
#endif
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0180 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Pro Controller for Nintendo Switch
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0181 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0184 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Faceoff Wired Deluxe+ Audio Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0185 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Wired Fight Pad Pro for Nintendo Switch
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0186 ), k_eControllerType_SwitchProController, NULL }, // PDP Afterglow Wireless Switch Controller - working gyro. USB is for charging only. Many later "Wireless" line devices w/ gyro also use this vid/pid
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0187 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Rockcandy Wired Controller
{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0188 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PDP Afterglow Wired Deluxe+ Audio Controller
{ MAKE_CONTROLLER_ID( 0x0f0d, 0x00aa ), k_eControllerType_SwitchInputOnlyController, NULL }, // HORI Real Arcade Pro V Hayabusa in Switch Mode
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa711 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Wired Controller Plus/PowerA Wired Controller Nintendo GameCube Style
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa712 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Fight Pad
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa713 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Super Mario Controller
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa714 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Spectra Controller
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa715 ), k_eControllerType_SwitchInputOnlyController, NULL }, // Power A Fusion Wireless Arcade Stick (USB Mode) Over BT is shows up as 057e 2009
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa716 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Pro Controller - USB requires toggling switch on back of device
// Valve products
{ MAKE_CONTROLLER_ID( 0x0000, 0x11fb ), k_eControllerType_MobileTouch, NULL }, // Streaming mobile touch virtual controls
{ MAKE_CONTROLLER_ID( 0x28de, 0x1101 ), k_eControllerType_SteamController, NULL }, // Valve Legacy Steam Controller (CHELL)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1102 ), k_eControllerType_SteamController, NULL }, // Valve wired Steam Controller (D0G)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1105 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1106 ), k_eControllerType_SteamController, NULL }, // Valve Bluetooth Steam Controller (D0G)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1142 ), k_eControllerType_SteamController, NULL }, // Valve wireless Steam Controller
{ MAKE_CONTROLLER_ID( 0x28de, 0x1201 ), k_eControllerType_SteamControllerV2, NULL }, // Valve wired Steam Controller (HEADCRAB)
{ MAKE_CONTROLLER_ID( 0x28de, 0x1202 ), k_eControllerType_SteamControllerV2, NULL }, // Valve Bluetooth Steam Controller (HEADCRAB)
};
static const char *GetControllerTypeOverride( int nVID, int nPID )
{
const char *hint = SDL_GetHint(SDL_HINT_GAMECONTROLLERTYPE);
if (hint) {
char key[32];
const char *spot = NULL;
SDL_snprintf(key, sizeof(key), "0x%.4x/0x%.4x=", nVID, nPID);
spot = SDL_strstr(hint, key);
if (!spot) {
SDL_snprintf(key, sizeof(key), "0x%.4X/0x%.4X=", nVID, nPID);
spot = SDL_strstr(hint, key);
}
if (spot) {
spot += SDL_strlen(key);
if (SDL_strncmp(spot, "k_eControllerType_", 18) == 0) {
spot += 18;
}
return spot;
}
}
return NULL;
}
EControllerType GuessControllerType( int nVID, int nPID )
{
#if 0//def _DEBUG
// Verify that there are no duplicates in the controller list
// If the list were sorted, we could do this much more efficiently, as well as improve lookup speed.
static bool s_bCheckedForDuplicates;
if ( !s_bCheckedForDuplicates )
{
s_bCheckedForDuplicates = true;
int i, j;
for ( i = 0; i < sizeof( arrControllers ) / sizeof( arrControllers[ 0 ] ); ++i )
{
for ( j = i + 1; j < sizeof( arrControllers ) / sizeof( arrControllers[ 0 ] ); ++j )
{
if ( arrControllers[ i ].m_unDeviceID == arrControllers[ j ].m_unDeviceID )
{
Log( "Duplicate controller entry found for VID 0x%.4x PID 0x%.4x\n", ( arrControllers[ i ].m_unDeviceID >> 16 ), arrControllers[ i ].m_unDeviceID & 0xFFFF );
}
}
}
}
#endif // _DEBUG
unsigned int unDeviceID = MAKE_CONTROLLER_ID( nVID, nPID );
int iIndex;
const char *pszOverride = GetControllerTypeOverride( nVID, nPID );
if ( pszOverride )
{
if ( SDL_strncasecmp( pszOverride, "Xbox360", 7 ) == 0 )
{
return k_eControllerType_XBox360Controller;
}
if ( SDL_strncasecmp( pszOverride, "XboxOne", 7 ) == 0 )
{
return k_eControllerType_XBoxOneController;
}
if ( SDL_strncasecmp( pszOverride, "PS3", 3 ) == 0 )
{
return k_eControllerType_PS3Controller;
}
if ( SDL_strncasecmp( pszOverride, "PS4", 3 ) == 0 )
{
return k_eControllerType_PS4Controller;
}
if ( SDL_strncasecmp( pszOverride, "PS5", 3 ) == 0 )
{
return k_eControllerType_PS5Controller;
}
if ( SDL_strncasecmp( pszOverride, "SwitchPro", 9 ) == 0 )
{
return k_eControllerType_SwitchProController;
}
if ( SDL_strncasecmp( pszOverride, "Steam", 5 ) == 0 )
{
return k_eControllerType_SteamController;
}
return k_eControllerType_UnknownNonSteamController;
}
for ( iIndex = 0; iIndex < sizeof( arrControllers ) / sizeof( arrControllers[0] ); ++iIndex )
{
if ( unDeviceID == arrControllers[ iIndex ].m_unDeviceID )
{
return arrControllers[ iIndex ].m_eControllerType;
}
}
return k_eControllerType_UnknownNonSteamController;
}
const char *GuessControllerName( int nVID, int nPID )
{
unsigned int unDeviceID = MAKE_CONTROLLER_ID( nVID, nPID );
int iIndex;
for ( iIndex = 0; iIndex < sizeof( arrControllers ) / sizeof( arrControllers[0] ); ++iIndex )
{
if ( unDeviceID == arrControllers[ iIndex ].m_unDeviceID )
{
return arrControllers[ iIndex ].m_pszName;
}
}
return NULL;
}
#undef MAKE_CONTROLLER_ID
/* vi: set ts=4 sw=4 noexpandtab: */

View File

@@ -1,71 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#include "../SDL_syslocale.h"
#include <psp2/apputil.h>
#include <psp2/system_param.h>
void
SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
{
const char *vita_locales[] = {
"ja_JP",
"en_US",
"fr_FR",
"es_ES",
"de_DE",
"it_IT",
"nl_NL",
"pt_PT",
"ru_RU",
"ko_KR",
"zh_TW",
"zh_CN",
"fi_FI",
"sv_SE",
"da_DK",
"no_NO",
"pl_PL",
"pt_BR",
"en_GB",
"tr_TR",
};
Sint32 language = SCE_SYSTEM_PARAM_LANG_ENGLISH_US;
SceAppUtilInitParam initParam;
SceAppUtilBootParam bootParam;
SDL_zero(initParam);
SDL_zero(bootParam);
sceAppUtilInit(&initParam, &bootParam);
sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &language);
if (language < 0 || language > SCE_SYSTEM_PARAM_LANG_TURKISH)
language = SCE_SYSTEM_PARAM_LANG_ENGLISH_US; // default to english
SDL_strlcpy(buf, vita_locales[language], buflen);
sceAppUtilShutdown();
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,82 +0,0 @@
/*
SDL_ngage_main.c, originally for SDL 1.2 by Hannu Viitala
*/
#include "../../SDL_internal.h"
/* Include the SDL main definition header */
#include "SDL_main.h"
#include <e32std.h>
#include <e32def.h>
#include <e32svr.h>
#include <e32base.h>
#include <estlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <w32std.h>
#include <apgtask.h>
#include "SDL_error.h"
extern "C" int main(int argc, char *argv[]);
TInt E32Main()
{
/* Get the clean-up stack */
CTrapCleanup* cleanup = CTrapCleanup::New();
/* Arrange for multi-threaded operation */
SpawnPosixServerThread();
/* Get args and environment */
int argc = 0;
char** argv = 0;
char** envp = 0;
__crt0(argc,argv,envp);
/* Start the application! */
/* Create stdlib */
_REENT;
/* Set process and thread priority and name */
RThread currentThread;
RProcess thisProcess;
TParse exeName;
exeName.Set(thisProcess.FileName(), NULL, NULL);
currentThread.Rename(exeName.Name());
currentThread.SetProcessPriority(EPriorityLow);
currentThread.SetPriority(EPriorityMuchLess);
/* Increase heap size */
RHeap* newHeap = NULL;
RHeap* oldHeap = NULL;
TInt heapSize = 7500000;
int ret;
newHeap = User::ChunkHeap(NULL, heapSize, heapSize, KMinHeapGrowBy);
if (NULL == newHeap)
{
ret = 3;
goto cleanup;
}
else
{
oldHeap = User::SwitchHeap(newHeap);
/* Call stdlib main */
SDL_SetMainReady();
ret = SDL_main(argc, argv);
}
cleanup:
_cleanup();
CloseSTDLIB();
delete cleanup;
return ret;
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,37 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_sysurl.h"
#include <emscripten/emscripten.h>
int
SDL_SYS_OpenURL(const char *url)
{
EM_ASM({
window.open(UTF8ToString($0), "_blank");
}, url);
return 0;
}
/* vi: set ts=4 sw=4 expandtab: */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
/* D3D12 shader implementation */
typedef enum {
SHADER_SOLID,
SHADER_RGB,
#if SDL_HAVE_YUV
SHADER_YUV_JPEG,
SHADER_YUV_BT601,
SHADER_YUV_BT709,
SHADER_NV12_JPEG,
SHADER_NV12_BT601,
SHADER_NV12_BT709,
SHADER_NV21_JPEG,
SHADER_NV21_BT601,
SHADER_NV21_BT709,
#endif
NUM_SHADERS
} D3D12_Shader;
typedef enum {
ROOTSIG_COLOR,
ROOTSIG_TEXTURE,
#if SDL_HAVE_YUV
ROOTSIG_YUV,
ROOTSIG_NV,
#endif
NUM_ROOTSIGS
} D3D12_RootSignature;
extern void D3D12_GetVertexShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode);
extern void D3D12_GetPixelShader(D3D12_Shader shader, D3D12_SHADER_BYTECODE *outBytecode);
extern D3D12_RootSignature D3D12_GetRootSignatureType(D3D12_Shader shader);
extern void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECODE* outBytecode);
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,79 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
/* This file contains a portable memcpy manipulation function for SDL */
void *
SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
{
#ifdef __GNUC__
/* Presumably this is well tuned for speed.
On my machine this is twice as fast as the C code below.
*/
return __builtin_memcpy(dst, src, len);
#elif defined(HAVE_MEMCPY)
return memcpy(dst, src, len);
#elif defined(HAVE_BCOPY)
bcopy(src, dst, len);
return dst;
#else
/* GCC 4.9.0 with -O3 will generate movaps instructions with the loop
using Uint32* pointers, so we need to make sure the pointers are
aligned before we loop using them.
*/
if (((uintptr_t)src & 0x3) || ((uintptr_t)dst & 0x3)) {
/* Do an unaligned byte copy */
Uint8 *srcp1 = (Uint8 *)src;
Uint8 *dstp1 = (Uint8 *)dst;
while (len--) {
*dstp1++ = *srcp1++;
}
} else {
size_t left = (len % 4);
Uint32 *srcp4, *dstp4;
Uint8 *srcp1, *dstp1;
srcp4 = (Uint32 *) src;
dstp4 = (Uint32 *) dst;
len /= 4;
while (len--) {
*dstp4++ = *srcp4++;
}
srcp1 = (Uint8 *) srcp4;
dstp1 = (Uint8 *) dstp4;
switch (left) {
case 3:
*dstp1++ = *srcp1++;
case 2:
*dstp1++ = *srcp1++;
case 1:
*dstp1++ = *srcp1++;
}
}
return dst;
#endif /* __GNUC__ */
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,75 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
/* This file contains a portable memset manipulation function for SDL */
void *
SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
{
#if defined(HAVE_MEMSET)
return memset(dst, c, len);
#else
size_t left;
Uint32 *dstp4;
Uint8 *dstp1 = (Uint8 *) dst;
Uint8 value1;
Uint32 value4;
/* The value used in memset() is a byte, passed as an int */
c &= 0xff;
/* The destination pointer needs to be aligned on a 4-byte boundary to
* execute a 32-bit set. Set first bytes manually if needed until it is
* aligned. */
value1 = (Uint8)c;
while ((uintptr_t)dstp1 & 0x3) {
if (len--) {
*dstp1++ = value1;
} else {
return dst;
}
}
value4 = ((Uint32)c | ((Uint32)c << 8) | ((Uint32)c << 16) | ((Uint32)c << 24));
dstp4 = (Uint32 *) dstp1;
left = (len % 4);
len /= 4;
while (len--) {
*dstp4++ = value4;
}
dstp1 = (Uint8 *) dstp4;
switch (left) {
case 3:
*dstp1++ = value1;
case 2:
*dstp1++ = value1;
case 1:
*dstp1++ = value1;
}
return dst;
#endif /* HAVE_MEMSET */
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,36 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* Do our best to make sure va_copy is working */
#if defined(__NGAGE__)
#undef va_copy
#define va_copy(dst, src) dst = src
#elif defined(_MSC_VER) && _MSC_VER <= 1800
/* Visual Studio 2013 tries to link with _vacopy in the C runtime. Newer versions do an inline assignment */
#undef va_copy
#define va_copy(dst, src) dst = src
#elif defined(__GNUC__) && (__GNUC__ < 3)
#define va_copy(dst, src) __va_copy(dst, src)
#endif
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,123 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
/* An implementation of mutexes using the Symbian API. */
#include <e32std.h>
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
struct SDL_mutex
{
TInt handle;
};
extern TInt CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny*, TAny*);
static TInt NewMutex(const TDesC& aName, TAny* aPtr1, TAny*)
{
return ((RMutex*)aPtr1)->CreateGlobal(aName);
}
/* Create a mutex */
SDL_mutex *
SDL_CreateMutex(void)
{
RMutex rmutex;
TInt status = CreateUnique(NewMutex, &rmutex, NULL);
if(status != KErrNone)
{
SDL_SetError("Couldn't create mutex.");
}
SDL_mutex* mutex = new /*(ELeave)*/ SDL_mutex;
mutex->handle = rmutex.Handle();
return(mutex);
}
/* Free the mutex */
void
SDL_DestroyMutex(SDL_mutex * mutex)
{
if (mutex)
{
RMutex rmutex;
rmutex.SetHandle(mutex->handle);
rmutex.Signal();
rmutex.Close();
delete(mutex);
mutex = NULL;
}
}
/* Try to lock the mutex */
#if 0
int
SDL_TryLockMutex(SDL_mutex * mutex)
{
if (mutex == NULL)
{
SDL_SetError("Passed a NULL mutex.");
return -1;
}
// Not yet implemented.
return 0;
}
#endif
/* Lock the mutex */
int
SDL_LockMutex(SDL_mutex * mutex)
{
if (mutex == NULL)
{
SDL_SetError("Passed a NULL mutex.");
return -1;
}
RMutex rmutex;
rmutex.SetHandle(mutex->handle);
rmutex.Wait();
return(0);
}
/* Unlock the mutex */
int
SDL_UnlockMutex(SDL_mutex * mutex)
{
if ( mutex == NULL )
{
SDL_SetError("Passed a NULL mutex.");
return -1;
}
RMutex rmutex;
rmutex.SetHandle(mutex->handle);
rmutex.Signal();
return(0);
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,195 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
/* An implementation of semaphores using the Symbian API. */
#include <e32std.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#define SDL_MUTEX_TIMEOUT -2
struct SDL_semaphore
{
TInt handle;
TInt count;
};
struct TInfo
{
TInfo(TInt aTime, TInt aHandle) :
iTime(aTime), iHandle(aHandle), iVal(0) {}
TInt iTime;
TInt iHandle;
TInt iVal;
};
extern TInt CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny*, TAny*);
static TBool RunThread(TAny* aInfo)
{
TInfo* info = STATIC_CAST(TInfo*, aInfo);
User::After(info->iTime);
RSemaphore sema;
sema.SetHandle(info->iHandle);
sema.Signal();
info->iVal = SDL_MUTEX_TIMEOUT;
return 0;
}
static TInt
NewThread(const TDesC& aName, TAny* aPtr1, TAny* aPtr2)
{
return ((RThread*)(aPtr1))->Create
(aName,
RunThread,
KDefaultStackSize,
NULL,
aPtr2);
}
static TInt NewSema(const TDesC& aName, TAny* aPtr1, TAny* aPtr2)
{
TInt value = *((TInt*) aPtr2);
return ((RSemaphore*)aPtr1)->CreateGlobal(aName, value);
}
static void WaitAll(SDL_sem *sem)
{
RSemaphore sema;
sema.SetHandle(sem->handle);
sema.Wait();
while(sem->count < 0)
{
sema.Wait();
}
}
SDL_sem *
SDL_CreateSemaphore(Uint32 initial_value)
{
RSemaphore s;
TInt status = CreateUnique(NewSema, &s, &initial_value);
if(status != KErrNone)
{
SDL_SetError("Couldn't create semaphore");
}
SDL_semaphore* sem = new /*(ELeave)*/ SDL_semaphore;
sem->handle = s.Handle();
sem->count = initial_value;
return(sem);
}
void
SDL_DestroySemaphore(SDL_sem * sem)
{
if (sem)
{
RSemaphore sema;
sema.SetHandle(sem->handle);
sema.Signal(sema.Count());
sema.Close();
delete sem;
sem = NULL;
}
}
int
SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
{
if (! sem)
{
SDL_SetError("Passed a NULL sem");
return -1;
}
if (timeout == SDL_MUTEX_MAXWAIT)
{
WaitAll(sem);
return SDL_MUTEX_MAXWAIT;
}
RThread thread;
TInfo* info = new (ELeave)TInfo(timeout, sem->handle);
TInt status = CreateUnique(NewThread, &thread, info);
if(status != KErrNone)
{
return status;
}
thread.Resume();
WaitAll(sem);
if(thread.ExitType() == EExitPending)
{
thread.Kill(SDL_MUTEX_TIMEOUT);
}
thread.Close();
return info->iVal;
}
int
SDL_SemTryWait(SDL_sem *sem)
{
if(sem->count > 0)
{
sem->count--;
}
return SDL_MUTEX_TIMEOUT;
}
int
SDL_SemWait(SDL_sem * sem)
{
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
Uint32
SDL_SemValue(SDL_sem * sem)
{
if (! sem)
{
SDL_SetError("Passed a NULL sem.");
return 0;
}
return sem->count;
}
int
SDL_SemPost(SDL_sem * sem)
{
if (! sem)
{
SDL_SetError("Passed a NULL sem.");
return -1;
}
sem->count++;
RSemaphore sema;
sema.SetHandle(sem->handle);
sema.Signal();
return 0;
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,134 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_THREAD_NGAGE
/* N-Gage thread management routines for SDL */
#include <e32std.h>
extern "C" {
#undef NULL
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
};
static int object_count;
static int
RunThread(TAny* data)
{
SDL_RunThread((SDL_Thread*)data);
return(0);
}
static TInt
NewThread(const TDesC& aName, TAny* aPtr1, TAny* aPtr2)
{
return ((RThread*)(aPtr1))->Create
(aName,
RunThread,
KDefaultStackSize,
NULL,
aPtr2);
}
int
CreateUnique(TInt (*aFunc)(const TDesC& aName, TAny*, TAny*), TAny* aPtr1, TAny* aPtr2)
{
TBuf<16> name;
TInt status = KErrNone;
do
{
object_count++;
name.Format(_L("SDL_%x"), object_count);
status = aFunc(name, aPtr1, aPtr2);
}
while(status == KErrAlreadyExists);
return status;
}
int
SDL_SYS_CreateThread(SDL_Thread *thread)
{
RThread rthread;
TInt status = CreateUnique(NewThread, &rthread, thread);
if (status != KErrNone)
{
delete(((RThread*)(thread->handle)));
thread->handle = NULL;
SDL_SetError("Not enough resources to create thread");
return(-1);
}
rthread.Resume();
thread->handle = rthread.Handle();
return(0);
}
void
SDL_SYS_SetupThread(const char *name)
{
return;
}
SDL_threadID
SDL_ThreadID(void)
{
RThread current;
TThreadId id = current.Id();
return id;
}
int
SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
{
return (0);
}
void
SDL_SYS_WaitThread(SDL_Thread * thread)
{
RThread t;
t.Open(thread->threadid);
if(t.ExitReason() == EExitPending)
{
TRequestStatus status;
t.Logon(status);
User::WaitForRequest(status);
}
t.Close();
}
void
SDL_SYS_DetachThread(SDL_Thread * thread)
{
return;
}
#endif /* SDL_THREAD_NGAGE */
/* vim: ts=4 sw=4
*/

View File

@@ -1,25 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
typedef int SYS_ThreadHandle;
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,159 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_THREAD_PS2
/* Semaphore functions for the PS2. */
#include <stdio.h>
#include <stdlib.h>
#include <timer_alarm.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include <kernel.h>
struct SDL_semaphore {
s32 semid;
};
static void usercb(struct timer_alarm_t *alarm, void *arg) {
iReleaseWaitThread((int)arg);
}
/* Create a semaphore */
SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
{
SDL_sem *sem;
ee_sema_t sema;
sem = (SDL_sem *) SDL_malloc(sizeof(*sem));
if (sem != NULL) {
/* TODO: Figure out the limit on the maximum value. */
sema.init_count = initial_value;
sema.max_count = 255;
sema.option = 0;
sem->semid = CreateSema(&sema);
if (sem->semid < 0) {
SDL_SetError("Couldn't create semaphore");
SDL_free(sem);
sem = NULL;
}
} else {
SDL_OutOfMemory();
}
return sem;
}
/* Free the semaphore */
void SDL_DestroySemaphore(SDL_sem *sem)
{
if (sem != NULL) {
if (sem->semid > 0) {
DeleteSema(sem->semid);
sem->semid = 0;
}
SDL_free(sem);
}
}
int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
{
int ret;
struct timer_alarm_t alarm;
InitializeTimerAlarm(&alarm);
if (sem == NULL) {
SDL_InvalidParamError("sem");
return 0;
}
if (timeout == 0) {
if (PollSema(sem->semid) < 0) {
return SDL_MUTEX_TIMEDOUT;
}
return 0;
}
if (timeout != SDL_MUTEX_MAXWAIT) {
SetTimerAlarm(&alarm, MSec2TimerBusClock(timeout), &usercb, (void *)GetThreadId());
}
ret = WaitSema(sem->semid);
StopTimerAlarm(&alarm);
if (ret < 0)
return SDL_MUTEX_TIMEDOUT;
return 0; //Wait condition satisfied.
}
int SDL_SemTryWait(SDL_sem *sem)
{
return SDL_SemWaitTimeout(sem, 0);
}
int SDL_SemWait(SDL_sem *sem)
{
return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT);
}
/* Returns the current count of the semaphore */
Uint32 SDL_SemValue(SDL_sem *sem)
{
ee_sema_t info;
if (sem == NULL) {
SDL_InvalidParamError("sem");
return 0;
}
if (ReferSemaStatus(sem->semid, &info) >= 0) {
return info.count;
}
return 0;
}
int SDL_SemPost(SDL_sem *sem)
{
int res;
if (sem == NULL) {
return SDL_InvalidParamError("sem");
}
res = SignalSema(sem->semid);
if (res < 0) {
return SDL_SetError("sceKernelSignalSema() failed");
}
return 0;
}
#endif /* SDL_THREAD_PS2 */
/* vim: ts=4 sw=4
*/

View File

@@ -1,140 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_THREAD_PS2
/* PS2 thread management routines for SDL */
#include <stdio.h>
#include <stdlib.h>
#include "SDL_error.h"
#include "SDL_thread.h"
#include "../SDL_systhread.h"
#include "../SDL_thread_c.h"
#include <kernel.h>
static void FinishThread(SDL_Thread *thread) {
ee_thread_status_t info;
int res;
res = ReferThreadStatus(thread->handle, &info);
TerminateThread(thread->handle);
DeleteThread(thread->handle);
DeleteSema((int)thread->endfunc);
if (res > 0) {
SDL_free(info.stack);
}
}
static int childThread(void *arg)
{
SDL_Thread *thread = (SDL_Thread *)arg;
int res = thread->userfunc(thread->userdata);
SignalSema((int)thread->endfunc);
return res;
}
int SDL_SYS_CreateThread(SDL_Thread *thread)
{
ee_thread_status_t status;
ee_thread_t eethread;
ee_sema_t sema;
size_t stack_size;
int priority = 32;
/* Set priority of new thread to the same as the current thread */
// status.size = sizeof(ee_thread_t);
if (ReferThreadStatus(GetThreadId(), &status) == 0) {
priority = status.current_priority;
}
stack_size = thread->stacksize ? ((int) thread->stacksize) : 0x1800;
/* Create EE Thread */
eethread.attr = 0;
eethread.option = 0;
eethread.func = &childThread;
eethread.stack = SDL_malloc(stack_size);
eethread.stack_size = stack_size;
eethread.gp_reg = &_gp;
eethread.initial_priority = priority;
thread->handle = CreateThread(&eethread);
if (thread->handle < 0) {
return SDL_SetError("CreateThread() failed");
}
// Prepare el semaphore for the ending function
sema.init_count = 0;
sema.max_count = 1;
sema.option = 0;
thread->endfunc = (void *)CreateSema(&sema);
return StartThread(thread->handle, thread);
}
void SDL_SYS_SetupThread(const char *name)
{
/* Do nothing. */
}
SDL_threadID SDL_ThreadID(void)
{
return (SDL_threadID) GetThreadId();
}
void SDL_SYS_WaitThread(SDL_Thread *thread)
{
WaitSema((int)thread->endfunc);
ReleaseWaitThread(thread->handle);
FinishThread(thread);
}
void SDL_SYS_DetachThread(SDL_Thread *thread)
{
/* Do nothing. */
}
int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
{
int value;
if (priority == SDL_THREAD_PRIORITY_LOW) {
value = 111;
} else if (priority == SDL_THREAD_PRIORITY_HIGH) {
value = 32;
} else if (priority == SDL_THREAD_PRIORITY_TIME_CRITICAL) {
value = 16;
} else {
value = 50;
}
return ChangeThreadPriority(GetThreadId(),value);
}
#endif /* SDL_THREAD_PS2 */
/* vim: ts=4 sw=4
*/

View File

@@ -1,24 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <stdint.h>
typedef int32_t SYS_ThreadHandle;

View File

@@ -1,100 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if defined(SDL_TIMER_NGAGE)
#include <e32std.h>
#include <e32hal.h>
#include "SDL_timer.h"
static SDL_bool ticks_started = SDL_FALSE;
static TUint start = 0;
static TInt tickPeriodMilliSeconds;
#ifdef __cplusplus
extern "C" {
#endif
void
SDL_TicksInit(void)
{
if (ticks_started)
{
return;
}
ticks_started = SDL_TRUE;
start = User::TickCount();
TTimeIntervalMicroSeconds32 period;
TInt tmp = UserHal::TickPeriod(period);
(void)tmp; /* Suppress redundant warning. */
tickPeriodMilliSeconds = period.Int() / 1000;
}
void
SDL_TicksQuit(void)
{
ticks_started = SDL_FALSE;
}
Uint64
SDL_GetTicks64(void)
{
if (! ticks_started)
{
SDL_TicksInit();
}
TUint deltaTics = User::TickCount() - start;
// Overlaps early, but should do the trick for now.
return (Uint64)(deltaTics * tickPeriodMilliSeconds);
}
Uint64
SDL_GetPerformanceCounter(void)
{
return (Uint64)User::TickCount();
}
Uint64
SDL_GetPerformanceFrequency(void)
{
return 1000000;
}
void
SDL_Delay(Uint32 ms)
{
User::After(TTimeIntervalMicroSeconds32(ms * 1000));
}
#ifdef __cplusplus
}
#endif
#endif /* SDL_TIMER_NGAGE */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,90 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#ifdef SDL_TIMER_PS2
#include "SDL_thread.h"
#include "SDL_timer.h"
#include "SDL_error.h"
#include "../SDL_timer_c.h"
#include <stdlib.h>
#include <time.h>
#include <timer.h>
#include <sys/time.h>
static uint64_t start;
static SDL_bool ticks_started = SDL_FALSE;
void
SDL_TicksInit(void)
{
if (ticks_started) {
return;
}
ticks_started = SDL_TRUE;
start = GetTimerSystemTime();
}
void
SDL_TicksQuit(void)
{
ticks_started = SDL_FALSE;
}
Uint64
SDL_GetTicks64(void)
{
uint64_t now;
if (!ticks_started) {
SDL_TicksInit();
}
now = GetTimerSystemTime();
return (Uint64)((now - start) / (kBUSCLK / CLOCKS_PER_SEC));
}
Uint64
SDL_GetPerformanceCounter(void)
{
return SDL_GetTicks64();
}
Uint64
SDL_GetPerformanceFrequency(void)
{
return 1000;
}
void SDL_Delay(Uint32 ms)
{
struct timespec tv = {0};
tv.tv_sec = ms / 1000;
tv.tv_nsec = (ms % 1000) * 1000000;
nanosleep(&tv, NULL);
}
#endif /* SDL_TIMER_PS2 */
/* vim: ts=4 sw=4
*/

View File

@@ -1,444 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* This file is #included twice to support int and float versions with the same code. */
SDL_bool
SDL_HASINTERSECTION(const RECTTYPE * A, const RECTTYPE * B)
{
SCALARTYPE Amin, Amax, Bmin, Bmax;
if (!A) {
SDL_InvalidParamError("A");
return SDL_FALSE;
} else if (!B) {
SDL_InvalidParamError("B");
return SDL_FALSE;
} else if (SDL_RECTEMPTY(A) || SDL_RECTEMPTY(B)) {
return SDL_FALSE; /* Special cases for empty rects */
}
/* Horizontal intersection */
Amin = A->x;
Amax = Amin + A->w;
Bmin = B->x;
Bmax = Bmin + B->w;
if (Bmin > Amin) {
Amin = Bmin;
}
if (Bmax < Amax) {
Amax = Bmax;
}
if (Amax <= Amin) {
return SDL_FALSE;
}
/* Vertical intersection */
Amin = A->y;
Amax = Amin + A->h;
Bmin = B->y;
Bmax = Bmin + B->h;
if (Bmin > Amin) {
Amin = Bmin;
}
if (Bmax < Amax) {
Amax = Bmax;
}
if (Amax <= Amin) {
return SDL_FALSE;
}
return SDL_TRUE;
}
SDL_bool
SDL_INTERSECTRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result)
{
SCALARTYPE Amin, Amax, Bmin, Bmax;
if (!A) {
SDL_InvalidParamError("A");
return SDL_FALSE;
} else if (!B) {
SDL_InvalidParamError("B");
return SDL_FALSE;
} else if (!result) {
SDL_InvalidParamError("result");
return SDL_FALSE;
} else if (SDL_RECTEMPTY(A) || SDL_RECTEMPTY(B)) { /* Special cases for empty rects */
result->w = 0;
result->h = 0;
return SDL_FALSE;
}
/* Horizontal intersection */
Amin = A->x;
Amax = Amin + A->w;
Bmin = B->x;
Bmax = Bmin + B->w;
if (Bmin > Amin) {
Amin = Bmin;
}
result->x = Amin;
if (Bmax < Amax) {
Amax = Bmax;
}
result->w = Amax - Amin;
/* Vertical intersection */
Amin = A->y;
Amax = Amin + A->h;
Bmin = B->y;
Bmax = Bmin + B->h;
if (Bmin > Amin) {
Amin = Bmin;
}
result->y = Amin;
if (Bmax < Amax) {
Amax = Bmax;
}
result->h = Amax - Amin;
return !SDL_RECTEMPTY(result);
}
void
SDL_UNIONRECT(const RECTTYPE * A, const RECTTYPE * B, RECTTYPE * result)
{
SCALARTYPE Amin, Amax, Bmin, Bmax;
if (!A) {
SDL_InvalidParamError("A");
return;
} else if (!B) {
SDL_InvalidParamError("B");
return;
} else if (!result) {
SDL_InvalidParamError("result");
return;
} else if (SDL_RECTEMPTY(A)) { /* Special cases for empty Rects */
if (SDL_RECTEMPTY(B)) { /* A and B empty */
SDL_zerop(result);
} else { /* A empty, B not empty */
*result = *B;
}
return;
} else if (SDL_RECTEMPTY(B)) { /* A not empty, B empty */
*result = *A;
return;
}
/* Horizontal union */
Amin = A->x;
Amax = Amin + A->w;
Bmin = B->x;
Bmax = Bmin + B->w;
if (Bmin < Amin) {
Amin = Bmin;
}
result->x = Amin;
if (Bmax > Amax) {
Amax = Bmax;
}
result->w = Amax - Amin;
/* Vertical union */
Amin = A->y;
Amax = Amin + A->h;
Bmin = B->y;
Bmax = Bmin + B->h;
if (Bmin < Amin) {
Amin = Bmin;
}
result->y = Amin;
if (Bmax > Amax) {
Amax = Bmax;
}
result->h = Amax - Amin;
}
SDL_bool SDL_ENCLOSEPOINTS(const POINTTYPE * points, int count, const RECTTYPE * clip,
RECTTYPE * result)
{
SCALARTYPE minx = 0;
SCALARTYPE miny = 0;
SCALARTYPE maxx = 0;
SCALARTYPE maxy = 0;
SCALARTYPE x, y;
int i;
if (!points) {
SDL_InvalidParamError("points");
return SDL_FALSE;
} else if (count < 1) {
SDL_InvalidParamError("count");
return SDL_FALSE;
}
if (clip) {
SDL_bool added = SDL_FALSE;
const SCALARTYPE clip_minx = clip->x;
const SCALARTYPE clip_miny = clip->y;
const SCALARTYPE clip_maxx = clip->x+clip->w-1;
const SCALARTYPE clip_maxy = clip->y+clip->h-1;
/* Special case for empty rectangle */
if (SDL_RECTEMPTY(clip)) {
return SDL_FALSE;
}
for (i = 0; i < count; ++i) {
x = points[i].x;
y = points[i].y;
if (x < clip_minx || x > clip_maxx ||
y < clip_miny || y > clip_maxy) {
continue;
}
if (!added) {
/* Special case: if no result was requested, we are done */
if (result == NULL) {
return SDL_TRUE;
}
/* First point added */
minx = maxx = x;
miny = maxy = y;
added = SDL_TRUE;
continue;
}
if (x < minx) {
minx = x;
} else if (x > maxx) {
maxx = x;
}
if (y < miny) {
miny = y;
} else if (y > maxy) {
maxy = y;
}
}
if (!added) {
return SDL_FALSE;
}
} else {
/* Special case: if no result was requested, we are done */
if (result == NULL) {
return SDL_TRUE;
}
/* No clipping, always add the first point */
minx = maxx = points[0].x;
miny = maxy = points[0].y;
for (i = 1; i < count; ++i) {
x = points[i].x;
y = points[i].y;
if (x < minx) {
minx = x;
} else if (x > maxx) {
maxx = x;
}
if (y < miny) {
miny = y;
} else if (y > maxy) {
maxy = y;
}
}
}
if (result) {
result->x = minx;
result->y = miny;
result->w = (maxx-minx)+1;
result->h = (maxy-miny)+1;
}
return SDL_TRUE;
}
/* Use the Cohen-Sutherland algorithm for line clipping */
static int
COMPUTEOUTCODE(const RECTTYPE * rect, SCALARTYPE x, SCALARTYPE y)
{
int code = 0;
if (y < rect->y) {
code |= CODE_TOP;
} else if (y >= rect->y + rect->h) {
code |= CODE_BOTTOM;
}
if (x < rect->x) {
code |= CODE_LEFT;
} else if (x >= rect->x + rect->w) {
code |= CODE_RIGHT;
}
return code;
}
SDL_bool
SDL_INTERSECTRECTANDLINE(const RECTTYPE * rect, SCALARTYPE *X1, SCALARTYPE *Y1, SCALARTYPE *X2,
SCALARTYPE *Y2)
{
SCALARTYPE x = 0;
SCALARTYPE y = 0;
SCALARTYPE x1, y1;
SCALARTYPE x2, y2;
SCALARTYPE rectx1;
SCALARTYPE recty1;
SCALARTYPE rectx2;
SCALARTYPE recty2;
int outcode1, outcode2;
if (!rect) {
SDL_InvalidParamError("rect");
return SDL_FALSE;
} else if (!X1) {
SDL_InvalidParamError("X1");
return SDL_FALSE;
} else if (!Y1) {
SDL_InvalidParamError("Y1");
return SDL_FALSE;
} else if (!X2) {
SDL_InvalidParamError("X2");
return SDL_FALSE;
} else if (!Y2) {
SDL_InvalidParamError("Y2");
return SDL_FALSE;
} else if (SDL_RECTEMPTY(rect)) {
return SDL_FALSE; /* Special case for empty rect */
}
x1 = *X1;
y1 = *Y1;
x2 = *X2;
y2 = *Y2;
rectx1 = rect->x;
recty1 = rect->y;
rectx2 = rect->x + rect->w - 1;
recty2 = rect->y + rect->h - 1;
/* Check to see if entire line is inside rect */
if (x1 >= rectx1 && x1 <= rectx2 && x2 >= rectx1 && x2 <= rectx2 &&
y1 >= recty1 && y1 <= recty2 && y2 >= recty1 && y2 <= recty2) {
return SDL_TRUE;
}
/* Check to see if entire line is to one side of rect */
if ((x1 < rectx1 && x2 < rectx1) || (x1 > rectx2 && x2 > rectx2) ||
(y1 < recty1 && y2 < recty1) || (y1 > recty2 && y2 > recty2)) {
return SDL_FALSE;
}
if (y1 == y2) { /* Horizontal line, easy to clip */
if (x1 < rectx1) {
*X1 = rectx1;
} else if (x1 > rectx2) {
*X1 = rectx2;
}
if (x2 < rectx1) {
*X2 = rectx1;
} else if (x2 > rectx2) {
*X2 = rectx2;
}
return SDL_TRUE;
}
if (x1 == x2) { /* Vertical line, easy to clip */
if (y1 < recty1) {
*Y1 = recty1;
} else if (y1 > recty2) {
*Y1 = recty2;
}
if (y2 < recty1) {
*Y2 = recty1;
} else if (y2 > recty2) {
*Y2 = recty2;
}
return SDL_TRUE;
}
/* More complicated Cohen-Sutherland algorithm */
outcode1 = COMPUTEOUTCODE(rect, x1, y1);
outcode2 = COMPUTEOUTCODE(rect, x2, y2);
while (outcode1 || outcode2) {
if (outcode1 & outcode2) {
return SDL_FALSE;
}
if (outcode1) {
if (outcode1 & CODE_TOP) {
y = recty1;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);
} else if (outcode1 & CODE_BOTTOM) {
y = recty2;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);
} else if (outcode1 & CODE_LEFT) {
x = rectx1;
y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1);
} else if (outcode1 & CODE_RIGHT) {
x = rectx2;
y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1);
}
x1 = x;
y1 = y;
outcode1 = COMPUTEOUTCODE(rect, x, y);
} else {
if (outcode2 & CODE_TOP) {
y = recty1;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);
} else if (outcode2 & CODE_BOTTOM) {
y = recty2;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);
} else if (outcode2 & CODE_LEFT) {
/* If this assertion ever fires, here's the static analysis that warned about it:
http://buildbot.libsdl.org/sdl-static-analysis/sdl-macosx-static-analysis/sdl-macosx-static-analysis-1101/report-b0d01a.html#EndPath */
SDL_assert(x2 != x1); /* if equal: division by zero. */
x = rectx1;
y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1);
} else if (outcode2 & CODE_RIGHT) {
/* If this assertion ever fires, here's the static analysis that warned about it:
http://buildbot.libsdl.org/sdl-static-analysis/sdl-macosx-static-analysis/sdl-macosx-static-analysis-1101/report-39b114.html#EndPath */
SDL_assert(x2 != x1); /* if equal: division by zero. */
x = rectx2;
y = y1 + ((y2 - y1) * (x - x1)) / (x2 - x1);
}
x2 = x;
y2 = y;
outcode2 = COMPUTEOUTCODE(rect, x, y);
}
}
*X1 = x1;
*Y1 = y1;
*X2 = x2;
*Y2 = y2;
return SDL_TRUE;
}
#undef RECTTYPE
#undef POINTTYPE
#undef SCALARTYPE
#undef COMPUTEOUTCODE
#undef SDL_HASINTERSECTION
#undef SDL_INTERSECTRECT
#undef SDL_RECTEMPTY
#undef SDL_UNIONRECT
#undef SDL_ENCLOSEPOINTS
#undef SDL_INTERSECTRECTANDLINE
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,431 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_BAPP_H
#define SDL_BAPP_H
#include <Path.h>
#include <InterfaceKit.h>
#include <LocaleRoster.h>
#if SDL_VIDEO_OPENGL
#include <OpenGLKit.h>
#endif
#include "../../video/haiku/SDL_bkeyboard.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "../../SDL_internal.h"
#include "SDL_video.h"
/* Local includes */
#include "../../events/SDL_events_c.h"
#include "../../video/haiku/SDL_bframebuffer.h"
#ifdef __cplusplus
}
#endif
#include <vector>
/* Forward declarations */
class SDL_BWin;
/* Message constants */
enum ToSDL {
/* Intercepted by BWindow on its way to BView */
BAPP_MOUSE_MOVED,
BAPP_MOUSE_BUTTON,
BAPP_MOUSE_WHEEL,
BAPP_KEY,
BAPP_REPAINT, /* from _UPDATE_ */
/* From BWindow */
BAPP_MAXIMIZE, /* from B_ZOOM */
BAPP_MINIMIZE,
BAPP_RESTORE, /* TODO: IMPLEMENT! */
BAPP_SHOW,
BAPP_HIDE,
BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */
BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */
BAPP_WINDOW_CLOSE_REQUESTED,
BAPP_WINDOW_MOVED,
BAPP_WINDOW_RESIZED,
BAPP_SCREEN_CHANGED
};
/* Create a descendant of BApplication */
class SDL_BApp : public BApplication {
public:
SDL_BApp(const char* signature) :
BApplication(signature) {
#if SDL_VIDEO_OPENGL
_current_context = NULL;
#endif
}
virtual ~SDL_BApp() {
}
virtual void RefsReceived(BMessage* message) {
char filePath[512];
entry_ref entryRef;
for (int32 i = 0; message->FindRef("refs", i, &entryRef) == B_OK; i++) {
BPath referencePath = BPath(&entryRef);
SDL_SendDropFile(NULL, referencePath.Path());
}
return;
}
/* Event-handling functions */
virtual void MessageReceived(BMessage* message) {
/* Sort out SDL-related messages */
switch ( message->what ) {
case BAPP_MOUSE_MOVED:
_HandleMouseMove(message);
break;
case BAPP_MOUSE_BUTTON:
_HandleMouseButton(message);
break;
case BAPP_MOUSE_WHEEL:
_HandleMouseWheel(message);
break;
case BAPP_KEY:
_HandleKey(message);
break;
case BAPP_REPAINT:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_EXPOSED);
break;
case BAPP_MAXIMIZE:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MAXIMIZED);
break;
case BAPP_MINIMIZE:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MINIMIZED);
break;
case BAPP_SHOW:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_SHOWN);
break;
case BAPP_HIDE:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_HIDDEN);
break;
case BAPP_MOUSE_FOCUS:
_HandleMouseFocus(message);
break;
case BAPP_KEYBOARD_FOCUS:
_HandleKeyboardFocus(message);
break;
case BAPP_WINDOW_CLOSE_REQUESTED:
_HandleBasicWindowEvent(message, SDL_WINDOWEVENT_CLOSE);
break;
case BAPP_WINDOW_MOVED:
_HandleWindowMoved(message);
break;
case BAPP_WINDOW_RESIZED:
_HandleWindowResized(message);
break;
case B_LOCALE_CHANGED:
SDL_SendLocaleChangedEvent();
break;
case BAPP_SCREEN_CHANGED:
/* TODO: Handle screen resize or workspace change */
break;
default:
BApplication::MessageReceived(message);
break;
}
}
/* Window creation/destruction methods */
int32 GetID(SDL_Window *win) {
int32 i;
for(i = 0; i < _GetNumWindowSlots(); ++i) {
if( GetSDLWindow(i) == NULL ) {
_SetSDLWindow(win, i);
return i;
}
}
/* Expand the vector if all slots are full */
if( i == _GetNumWindowSlots() ) {
_PushBackWindow(win);
return i;
}
/* TODO: error handling */
return 0;
}
/* FIXME: Bad coding practice, but I can't include SDL_BWin.h here. Is
there another way to do this? */
void ClearID(SDL_BWin *bwin); /* Defined in SDL_BeApp.cc */
SDL_Window *GetSDLWindow(int32 winID) {
return _window_map[winID];
}
#if SDL_VIDEO_OPENGL
BGLView *GetCurrentContext() {
return _current_context;
}
void SetCurrentContext(BGLView *newContext) {
if(_current_context)
_current_context->UnlockGL();
_current_context = newContext;
if (_current_context)
_current_context->LockGL();
}
#endif
private:
/* Event management */
void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) {
SDL_Window *win;
int32 winID;
if(
!_GetWinID(msg, &winID)
) {
return;
}
win = GetSDLWindow(winID);
SDL_SendWindowEvent(win, sdlEventType, 0, 0);
}
void _HandleMouseMove(BMessage *msg) {
SDL_Window *win;
int32 winID;
int32 x = 0, y = 0;
if(
!_GetWinID(msg, &winID) ||
msg->FindInt32("x", &x) != B_OK || /* x movement */
msg->FindInt32("y", &y) != B_OK /* y movement */
) {
return;
}
win = GetSDLWindow(winID);
// Simple relative mode support for mouse.
if (SDL_GetMouse()->relative_mode) {
int winWidth, winHeight, winPosX, winPosY;
SDL_GetWindowSize(win, &winWidth, &winHeight);
SDL_GetWindowPosition(win, &winPosX, &winPosY);
int dx = x - (winWidth / 2);
int dy = y - (winHeight / 2);
SDL_SendMouseMotion(win, 0, SDL_GetMouse()->relative_mode, dx, dy);
set_mouse_position((winPosX + winWidth / 2), (winPosY + winHeight / 2));
if (!be_app->IsCursorHidden())
be_app->HideCursor();
} else {
SDL_SendMouseMotion(win, 0, 0, x, y);
if (SDL_ShowCursor(-1) && be_app->IsCursorHidden())
be_app->ShowCursor();
}
}
void _HandleMouseButton(BMessage *msg) {
SDL_Window *win;
int32 winID;
int32 button, state; /* left/middle/right, pressed/released */
if(
!_GetWinID(msg, &winID) ||
msg->FindInt32("button-id", &button) != B_OK ||
msg->FindInt32("button-state", &state) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
SDL_SendMouseButton(win, 0, state, button);
}
void _HandleMouseWheel(BMessage *msg) {
SDL_Window *win;
int32 winID;
int32 xTicks, yTicks;
if(
!_GetWinID(msg, &winID) ||
msg->FindInt32("xticks", &xTicks) != B_OK ||
msg->FindInt32("yticks", &yTicks) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
SDL_SendMouseWheel(win, 0, xTicks, -yTicks, SDL_MOUSEWHEEL_NORMAL);
}
void _HandleKey(BMessage *msg) {
int32 scancode, state; /* scancode, pressed/released */
if(
msg->FindInt32("key-state", &state) != B_OK ||
msg->FindInt32("key-scancode", &scancode) != B_OK
) {
return;
}
/* Make sure this isn't a repeated event (key pressed and held) */
if(state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) {
return;
}
HAIKU_SetKeyState(scancode, state);
SDL_SendKeyboardKey(state, HAIKU_GetScancodeFromBeKey(scancode));
if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
const int8 *keyUtf8;
ssize_t count;
if (msg->FindData("key-utf8", B_INT8_TYPE, (const void**)&keyUtf8, &count) == B_OK) {
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
SDL_zeroa(text);
SDL_memcpy(text, keyUtf8, count);
SDL_SendKeyboardText(text);
}
}
}
void _HandleMouseFocus(BMessage *msg) {
SDL_Window *win;
int32 winID;
bool bSetFocus; /* If false, lose focus */
if(
!_GetWinID(msg, &winID) ||
msg->FindBool("focusGained", &bSetFocus) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
if(bSetFocus) {
SDL_SetMouseFocus(win);
} else if(SDL_GetMouseFocus() == win) {
/* Only lose all focus if this window was the current focus */
SDL_SetMouseFocus(NULL);
}
}
void _HandleKeyboardFocus(BMessage *msg) {
SDL_Window *win;
int32 winID;
bool bSetFocus; /* If false, lose focus */
if(
!_GetWinID(msg, &winID) ||
msg->FindBool("focusGained", &bSetFocus) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
if(bSetFocus) {
SDL_SetKeyboardFocus(win);
} else if(SDL_GetKeyboardFocus() == win) {
/* Only lose all focus if this window was the current focus */
SDL_SetKeyboardFocus(NULL);
}
}
void _HandleWindowMoved(BMessage *msg) {
SDL_Window *win;
int32 winID;
int32 xPos, yPos;
/* Get the window id and new x/y position of the window */
if(
!_GetWinID(msg, &winID) ||
msg->FindInt32("window-x", &xPos) != B_OK ||
msg->FindInt32("window-y", &yPos) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
SDL_SendWindowEvent(win, SDL_WINDOWEVENT_MOVED, xPos, yPos);
}
void _HandleWindowResized(BMessage *msg) {
SDL_Window *win;
int32 winID;
int32 w, h;
/* Get the window id ]and new x/y position of the window */
if(
!_GetWinID(msg, &winID) ||
msg->FindInt32("window-w", &w) != B_OK ||
msg->FindInt32("window-h", &h) != B_OK
) {
return;
}
win = GetSDLWindow(winID);
SDL_SendWindowEvent(win, SDL_WINDOWEVENT_RESIZED, w, h);
}
bool _GetWinID(BMessage *msg, int32 *winID) {
return msg->FindInt32("window-id", winID) == B_OK;
}
/* Vector functions: Wraps vector stuff in case we need to change
implementation */
void _SetSDLWindow(SDL_Window *win, int32 winID) {
_window_map[winID] = win;
}
int32 _GetNumWindowSlots() {
return _window_map.size();
}
void _PopBackWindow() {
_window_map.pop_back();
}
void _PushBackWindow(SDL_Window *win) {
_window_map.push_back(win);
}
/* Members */
std::vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id */
#if SDL_VIDEO_OPENGL
BGLView *_current_context;
#endif
};
#endif

View File

@@ -1,200 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_NGAGE
/* Being a ngage driver, there's no event stream. We just define stubs for
most of the API. */
#ifdef __cplusplus
extern "C" {
#endif
#include "../../events/SDL_events_c.h"
#include "../../events/SDL_keyboard_c.h"
#ifdef __cplusplus
}
#endif
#include "SDL_ngagevideo.h"
#include "SDL_ngageevents_c.h"
int HandleWsEvent(_THIS, const TWsEvent& aWsEvent);
void
NGAGE_PumpEvents(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
while (phdata->NGAGE_WsEventStatus != KRequestPending)
{
phdata->NGAGE_WsSession.GetEvent(phdata->NGAGE_WsEvent);
HandleWsEvent(_this, phdata->NGAGE_WsEvent);
phdata->NGAGE_WsEventStatus = KRequestPending;
phdata->NGAGE_WsSession.EventReady(&phdata->NGAGE_WsEventStatus);
}
}
/*****************************************************************************/
/* Internal */
/*****************************************************************************/
#include <bautils.h>
#include <hal.h>
extern void DisableKeyBlocking(_THIS);
extern void RedrawWindowL(_THIS);
TBool isCursorVisible = EFalse;
static SDL_Scancode ConvertScancode(_THIS, int key)
{
SDL_Keycode keycode;
switch(key)
{
case EStdKeyBackspace: // Clear key
keycode = SDLK_BACKSPACE;
break;
case 0x31: // 1
keycode = SDLK_1;
break;
case 0x32: // 2
keycode = SDLK_2;
break;
case 0x33: // 3
keycode = SDLK_3;
break;
case 0x34: // 4
keycode = SDLK_4;
break;
case 0x35: // 5
keycode = SDLK_5;
break;
case 0x36: // 6
keycode = SDLK_6;
break;
case 0x37: // 7
keycode = SDLK_7;
break;
case 0x38: // 8
keycode = SDLK_8;
break;
case 0x39: // 9
keycode = SDLK_9;
break;
case 0x30: // 0
keycode = SDLK_0;
break;
case 0x2a: // Asterisk
keycode = SDLK_ASTERISK;
break;
case EStdKeyHash: // Hash
keycode = SDLK_HASH;
break;
case EStdKeyDevice0: // Left softkey
keycode = SDLK_SOFTLEFT;
break;
case EStdKeyDevice1: // Right softkey
keycode = SDLK_SOFTRIGHT;
break;
case EStdKeyApplication0: // Call softkey
keycode = SDLK_CALL;
break;
case EStdKeyApplication1: // End call softkey
keycode = SDLK_ENDCALL;
break;
case EStdKeyDevice3: // Middle softkey
keycode = SDLK_SELECT;
break;
case EStdKeyUpArrow: // Up arrow
keycode = SDLK_UP;
break;
case EStdKeyDownArrow: // Down arrow
keycode = SDLK_DOWN;
break;
case EStdKeyLeftArrow: // Left arrow
keycode = SDLK_LEFT;
break;
case EStdKeyRightArrow: // Right arrow
keycode = SDLK_RIGHT;
break;
default:
keycode = SDLK_UNKNOWN;
break;
}
return SDL_GetScancodeFromKey(keycode);
}
int HandleWsEvent(_THIS, const TWsEvent& aWsEvent)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
int posted = 0;
switch (aWsEvent.Type())
{
case EEventKeyDown: /* Key events */
SDL_SendKeyboardKey(SDL_PRESSED, ConvertScancode(_this, aWsEvent.Key()->iScanCode));
break;
case EEventKeyUp: /* Key events */
SDL_SendKeyboardKey(SDL_RELEASED, ConvertScancode(_this, aWsEvent.Key()->iScanCode));
break;
case EEventFocusGained: /* SDL window got focus */
phdata->NGAGE_IsWindowFocused = ETrue;
/* Draw window background and screen buffer */
DisableKeyBlocking(_this);
RedrawWindowL(_this);
break;
case EEventFocusLost: /* SDL window lost focus */
{
phdata->NGAGE_IsWindowFocused = EFalse;
RWsSession s;
s.Connect();
RWindowGroup g(s);
g.Construct(TUint32(&g), EFalse);
g.EnableReceiptOfFocus(EFalse);
RWindow w(s);
w.Construct(g, TUint32(&w));
w.SetExtent(TPoint(0, 0), phdata->NGAGE_WsWindow.Size());
w.SetOrdinalPosition(0);
w.Activate();
w.Close();
g.Close();
s.Close();
break;
}
case EEventModifiersChanged:
break;
default:
break;
}
return posted;
}
#endif /* SDL_VIDEO_DRIVER_NGAGE */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,28 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#include "SDL_ngagevideo.h"
extern void NGAGE_PumpEvents(_THIS);
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,431 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_NGAGE
#include <SDL.h>
#include "../SDL_sysvideo.h"
#include "SDL_ngagevideo.h"
#include "SDL_ngageframebuffer_c.h"
#define NGAGE_SURFACE "NGAGE_FrameBuffer"
/* For 12 bit screen HW. Table for fast conversion from 8 bit to 12 bit
*
* TUint16 is enough, but using TUint32 so we can use better instruction
* selection on ARMI.
*/
static TUint32 NGAGE_HWPalette_256_to_Screen[256];
int GetBpp(TDisplayMode displaymode);
void DirectUpdate(_THIS, int numrects, SDL_Rect *rects);
void DrawBackground(_THIS);
void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16* screenBuffer);
void RedrawWindowL(_THIS);
int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
SDL_Surface *surface;
const Uint32 surface_format = SDL_PIXELFORMAT_RGB444;
int w, h;
/* Free the old framebuffer surface */
SDL_NGAGE_DestroyWindowFramebuffer(_this, window);
/* Create a new one */
SDL_GetWindowSize(window, &w, &h);
surface = SDL_CreateRGBSurfaceWithFormat(0, w, h, 0, surface_format);
if (! surface) {
return -1;
}
/* Save the info and return! */
SDL_SetWindowData(window, NGAGE_SURFACE, surface);
*format = surface_format;
*pixels = surface->pixels;
*pitch = surface->pitch;
/* Initialise Epoc frame buffer */
TDisplayMode displayMode = phdata->NGAGE_WsScreen->DisplayMode();
TScreenInfoV01 screenInfo;
TPckg<TScreenInfoV01> sInfo(screenInfo);
UserSvr::ScreenInfo(sInfo);
phdata->NGAGE_ScreenSize = screenInfo.iScreenSize;
phdata->NGAGE_DisplayMode = displayMode;
phdata->NGAGE_HasFrameBuffer = screenInfo.iScreenAddressValid;
phdata->NGAGE_FrameBuffer = phdata->NGAGE_HasFrameBuffer ? (TUint8*) screenInfo.iScreenAddress : NULL;
phdata->NGAGE_BytesPerPixel = ((GetBpp(displayMode)-1) / 8) + 1;
phdata->NGAGE_BytesPerScanLine = screenInfo.iScreenSize.iWidth * phdata->NGAGE_BytesPerPixel;
phdata->NGAGE_BytesPerScreen = phdata->NGAGE_BytesPerScanLine * phdata->NGAGE_ScreenSize.iHeight;
SDL_Log("Screen width %d", screenInfo.iScreenSize.iWidth);
SDL_Log("Screen height %d", screenInfo.iScreenSize.iHeight);
SDL_Log("Screen dmode %d", displayMode);
SDL_Log("Screen valid %d", screenInfo.iScreenAddressValid);
SDL_Log("Bytes per pixel %d", phdata->NGAGE_BytesPerPixel);
SDL_Log("Bytes per scan line %d", phdata->NGAGE_BytesPerScanLine);
SDL_Log("Bytes per screen %d", phdata->NGAGE_BytesPerScreen);
/* It seems that in SA1100 machines for 8bpp displays there is a 512
* palette table at the beginning of the frame buffer.
*
* In 12 bpp machines the table has 16 entries.
*/
if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 8)
{
phdata->NGAGE_FrameBuffer += 512;
}
else
{
phdata->NGAGE_FrameBuffer += 32;
}
#if 0
if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 12)
{
phdata->NGAGE_FrameBuffer += 16 * 2;
}
if (phdata->NGAGE_HasFrameBuffer && GetBpp(displayMode) == 16)
{
phdata->NGAGE_FrameBuffer += 16 * 2;
}
#endif
// Get draw device for updating the screen
TScreenInfoV01 screenInfo2;
NGAGE_Runtime::GetScreenInfo(screenInfo2);
TRAPD(status, phdata->NGAGE_DrawDevice = CFbsDrawDevice::NewScreenDeviceL(screenInfo2, displayMode));
User::LeaveIfError(status);
/* Activate events for me */
phdata->NGAGE_WsEventStatus = KRequestPending;
phdata->NGAGE_WsSession.EventReady(&phdata->NGAGE_WsEventStatus);
SDL_Log("SDL:WsEventStatus");
User::WaitForRequest(phdata->NGAGE_WsEventStatus);
phdata->NGAGE_RedrawEventStatus = KRequestPending;
phdata->NGAGE_WsSession.RedrawReady(&phdata->NGAGE_RedrawEventStatus);
SDL_Log("SDL:RedrawEventStatus");
User::WaitForRequest(phdata->NGAGE_RedrawEventStatus);
phdata->NGAGE_WsWindow.PointerFilter(EPointerFilterDrag, 0);
phdata->NGAGE_ScreenOffset = TPoint(0, 0);
SDL_Log("SDL:DrawBackground");
DrawBackground(_this); // Clear screen
return 0;
}
int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
{
static int frame_number;
SDL_Surface *surface;
surface = (SDL_Surface *) SDL_GetWindowData(window, NGAGE_SURFACE);
if (! surface)
{
return SDL_SetError("Couldn't find ngage surface for window");
}
/* Send the data to the display */
if (SDL_getenv("SDL_VIDEO_NGAGE_SAVE_FRAMES"))
{
char file[128];
SDL_snprintf(file, sizeof(file), "SDL_window%d-%8.8d.bmp",
(int)SDL_GetWindowID(window), ++frame_number);
SDL_SaveBMP(surface, file);
}
DirectUpdate(_this, numrects, (SDL_Rect*)rects);
return 0;
}
void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window)
{
SDL_Surface *surface;
surface = (SDL_Surface *) SDL_SetWindowData(window, NGAGE_SURFACE, NULL);
SDL_FreeSurface(surface);
}
/*****************************************************************************/
/* Runtime */
/*****************************************************************************/
#include <e32svr.h>
#include <hal_data.h>
#include <hal.h>
EXPORT_C void NGAGE_Runtime::GetScreenInfo(TScreenInfoV01& screenInfo2)
{
TPckg<TScreenInfoV01> sInfo2(screenInfo2);
UserSvr::ScreenInfo(sInfo2);
}
/*****************************************************************************/
/* Internal */
/*****************************************************************************/
int GetBpp(TDisplayMode displaymode)
{
return TDisplayModeUtils::NumDisplayModeBitsPerPixel(displaymode);
}
void DrawBackground(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
/* Draw background */
TUint16* screenBuffer = (TUint16*)phdata->NGAGE_FrameBuffer;
/* Draw black background */
Mem::FillZ(screenBuffer, phdata->NGAGE_BytesPerScreen);
}
void DirectDraw(_THIS, int numrects, SDL_Rect *rects, TUint16* screenBuffer)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
SDL_Surface *screen = (SDL_Surface*)SDL_GetWindowData(_this->windows, NGAGE_SURFACE);
TInt i;
//const TInt sourceNumBytesPerPixel = ((screen->format->BitsPerPixel-1) >> 3) + 1;
TDisplayMode displayMode = phdata->NGAGE_DisplayMode;
const TInt sourceNumBytesPerPixel = ((GetBpp(displayMode)-1) / 8) + 1;
//
const TPoint fixedOffset = phdata->NGAGE_ScreenOffset;
const TInt screenW = screen->w;
const TInt screenH = screen->h;
const TInt sourceScanlineLength = screenW;
const TInt targetScanlineLength = phdata->NGAGE_ScreenSize.iWidth;
/* Render the rectangles in the list */
for (i = 0; i < numrects; ++i)
{
const SDL_Rect& currentRect = rects[i];
SDL_Rect rect2;
rect2.x = currentRect.x;
rect2.y = currentRect.y;
rect2.w = currentRect.w;
rect2.h = currentRect.h;
if (rect2.w <= 0 || rect2.h <= 0) /* Sanity check */
{
continue;
}
/* All variables are measured in pixels */
/* Check rects validity, i.e. upper and lower bounds */
TInt maxX = Min(screenW - 1, rect2.x + rect2.w - 1);
TInt maxY = Min(screenH - 1, rect2.y + rect2.h - 1);
if (maxX < 0 || maxY < 0) /* sanity check */
{
continue;
}
/* Clip from bottom */
maxY = Min(maxY, phdata->NGAGE_ScreenSize.iHeight-1);
/* TODO: Clip from the right side */
const TInt sourceRectWidth = maxX - rect2.x + 1;
const TInt sourceRectWidthInBytes = sourceRectWidth * sourceNumBytesPerPixel;
const TInt sourceRectHeight = maxY - rect2.y + 1;
const TInt sourceStartOffset = rect2.x + rect2.y * sourceScanlineLength;
const TUint skipValue = 1; /* 1 = No skip */
TInt targetStartOffset = fixedOffset.iX + rect2.x + (fixedOffset.iY +rect2.y) * targetScanlineLength;
switch (screen->format->BitsPerPixel)
{
case 12:
{
TUint16* bitmapLine = (TUint16*)screen->pixels + sourceStartOffset;
TUint16* screenMemory = screenBuffer + targetStartOffset;
if (skipValue == 1)
{
for(TInt y = 0 ; y < sourceRectHeight ; y++)
{
Mem::Copy(screenMemory, bitmapLine, sourceRectWidthInBytes);
bitmapLine += sourceScanlineLength;
screenMemory += targetScanlineLength;
}
}
else
{
for(TInt y = 0 ; y < sourceRectHeight ; y++)
{
TUint16* bitmapPos = bitmapLine; /* 2 bytes per pixel */
TUint16* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */
for(TInt x = 0 ; x < sourceRectWidth ; x++)
{
__ASSERT_DEBUG(screenMemory < (screenBuffer + phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(screenMemory >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapLine < ((TUint16*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapLine >= (TUint16*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt));
*screenMemoryLinePos++ = *bitmapPos;
bitmapPos += skipValue;
}
bitmapLine += sourceScanlineLength;
screenMemory += targetScanlineLength;
}
}
}
break;
// 256 color paletted mode: 8 bpp --> 12 bpp
default:
{
if(phdata->NGAGE_BytesPerPixel <= 2)
{
TUint8* bitmapLine = (TUint8*)screen->pixels + sourceStartOffset;
TUint16* screenMemory = screenBuffer + targetStartOffset;
for(TInt y = 0 ; y < sourceRectHeight ; y++)
{
TUint8* bitmapPos = bitmapLine; /* 1 byte per pixel */
TUint16* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */
/* Convert each pixel from 256 palette to 4k color values */
for(TInt x = 0 ; x < sourceRectWidth ; x++)
{
__ASSERT_DEBUG(screenMemoryLinePos < (screenBuffer + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(screenMemoryLinePos >= screenBuffer, User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapPos < ((TUint8*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapPos >= (TUint8*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt));
*screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++];
}
bitmapLine += sourceScanlineLength;
screenMemory += targetScanlineLength;
}
}
else
{
TUint8* bitmapLine = (TUint8*)screen->pixels + sourceStartOffset;
TUint32* screenMemory = reinterpret_cast<TUint32*>(screenBuffer + targetStartOffset);
for(TInt y = 0 ; y < sourceRectHeight ; y++)
{
TUint8* bitmapPos = bitmapLine; /* 1 byte per pixel */
TUint32* screenMemoryLinePos = screenMemory; /* 2 bytes per pixel */
/* Convert each pixel from 256 palette to 4k color values */
for(TInt x = 0 ; x < sourceRectWidth ; x++)
{
__ASSERT_DEBUG(screenMemoryLinePos < (reinterpret_cast<TUint32*>(screenBuffer) + (phdata->NGAGE_ScreenSize.iWidth * phdata->NGAGE_ScreenSize.iHeight)), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(screenMemoryLinePos >= reinterpret_cast<TUint32*>(screenBuffer), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapPos < ((TUint8*)screen->pixels + (screen->w * screen->h)), User::Panic(_L("SDL"), KErrCorrupt));
__ASSERT_DEBUG(bitmapPos >= (TUint8*)screen->pixels, User::Panic(_L("SDL"), KErrCorrupt));
*screenMemoryLinePos++ = NGAGE_HWPalette_256_to_Screen[*bitmapPos++];
}
bitmapLine += sourceScanlineLength;
screenMemory += targetScanlineLength;
}
}
}
}
}
}
void DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
if (! phdata->NGAGE_IsWindowFocused)
{
SDL_PauseAudio(1);
SDL_Delay(1000);
return;
}
SDL_PauseAudio(0);
TUint16* screenBuffer = (TUint16*)phdata->NGAGE_FrameBuffer;
#if 0
if (phdata->NGAGE_ScreenOrientation == CFbsBitGc::EGraphicsOrientationRotated270)
{
// ...
}
else
#endif
{
DirectDraw(_this, numrects, rects, screenBuffer);
}
//TRect rect2 = TRect(phdata->NGAGE_WsWindow.Size());
for (int i = 0; i < numrects; ++i)
{
TInt aAx = rects[i].x;
TInt aAy = rects[i].y;
TInt aBx = rects[i].w;
TInt aBy = rects[i].h;
TRect rect2 = TRect(aAx, aAy, aBx, aBy);
phdata->NGAGE_DrawDevice->UpdateRegion(rect2); /* Should we update rects parameter area only? */
phdata->NGAGE_DrawDevice->Update();
}
}
void RedrawWindowL(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
SDL_Surface *screen = (SDL_Surface*)SDL_GetWindowData(_this->windows, NGAGE_SURFACE);
int w = screen->w;
int h = screen->h;
if (phdata->NGAGE_ScreenOrientation == CFbsBitGc::EGraphicsOrientationRotated270) {
w = screen->h;
h = screen->w;
}
if ((w < phdata->NGAGE_ScreenSize.iWidth)
|| (h < phdata->NGAGE_ScreenSize.iHeight)) {
DrawBackground(_this);
}
/* Tell the system that something has been drawn */
TRect rect = TRect(phdata->NGAGE_WsWindow.Size());
phdata->NGAGE_WsWindow.Invalidate(rect);
/* Draw current buffer */
SDL_Rect fullScreen;
fullScreen.x = 0;
fullScreen.y = 0;
fullScreen.w = screen->w;
fullScreen.h = screen->h;
DirectUpdate(_this, 1, &fullScreen);
}
#endif /* SDL_VIDEO_DRIVER_NGAGE */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,38 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
extern int SDL_NGAGE_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
extern int SDL_NGAGE_UpdateWindowFramebuffer(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
extern void SDL_NGAGE_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
/****************************************************************************/
/* Runtime */
/****************************************************************************/
class NGAGE_Runtime
{
public:
IMPORT_C static void GetScreenInfo(TScreenInfoV01& screenInfo2);
};
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,192 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include <stdlib.h>
#ifdef NULL
#undef NULL
#endif
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_NGAGE
#ifdef __cplusplus
extern "C" {
#endif
#include "SDL_video.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
#include "../../events/SDL_events_c.h"
#ifdef __cplusplus
}
#endif
#include "SDL_ngagevideo.h"
#include "SDL_ngagewindow.h"
#include "SDL_ngageevents_c.h"
#include "SDL_ngageframebuffer_c.h"
#define NGAGEVID_DRIVER_NAME "ngage"
/* Initialization/Query functions */
static int NGAGE_VideoInit(_THIS);
static int NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
static void NGAGE_VideoQuit(_THIS);
/* NGAGE driver bootstrap functions */
static void
NGAGE_DeleteDevice(SDL_VideoDevice * device)
{
SDL_VideoData *phdata = (SDL_VideoData*)device->driverdata;
if (phdata)
{
/* Free Epoc resources */
/* Disable events for me */
if (phdata->NGAGE_WsEventStatus != KRequestPending)
{
phdata->NGAGE_WsSession.EventReadyCancel();
}
if (phdata->NGAGE_RedrawEventStatus != KRequestPending)
{
phdata->NGAGE_WsSession.RedrawReadyCancel();
}
free(phdata->NGAGE_DrawDevice);
if (phdata->NGAGE_WsWindow.WsHandle())
{
phdata->NGAGE_WsWindow.Close();
}
if (phdata->NGAGE_WsWindowGroup.WsHandle())
{
phdata->NGAGE_WsWindowGroup.Close();
}
delete phdata->NGAGE_WindowGc;
phdata->NGAGE_WindowGc = NULL;
delete phdata->NGAGE_WsScreen;
phdata->NGAGE_WsScreen = NULL;
if (phdata->NGAGE_WsSession.WsHandle())
{
phdata->NGAGE_WsSession.Close();
}
SDL_free(phdata);
phdata = NULL;
}
if (device)
{
SDL_free(device);
device = NULL;
}
}
static SDL_VideoDevice *
NGAGE_CreateDevice(int devindex)
{
SDL_VideoDevice *device;
SDL_VideoData *phdata;
/* Initialize all variables that we clean on shutdown */
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
if (!device) {
SDL_OutOfMemory();
return (0);
}
/* Initialize internal N-Gage specific data */
phdata = (SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
if (! phdata)
{
SDL_OutOfMemory();
SDL_free(device);
return (0);
}
/* General video */
device->VideoInit = NGAGE_VideoInit;
device->VideoQuit = NGAGE_VideoQuit;
device->SetDisplayMode = NGAGE_SetDisplayMode;
device->PumpEvents = NGAGE_PumpEvents;
device->CreateWindowFramebuffer = SDL_NGAGE_CreateWindowFramebuffer;
device->UpdateWindowFramebuffer = SDL_NGAGE_UpdateWindowFramebuffer;
device->DestroyWindowFramebuffer = SDL_NGAGE_DestroyWindowFramebuffer;
device->free = NGAGE_DeleteDevice;
/* "Window" */
device->CreateSDLWindow = NGAGE_CreateWindow;
device->DestroyWindow = NGAGE_DestroyWindow;
/* N-Gage specific data */
device->driverdata = phdata;
return device;
}
VideoBootStrap NGAGE_bootstrap = {
NGAGEVID_DRIVER_NAME, "SDL ngage video driver",
NGAGE_CreateDevice
};
int
NGAGE_VideoInit(_THIS)
{
SDL_DisplayMode mode;
/* Use 12-bpp desktop mode */
mode.format = SDL_PIXELFORMAT_RGB444;
mode.w = 176;
mode.h = 208;
mode.refresh_rate = 0;
mode.driverdata = NULL;
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
return -1;
}
SDL_zero(mode);
SDL_AddDisplayMode(&_this->displays[0], &mode);
/* We're done! */
return 0;
}
static int
NGAGE_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
{
return 0;
}
void
NGAGE_VideoQuit(_THIS)
{
}
#endif /* SDL_VIDEO_DRIVER_NGAGE */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,75 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#ifndef _SDL_ngagevideo_h
#define _SDL_ngagevideo_h
#include "../SDL_sysvideo.h"
#include <e32std.h>
#include <e32svr.h>
#include <bitdev.h>
#include <w32std.h>
#include <bitdraw.h> // CFbsDrawDevice
#define _THIS SDL_VideoDevice *_this
typedef struct SDL_VideoData
{
/* Epoc window server info */
RWsSession NGAGE_WsSession;
RWindowGroup NGAGE_WsWindowGroup;
TInt NGAGE_WsWindowGroupID;
RWindow NGAGE_WsWindow;
CWsScreenDevice* NGAGE_WsScreen;
CWindowGc* NGAGE_WindowGc;
TRequestStatus NGAGE_WsEventStatus;
TRequestStatus NGAGE_RedrawEventStatus;
TWsEvent NGAGE_WsEvent;
//TWsRedrawEvent NGAGE_RedrawEvent;
CFbsDrawDevice* NGAGE_DrawDevice;
TBool NGAGE_IsWindowFocused; /* Not used yet */
/* Screen hardware frame buffer info */
TBool NGAGE_HasFrameBuffer;
TInt NGAGE_BytesPerPixel;
TInt NGAGE_BytesPerScanLine;
TInt NGAGE_BytesPerScreen;
TDisplayMode NGAGE_DisplayMode;
TSize NGAGE_ScreenSize;
TUint8* NGAGE_FrameBuffer;
TPoint NGAGE_ScreenOffset;
CFbsBitGc::TGraphicsOrientation NGAGE_ScreenOrientation;
/* Simulate double screen height */
//TInt NGAGE_ScreenXScaleValue;
//TInt NGAGE_ScreenYScaleValue;
} SDL_VideoData;
#endif /* _SDL_ngagevideo_h */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,129 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_NGAGE
#include "../SDL_sysvideo.h"
#include "SDL_ngagewindow.h"
const TUint32 WindowClientHandle = 9210;
void DisableKeyBlocking(_THIS);
void ConstructWindowL(_THIS);
int
NGAGE_CreateWindow(_THIS, SDL_Window* window)
{
NGAGE_Window* ngage_window = (NGAGE_Window*)SDL_calloc(1, sizeof(NGAGE_Window));
if (!ngage_window) {
return SDL_OutOfMemory();
}
window->driverdata = ngage_window;
if (window->x == SDL_WINDOWPOS_UNDEFINED) {
window->x = 0;
}
if (window->y == SDL_WINDOWPOS_UNDEFINED) {
window->y = 0;
}
ngage_window->sdl_window = window;
ConstructWindowL(_this);
return 0;
}
void
NGAGE_DestroyWindow(_THIS, SDL_Window* window)
{
NGAGE_Window* ngage_window = (NGAGE_Window*)window->driverdata;
if (ngage_window) {
SDL_free(ngage_window);
}
window->driverdata = NULL;
}
/*****************************************************************************/
/* Internal */
/*****************************************************************************/
void DisableKeyBlocking(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
TRawEvent event;
event.Set((TRawEvent::TType) /*EDisableKeyBlock*/ 51);
phdata->NGAGE_WsSession.SimulateRawEvent(event);
}
void ConstructWindowL(_THIS)
{
SDL_VideoData *phdata = (SDL_VideoData*)_this->driverdata;
TInt error;
error = phdata->NGAGE_WsSession.Connect();
User::LeaveIfError(error);
phdata->NGAGE_WsScreen=new(ELeave) CWsScreenDevice(phdata->NGAGE_WsSession);
User::LeaveIfError(phdata->NGAGE_WsScreen->Construct());
User::LeaveIfError(phdata->NGAGE_WsScreen->CreateContext(phdata->NGAGE_WindowGc));
phdata->NGAGE_WsWindowGroup=RWindowGroup(phdata->NGAGE_WsSession);
User::LeaveIfError(phdata->NGAGE_WsWindowGroup.Construct(WindowClientHandle));
phdata->NGAGE_WsWindowGroup.SetOrdinalPosition(0);
RProcess thisProcess;
TParse exeName;
exeName.Set(thisProcess.FileName(), NULL, NULL);
TBuf<32> winGroupName;
winGroupName.Append(0);
winGroupName.Append(0);
winGroupName.Append(0); // UID
winGroupName.Append(0);
winGroupName.Append(exeName.Name()); // Caption
winGroupName.Append(0);
winGroupName.Append(0); // DOC name
phdata->NGAGE_WsWindowGroup.SetName(winGroupName);
phdata->NGAGE_WsWindow=RWindow(phdata->NGAGE_WsSession);
User::LeaveIfError(phdata->NGAGE_WsWindow.Construct(phdata->NGAGE_WsWindowGroup,WindowClientHandle - 1));
phdata->NGAGE_WsWindow.SetBackgroundColor(KRgbWhite);
phdata->NGAGE_WsWindow.Activate();
phdata->NGAGE_WsWindow.SetSize(phdata->NGAGE_WsScreen->SizeInPixels());
phdata->NGAGE_WsWindow.SetVisible(ETrue);
phdata->NGAGE_WsWindowGroupID = phdata->NGAGE_WsWindowGroup.Identifier();
phdata->NGAGE_IsWindowFocused = EFalse;
DisableKeyBlocking(_this);
}
#endif /* SDL_VIDEO_DRIVER_NGAGE */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,45 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef _SDL_ngagewindow_h
#define _SDL_ngagewindow_h
#include "../SDL_sysvideo.h"
#include "SDL_syswm.h"
#include "SDL_ngagevideo.h"
typedef struct {
SDL_Window* sdl_window;
} NGAGE_Window;
extern int
NGAGE_CreateWindow(_THIS, SDL_Window* window);
extern void
NGAGE_DestroyWindow(_THIS, SDL_Window* window);
#endif /* _SDL_ngagewindow */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,88 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_RISCOS
#include "../../events/SDL_mouse_c.h"
#include <kernel.h>
static SDL_Cursor *
RISCOS_CreateDefaultCursor()
{
SDL_Cursor *cursor;
cursor = SDL_calloc(1, sizeof(*cursor));
if (cursor) {
/* NULL is used to indicate the default cursor */
cursor->driverdata = NULL;
} else {
SDL_OutOfMemory();
}
return cursor;
}
static void
RISCOS_FreeCursor(SDL_Cursor * cursor)
{
SDL_free(cursor);
}
static int
RISCOS_ShowCursor(SDL_Cursor * cursor)
{
if (cursor) {
/* Turn the mouse pointer on */
_kernel_osbyte(106, 1, 0);
} else {
/* Turn the mouse pointer off */
_kernel_osbyte(106, 0, 0);
}
return 0;
}
int
RISCOS_InitMouse(_THIS)
{
SDL_Mouse *mouse = SDL_GetMouse();
/* mouse->CreateCursor = RISCOS_CreateCursor; */
/* mouse->CreateSystemCursor = RISCOS_CreateSystemCursor; */
mouse->ShowCursor = RISCOS_ShowCursor;
mouse->FreeCursor = RISCOS_FreeCursor;
/* mouse->WarpMouse = RISCOS_WarpMouse; */
/* mouse->WarpMouseGlobal = RISCOS_WarpMouseGlobal; */
/* mouse->SetRelativeMouseMode = RISCOS_SetRelativeMouseMode; */
/* mouse->CaptureMouse = RISCOS_CaptureMouse; */
/* mouse->GetGlobalMouseState = RISCOS_GetGlobalMouseState; */
SDL_SetDefaultCursor(RISCOS_CreateDefaultCursor());
return 0;
}
#endif /* SDL_VIDEO_DRIVER_RISCOS */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,30 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#ifndef SDL_riscosmouse_h_
#define SDL_riscosmouse_h_
extern int RISCOS_InitMouse(_THIS);
#endif /* SDL_riscosmouse_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,235 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_VITA_PIB
#include <stdlib.h>
#include <string.h>
#include "SDL_error.h"
#include "SDL_log.h"
#include "SDL_vitavideo.h"
#include "SDL_vitagles_c.h"
/*****************************************************************************/
/* SDL OpenGL/OpenGL ES functions */
/*****************************************************************************/
#define EGLCHK(stmt) \
do { \
EGLint err; \
\
stmt; \
err = eglGetError(); \
if (err != EGL_SUCCESS) { \
SDL_SetError("EGL error %d", err); \
return 0; \
} \
} while (0)
void
VITA_GLES_KeyboardCallback(ScePigletPreSwapData *data)
{
SceCommonDialogUpdateParam commonDialogParam;
SDL_zero(commonDialogParam);
commonDialogParam.renderTarget.colorFormat = data->colorFormat;
commonDialogParam.renderTarget.surfaceType = data->surfaceType;
commonDialogParam.renderTarget.colorSurfaceData = data->colorSurfaceData;
commonDialogParam.renderTarget.depthSurfaceData = data->depthSurfaceData;
commonDialogParam.renderTarget.width = data->width;
commonDialogParam.renderTarget.height = data->height;
commonDialogParam.renderTarget.strideInPixels = data->strideInPixels;
commonDialogParam.displaySyncObject = data->displaySyncObject;
sceCommonDialogUpdate(&commonDialogParam);
}
int
VITA_GLES_LoadLibrary(_THIS, const char *path)
{
pibInit(PIB_SHACCCG | PIB_GET_PROC_ADDR_CORE);
return 0;
}
void *
VITA_GLES_GetProcAddress(_THIS, const char *proc)
{
return eglGetProcAddress(proc);
}
void
VITA_GLES_UnloadLibrary(_THIS)
{
eglTerminate(_this->gl_data->display);
}
static EGLint width = 960;
static EGLint height = 544;
SDL_GLContext
VITA_GLES_CreateContext(_THIS, SDL_Window * window)
{
SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
EGLint attribs[32];
EGLDisplay display;
EGLContext context;
EGLSurface surface;
EGLConfig config;
EGLint num_configs;
PFNEGLPIGLETVITASETPRESWAPCALLBACKSCEPROC preSwapCallback;
int i;
const EGLint contextAttribs[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
EGLCHK(display = eglGetDisplay(0));
EGLCHK(eglInitialize(display, NULL, NULL));
wdata->uses_gles = SDL_TRUE;
window->flags |= SDL_WINDOW_FULLSCREEN;
EGLCHK(eglBindAPI(EGL_OPENGL_ES_API));
i = 0;
attribs[i++] = EGL_RED_SIZE;
attribs[i++] = 8;
attribs[i++] = EGL_GREEN_SIZE;
attribs[i++] = 8;
attribs[i++] = EGL_BLUE_SIZE;
attribs[i++] = 8;
attribs[i++] = EGL_DEPTH_SIZE;
attribs[i++] = 0;
attribs[i++] = EGL_ALPHA_SIZE;
attribs[i++] = 8;
attribs[i++] = EGL_STENCIL_SIZE;
attribs[i++] = 0;
attribs[i++] = EGL_SURFACE_TYPE;
attribs[i++] = 5;
attribs[i++] = EGL_RENDERABLE_TYPE;
attribs[i++] = EGL_OPENGL_ES2_BIT;
attribs[i++] = EGL_CONFORMANT;
attribs[i++] = EGL_OPENGL_ES2_BIT;
attribs[i++] = EGL_NONE;
EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs));
if (num_configs == 0)
{
SDL_SetError("No valid EGL configs for requested mode");
return 0;
}
EGLCHK(surface = eglCreateWindowSurface(display, config, VITA_WINDOW_960X544, NULL));
EGLCHK(context = eglCreateContext(display, config, EGL_NO_CONTEXT, contextAttribs));
EGLCHK(eglMakeCurrent(display, surface, surface, context));
EGLCHK(eglQuerySurface(display, surface, EGL_WIDTH, &width));
EGLCHK(eglQuerySurface(display, surface, EGL_HEIGHT, &height));
_this->gl_data->display = display;
_this->gl_data->context = context;
_this->gl_data->surface = surface;
preSwapCallback = (PFNEGLPIGLETVITASETPRESWAPCALLBACKSCEPROC) eglGetProcAddress("eglPigletVitaSetPreSwapCallbackSCE");
preSwapCallback(VITA_GLES_KeyboardCallback);
return context;
}
int
VITA_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface,
_this->gl_data->surface, _this->gl_data->context))
{
return SDL_SetError("Unable to make EGL context current");
}
return 0;
}
int
VITA_GLES_SetSwapInterval(_THIS, int interval)
{
EGLBoolean status;
status = eglSwapInterval(_this->gl_data->display, interval);
if (status == EGL_TRUE) {
/* Return success to upper level */
_this->gl_data->swapinterval = interval;
return 0;
}
/* Failed to set swap interval */
return SDL_SetError("Unable to set the EGL swap interval");
}
int
VITA_GLES_GetSwapInterval(_THIS)
{
return _this->gl_data->swapinterval;
}
int
VITA_GLES_SwapWindow(_THIS, SDL_Window * window)
{
if (!eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface)) {
return SDL_SetError("eglSwapBuffers() failed");
}
return 0;
}
void
VITA_GLES_DeleteContext(_THIS, SDL_GLContext context)
{
SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
EGLBoolean status;
if (phdata->egl_initialized != SDL_TRUE) {
SDL_SetError("VITA: GLES initialization failed, no OpenGL ES support");
return;
}
/* Check if OpenGL ES connection has been initialized */
if (_this->gl_data->display != EGL_NO_DISPLAY) {
if (context != EGL_NO_CONTEXT) {
status = eglDestroyContext(_this->gl_data->display, context);
if (status != EGL_TRUE) {
/* Error during OpenGL ES context destroying */
SDL_SetError("VITA: OpenGL ES context destroy error");
return;
}
}
}
return;
}
#endif /* SDL_VIDEO_DRIVER_VITA */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,57 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_vitagles_c_h_
#define SDL_vitagles_c_h_
#include <pib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include "SDL_vitavideo.h"
typedef struct SDL_GLDriverData {
EGLDisplay display;
EGLContext context;
EGLSurface surface;
uint32_t swapinterval;
}SDL_GLDriverData;
extern void * VITA_GLES_GetProcAddress(_THIS, const char *proc);
extern int VITA_GLES_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context);
extern void VITA_GLES_SwapBuffers(_THIS);
extern int VITA_GLES_SwapWindow(_THIS, SDL_Window * window);
extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window * window);
extern int VITA_GLES_LoadLibrary(_THIS, const char *path);
extern void VITA_GLES_UnloadLibrary(_THIS);
extern int VITA_GLES_SetSwapInterval(_THIS, int interval);
extern int VITA_GLES_GetSwapInterval(_THIS);
#endif /* SDL_vitagles_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,103 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_VITA_PVR
#include <stdlib.h>
#include <string.h>
#include <psp2/kernel/modulemgr.h>
#include <gpu_es4/psp2_pvr_hint.h>
#include "SDL_error.h"
#include "SDL_log.h"
#include "SDL_vitavideo.h"
#include "../SDL_egl_c.h"
#include "SDL_vitagles_pvr_c.h"
#define MAX_PATH 256 // vita limits are somehow wrong
int
VITA_GLES_LoadLibrary(_THIS, const char *path)
{
PVRSRV_PSP2_APPHINT hint;
char* override = SDL_getenv("VITA_MODULE_PATH");
char* skip_init = SDL_getenv("VITA_PVR_SKIP_INIT");
char* default_path = "app0:module";
char target_path[MAX_PATH];
if (skip_init == NULL) // we don't care about actual value
{
if (override != NULL)
{
default_path = override;
}
sceKernelLoadStartModule("vs0:sys/external/libfios2.suprx", 0, NULL, 0, NULL, NULL);
sceKernelLoadStartModule("vs0:sys/external/libc.suprx", 0, NULL, 0, NULL, NULL);
SDL_snprintf(target_path, MAX_PATH, "%s/%s", default_path, "libgpu_es4_ext.suprx");
sceKernelLoadStartModule(target_path, 0, NULL, 0, NULL, NULL);
SDL_snprintf(target_path, MAX_PATH, "%s/%s", default_path, "libIMGEGL.suprx");
sceKernelLoadStartModule(target_path, 0, NULL, 0, NULL, NULL);
PVRSRVInitializeAppHint(&hint);
SDL_snprintf(hint.szGLES1, MAX_PATH, "%s/%s", default_path, "libGLESv1_CM.suprx");
SDL_snprintf(hint.szGLES2, MAX_PATH, "%s/%s", default_path, "libGLESv2.suprx");
SDL_snprintf(hint.szWindowSystem, MAX_PATH, "%s/%s", default_path, "libpvrPSP2_WSEGL.suprx");
PVRSRVCreateVirtualAppHint(&hint);
}
return SDL_EGL_LoadLibrary(_this, path, (NativeDisplayType) 0, 0);
}
SDL_GLContext
VITA_GLES_CreateContext(_THIS, SDL_Window * window)
{
return SDL_EGL_CreateContext(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
}
int
VITA_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
{
if (window && context) {
return SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context);
} else {
return SDL_EGL_MakeCurrent(_this, NULL, NULL);
}
}
int
VITA_GLES_SwapWindow(_THIS, SDL_Window * window)
{
SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
if (videodata->ime_active) {
sceImeUpdate();
}
return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
}
#endif /* SDL_VIDEO_DRIVER_VITA && SDL_VIDEO_VITA_PVR */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,35 +0,0 @@
/*
Simple DirectMedia Layer
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
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef SDL_vitagles_pvr_c_h_
#define SDL_vitagles_pvr_c_h_
#include "SDL_vitavideo.h"
extern int VITA_GLES_MakeCurrent(_THIS,SDL_Window * window, SDL_GLContext context);
extern int VITA_GLES_SwapWindow(_THIS, SDL_Window * window);
extern SDL_GLContext VITA_GLES_CreateContext(_THIS, SDL_Window * window);
extern int VITA_GLES_LoadLibrary(_THIS, const char *path);
#endif /* SDL_vitagles_pvr_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -1,372 +0,0 @@
// Copyright 2016 Adrien Descamps
// // Distributed under BSD 3-Clause License
#include <lsxintrin.h>
#if YUV_FORMAT == YUV_FORMAT_420
#define READ_Y(y_ptr) \
y = __lsx_vld(y_ptr, 0); \
#define READ_UV \
u_temp = __lsx_vld(u_ptr, 0); \
v_temp = __lsx_vld(v_ptr, 0); \
#else
#error READ_UV unimplemented
#endif
#define PACK_RGBA_32(R1, R2, G1, G2, B1, B2, A1, A2, RGB1, RGB2, \
RGB3, RGB4, RGB5, RGB6, RGB7, RGB8) \
{ \
__m128i ab_l, ab_h, gr_l, gr_h; \
ab_l = __lsx_vilvl_b(B1, A1); \
ab_h = __lsx_vilvh_b(B1, A1); \
gr_l = __lsx_vilvl_b(R1, G1); \
gr_h = __lsx_vilvh_b(R1, G1); \
RGB1 = __lsx_vilvl_h(gr_l, ab_l); \
RGB2 = __lsx_vilvh_h(gr_l, ab_l); \
RGB3 = __lsx_vilvl_h(gr_h, ab_h); \
RGB4 = __lsx_vilvh_h(gr_h, ab_h); \
ab_l = __lsx_vilvl_b(B2, A2); \
ab_h = __lsx_vilvh_b(B2, A2); \
gr_l = __lsx_vilvl_b(R2, G2); \
gr_h = __lsx_vilvh_b(R2, G2); \
RGB5 = __lsx_vilvl_h(gr_l, ab_l); \
RGB6 = __lsx_vilvh_h(gr_l, ab_l); \
RGB7 = __lsx_vilvl_h(gr_h, ab_h); \
RGB8 = __lsx_vilvh_h(gr_h, ab_h); \
}
#define PACK_RGB24_32_STEP(R, G, B, RGB1, RGB2, RGB3) \
RGB1 = __lsx_vilvl_b(G, R); \
RGB1 = __lsx_vshuf_b(B, RGB1, mask1); \
RGB2 = __lsx_vshuf_b(B, G, mask2); \
RGB2 = __lsx_vshuf_b(R, RGB2, mask3); \
RGB3 = __lsx_vshuf_b(R, B, mask4); \
RGB3 = __lsx_vshuf_b(G, RGB3, mask5); \
#define PACK_RGB24_32(R1, R2, G1, G2, B1, B2, RGB1, RGB2, RGB3, RGB4, RGB5, RGB6) \
PACK_RGB24_32_STEP(R1, G1, B1, RGB1, RGB2, RGB3); \
PACK_RGB24_32_STEP(R2, G2, B2, RGB4, RGB5, RGB6); \
#if RGB_FORMAT == RGB_FORMAT_RGB24
#define PACK_PIXEL \
__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6; \
__m128i rgb_7, rgb_8, rgb_9, rgb_10, rgb_11, rgb_12; \
PACK_RGB24_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, \
rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6) \
PACK_RGB24_32(r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, \
rgb_7, rgb_8, rgb_9, rgb_10, rgb_11, rgb_12) \
#elif RGB_FORMAT == RGB_FORMAT_RGBA
#define PACK_PIXEL \
__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \
__m128i rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16; \
__m128i a = __lsx_vldi(0xFF); \
PACK_RGBA_32(r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, a, a, \
rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8) \
PACK_RGBA_32(r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, a, a, \
rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16) \
#elif RGB_FORMAT == RGB_FORMAT_BGRA
#define PACK_PIXEL \
__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \
__m128i rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16; \
__m128i a = __lsx_vldi(0xFF); \
PACK_RGBA_32(b_8_11, b_8_12, g_8_11, g_8_12, r_8_11, r_8_12, a, a, \
rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8) \
PACK_RGBA_32(b_8_21, b_8_22, g_8_21, g_8_22, r_8_21, r_8_22, a, a, \
rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16) \
#elif RGB_FORMAT == RGB_FORMAT_ARGB
#define PACK_PIXEL \
__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \
__m128i rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16; \
__m128i a = __lsx_vldi(0xFF); \
PACK_RGBA_32(a, a, r_8_11, r_8_12, g_8_11, g_8_12, b_8_11, b_8_12, \
rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8) \
PACK_RGBA_32(a, a, r_8_21, r_8_22, g_8_21, g_8_22, b_8_21, b_8_22, \
rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16) \
#elif RGB_FORMAT == RGB_FORMAT_ABGR
#define PACK_PIXEL \
__m128i rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8; \
__m128i rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16; \
__m128i a = __lsx_vldi(0xFF); \
PACK_RGBA_32(a, a, b_8_11, b_8_12, g_8_11, g_8_12, r_8_11, r_8_12, \
rgb_1, rgb_2, rgb_3, rgb_4, rgb_5, rgb_6, rgb_7, rgb_8) \
PACK_RGBA_32(a, a, b_8_21, b_8_22, g_8_21, g_8_22, r_8_21, r_8_22, \
rgb_9, rgb_10, rgb_11, rgb_12, rgb_13, rgb_14, rgb_15, rgb_16) \
#else
#error PACK_PIXEL unimplemented
#endif
#define LSX_ST_UB2(in0, in1, pdst, stride) \
{ \
__lsx_vst(in0, pdst, 0); \
__lsx_vst(in1, pdst + stride, 0); \
}
#if RGB_FORMAT == RGB_FORMAT_RGB24 \
#define SAVE_LINE1 \
LSX_ST_UB2(rgb_1, rgb_2, rgb_ptr1, 16); \
LSX_ST_UB2(rgb_3, rgb_4, rgb_ptr1 + 32, 16); \
LSX_ST_UB2(rgb_5, rgb_6, rgb_ptr1 + 64, 16); \
#define SAVE_LINE2 \
LSX_ST_UB2(rgb_7, rgb_8, rgb_ptr2, 16); \
LSX_ST_UB2(rgb_9, rgb_10, rgb_ptr2 + 32, 16); \
LSX_ST_UB2(rgb_11, rgb_12, rgb_ptr2 + 64, 16); \
#elif RGB_FORMAT == RGB_FORMAT_RGBA || RGB_FORMAT == RGB_FORMAT_BGRA || \
RGB_FORMAT == RGB_FORMAT_ARGB || RGB_FORMAT == RGB_FORMAT_ABGR \
#define SAVE_LINE1 \
LSX_ST_UB2(rgb_1, rgb_2, rgb_ptr1, 16); \
LSX_ST_UB2(rgb_3, rgb_4, rgb_ptr1 + 32, 16); \
LSX_ST_UB2(rgb_5, rgb_6, rgb_ptr1 + 64, 16); \
LSX_ST_UB2(rgb_7, rgb_8, rgb_ptr1 + 96, 16); \
#define SAVE_LINE2 \
LSX_ST_UB2(rgb_9, rgb_10, rgb_ptr2, 16); \
LSX_ST_UB2(rgb_11, rgb_12, rgb_ptr2 + 32, 16); \
LSX_ST_UB2(rgb_13, rgb_14, rgb_ptr2 + 64, 16); \
LSX_ST_UB2(rgb_15, rgb_16, rgb_ptr2 + 96, 16); \
#else
#error SAVE_LINE unimplemented
#endif
// = u*vr g=u*ug+v*vg b=u*ub
#define UV2RGB_16(U, V, R1, G1, B1, R2, G2, B2) \
r_temp = __lsx_vmul_h(V, v2r); \
g_temp = __lsx_vmul_h(U, u2g); \
g_temp = __lsx_vmadd_h(g_temp, V, v2g); \
b_temp = __lsx_vmul_h(U, u2b); \
R1 = __lsx_vilvl_h(r_temp, r_temp); \
G1 = __lsx_vilvl_h(g_temp, g_temp); \
B1 = __lsx_vilvl_h(b_temp, b_temp); \
R2 = __lsx_vilvh_h(r_temp, r_temp); \
G2 = __lsx_vilvh_h(g_temp, g_temp); \
B2 = __lsx_vilvh_h(b_temp, b_temp); \
// Y=(Y-shift)*shift R=(Y+R)>>6,G=(Y+G)>>6,B=(B+Y)>>6
#define ADD_Y2RGB_16(Y1, Y2, R1, G1, B1, R2, G2, B2) \
Y1 = __lsx_vsub_h(Y1, shift); \
Y2 = __lsx_vsub_h(Y2, shift); \
Y1 = __lsx_vmul_h(Y1, yf); \
Y2 = __lsx_vmul_h(Y2, yf); \
R1 = __lsx_vadd_h(R1, Y1); \
G1 = __lsx_vadd_h(G1, Y1); \
B1 = __lsx_vadd_h(B1, Y1); \
R2 = __lsx_vadd_h(R2, Y2); \
G2 = __lsx_vadd_h(G2, Y2); \
B2 = __lsx_vadd_h(B2, Y2); \
R1 = __lsx_vsrai_h(R1, PRECISION); \
G1 = __lsx_vsrai_h(G1, PRECISION); \
B1 = __lsx_vsrai_h(B1, PRECISION); \
R2 = __lsx_vsrai_h(R2, PRECISION); \
G2 = __lsx_vsrai_h(G2, PRECISION); \
B2 = __lsx_vsrai_h(B2, PRECISION); \
#define CLIP(in0, in1, in2, in3, in4, in5) \
{ \
in0 = __lsx_vmaxi_h(in0, 0); \
in1 = __lsx_vmaxi_h(in1, 0); \
in2 = __lsx_vmaxi_h(in2, 0); \
in3 = __lsx_vmaxi_h(in3, 0); \
in4 = __lsx_vmaxi_h(in4, 0); \
in5 = __lsx_vmaxi_h(in5, 0); \
in0 = __lsx_vsat_hu(in0, 7); \
in1 = __lsx_vsat_hu(in1, 7); \
in2 = __lsx_vsat_hu(in2, 7); \
in3 = __lsx_vsat_hu(in3, 7); \
in4 = __lsx_vsat_hu(in4, 7); \
in5 = __lsx_vsat_hu(in5, 7); \
}
#define YUV2RGB_32 \
__m128i y, u_temp, v_temp; \
__m128i r_8_11, g_8_11, b_8_11, r_8_21, g_8_21, b_8_21; \
__m128i r_8_12, g_8_12, b_8_12, r_8_22, g_8_22, b_8_22; \
__m128i u, v, r_temp, g_temp, b_temp; \
__m128i r_1, g_1, b_1, r_2, g_2, b_2; \
__m128i y_1, y_2; \
__m128i r_uv_1, g_uv_1, b_uv_1, r_uv_2, g_uv_2, b_uv_2; \
\
READ_UV \
\
/* process first 16 pixels of first line */ \
u = __lsx_vilvl_b(zero, u_temp); \
v = __lsx_vilvl_b(zero, v_temp); \
u = __lsx_vsub_h(u, bias); \
v = __lsx_vsub_h(v, bias); \
UV2RGB_16(u, v, r_1, g_1, b_1, r_2, g_2, b_2); \
r_uv_1 = r_1; g_uv_1 = g_1; b_uv_1 = b_1; \
r_uv_2 = r_2; g_uv_2 = g_2; b_uv_2 = b_2; \
READ_Y(y_ptr1) \
y_1 = __lsx_vilvl_b(zero, y); \
y_2 = __lsx_vilvh_b(zero, y); \
ADD_Y2RGB_16(y_1, y_2, r_1, g_1, b_1, r_2, g_2, b_2) \
CLIP(r_1, g_1, b_1, r_2, g_2, b_2); \
r_8_11 = __lsx_vpickev_b(r_2, r_1); \
g_8_11 = __lsx_vpickev_b(g_2, g_1); \
b_8_11 = __lsx_vpickev_b(b_2, b_1); \
\
/* process first 16 pixels of second line */ \
r_1 = r_uv_1; g_1 = g_uv_1; b_1 = b_uv_1; \
r_2 = r_uv_2; g_2 = g_uv_2; b_2 = b_uv_2; \
\
READ_Y(y_ptr2) \
y_1 = __lsx_vilvl_b(zero, y); \
y_2 = __lsx_vilvh_b(zero, y); \
ADD_Y2RGB_16(y_1, y_2, r_1, g_1, b_1, r_2, g_2, b_2) \
CLIP(r_1, g_1, b_1, r_2, g_2, b_2); \
r_8_21 = __lsx_vpickev_b(r_2, r_1); \
g_8_21 = __lsx_vpickev_b(g_2, g_1); \
b_8_21 = __lsx_vpickev_b(b_2, b_1); \
\
/* process last 16 pixels of first line */ \
u = __lsx_vilvh_b(zero, u_temp); \
v = __lsx_vilvh_b(zero, v_temp); \
u = __lsx_vsub_h(u, bias); \
v = __lsx_vsub_h(v, bias); \
UV2RGB_16(u, v, r_1, g_1, b_1, r_2, g_2, b_2); \
r_uv_1 = r_1; g_uv_1 = g_1; b_uv_1 = b_1; \
r_uv_2 = r_2; g_uv_2 = g_2; b_uv_2 = b_2; \
READ_Y(y_ptr1 + 16 * y_pixel_stride) \
y_1 = __lsx_vilvl_b(zero, y); \
y_2 = __lsx_vilvh_b(zero, y); \
ADD_Y2RGB_16(y_1, y_2, r_1, g_1, b_1, r_2, g_2, b_2) \
CLIP(r_1, g_1, b_1, r_2, g_2, b_2); \
r_8_12 = __lsx_vpickev_b(r_2, r_1); \
g_8_12 = __lsx_vpickev_b(g_2, g_1); \
b_8_12 = __lsx_vpickev_b(b_2, b_1); \
\
/* process last 16 pixels of second line */ \
r_1 = r_uv_1; g_1 = g_uv_1; b_1 = b_uv_1; \
r_2 = r_uv_2; g_2 = g_uv_2; b_2 = b_uv_2; \
\
READ_Y(y_ptr2 + 16 * y_pixel_stride) \
y_1 = __lsx_vilvl_b(zero, y); \
y_2 = __lsx_vilvh_b(zero, y); \
ADD_Y2RGB_16(y_1, y_2, r_1, g_1, b_1, r_2, g_2, b_2) \
CLIP(r_1, g_1, b_1, r_2, g_2, b_2); \
r_8_22 = __lsx_vpickev_b(r_2, r_1); \
g_8_22 = __lsx_vpickev_b(g_2, g_1); \
b_8_22 = __lsx_vpickev_b(b_2, b_1); \
\
void LSX_FUNCTION_NAME(uint32_t width, uint32_t height, const uint8_t *Y,
const uint8_t *U, const uint8_t *V, uint32_t Y_stride,
uint32_t UV_stride, uint8_t *RGB, uint32_t RGB_stride,
YCbCrType yuv_type)
{
const YUV2RGBParam *const param = &(YUV2RGB[yuv_type]);
#if YUV_FORMAT == YUV_FORMAT_420
const int y_pixel_stride = 1;
const int uv_pixel_stride = 1;
const int uv_x_sample_interval = 2;
const int uv_y_sample_interval = 2;
#endif
#if RGB_FORMAT == RGB_FORMAT_RGB565
const int rgb_pixel_stride = 2;
#elif RGB_FORMAT == RGB_FORMAT_RGB24
const int rgb_pixel_stride = 3;
__m128i mask1 = {0x0504110302100100, 0x0A14090813070612};
__m128i mask2 = {0x1808170716061505, 0x00000000000A1909};
__m128i mask3 = {0x0504170302160100, 0x0A1A090819070618};
__m128i mask4 = {0x1E0D1D0C1C0B1B0A, 0x00000000000F1F0E};
__m128i mask5 = {0x05041C03021B0100, 0x0A1F09081E07061D};
#elif RGB_FORMAT == RGB_FORMAT_RGBA || RGB_FORMAT_BGRA || \
RGB_FORMAT == RGB_FORMAT_ARGB || RGB_FORMAT_ABGR
const int rgb_pixel_stride = 4;
#else
#error Unknown RGB pixel size
#endif
uint32_t xpos, ypos;
__m128i v2r = __lsx_vreplgr2vr_h(param->v_r_factor);
__m128i v2g = __lsx_vreplgr2vr_h(param->v_g_factor);
__m128i u2g = __lsx_vreplgr2vr_h(param->u_g_factor);
__m128i u2b = __lsx_vreplgr2vr_h(param->u_b_factor);
__m128i bias = __lsx_vreplgr2vr_h(128);
__m128i shift = __lsx_vreplgr2vr_h(param->y_shift);
__m128i yf = __lsx_vreplgr2vr_h(param->y_factor);
__m128i zero = __lsx_vldi(0);
if (width >= 32) {
for (ypos = 0; ypos < (height - (uv_y_sample_interval - 1)); ypos += uv_y_sample_interval) {
const uint8_t *y_ptr1 = Y + ypos * Y_stride,
*y_ptr2 = Y + (ypos + 1) * Y_stride,
*u_ptr = U + (ypos/uv_y_sample_interval) * UV_stride,
*v_ptr = V + (ypos/uv_y_sample_interval) * UV_stride;
uint8_t *rgb_ptr1 = RGB + ypos * RGB_stride,
*rgb_ptr2 = RGB + (ypos + 1) * RGB_stride;
for (xpos = 0; xpos < (width - 31); xpos += 32){
YUV2RGB_32
{
PACK_PIXEL
SAVE_LINE1
if (uv_y_sample_interval > 1)
{
SAVE_LINE2
}
}
y_ptr1 += 32 * y_pixel_stride;
y_ptr2 += 32 * y_pixel_stride;
u_ptr += 32 * uv_pixel_stride/uv_x_sample_interval;
v_ptr += 32 * uv_pixel_stride/uv_x_sample_interval;
rgb_ptr1 += 32 * rgb_pixel_stride;
rgb_ptr2 += 32 * rgb_pixel_stride;
}
}
if (uv_y_sample_interval == 2 && ypos == (height - 1)) {
const uint8_t *y_ptr = Y + ypos * Y_stride,
*u_ptr = U + (ypos/uv_y_sample_interval) * UV_stride,
*v_ptr = V + (ypos/uv_y_sample_interval) * UV_stride;
uint8_t *rgb_ptr = RGB + ypos * RGB_stride;
STD_FUNCTION_NAME(width, 1, y_ptr, u_ptr, v_ptr, Y_stride, UV_stride, rgb_ptr, RGB_stride, yuv_type);
}
}
{
int converted = (width & ~31);
if (converted != width)
{
const uint8_t *y_ptr = Y + converted * y_pixel_stride,
*u_ptr = U + converted * uv_pixel_stride / uv_x_sample_interval,
*v_ptr = V + converted * uv_pixel_stride / uv_x_sample_interval;
uint8_t *rgb_ptr = RGB + converted * rgb_pixel_stride;
STD_FUNCTION_NAME(width-converted, height, y_ptr, u_ptr, v_ptr, Y_stride, UV_stride, rgb_ptr, RGB_stride, yuv_type);
}
}
}
#undef LSX_FUNCTION_NAME
#undef STD_FUNCTION_NAME
#undef YUV_FORMAT
#undef RGB_FORMAT
#undef LSX_ALIGNED
#undef LSX_ST_UB2
#undef UV2RGB_16
#undef ADD_Y2RGB_16
#undef PACK_RGB24_32_STEP
#undef PACK_RGB24_32
#undef PACK_PIXEL
#undef PACK_RGBA_32
#undef SAVE_LINE1
#undef SAVE_LINE2
#undef READ_Y
#undef READ_UV
#undef YUV2RGB_32