mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-28 19:08:25 -05:00
remove obsolete files
This commit is contained in:
parent
117076fd71
commit
de846fb71e
44
dist/license.md
vendored
44
dist/license.md
vendored
@ -1,44 +0,0 @@
|
||||
The icons in this folder and its subfolders have the following licenses:
|
||||
|
||||
Icon Name | License | Origin/Author
|
||||
--- | --- | ---
|
||||
qt_themes/default/icons/16x16/checked.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/disconnected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/failed.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
qt_themes/default/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/no_avatar.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team
|
||||
qt_themes/default/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/default/icons/48x48/star.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
qt_themes/qdarkstyle/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/no_avatar.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team
|
||||
qt_themes/qdarkstyle/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/qdarkstyle/icons/48x48/star.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/connected.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/connected_notification.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/16x16/view-refresh.png | Apache 2.0 | https://material.io
|
||||
qt_themes/colorful/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/plus.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com
|
||||
qt_themes/colorful/icons/48x48/star.png | CC BY-ND 3.0 | https://icons8.com
|
||||
|
||||
<!-- TODO: Add the license of the yuzu icon -->
|
12
dist/yuzu.desktop
vendored
12
dist/yuzu.desktop
vendored
@ -1,12 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=yuzu
|
||||
GenericName=Switch Emulator
|
||||
Comment=Nintendo Switch video game console emulator
|
||||
Icon=yuzu
|
||||
TryExec=yuzu
|
||||
Exec=yuzu %f
|
||||
Categories=Game;Emulator;Qt;
|
||||
MimeType=application/x-nx-nro;application/x-nx-nso;application/x-nx-nsp;application/x-nx-xci;
|
||||
Keywords=Switch;Nintendo;
|
33
dist/yuzu.xml
vendored
33
dist/yuzu.xml
vendored
@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-nx-nro">
|
||||
<comment>Nintendo Switch homebrew executable</comment>
|
||||
<acronym>NRO</acronym>
|
||||
<icon name="yuzu"/>
|
||||
<glob pattern="*.nro"/>
|
||||
<magic><match value="NRO" type="string" offset="16"/></magic>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/x-nx-nso">
|
||||
<comment>Nintendo Switch homebrew executable</comment>
|
||||
<acronym>NSO</acronym>
|
||||
<icon name="yuzu"/>
|
||||
<glob pattern="*.nso"/>
|
||||
<magic><match value="NSO" type="string" offset="0"/></magic>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/x-nx-nsp">
|
||||
<comment>Nintendo Switch Package</comment>
|
||||
<acronym>NSP</acronym>
|
||||
<icon name="yuzu"/>
|
||||
<glob pattern="*.nsp"/>
|
||||
<magic><match value="PFS" type="string" offset="0"/></magic>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/x-nx-xci">
|
||||
<comment>Nintendo Switch Card Image</comment>
|
||||
<acronym>XCI</acronym>
|
||||
<icon name="yuzu"/>
|
||||
<glob pattern="*.xci"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
89
externals/SDL/.clang-format
vendored
89
externals/SDL/.clang-format
vendored
@ -1,89 +0,0 @@
|
||||
---
|
||||
AlignConsecutiveMacros: Consecutive
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveBitFields: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments: true
|
||||
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
|
||||
AlwaysBreakAfterDefinitionReturnType: All
|
||||
AlwaysBreakAfterReturnType: AllDefinitions
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
|
||||
# Custom brace breaking
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterObjCDeclaration: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: false
|
||||
BeforeElse: false
|
||||
BeforeWhile: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
|
||||
# Make the closing brace of container literals go to a new line
|
||||
Cpp11BracedListStyle: false
|
||||
|
||||
# Never format includes
|
||||
IncludeBlocks: Preserve
|
||||
# clang-format version 4.0 through 12.0:
|
||||
#SortIncludes: false
|
||||
# clang-format version 13.0+:
|
||||
#SortIncludes: Never
|
||||
|
||||
# No length limit, in case it breaks macros, you can
|
||||
# disable it with /* clang-format off/on */ comments
|
||||
ColumnLimit: 0
|
||||
|
||||
IndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseLabels: false
|
||||
IndentCaseBlocks: false
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentExternBlock: NoIndent
|
||||
|
||||
SpaceAfterCStyleCast: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
|
||||
ForEachMacros:
|
||||
[
|
||||
"spa_list_for_each",
|
||||
"spa_list_for_each_safe",
|
||||
"wl_list_for_each",
|
||||
"wl_array_for_each",
|
||||
"udev_list_entry_foreach",
|
||||
]
|
||||
|
||||
---
|
||||
|
77
externals/SDL/.editorconfig
vendored
77
externals/SDL/.editorconfig
vendored
@ -1,77 +0,0 @@
|
||||
# For format see editorconfig.org
|
||||
# Copyright 2022 Collabora Ltd.
|
||||
# SPDX-License-Identifier: Zlib
|
||||
|
||||
root = true
|
||||
|
||||
[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.xml]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[{cmake_uninstall.cmake.in,test/CMakeLists.txt}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[configure.ac]
|
||||
# Inconsistently 2-, 4- or occasionally 3-space indented, but mostly 4,
|
||||
# so let's use 4 for new code
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
|
||||
indent_size = 8
|
||||
indent_style = tab
|
||||
tab_width = 8
|
||||
|
||||
[Makefile.os2]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
|
||||
[test/Makefile.os2]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[{src/core/os2/geniconv/makefile,src/core/os2/geniconv/os2cp.c}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[src/joystick/controller_type.*]
|
||||
indent_style = tab
|
||||
|
||||
[src/joystick/hidapi/steam/*.h]
|
||||
indent_style = tab
|
||||
|
||||
[src/libm/*.c]
|
||||
indent_style = tab
|
||||
|
||||
[src/test/SDL_test_{crc32,md5,random}.c]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[src/video/yuv2rgb/*.{c,h}]
|
||||
indent_style = tab
|
||||
|
||||
[src/wayland-protocols/*.xml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.{markdown,md}]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
# Markdown syntax treats tabs as 4 spaces
|
||||
tab_width = 4
|
||||
|
||||
[{*.bat,*.rc}]
|
||||
end_of_line = crlf
|
57
externals/SDL/.github/workflows/msvc.yml
vendored
57
externals/SDL/.github/workflows/msvc.yml
vendored
@ -1,57 +0,0 @@
|
||||
name: Build (MSVC)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (x64), flags: -A x64, project: VisualC/SDL.sln, projectflags: '/p:Platform=x64' }
|
||||
- { name: Windows (x86), flags: -A Win32, project: VisualC/SDL.sln, projectflags: '/p:Platform=Win32' }
|
||||
- { name: Windows static VCRT (x64), flags: -A x64 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON }
|
||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
|
||||
- { name: Windows (ARM), flags: -A ARM }
|
||||
- { name: Windows (ARM64), flags: -A ARM64 }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" -DSDL_TESTS=OFF,
|
||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0' }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -S . -B build `
|
||||
-DSDL_TESTS=ON `
|
||||
-DSDL_INSTALL_TESTS=ON `
|
||||
${{ matrix.platform.flags }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build CMake
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
- name: Run build-time tests
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release
|
||||
- name: Install CMake
|
||||
run: |
|
||||
echo "SDL2_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Verify CMake configuration files
|
||||
if: ${{ !contains(matrix.platform.name, 'UWP') }} # FIXME: cmake/test/CMakeLists.txt should support UWP
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build `
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} `
|
||||
${{ matrix.platform.flags }}
|
||||
cmake --build cmake_config_build --config Release
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
- name: Build msbuild
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
30
externals/SDL/.github/workflows/ps2.yaml
vendored
30
externals/SDL/.github/workflows/ps2.yaml
vendored
@ -1,30 +0,0 @@
|
||||
name: Build (Sony Playstation 2)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ps2:
|
||||
runs-on: ubuntu-latest
|
||||
container: ps2dev/ps2dev:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake gmp mpc1 mpfr4 make
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake -DSDL_TESTS=ON
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- name: Upload artifacts
|
||||
if: ${{ success() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tests-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
build/test
|
35
externals/SDL/.github/workflows/watcom.yml
vendored
35
externals/SDL/.github/workflows/watcom.yml
vendored
@ -1,35 +0,0 @@
|
||||
name: Build (OpenWatcom)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
os2:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows, makefile: Makefile.w32 }
|
||||
- { name: OS/2, makefile: Makefile.os2 }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: open-watcom/setup-watcom@v0
|
||||
- name: Build SDL2
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }}
|
||||
- name: Build tests
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }}
|
||||
cd ..
|
||||
- name: Run tests
|
||||
if: "matrix.platform.makefile == 'Makefile.w32'"
|
||||
run: |
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
|
||||
cd ..
|
||||
- name: distclean
|
||||
run: |
|
||||
wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd test && wmake -f ${{ matrix.platform.makefile }} distclean
|
||||
cd ..
|
15
externals/SDL/.wikiheaders-options
vendored
15
externals/SDL/.wikiheaders-options
vendored
@ -1,15 +0,0 @@
|
||||
projectfullname = SDL_mixer
|
||||
projectshortname = SDL_mixer
|
||||
incsubdir = include
|
||||
wikisubdir =
|
||||
apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
|
||||
mainincludefname = SDL.h
|
||||
versionfname = include/SDL_version.h
|
||||
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
|
||||
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
|
||||
versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
|
||||
selectheaderregex = \ASDL.*?\.h\Z
|
||||
projecturl = https://libsdl.org/
|
||||
wikiurl = https://wiki.libsdl.org
|
||||
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
|
||||
warn_about_missing = 0
|
273
externals/SDL/Makefile.w32
vendored
273
externals/SDL/Makefile.w32
vendored
@ -1,273 +0,0 @@
|
||||
# Open Watcom makefile to build SDL2.dll for Win32
|
||||
# wmake -f Makefile.w32
|
||||
|
||||
LIBNAME = SDL2
|
||||
MAJOR_VERSION = 2
|
||||
MINOR_VERSION = 23
|
||||
MICRO_VERSION = 1
|
||||
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBHOME = .
|
||||
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
||||
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
|
||||
EXPFILE = $(LIBHOME)/$(LIBNAME).exp
|
||||
LNKFILE = $(LIBNAME).lnk
|
||||
|
||||
INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
|
||||
INCPATH+= -Iinclude
|
||||
INCPATH+= -I"src/video/khronos"
|
||||
|
||||
LIBM = SDL2libm.lib
|
||||
TLIB = SDL2test.lib
|
||||
LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
|
||||
|
||||
CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
# newer OpenWatcom versions enable W303 by default
|
||||
CFLAGS+= -wcd=303
|
||||
# the include paths :
|
||||
CFLAGS+= $(INCPATH)
|
||||
CFLAGS_STATIC=$(CFLAGS)
|
||||
# building dll:
|
||||
CFLAGS_DLL =$(CFLAGS)
|
||||
CFLAGS_DLL+= -bd
|
||||
# we override the DECLSPEC define in begin_code.h, because we are using
|
||||
# an exports file to remove the _cdecl '_' prefix from the symbol names
|
||||
CFLAGS_DLL+= -DDECLSPEC=
|
||||
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
|
||||
CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
|
||||
|
||||
RCFLAGS = -q -r -bt=nt $(INCPATH)
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_memcpy.c SDL_memset.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
|
||||
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.c
|
||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
|
||||
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
|
||||
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
|
||||
|
||||
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
|
||||
SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
SRCS+= SDL_locale.c SDL_syslocale.c
|
||||
SRCS+= SDL_url.c SDL_sysurl.c
|
||||
|
||||
SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
|
||||
SRCS+= SDL_hid.c SDL_windows.c SDL_xinput.c
|
||||
SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
|
||||
SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
|
||||
SRCS+= SDL_syspower.c
|
||||
SRCS+= SDL_d3dmath.c
|
||||
SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
|
||||
SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
|
||||
SRCS+= SDL_render_d3d12.c SDL_shaders_d3d12.c
|
||||
SRCS+= SDL_render_gl.c SDL_shaders_gl.c
|
||||
SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
|
||||
SRCS+= SDL_windowssensor.c
|
||||
SRCS+= SDL_syscond_cv.c
|
||||
SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
|
||||
|
||||
SRCS+= SDL_dynapi.c
|
||||
|
||||
RCSRCS = version.rc
|
||||
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
RCOBJS= $(RCSRCS:.rc=.res)
|
||||
|
||||
.extensions:
|
||||
.extensions: .lib .dll .obj .res .c .rc .asm
|
||||
|
||||
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
|
||||
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
|
||||
.c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
|
||||
.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/direct3d12;./src/render/opengl;./src/render/opengles2
|
||||
.rc: ./src/main/windows
|
||||
|
||||
all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
|
||||
|
||||
build_dll: .symbolic
|
||||
@echo * Compiling dll objects
|
||||
|
||||
$(DLLFILE): build_dll $(OBJS) $(LIBM) $(RCOBJS) $(LNKFILE)
|
||||
@echo * Linking: $@
|
||||
wlink @$(LNKFILE)
|
||||
|
||||
$(LIBFILE): $(DLLFILE)
|
||||
@echo * Creating LIB file: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $* @$(EXPFILE)
|
||||
|
||||
.c.obj:
|
||||
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
|
||||
|
||||
.rc.res:
|
||||
wrc $(RCFLAGS) -fo=$^@ $<
|
||||
|
||||
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
|
||||
wcc386 $(CFLAGS_DLL) -fo=$^@ $<
|
||||
SDL_cpuinfo.obj: SDL_cpuinfo.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_wave.obj: SDL_wave.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=124 -fo=$^@ $<
|
||||
SDL_blendfillrect.obj: SDL_blendfillrect.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_blendline.obj: SDL_blendline.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
SDL_malloc.obj: SDL_malloc.c
|
||||
wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
|
||||
|
||||
# SDL2libm
|
||||
MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
|
||||
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
|
||||
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
|
||||
MOBJS= $(MSRCS:.c=.obj)
|
||||
|
||||
.c: ./src/libm;
|
||||
e_atan2.obj: e_atan2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_exp.obj: e_exp.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_fmod.obj: e_fmod.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_log10.obj: e_log10.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_log.obj: e_log.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_pow.obj: e_pow.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_rem_pio2.obj: e_rem_pio2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
e_sqrt.obj: e_sqrt.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_cos.obj: k_cos.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_rem_pio2.obj: k_rem_pio2.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_sin.obj: k_sin.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
k_tan.obj: k_tan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_atan.obj: s_atan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_copysign.obj: s_copysign.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_cos.obj: s_cos.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_fabs.obj: s_fabs.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_floor.obj: s_floor.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_scalbn.obj: s_scalbn.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_sin.obj: s_sin.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
s_tan.obj: s_tan.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
|
||||
build_libm: .symbolic
|
||||
@echo * Compiling libm objects
|
||||
$(LIBM): build_libm $(MOBJS)
|
||||
@echo * Creating: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
|
||||
|
||||
# SDL2test
|
||||
TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
|
||||
SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
|
||||
SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
|
||||
SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
|
||||
SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
|
||||
TOBJS= $(TSRCS:.c=.obj)
|
||||
|
||||
.c: ./src/test;
|
||||
SDL_test_assert.obj: SDL_test_assert.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_common.obj: SDL_test_common.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_compare.obj: SDL_test_compare.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_crc32.obj: SDL_test_crc32.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_font.obj: SDL_test_font.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_fuzzer.obj: SDL_test_fuzzer.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_harness.obj: SDL_test_harness.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageBlit.obj: SDL_test_imageBlit.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageBlitBlend.obj: SDL_test_imageBlitBlend.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imageFace.obj: SDL_test_imageFace.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imagePrimitives.obj: SDL_test_imagePrimitives.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_imagePrimitivesBlend.obj: SDL_test_imagePrimitivesBlend.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_log.obj: SDL_test_log.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_md5.obj: SDL_test_md5.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_random.obj: SDL_test_random.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
SDL_test_memory.obj: SDL_test_memory.c
|
||||
wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
|
||||
|
||||
build_tlib: .symbolic
|
||||
@echo * Compiling testlib objects
|
||||
$(TLIB): build_tlib $(TOBJS)
|
||||
@echo * Creating: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(TOBJS)
|
||||
|
||||
$(LNKFILE): Makefile.w32
|
||||
@echo * Creating linker file: $@
|
||||
@%create $@
|
||||
@%append $@ SYSTEM nt_dll INITINSTANCE TERMINSTANCE
|
||||
@%append $@ NAME $(DLLFILE)
|
||||
@for %i in ($(OBJS)) do @%append $@ FILE %i
|
||||
@for %i in ($(LIBS)) do @%append $@ LIB %i
|
||||
@%append $@ OPTION RESOURCE=$(RCOBJS)
|
||||
@%append $@ EXPORT=src/dynapi/SDL2.exports
|
||||
@%append $@ OPTION QUIET
|
||||
@%append $@ OPTION IMPF=$(EXPFILE)
|
||||
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
|
||||
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
|
||||
@%append $@ OPTION ELIMINATE
|
||||
@%append $@ OPTION SHOWDEAD
|
||||
|
||||
clean: .SYMBOLIC
|
||||
@echo * Clean: $(LIBNAME)
|
||||
@if exist *.obj rm *.obj
|
||||
@if exist *.res rm *.res
|
||||
@if exist *.err rm *.err
|
||||
@if exist $(LNKFILE) rm $(LNKFILE)
|
||||
@if exist $(LIBM) rm $(LIBM)
|
||||
|
||||
distclean: .SYMBOLIC clean
|
||||
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
||||
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
|
||||
@if exist $(LIBFILE) rm $(LIBFILE)
|
||||
@if exist $(DLLFILE) rm $(DLLFILE)
|
||||
@if exist $(TLIB) rm $(TLIB)
|
65
externals/SDL/SDL2Config.cmake.in
vendored
65
externals/SDL/SDL2Config.cmake.in
vendored
@ -1,65 +0,0 @@
|
||||
# sdl2 cmake project-config input for CMakeLists.txt script
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2 PROPERTIES
|
||||
URL "https://www.libsdl.org/"
|
||||
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
|
||||
)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(SDL2_FOUND TRUE)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
set(SDL2_SDL2_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
if(ANDROID)
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
|
||||
set(SDL2_SDL2-static_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
|
||||
set(SDL2_SDL2main_FOUND TRUE)
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
|
||||
set(SDL2_SDL2test_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
check_required_components(SDL2)
|
||||
|
||||
# Create SDL2::SDL2 alias for static-only builds
|
||||
if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
add_library(SDL2::SDL2 INTERFACE IMPORTED)
|
||||
set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
|
||||
else()
|
||||
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
|
||||
|
||||
set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
||||
set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
||||
set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
|
||||
set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
|
||||
set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
|
||||
set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
set(SDL2_LIBRARIES SDL2::SDL2)
|
||||
set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
|
||||
set(SDL2_STATIC_PRIVATE_LIBS)
|
||||
|
||||
set(SDL2MAIN_LIBRARY)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
||||
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
|
||||
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
||||
endif()
|
||||
|
||||
set(SDL2TEST_LIBRARY SDL2::SDL2test)
|
@ -1,163 +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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Built with:
|
||||
|
||||
gcc -o genfilter build-scripts/gen_audio_resampler_filter.c -lm && ./genfilter > src/audio/SDL_audio_resampler_filter.h
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
SDL's resampler uses a "bandlimited interpolation" algorithm:
|
||||
https://ccrma.stanford.edu/~jos/resample/
|
||||
|
||||
This code pre-generates the kaiser tables so we don't have to do this at
|
||||
run time, at a cost of about 20 kilobytes of static data in SDL. This code
|
||||
used to be part of SDL itself and generated the tables on the first use,
|
||||
but that was expensive to produce on platforms without floating point
|
||||
hardware.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#define RESAMPLER_ZERO_CROSSINGS 5
|
||||
#define RESAMPLER_BITS_PER_SAMPLE 16
|
||||
#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))
|
||||
#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)
|
||||
|
||||
/* This is a "modified" bessel function, so you can't use POSIX j0() */
|
||||
static double
|
||||
bessel(const double x)
|
||||
{
|
||||
const double xdiv2 = x / 2.0;
|
||||
double i0 = 1.0f;
|
||||
double f = 1.0f;
|
||||
int i = 1;
|
||||
|
||||
while (1) {
|
||||
const double diff = pow(xdiv2, i * 2) / pow(f, 2);
|
||||
if (diff < 1.0e-21f) {
|
||||
break;
|
||||
}
|
||||
i0 += diff;
|
||||
i++;
|
||||
f *= (double) i;
|
||||
}
|
||||
|
||||
return i0;
|
||||
}
|
||||
|
||||
/* build kaiser table with cardinal sine applied to it, and array of differences between elements. */
|
||||
static void
|
||||
kaiser_and_sinc(float *table, float *diffs, const int tablelen, const double beta)
|
||||
{
|
||||
const int lenm1 = tablelen - 1;
|
||||
const int lenm1div2 = lenm1 / 2;
|
||||
const double bessel_beta = bessel(beta);
|
||||
int i;
|
||||
|
||||
table[0] = 1.0f;
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const double kaiser = bessel(beta * sqrt(1.0 - pow(((i - lenm1) / 2.0) / lenm1div2, 2.0))) / bessel_beta;
|
||||
table[tablelen - i] = (float) kaiser;
|
||||
}
|
||||
|
||||
for (i = 1; i < tablelen; i++) {
|
||||
const float x = (((float) i) / ((float) RESAMPLER_SAMPLES_PER_ZERO_CROSSING)) * ((float) M_PI);
|
||||
table[i] *= sinf(x) / x;
|
||||
diffs[i - 1] = table[i] - table[i - 1];
|
||||
}
|
||||
diffs[lenm1] = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
static float ResamplerFilter[RESAMPLER_FILTER_SIZE];
|
||||
static float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE];
|
||||
|
||||
static void
|
||||
PrepareResampleFilter(void)
|
||||
{
|
||||
/* if dB > 50, beta=(0.1102 * (dB - 8.7)), according to Matlab. */
|
||||
const double dB = 80.0;
|
||||
const double beta = 0.1102 * (dB - 8.7);
|
||||
kaiser_and_sinc(ResamplerFilter, ResamplerFilterDifference, RESAMPLER_FILTER_SIZE, beta);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
PrepareResampleFilter();
|
||||
|
||||
printf(
|
||||
"/*\n"
|
||||
" Simple DirectMedia Layer\n"
|
||||
" Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>\n"
|
||||
"\n"
|
||||
" This software is provided 'as-is', without any express or implied\n"
|
||||
" warranty. In no event will the authors be held liable for any damages\n"
|
||||
" arising from the use of this software.\n"
|
||||
"\n"
|
||||
" Permission is granted to anyone to use this software for any purpose,\n"
|
||||
" including commercial applications, and to alter it and redistribute it\n"
|
||||
" freely, subject to the following restrictions:\n"
|
||||
"\n"
|
||||
" 1. The origin of this software must not be misrepresented; you must not\n"
|
||||
" claim that you wrote the original software. If you use this software\n"
|
||||
" in a product, an acknowledgment in the product documentation would be\n"
|
||||
" appreciated but is not required.\n"
|
||||
" 2. Altered source versions must be plainly marked as such, and must not be\n"
|
||||
" misrepresented as being the original software.\n"
|
||||
" 3. This notice may not be removed or altered from any source distribution.\n"
|
||||
"*/\n"
|
||||
"\n"
|
||||
"/* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_resampler_filter.c */\n"
|
||||
"\n"
|
||||
"#define RESAMPLER_ZERO_CROSSINGS %d\n"
|
||||
"#define RESAMPLER_BITS_PER_SAMPLE %d\n"
|
||||
"#define RESAMPLER_SAMPLES_PER_ZERO_CROSSING (1 << ((RESAMPLER_BITS_PER_SAMPLE / 2) + 1))\n"
|
||||
"#define RESAMPLER_FILTER_SIZE ((RESAMPLER_SAMPLES_PER_ZERO_CROSSING * RESAMPLER_ZERO_CROSSINGS) + 1)\n"
|
||||
"\n", RESAMPLER_ZERO_CROSSINGS, RESAMPLER_BITS_PER_SAMPLE
|
||||
);
|
||||
|
||||
printf("static const float ResamplerFilter[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilter[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilter[i+1]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static const float ResamplerFilterDifference[RESAMPLER_FILTER_SIZE] = {\n");
|
||||
printf(" %.9ff", ResamplerFilterDifference[0]);
|
||||
for (i = 0; i < RESAMPLER_FILTER_SIZE-1; i++) {
|
||||
printf("%s%.9ff", ((i % 5) == 4) ? ",\n " : ", ", ResamplerFilterDifference[i+1]);
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
printf("/* vi: set ts=4 sw=4 expandtab: */\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
100
externals/SDL/cmake/test/CMakeLists.txt
vendored
100
externals/SDL/cmake/test/CMakeLists.txt
vendored
@ -1,100 +0,0 @@
|
||||
# This cmake build script is meant for verifying the various CMake configuration script.
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(sdl_test LANGUAGES C)
|
||||
|
||||
if(ANDROID)
|
||||
macro(add_executable NAME)
|
||||
set(args ${ARGN})
|
||||
list(REMOVE_ITEM args WIN32)
|
||||
add_library(${NAME} SHARED ${args})
|
||||
unset(args)
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
|
||||
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
|
||||
|
||||
include(FeatureSummary)
|
||||
|
||||
option(TEST_SHARED "Test linking to shared SDL2 library" ON)
|
||||
add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
|
||||
|
||||
option(TEST_STATIC "Test linking to static SDL2 libary" ON)
|
||||
add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
|
||||
|
||||
if(TEST_SHARED)
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2)
|
||||
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||
endif()
|
||||
add_executable(gui-shared WIN32 main_gui.c)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
target_link_libraries(gui-shared PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
target_link_libraries(gui-shared PRIVATE SDL2::SDL2)
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET gui-shared POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:gui-shared>"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_executable(gui-shared-vars WIN32 main_gui.c)
|
||||
target_link_libraries(gui-shared-vars PRIVATE ${SDL2_LIBRARIES})
|
||||
target_include_directories(gui-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(cli-shared main_cli.c)
|
||||
target_link_libraries(cli-shared PRIVATE SDL2::SDL2)
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET cli-shared POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:cli-shared>"
|
||||
)
|
||||
endif()
|
||||
|
||||
# SDL2_LIBRARIES does not support creating a cli SDL2 application
|
||||
# (it is possible that SDL2main is a stub, but we don't know for sure)
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_executable(cli-shared-vars main_cli.c)
|
||||
target_link_libraries(cli-shared-vars PRIVATE ${SDL2_LIBRARIES})
|
||||
target_include_directories(cli-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TEST_STATIC)
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2-static)
|
||||
if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
|
||||
find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
|
||||
endif()
|
||||
add_executable(gui-static WIN32 main_gui.c)
|
||||
if(TARGET SDL2::SDL2main)
|
||||
target_link_libraries(gui-static PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
target_link_libraries(gui-static PRIVATE SDL2::SDL2-static)
|
||||
|
||||
add_executable(gui-static-vars WIN32 main_gui.c)
|
||||
target_link_libraries(gui-static-vars PRIVATE ${SDL2MAIN_LIBRARY} ${SDL2_STATIC_LIBRARIES})
|
||||
target_include_directories(gui-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(cli-static main_cli.c)
|
||||
target_link_libraries(cli-static PRIVATE SDL2::SDL2-static)
|
||||
|
||||
# SDL2_LIBRARIES does not support creating a cli SDL2 application (when SDL2::SDL2main is available)
|
||||
# (it is possible that SDL2main is a stub, but we don't know for sure)
|
||||
if(NOT TARGET SDL2::SDL2main)
|
||||
add_executable(cli-static-vars main_cli.c)
|
||||
target_link_libraries(cli-static-vars PRIVATE ${SDL2_STATIC_LIBRARIES})
|
||||
target_include_directories(cli-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "SDL2_PREFIX: ${SDL2_PREFIX}")
|
||||
message(STATUS "SDL2_INCLUDE_DIR: ${SDL2_INCLUDE_DIR}")
|
||||
message(STATUS "SDL2_INCLUDE_DIRS: ${SDL2_INCLUDE_DIRS}")
|
||||
message(STATUS "SDL2_LIBRARIES: ${SDL2_LIBRARIES}")
|
||||
message(STATUS "SDL2_STATIC_LIBRARIES: ${SDL2_STATIC_LIBRARIES}")
|
||||
message(STATUS "SDL2MAIN_LIBRARY: ${SDL2MAIN_LIBRARY}")
|
||||
message(STATUS "SDL2TEST_LIBRARY: ${SDL2TEST_LIBRARY}")
|
||||
|
||||
feature_summary(WHAT ALL)
|
14
externals/SDL/cmake/test/main_cli.c
vendored
14
externals/SDL/cmake/test/main_cli.c
vendored
@ -1,14 +0,0 @@
|
||||
#define SDL_MAIN_HANDLED
|
||||
#include "SDL.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
SDL_SetMainReady();
|
||||
if (SDL_Init(0) < 0) {
|
||||
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
SDL_Delay(100);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
28
externals/SDL/cmake/test/main_gui.c
vendored
28
externals/SDL/cmake/test/main_gui.c
vendored
@ -1,28 +0,0 @@
|
||||
#include "SDL.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Surface *screenSurface = NULL;
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
window = SDL_CreateWindow(
|
||||
"hello_sdl2",
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
640, 480,
|
||||
SDL_WINDOW_SHOWN
|
||||
);
|
||||
if (window == NULL) {
|
||||
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
screenSurface = SDL_GetWindowSurface(window);
|
||||
SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xff, 0xff, 0xff));
|
||||
SDL_UpdateWindowSurface(window);
|
||||
SDL_Delay(100);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
44
externals/SDL/docs/README-ngage.md
vendored
44
externals/SDL/docs/README-ngage.md
vendored
@ -1,44 +0,0 @@
|
||||
Nokia N-Gage
|
||||
============
|
||||
|
||||
SDL2 port for Symbian S60v1 and v2 with a main focus on the Nokia N-Gage
|
||||
(Classic and QD) by [Michael Fitzmayer](https://github.com/mupfdev).
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
SDL is part of the [N-Gage SDK.](https://github.com/ngagesdk) project.
|
||||
The library is included in the
|
||||
[toolchain](https://github.com/ngagesdk/ngage-toolchain) as a
|
||||
sub-module.
|
||||
|
||||
A complete example project based on SDL2 can be found in the GitHub
|
||||
account of the SDK: [Wordle](https://github.com/ngagesdk/wordle).
|
||||
|
||||
Current level of implementation
|
||||
-------------------------------
|
||||
|
||||
The video driver currently provides full screen video support with
|
||||
keyboard input.
|
||||
|
||||
At the moment only the software renderer works.
|
||||
|
||||
Audio is not yet implemented.
|
||||
|
||||
Acknowledgements
|
||||
----------------
|
||||
|
||||
Thanks to Hannu Viitala, Kimmo Kinnunen and Markus Mertama for the
|
||||
valuable insight into Symbian programming. Without the SDL 1.2 port
|
||||
which was specially developed for CDoom (Doom for the Nokia 9210), this
|
||||
adaptation would not have been possible.
|
||||
|
||||
I would like to thank my friends
|
||||
[Razvan](https://twitter.com/bewarerazvan) and [Dan
|
||||
Whelan](https://danwhelan.ie/), for their continuous support. Without
|
||||
you and the [N-Gage community](https://discord.gg/dbUzqJ26vs), I would
|
||||
have lost my patience long ago.
|
||||
|
||||
Last but not least, I would like to thank the development team of
|
||||
[EKA2L1](https://12z1.com/) (an experimental Symbian OS emulator). Your
|
||||
patience and support in troubleshooting helped me a lot.
|
34
externals/SDL/docs/README-ps2.md
vendored
34
externals/SDL/docs/README-ps2.md
vendored
@ -1,34 +0,0 @@
|
||||
PS2
|
||||
======
|
||||
SDL2 port for the Sony Playstation 2 contributed by:
|
||||
- Francisco Javier Trujillo Mata
|
||||
|
||||
|
||||
Credit to
|
||||
- The guys that ported SDL to PSP & Vita because I'm taking them as reference.
|
||||
- David G. F. for helping me with several issues and tests.
|
||||
|
||||
## Building
|
||||
To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
|
||||
```bash
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
|
||||
cmake --build build
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
|
||||
## Getting PS2 Dev
|
||||
[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
|
||||
|
||||
## Running on PCSX2 Emulator
|
||||
[PCSX2](https://github.com/PCSX2/pcsx2)
|
||||
|
||||
[More PCSX2 information](https://pcsx2.net/)
|
||||
|
||||
## To Do
|
||||
- PS2 Screen Keyboard
|
||||
- Dialogs
|
||||
- Audio
|
||||
- Video
|
||||
- Controllers
|
||||
- Others
|
60
externals/SDL/docs/README-versions.md
vendored
60
externals/SDL/docs/README-versions.md
vendored
@ -1,60 +0,0 @@
|
||||
# Versioning
|
||||
|
||||
## Since 2.23.0
|
||||
|
||||
SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
|
||||
and older versions of the Linux kernel:
|
||||
|
||||
* The major version (first part) increases when backwards compatibility
|
||||
is broken, which will happen infrequently.
|
||||
|
||||
* If the minor version (second part) is divisible by 2
|
||||
(for example 2.24.x, 2.26.x), this indicates a version of SDL that
|
||||
is believed to be stable and suitable for production use.
|
||||
|
||||
* In stable releases, the patchlevel or micro version (third part)
|
||||
indicates bugfix releases. Bugfix releases should not add or
|
||||
remove ABI, so the ".0" release (for example 2.24.0) should be
|
||||
forwards-compatible with all the bugfix releases from the
|
||||
same cycle (for example 2.24.1).
|
||||
|
||||
* The minor version increases when new API or ABI is added, or when
|
||||
other significant changes are made. Newer minor versions are
|
||||
backwards-compatible, but not fully forwards-compatible.
|
||||
For example, programs built against SDL 2.24.x should work fine
|
||||
with SDL 2.26.x, but programs built against SDL 2.26.x will not
|
||||
necessarily work with 2.24.x.
|
||||
|
||||
* If the minor version (second part) is not divisible by 2
|
||||
(for example 2.23.x, 2.25.x), this indicates a development prerelease
|
||||
of SDL that is not suitable for stable software distributions.
|
||||
Use with caution.
|
||||
|
||||
* The patchlevel or micro version (third part) increases with
|
||||
each prerelease.
|
||||
|
||||
* Each prerelease might add new API and/or ABI.
|
||||
|
||||
* Prereleases are backwards-compatible with older stable branches.
|
||||
For example, 2.25.x will be backwards-compatible with 2.24.x.
|
||||
|
||||
* Prereleases are not guaranteed to be backwards-compatible with
|
||||
each other. For example, new API or ABI added in 2.25.1
|
||||
might be removed or changed in 2.25.2.
|
||||
If this would be a problem for you, please do not use prereleases.
|
||||
|
||||
* Only upgrade to a prerelease if you can guarantee that you will
|
||||
promptly upgrade to the stable release that follows it.
|
||||
For example, do not upgrade to 2.23.x unless you will be able to
|
||||
upgrade to 2.24.0 when it becomes available.
|
||||
|
||||
* Software distributions that have a freeze policy (in particular Linux
|
||||
distributions with a release cycle, such as Debian and Fedora)
|
||||
should usually only package stable releases, and not prereleases.
|
||||
|
||||
## Before 2.23.0
|
||||
|
||||
Older versions of SDL followed a similar policy, but instead of the
|
||||
odd/even rule applying to the minor version, it applied to the patchlevel
|
||||
(micro version, third part). For example, 2.0.22 was a stable release
|
||||
and 2.0.21 was a prerelease.
|
92
externals/SDL/docs/release_checklist.md
vendored
92
externals/SDL/docs/release_checklist.md
vendored
@ -1,92 +0,0 @@
|
||||
# Release checklist
|
||||
|
||||
## New feature release
|
||||
|
||||
* Update `WhatsNew.txt`
|
||||
|
||||
* Bump version number to 2.EVEN.0 in all these locations:
|
||||
|
||||
* `configure.ac`, `CMakeLists.txt`: `SDL_*_VERSION`
|
||||
* `Xcode/SDL/Info-Framework.plist`: `CFBundleShortVersionString`,
|
||||
`CFBundleVersion`
|
||||
* `Makefile.os2`: `VERSION`
|
||||
* `Makefile.w32`: `*_VERSION`
|
||||
* `build-scripts/winrtbuild.ps1`: `$SDLVersion`
|
||||
* `include/SDL_version.h`: `SDL_*_VERSION`, `SDL_PATCHLEVEL`
|
||||
* `src/main/windows/version.rc`: `FILEVERSION`, `PRODUCTVERSION`,
|
||||
`FileVersion`, `ProductVersion`
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set first number in `DYLIB_CURRENT_VERSION` to
|
||||
(100 * *minor*) + 1
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to 0
|
||||
* if backwards compatibility has been broken,
|
||||
increase `DYLIB_COMPATIBILITY_VERSION` (?)
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
||||
|
||||
## New bugfix release
|
||||
|
||||
* Check that no new API/ABI was added
|
||||
|
||||
* If it was, do a new feature release (see above) instead
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
||||
|
||||
## After a feature release
|
||||
|
||||
* Create a branch like `release-2.24.x`
|
||||
|
||||
* Bump version number to 2.ODD.0 for next development branch
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* Same places as listed above
|
||||
* Assume that the next feature release will contain new API/ABI
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
## New development prerelease
|
||||
|
||||
* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
|
||||
|
||||
* Same places as listed above
|
||||
|
||||
* Bump ABI version information
|
||||
|
||||
* `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
|
||||
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
|
||||
* set first number in `DYLIB_CURRENT_VERSION` to
|
||||
(100 * *minor*) + *patchlevel* + 1
|
||||
* set second number in `DYLIB_CURRENT_VERSION` to 0
|
||||
* if backwards compatibility has been broken,
|
||||
increase `DYLIB_COMPATIBILITY_VERSION` (?)
|
||||
|
||||
* Run test/versioning.sh to verify that everything is consistent
|
||||
|
||||
* Regenerate `configure`
|
||||
|
||||
* Do the release
|
89
externals/SDL/include/SDL_config_ngage.h
vendored
89
externals/SDL/include/SDL_config_ngage.h
vendored
@ -1,89 +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_config_ngage_h_
|
||||
#define SDL_config_ngage_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define SDL_MAIN_NEEDED 1
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the N-Gage thread support (src/thread/ngage/\*.c) */
|
||||
#define SDL_THREAD_NGAGE 1
|
||||
|
||||
/* Enable the N-Gage timer support (src/timer/ngage/\*.c) */
|
||||
#define SDL_TIMER_NGAGE 1
|
||||
|
||||
/* Enable the N-Gage video driver (src/video/ngage/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_NGAGE 1
|
||||
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub HIDAPI */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
|
||||
#define SDL_SENSOR_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* SDL_config_ngage_h_ */
|
100
externals/SDL/include/SDL_guid.h
vendored
100
externals/SDL/include/SDL_guid.h
vendored
@ -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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_guid.h
|
||||
*
|
||||
* Include file for handling ::SDL_GUID values.
|
||||
*/
|
||||
|
||||
#ifndef SDL_guid_h_
|
||||
#define SDL_guid_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An SDL_GUID is a 128-bit identifier for an input device that
|
||||
* identifies that device across runs of SDL programs on the same
|
||||
* platform. If the device is detached and then re-attached to a
|
||||
* different port, or if the base system is rebooted, the device
|
||||
* should still report the same GUID.
|
||||
*
|
||||
* GUIDs are as precise as possible but are not guaranteed to
|
||||
* distinguish physically distinct but equivalent devices. For
|
||||
* example, two game controllers from the same vendor with the same
|
||||
* product ID and revision may have the same GUID.
|
||||
*
|
||||
* GUIDs may be platform-dependent (i.e., the same device may report
|
||||
* different GUIDs on different operating systems).
|
||||
*/
|
||||
typedef struct {
|
||||
Uint8 data[16];
|
||||
} SDL_GUID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given ::SDL_GUID.
|
||||
*
|
||||
* You should supply at least 33 bytes for pszGUID.
|
||||
*
|
||||
* \param guid the ::SDL_GUID you wish to convert to string
|
||||
* \param pszGUID buffer in which to write the ASCII string
|
||||
* \param cbGUID the size of pszGUID
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a GUID string into a ::SDL_GUID structure.
|
||||
*
|
||||
* Performs no error checking. If this function is given a string containing
|
||||
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||
* will not be useful.
|
||||
*
|
||||
* \param pchGUID string containing an ASCII representation of a GUID
|
||||
* \returns a ::SDL_GUID structure.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDToString
|
||||
*/
|
||||
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_guid_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
91
externals/SDL/src/SDL_guid.c
vendored
91
externals/SDL/src/SDL_guid.c
vendored
@ -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;
|
||||
}
|
93
externals/SDL/src/SDL_list.c
vendored
93
externals/SDL/src/SDL_list.c
vendored
@ -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: */
|
39
externals/SDL/src/SDL_list.h
vendored
39
externals/SDL/src/SDL_list.h
vendored
@ -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: */
|
33
externals/SDL/src/SDL_log_c.h
vendored
33
externals/SDL/src/SDL_log_c.h
vendored
@ -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: */
|
1062
externals/SDL/src/audio/SDL_audio_resampler_filter.h
vendored
1062
externals/SDL/src/audio/SDL_audio_resampler_filter.h
vendored
File diff suppressed because it is too large
Load Diff
851
externals/SDL/src/dynapi/SDL2.exports
vendored
851
externals/SDL/src/dynapi/SDL2.exports
vendored
@ -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'
|
@ -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: */
|
689
externals/SDL/src/joystick/controller_type.c
vendored
689
externals/SDL/src/joystick/controller_type.c
vendored
@ -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: */
|
71
externals/SDL/src/locale/vita/SDL_syslocale.c
vendored
71
externals/SDL/src/locale/vita/SDL_syslocale.c
vendored
@ -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: */
|
||||
|
82
externals/SDL/src/main/ngage/SDL_ngage_main.cpp
vendored
82
externals/SDL/src/main/ngage/SDL_ngage_main.cpp
vendored
@ -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: */
|
37
externals/SDL/src/misc/emscripten/SDL_sysurl.c
vendored
37
externals/SDL/src/misc/emscripten/SDL_sysurl.c
vendored
@ -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: */
|
||||
|
3053
externals/SDL/src/render/direct3d12/SDL_render_d3d12.c
vendored
3053
externals/SDL/src/render/direct3d12/SDL_render_d3d12.c
vendored
File diff suppressed because it is too large
Load Diff
6967
externals/SDL/src/render/direct3d12/SDL_shaders_d3d12.c
vendored
6967
externals/SDL/src/render/direct3d12/SDL_shaders_d3d12.c
vendored
File diff suppressed because it is too large
Load Diff
@ -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: */
|
79
externals/SDL/src/stdlib/SDL_memcpy.c
vendored
79
externals/SDL/src/stdlib/SDL_memcpy.c
vendored
@ -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: */
|
75
externals/SDL/src/stdlib/SDL_memset.c
vendored
75
externals/SDL/src/stdlib/SDL_memset.c
vendored
@ -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: */
|
36
externals/SDL/src/stdlib/SDL_vacopy.h
vendored
36
externals/SDL/src/stdlib/SDL_vacopy.h
vendored
@ -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: */
|
123
externals/SDL/src/thread/ngage/SDL_sysmutex.cpp
vendored
123
externals/SDL/src/thread/ngage/SDL_sysmutex.cpp
vendored
@ -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: */
|
195
externals/SDL/src/thread/ngage/SDL_syssem.cpp
vendored
195
externals/SDL/src/thread/ngage/SDL_syssem.cpp
vendored
@ -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: */
|
134
externals/SDL/src/thread/ngage/SDL_systhread.cpp
vendored
134
externals/SDL/src/thread/ngage/SDL_systhread.cpp
vendored
@ -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
|
||||
*/
|
25
externals/SDL/src/thread/ngage/SDL_systhread_c.h
vendored
25
externals/SDL/src/thread/ngage/SDL_systhread_c.h
vendored
@ -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: */
|
159
externals/SDL/src/thread/ps2/SDL_syssem.c
vendored
159
externals/SDL/src/thread/ps2/SDL_syssem.c
vendored
@ -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
|
||||
*/
|
140
externals/SDL/src/thread/ps2/SDL_systhread.c
vendored
140
externals/SDL/src/thread/ps2/SDL_systhread.c
vendored
@ -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
|
||||
*/
|
24
externals/SDL/src/thread/ps2/SDL_systhread_c.h
vendored
24
externals/SDL/src/thread/ps2/SDL_systhread_c.h
vendored
@ -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;
|
100
externals/SDL/src/timer/ngage/SDL_systimer.cpp
vendored
100
externals/SDL/src/timer/ngage/SDL_systimer.cpp
vendored
@ -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: */
|
90
externals/SDL/src/timer/ps2/SDL_systimer.c
vendored
90
externals/SDL/src/timer/ps2/SDL_systimer.c
vendored
@ -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
|
||||
*/
|
444
externals/SDL/src/video/SDL_rect_impl.h
vendored
444
externals/SDL/src/video/SDL_rect_impl.h
vendored
@ -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: */
|
431
externals/SDL/src/video/haiku/SDL_BApp.h
vendored
431
externals/SDL/src/video/haiku/SDL_BApp.h
vendored
@ -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
|
200
externals/SDL/src/video/ngage/SDL_ngageevents.cpp
vendored
200
externals/SDL/src/video/ngage/SDL_ngageevents.cpp
vendored
@ -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: */
|
@ -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: */
|
@ -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: */
|
@ -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: */
|
192
externals/SDL/src/video/ngage/SDL_ngagevideo.cpp
vendored
192
externals/SDL/src/video/ngage/SDL_ngagevideo.cpp
vendored
@ -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: */
|
75
externals/SDL/src/video/ngage/SDL_ngagevideo.h
vendored
75
externals/SDL/src/video/ngage/SDL_ngagevideo.h
vendored
@ -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: */
|
129
externals/SDL/src/video/ngage/SDL_ngagewindow.cpp
vendored
129
externals/SDL/src/video/ngage/SDL_ngagewindow.cpp
vendored
@ -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: */
|
45
externals/SDL/src/video/ngage/SDL_ngagewindow.h
vendored
45
externals/SDL/src/video/ngage/SDL_ngagewindow.h
vendored
@ -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: */
|
||||
|
88
externals/SDL/src/video/riscos/SDL_riscosmouse.c
vendored
88
externals/SDL/src/video/riscos/SDL_riscosmouse.c
vendored
@ -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: */
|
30
externals/SDL/src/video/riscos/SDL_riscosmouse.h
vendored
30
externals/SDL/src/video/riscos/SDL_riscosmouse.h
vendored
@ -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: */
|
235
externals/SDL/src/video/vita/SDL_vitagles.c
vendored
235
externals/SDL/src/video/vita/SDL_vitagles.c
vendored
@ -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: */
|
57
externals/SDL/src/video/vita/SDL_vitagles_c.h
vendored
57
externals/SDL/src/video/vita/SDL_vitagles_c.h
vendored
@ -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: */
|
103
externals/SDL/src/video/vita/SDL_vitagles_pvr.c
vendored
103
externals/SDL/src/video/vita/SDL_vitagles_pvr.c
vendored
@ -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: */
|
@ -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: */
|
372
externals/SDL/src/video/yuv2rgb/yuv_rgb_lsx_func.h
vendored
372
externals/SDL/src/video/yuv2rgb/yuv_rgb_lsx_func.h
vendored
@ -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
|
16
externals/SDL/test/Makefile.w32
vendored
16
externals/SDL/test/Makefile.w32
vendored
@ -1,16 +0,0 @@
|
||||
# Open Watcom makefile to build SDL2 tests for Win32
|
||||
# wmake -f Makefile.w32
|
||||
|
||||
SYSTEM = nt
|
||||
|
||||
INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h" -I"../src/video/khronos"
|
||||
|
||||
CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
|
||||
CFLAGS+= -wx -wcd=303
|
||||
CFLAGS+= -DSDL_MAIN_HANDLED
|
||||
CFLAGS+= -DHAVE_OPENGL
|
||||
GLLIBS = opengl32.lib
|
||||
|
||||
TNSRCS = testnative.c testnativew32.c
|
||||
|
||||
!include watcom.mif
|
3
externals/SDL/test/template.test.in
vendored
3
externals/SDL/test/template.test.in
vendored
@ -1,3 +0,0 @@
|
||||
[Test]
|
||||
Type=session
|
||||
Exec=@installedtestsdir@/@exe@
|
3351
externals/SDL/test/testautomation_math.c
vendored
3351
externals/SDL/test/testautomation_math.c
vendored
File diff suppressed because it is too large
Load Diff
169
externals/SDL/test/testguid.c
vendored
169
externals/SDL/test/testguid.c
vendored
@ -1,169 +0,0 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Automated tests for GUID processing
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
/* Helpers */
|
||||
|
||||
static int _error_count = 0;
|
||||
|
||||
static int
|
||||
_require_eq(Uint64 expected, Uint64 actual, int line, char *msg)
|
||||
{
|
||||
if (expected != actual) {
|
||||
_error_count += 1;
|
||||
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "[%s, L%d] %s: Actual %ld (0x%lx) != expected %ld (0x%lx)",
|
||||
__FILE__, line, msg, actual, actual, expected, expected);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define ASSERT_EQ(MSG, EXPECTED, ACTUAL) _require_eq((EXPECTED), (ACTUAL), __LINE__, (MSG))
|
||||
|
||||
/* Helpers */
|
||||
|
||||
#define NUM_TEST_GUIDS 5
|
||||
|
||||
static struct {
|
||||
char *str;
|
||||
Uint64 upper, lower;
|
||||
} test_guids[NUM_TEST_GUIDS] = {
|
||||
{ "0000000000000000" "ffffffffffffffff",
|
||||
0x0000000000000000, 0xfffffffffffffffflu },
|
||||
{ "0011223344556677" "8091a2b3c4d5e6f0",
|
||||
0x0011223344556677lu, 0x8091a2b3c4d5e6f0lu },
|
||||
{ "a011223344556677" "8091a2b3c4d5e6f0",
|
||||
0xa011223344556677lu, 0x8091a2b3c4d5e6f0lu },
|
||||
{ "a011223344556677" "8091a2b3c4d5e6f1",
|
||||
0xa011223344556677lu, 0x8091a2b3c4d5e6f1lu },
|
||||
{ "a011223344556677" "8191a2b3c4d5e6f0",
|
||||
0xa011223344556677lu, 0x8191a2b3c4d5e6f0lu },
|
||||
};
|
||||
|
||||
static void
|
||||
upper_lower_to_bytestring(Uint8* out, Uint64 upper, Uint64 lower)
|
||||
{
|
||||
Uint64 values[2];
|
||||
int i, k;
|
||||
|
||||
values[0] = upper;
|
||||
values [1] = lower;
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
Uint64 v = values[i];
|
||||
|
||||
for (k = 0; k < 8; ++k) {
|
||||
*out++ = v >> 56;
|
||||
v <<= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ================= Test Case Implementation ================== */
|
||||
|
||||
/**
|
||||
* @brief Check String-to-GUID conversion
|
||||
*
|
||||
* @sa SDL_GUIDFromString
|
||||
*/
|
||||
static void
|
||||
TestGuidFromString(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_TEST_GUIDS; ++i) {
|
||||
Uint8 expected[16];
|
||||
SDL_GUID guid;
|
||||
|
||||
upper_lower_to_bytestring(expected,
|
||||
test_guids[i].upper, test_guids[i].lower);
|
||||
|
||||
guid = SDL_GUIDFromString(test_guids[i].str);
|
||||
if (!ASSERT_EQ("GUID from string", 0, SDL_memcmp(expected, guid.data, 16))) {
|
||||
SDL_Log(" GUID was: '%s'", test_guids[i].str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check GUID-to-String conversion
|
||||
*
|
||||
* @sa SDL_GUIDToString
|
||||
*/
|
||||
static void
|
||||
TestGuidToString(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_TEST_GUIDS; ++i) {
|
||||
const int guid_str_offset = 4;
|
||||
char guid_str_buf[64];
|
||||
char *guid_str = guid_str_buf + guid_str_offset;
|
||||
SDL_GUID guid;
|
||||
int size;
|
||||
|
||||
upper_lower_to_bytestring(guid.data,
|
||||
test_guids[i].upper, test_guids[i].lower);
|
||||
|
||||
/* Serialise to limited-length buffers */
|
||||
for (size = 0; size <= 36; ++size) {
|
||||
const Uint8 fill_char = size + 0xa0;
|
||||
Uint32 expected_prefix;
|
||||
Uint32 actual_prefix;
|
||||
int written_size;
|
||||
|
||||
SDL_memset(guid_str_buf, fill_char, sizeof(guid_str_buf));
|
||||
SDL_GUIDToString(guid, guid_str, size);
|
||||
|
||||
/* Check bytes before guid_str_buf */
|
||||
expected_prefix = fill_char | (fill_char << 8) | (fill_char << 16) | (fill_char << 24);
|
||||
SDL_memcpy(&actual_prefix, guid_str_buf, 4);
|
||||
if (!ASSERT_EQ("String buffer memory before output untouched: ", expected_prefix, actual_prefix)) {
|
||||
SDL_Log(" at size=%d", size);
|
||||
}
|
||||
|
||||
/* Check that we did not overwrite too much */
|
||||
written_size = 0;
|
||||
while ((guid_str[written_size] & 0xff) != fill_char && written_size < 256) {
|
||||
++written_size;
|
||||
}
|
||||
if (!ASSERT_EQ("Output length is within expected bounds", 1, written_size <= size)) {
|
||||
SDL_Log(" with length %d: wrote %d of %d permitted bytes",
|
||||
size, written_size, size);
|
||||
}
|
||||
if (size >= 33) {
|
||||
if (!ASSERT_EQ("GUID string equality", 0, SDL_strcmp(guid_str, test_guids[i].str))) {
|
||||
SDL_Log(" from string: %s", test_guids[i].str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/* Enable standard application logging */
|
||||
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
||||
|
||||
TestGuidFromString();
|
||||
TestGuidToString();
|
||||
|
||||
return _error_count > 0;
|
||||
}
|
153
externals/SDL/test/testutils.c
vendored
153
externals/SDL/test/testutils.c
vendored
@ -1,153 +0,0 @@
|
||||
/*
|
||||
Copyright 1997-2022 Sam Lantinga
|
||||
Copyright 2022 Collabora Ltd.
|
||||
SPDX-License-Identifier: Zlib
|
||||
*/
|
||||
|
||||
#include "testutils.h"
|
||||
|
||||
/*
|
||||
* Return the absolute path to def in the SDL_GetBasePath() if possible, or
|
||||
* the relative path to def on platforms that don't have a working
|
||||
* SDL_GetBasePath(). Free the result with SDL_free.
|
||||
*
|
||||
* Fails and returns NULL if out of memory.
|
||||
*/
|
||||
char *
|
||||
GetNearbyFilename(const char *file)
|
||||
{
|
||||
char *base;
|
||||
char *path;
|
||||
|
||||
base = SDL_GetBasePath();
|
||||
|
||||
if (base != NULL) {
|
||||
SDL_RWops *rw;
|
||||
size_t len = SDL_strlen(base) + SDL_strlen(file) + 1;
|
||||
|
||||
path = SDL_malloc(len);
|
||||
|
||||
if (path == NULL) {
|
||||
SDL_free(base);
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_snprintf(path, len, "%s%s", base, file);
|
||||
SDL_free(base);
|
||||
|
||||
rw = SDL_RWFromFile(path, "rb");
|
||||
if (rw) {
|
||||
SDL_RWclose(rw);
|
||||
return path;
|
||||
}
|
||||
|
||||
/* Couldn't find the file in the base path */
|
||||
SDL_free(path);
|
||||
}
|
||||
|
||||
path = SDL_strdup(file);
|
||||
if (path == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
/*
|
||||
* If user_specified is non-NULL, return a copy of it. Free with SDL_free.
|
||||
*
|
||||
* Otherwise, return the absolute path to def in the SDL_GetBasePath() if
|
||||
* possible, or the relative path to def on platforms that don't have a
|
||||
* working SDL_GetBasePath(). Free the result with SDL_free.
|
||||
*
|
||||
* Fails and returns NULL if out of memory.
|
||||
*/
|
||||
char *
|
||||
GetResourceFilename(const char *user_specified, const char *def)
|
||||
{
|
||||
if (user_specified != NULL) {
|
||||
char *ret = SDL_strdup(user_specified);
|
||||
|
||||
if (ret == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
return ret;
|
||||
} else {
|
||||
return GetNearbyFilename(def);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the .bmp file whose name is file, from the SDL_GetBasePath() if
|
||||
* possible or the current working directory if not.
|
||||
*
|
||||
* If transparent is true, set the transparent colour from the top left pixel.
|
||||
*
|
||||
* If width_out is non-NULL, set it to the texture width.
|
||||
*
|
||||
* If height_out is non-NULL, set it to the texture height.
|
||||
*/
|
||||
SDL_Texture *
|
||||
LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent,
|
||||
int *width_out, int *height_out)
|
||||
{
|
||||
SDL_Surface *temp = NULL;
|
||||
SDL_Texture *texture = NULL;
|
||||
char *path;
|
||||
|
||||
path = GetNearbyFilename(file);
|
||||
|
||||
if (path != NULL) {
|
||||
file = path;
|
||||
}
|
||||
|
||||
temp = SDL_LoadBMP(file);
|
||||
if (temp == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError());
|
||||
} else {
|
||||
/* Set transparent pixel as the pixel at (0,0) */
|
||||
if (transparent) {
|
||||
if (temp->format->palette) {
|
||||
SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *)temp->pixels);
|
||||
} else {
|
||||
switch (temp->format->BitsPerPixel) {
|
||||
case 15:
|
||||
SDL_SetColorKey(temp, SDL_TRUE,
|
||||
(*(Uint16 *) temp->pixels) & 0x00007FFF);
|
||||
break;
|
||||
case 16:
|
||||
SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels);
|
||||
break;
|
||||
case 24:
|
||||
SDL_SetColorKey(temp, SDL_TRUE,
|
||||
(*(Uint32 *) temp->pixels) & 0x00FFFFFF);
|
||||
break;
|
||||
case 32:
|
||||
SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (width_out != NULL) {
|
||||
*width_out = temp->w;
|
||||
}
|
||||
|
||||
if (height_out != NULL) {
|
||||
*height_out = temp->h;
|
||||
}
|
||||
|
||||
texture = SDL_CreateTextureFromSurface(renderer, temp);
|
||||
if (!texture) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError());
|
||||
}
|
||||
}
|
||||
if (temp) {
|
||||
SDL_FreeSurface(temp);
|
||||
}
|
||||
if (path) {
|
||||
SDL_free(path);
|
||||
}
|
||||
return texture;
|
||||
}
|
17
externals/SDL/test/testutils.h
vendored
17
externals/SDL/test/testutils.h
vendored
@ -1,17 +0,0 @@
|
||||
/*
|
||||
Copyright 1997-2022 Sam Lantinga
|
||||
Copyright 2022 Collabora Ltd.
|
||||
SPDX-License-Identifier: Zlib
|
||||
*/
|
||||
|
||||
#ifndef TESTUTILS_H
|
||||
#define TESTUTILS_H
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
SDL_Texture *LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent,
|
||||
int *width_out, int *height_out);
|
||||
char *GetNearbyFilename(const char *file);
|
||||
char *GetResourceFilename(const char *user_specified, const char *def);
|
||||
|
||||
#endif
|
162
externals/SDL/test/versioning.sh
vendored
162
externals/SDL/test/versioning.sh
vendored
@ -1,162 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2022 Collabora Ltd.
|
||||
# SPDX-License-Identifier: Zlib
|
||||
|
||||
set -eu
|
||||
|
||||
ref_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION *//p' include/SDL_version.h)
|
||||
ref_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION *//p' include/SDL_version.h)
|
||||
ref_micro=$(sed -ne 's/^#define SDL_PATCHLEVEL *//p' include/SDL_version.h)
|
||||
ref_version="${ref_major}.${ref_minor}.${ref_micro}"
|
||||
|
||||
tests=0
|
||||
failed=0
|
||||
|
||||
ok () {
|
||||
tests=$(( tests + 1 ))
|
||||
echo "ok - $*"
|
||||
}
|
||||
|
||||
not_ok () {
|
||||
tests=$(( tests + 1 ))
|
||||
echo "not ok - $*"
|
||||
failed=1
|
||||
}
|
||||
|
||||
major=$(sed -ne 's/^SDL_MAJOR_VERSION=//p' configure.ac)
|
||||
minor=$(sed -ne 's/^SDL_MINOR_VERSION=//p' configure.ac)
|
||||
micro=$(sed -ne 's/^SDL_MICRO_VERSION=//p' configure.ac)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "configure.ac $version"
|
||||
else
|
||||
not_ok "configure.ac $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/^set(SDL_MAJOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
|
||||
minor=$(sed -ne 's/^set(SDL_MINOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
|
||||
micro=$(sed -ne 's/^set(SDL_MICRO_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "CMakeLists.txt $version"
|
||||
else
|
||||
not_ok "CMakeLists.txt $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
|
||||
minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
|
||||
micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "Makefile.os2 $version"
|
||||
else
|
||||
not_ok "Makefile.os2 $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.w32)
|
||||
minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.w32)
|
||||
micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.w32)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "Makefile.w32 $version"
|
||||
else
|
||||
not_ok "Makefile.w32 $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
version=$(sed -Ene 's/^[$]SDLVersion = "([0-9.]*)"\r?$/\1/p' build-scripts/winrtbuild.ps1)
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "winrtbuild.ps1 $version"
|
||||
else
|
||||
not_ok "winrtbuild.ps1 $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
tuple=$(sed -ne 's/^ *FILEVERSION *//p' src/main/windows/version.rc | tr -d '\r')
|
||||
ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
|
||||
|
||||
if [ "$ref_tuple" = "$tuple" ]; then
|
||||
ok "version.rc FILEVERSION $tuple"
|
||||
else
|
||||
not_ok "version.rc FILEVERSION $tuple disagrees with SDL_version.h $ref_tuple"
|
||||
fi
|
||||
|
||||
tuple=$(sed -ne 's/^ *PRODUCTVERSION *//p' src/main/windows/version.rc | tr -d '\r')
|
||||
|
||||
if [ "$ref_tuple" = "$tuple" ]; then
|
||||
ok "version.rc PRODUCTVERSION $tuple"
|
||||
else
|
||||
not_ok "version.rc PRODUCTVERSION $tuple disagrees with SDL_version.h $ref_tuple"
|
||||
fi
|
||||
|
||||
tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]*)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
|
||||
ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
|
||||
|
||||
if [ "$ref_tuple" = "$tuple" ]; then
|
||||
ok "version.rc FileVersion $tuple"
|
||||
else
|
||||
not_ok "version.rc FileVersion $tuple disagrees with SDL_version.h $ref_tuple"
|
||||
fi
|
||||
|
||||
tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]*)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
|
||||
|
||||
if [ "$ref_tuple" = "$tuple" ]; then
|
||||
ok "version.rc ProductVersion $tuple"
|
||||
else
|
||||
not_ok "version.rc ProductVersion $tuple disagrees with SDL_version.h $ref_tuple"
|
||||
fi
|
||||
|
||||
version=$(sed -Ene '/CFBundleShortVersionString/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/SDL/Info-Framework.plist)
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "Info-Framework.plist CFBundleShortVersionString $version"
|
||||
else
|
||||
not_ok "Info-Framework.plist CFBundleShortVersionString $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
version=$(sed -Ene '/CFBundleVersion/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/SDL/Info-Framework.plist)
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "Info-Framework.plist CFBundleVersion $version"
|
||||
else
|
||||
not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
# For simplicity this assumes we'll never break ABI before SDL 3.
|
||||
dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
|
||||
ref='1.0.0
|
||||
1.0.0'
|
||||
|
||||
if [ "$ref" = "$dylib_compat" ]; then
|
||||
ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is consistent"
|
||||
else
|
||||
not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent"
|
||||
fi
|
||||
|
||||
dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
|
||||
|
||||
case "$ref_minor" in
|
||||
(*[02468])
|
||||
major="$(( ref_minor * 100 + 1 ))"
|
||||
minor="$ref_micro"
|
||||
;;
|
||||
(*)
|
||||
major="$(( ref_minor * 100 + ref_micro + 1 ))"
|
||||
minor="0"
|
||||
;;
|
||||
esac
|
||||
|
||||
ref="${major}.${minor}.0
|
||||
${major}.${minor}.0"
|
||||
|
||||
if [ "$ref" = "$dylib_cur" ]; then
|
||||
ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
|
||||
else
|
||||
not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent"
|
||||
fi
|
||||
|
||||
echo "1..$tests"
|
||||
exit "$failed"
|
116
externals/SDL/test/watcom.mif
vendored
116
externals/SDL/test/watcom.mif
vendored
@ -1,116 +0,0 @@
|
||||
INCPATH+= -I"../include"
|
||||
LIBPATH = ..
|
||||
LIBS = SDL2.lib SDL2test.lib testutils.lib
|
||||
|
||||
#CFLAGS+= -DHAVE_SDL_TTF
|
||||
#TTFLIBS = SDL2ttf.lib
|
||||
|
||||
CFLAGS+= $(INCPATH)
|
||||
|
||||
TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
|
||||
testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &
|
||||
testfilesystem.exe testgamecontroller.exe testgeometry.exe testgesture.exe &
|
||||
testhittesting.exe testhotplug.exe testiconv.exe testime.exe testlocale.exe &
|
||||
testguid.exe testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &
|
||||
testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &
|
||||
testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &
|
||||
testrendertarget.exe testrumble.exe testscale.exe testsem.exe &
|
||||
testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &
|
||||
teststreaming.exe testthread.exe testtimer.exe testver.exe &
|
||||
testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &
|
||||
checkkeysthreads.exe testmouse.exe testgles.exe testgles2.exe &
|
||||
controllermap.exe testhaptic.exe testqsort.exe testresample.exe &
|
||||
testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &
|
||||
testsurround.exe testyuv.exe testgl2.exe testvulkan.exe testnative.exe &
|
||||
testautomation.exe testaudiohotplug.exe testcustomcursor.exe testmultiaudio.exe &
|
||||
testoffscreen.exe testurl.exe
|
||||
|
||||
noninteractive = &
|
||||
testatomic.exe &
|
||||
testerror.exe &
|
||||
testfilesystem.exe &
|
||||
testkeys.exe &
|
||||
testlocale.exe &
|
||||
testplatform.exe &
|
||||
testpower.exe &
|
||||
testqsort.exe &
|
||||
testthread.exe &
|
||||
testtimer.exe &
|
||||
testver.exe
|
||||
|
||||
needs_audio = &
|
||||
testaudioinfo.exe &
|
||||
testsurround.exe
|
||||
|
||||
needs_display = &
|
||||
testbounds.exe &
|
||||
testdisplayinfo.exe
|
||||
|
||||
TESTS = $(noninteractive) $(needs_audio) $(needs_display)
|
||||
|
||||
# testautomation sources
|
||||
TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
|
||||
testautomation_events.c testautomation_hints.c &
|
||||
testautomation_keyboard.c testautomation_main.c &
|
||||
testautomation_mouse.c testautomation_pixels.c &
|
||||
testautomation_platform.c testautomation_rect.c &
|
||||
testautomation_render.c testautomation_rwops.c &
|
||||
testautomation_sdltest.c testautomation_stdlib.c &
|
||||
testautomation_surface.c testautomation_syswm.c &
|
||||
testautomation_timer.c testautomation_video.c &
|
||||
testautomation_math.c
|
||||
|
||||
OBJS = $(TARGETS:.exe=.obj)
|
||||
COBJS = $(CSRCS:.c=.obj)
|
||||
TAOBJS = $(TASRCS:.c=.obj)
|
||||
TNOBJS = $(TNSRCS:.c=.obj)
|
||||
|
||||
all: testutils.lib $(TARGETS)
|
||||
|
||||
.c: ../src/test
|
||||
|
||||
.obj.exe:
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
|
||||
|
||||
.c.obj:
|
||||
wcc386 $(CFLAGS) -fo=$^@ $<
|
||||
|
||||
# specials
|
||||
testautomation.exe: $(TAOBJS)
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
|
||||
|
||||
testnative.exe: $(TNOBJS)
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
|
||||
|
||||
testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
|
||||
|
||||
testyuv.exe: testyuv.obj testyuv_cvt.obj
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
|
||||
|
||||
testshader.exe: testshader.obj
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS) $(GLLIBS)} op q op el file {$<} name $@
|
||||
|
||||
testime.exe: testime.obj
|
||||
wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS) $(TTFLIBS)} op q op el file {$<} name $@
|
||||
|
||||
testutils.lib: testutils.obj
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $<
|
||||
|
||||
check: .SYMBOLIC $(TESTS)
|
||||
@set SDL_AUDIODRIVER=dummy
|
||||
@set SDL_VIDEODRIVER=dummy
|
||||
@copy "../SDL2.dll" .
|
||||
@for %exe in ($(TESTS)) do %exe
|
||||
|
||||
check-quick: .SYMBOLIC $(TESTS)
|
||||
@set SDL_TESTS_QUICK=1
|
||||
@set SDL_AUDIODRIVER=dummy
|
||||
@set SDL_VIDEODRIVER=dummy
|
||||
@copy "../SDL2.dll" .
|
||||
@for %exe in ($(TESTS)) do %exe
|
||||
|
||||
clean: .SYMBOLIC
|
||||
rm -f *.obj *.err
|
||||
distclean: .SYMBOLIC clean
|
||||
rm -f *.exe *.lib
|
1
externals/SDL/visualtest/compile
vendored
1
externals/SDL/visualtest/compile
vendored
@ -1 +0,0 @@
|
||||
/usr/share/automake-1.11/compile
|
23
externals/SDL/visualtest/config.h
vendored
23
externals/SDL/visualtest/config.h
vendored
@ -1,23 +0,0 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "apoorvupreti@gmail.com"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "sdlvisualtest"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "sdlvisualtest 0.01"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "sdlvisualtest"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "0.01"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
22
externals/SDL/visualtest/config.h.in
vendored
22
externals/SDL/visualtest/config.h.in
vendored
@ -1,22 +0,0 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
166
externals/SDL/visualtest/configure.in
vendored
166
externals/SDL/visualtest/configure.in
vendored
@ -1,166 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT([sdlvisualtest], [0.01], [apoorvupreti@gmail.com])
|
||||
|
||||
dnl Detect the canonical build and host environments
|
||||
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl Check for tools
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
dnl Check for compiler environment
|
||||
|
||||
AC_C_CONST
|
||||
|
||||
dnl We only care about this for building testnative at the moment, so these
|
||||
dnl values shouldn't be considered absolute truth.
|
||||
dnl (Haiku, for example, sets none of these.)
|
||||
ISUNIX="false"
|
||||
ISWINDOWS="false"
|
||||
ISMACOSX="false"
|
||||
|
||||
dnl Figure out which math or extra library to use
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
ISWINDOWS="true"
|
||||
EXE=".exe"
|
||||
MATHLIB=""
|
||||
EXTRALIB="-lshlwapi"
|
||||
SYS_GL_LIBS="-lopengl32"
|
||||
;;
|
||||
*-*-haiku*)
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
EXTRALIB=""
|
||||
SYS_GL_LIBS="-lGL"
|
||||
;;
|
||||
*-*-darwin* )
|
||||
ISMACOSX="true"
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
EXTRALIB=""
|
||||
|
||||
;;
|
||||
*-*-aix*)
|
||||
ISUNIX="true"
|
||||
EXE=""
|
||||
if test x$ac_cv_prog_gcc = xyes; then
|
||||
CFLAGS="-mthreads"
|
||||
fi
|
||||
MATHLIB=""
|
||||
EXTRALIB=""
|
||||
SYS_GL_LIBS=""
|
||||
;;
|
||||
*-*-mint*)
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
EXTRALIB=""
|
||||
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
|
||||
if test "x$OSMESA_CONFIG" = "xyes"; then
|
||||
OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
|
||||
OSMESA_LIBS=`$OSMESA_CONFIG --libs`
|
||||
CFLAGS="$CFLAGS $OSMESA_CFLAGS"
|
||||
SYS_GL_LIBS="$OSMESA_LIBS"
|
||||
else
|
||||
SYS_GL_LIBS="-lOSMesa"
|
||||
fi
|
||||
;;
|
||||
*-*-qnx*)
|
||||
EXE=""
|
||||
MATHLIB=""
|
||||
EXTRALIB=""
|
||||
SYS_GL_LIBS="-lGLES_CM"
|
||||
;;
|
||||
*)
|
||||
dnl Oh well, call it Unix...
|
||||
ISUNIX="true"
|
||||
EXE=""
|
||||
MATHLIB="-lm"
|
||||
EXTRALIB=""
|
||||
SYS_GL_LIBS="-lGL"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(EXE)
|
||||
AC_SUBST(MATHLIB)
|
||||
AC_SUBST(EXTRALIB)
|
||||
AC_SUBST(ISMACOSX)
|
||||
AC_SUBST(ISWINDOWS)
|
||||
AC_SUBST(ISUNIX)
|
||||
|
||||
dnl Check for SDL
|
||||
SDL_VERSION=2.0.0
|
||||
AM_PATH_SDL2($SDL_VERSION,
|
||||
:,
|
||||
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
||||
)
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB"
|
||||
|
||||
dnl Check for X11 path, needed for OpenGL on some systems
|
||||
AC_PATH_X
|
||||
if test x$have_x = xyes; then
|
||||
if test x$ac_x_includes = xno || test x$ac_x_includes = x; then
|
||||
:
|
||||
else
|
||||
CFLAGS="$CFLAGS -I$ac_x_includes"
|
||||
fi
|
||||
if test x$ac_x_libraries = xno || test x$ac_x_libraries = x; then
|
||||
:
|
||||
else
|
||||
XPATH="-L$ac_x_libraries"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for OpenGL
|
||||
AC_MSG_CHECKING(for OpenGL support)
|
||||
have_opengl=no
|
||||
AC_TRY_COMPILE([
|
||||
#include "SDL_opengl.h"
|
||||
],[
|
||||
],[
|
||||
have_opengl=yes
|
||||
])
|
||||
AC_MSG_RESULT($have_opengl)
|
||||
|
||||
dnl Check for OpenGL ES
|
||||
AC_MSG_CHECKING(for OpenGL ES support)
|
||||
have_opengles=no
|
||||
AC_TRY_COMPILE([
|
||||
#if defined (__IPHONEOS__)
|
||||
#include <OpenGLES/ES1/gl.h>
|
||||
#else
|
||||
#include <GLES/gl.h>
|
||||
#endif /* __QNXNTO__ */
|
||||
],[
|
||||
],[
|
||||
have_opengles=yes
|
||||
])
|
||||
AC_MSG_RESULT($have_opengles)
|
||||
|
||||
GLLIB=""
|
||||
if test x$have_opengles = xyes; then
|
||||
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
|
||||
GLLIB="$XPATH -lGLESv1_CM"
|
||||
elif test x$have_opengl = xyes; then
|
||||
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
||||
GLLIB="$XPATH $SYS_GL_LIBS"
|
||||
else
|
||||
GLLIB=""
|
||||
fi
|
||||
|
||||
AC_SUBST(GLLIB)
|
||||
|
||||
dnl Check for SDL_ttf
|
||||
AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)
|
||||
if test x$have_SDL_ttf = xyes; then
|
||||
CFLAGS="$CFLAGS -DHAVE_SDL_TTF"
|
||||
SDL_TTF_LIB="-lSDL2_ttf"
|
||||
fi
|
||||
AC_SUBST(SDL_TTF_LIB)
|
||||
|
||||
dnl Finally create all the generated files
|
||||
dnl AC_OUTPUT([Makefile])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT()
|
1
externals/SDL/visualtest/depcomp
vendored
1
externals/SDL/visualtest/depcomp
vendored
@ -1 +0,0 @@
|
||||
/usr/share/automake-1.11/depcomp
|
1
externals/SDL/visualtest/install-sh
vendored
1
externals/SDL/visualtest/install-sh
vendored
@ -1 +0,0 @@
|
||||
/usr/share/automake-1.11/install-sh
|
1
externals/SDL/visualtest/missing
vendored
1
externals/SDL/visualtest/missing
vendored
@ -1 +0,0 @@
|
||||
/usr/share/automake-1.11/missing
|
1
externals/SDL/visualtest/stamp-h1
vendored
1
externals/SDL/visualtest/stamp-h1
vendored
@ -1 +0,0 @@
|
||||
timestamp for config.h
|
1178
externals/SDL/wayland-protocols/tablet-unstable-v2.xml
vendored
1178
externals/SDL/wayland-protocols/tablet-unstable-v2.xml
vendored
File diff suppressed because it is too large
Load Diff
186
externals/SDL/wayland-protocols/viewporter.xml
vendored
186
externals/SDL/wayland-protocols/viewporter.xml
vendored
@ -1,186 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="viewporter">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2013-2016 Collabora, Ltd.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="wp_viewporter" version="1">
|
||||
<description summary="surface cropping and scaling">
|
||||
The global interface exposing surface cropping and scaling
|
||||
capabilities is used to instantiate an interface extension for a
|
||||
wl_surface object. This extended interface will then allow
|
||||
cropping and scaling the surface contents, effectively
|
||||
disconnecting the direct relationship between the buffer and the
|
||||
surface size.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="unbind from the cropping and scaling interface">
|
||||
Informs the server that the client will not be using this
|
||||
protocol object anymore. This does not affect any other objects,
|
||||
wp_viewport objects included.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="viewport_exists" value="0"
|
||||
summary="the surface already has a viewport object associated"/>
|
||||
</enum>
|
||||
|
||||
<request name="get_viewport">
|
||||
<description summary="extend surface interface for crop and scale">
|
||||
Instantiate an interface extension for the given wl_surface to
|
||||
crop and scale its content. If the given wl_surface already has
|
||||
a wp_viewport object associated, the viewport_exists
|
||||
protocol error is raised.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wp_viewport"
|
||||
summary="the new viewport interface id"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the surface"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wp_viewport" version="1">
|
||||
<description summary="crop and scale interface to a wl_surface">
|
||||
An additional interface to a wl_surface object, which allows the
|
||||
client to specify the cropping and scaling of the surface
|
||||
contents.
|
||||
|
||||
This interface works with two concepts: the source rectangle (src_x,
|
||||
src_y, src_width, src_height), and the destination size (dst_width,
|
||||
dst_height). The contents of the source rectangle are scaled to the
|
||||
destination size, and content outside the source rectangle is ignored.
|
||||
This state is double-buffered, and is applied on the next
|
||||
wl_surface.commit.
|
||||
|
||||
The two parts of crop and scale state are independent: the source
|
||||
rectangle, and the destination size. Initially both are unset, that
|
||||
is, no scaling is applied. The whole of the current wl_buffer is
|
||||
used as the source, and the surface size is as defined in
|
||||
wl_surface.attach.
|
||||
|
||||
If the destination size is set, it causes the surface size to become
|
||||
dst_width, dst_height. The source (rectangle) is scaled to exactly
|
||||
this size. This overrides whatever the attached wl_buffer size is,
|
||||
unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
|
||||
has no content and therefore no size. Otherwise, the size is always
|
||||
at least 1x1 in surface local coordinates.
|
||||
|
||||
If the source rectangle is set, it defines what area of the wl_buffer is
|
||||
taken as the source. If the source rectangle is set and the destination
|
||||
size is not set, then src_width and src_height must be integers, and the
|
||||
surface size becomes the source rectangle size. This results in cropping
|
||||
without scaling. If src_width or src_height are not integers and
|
||||
destination size is not set, the bad_size protocol error is raised when
|
||||
the surface state is applied.
|
||||
|
||||
The coordinate transformations from buffer pixel coordinates up to
|
||||
the surface-local coordinates happen in the following order:
|
||||
1. buffer_transform (wl_surface.set_buffer_transform)
|
||||
2. buffer_scale (wl_surface.set_buffer_scale)
|
||||
3. crop and scale (wp_viewport.set*)
|
||||
This means, that the source rectangle coordinates of crop and scale
|
||||
are given in the coordinates after the buffer transform and scale,
|
||||
i.e. in the coordinates that would be the surface-local coordinates
|
||||
if the crop and scale was not applied.
|
||||
|
||||
If src_x or src_y are negative, the bad_value protocol error is raised.
|
||||
Otherwise, if the source rectangle is partially or completely outside of
|
||||
the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
|
||||
when the surface state is applied. A NULL wl_buffer does not raise the
|
||||
out_of_buffer error.
|
||||
|
||||
The x, y arguments of wl_surface.attach are applied as normal to
|
||||
the surface. They indicate how many pixels to remove from the
|
||||
surface size from the left and the top. In other words, they are
|
||||
still in the surface-local coordinate system, just like dst_width
|
||||
and dst_height are.
|
||||
|
||||
If the wl_surface associated with the wp_viewport is destroyed,
|
||||
all wp_viewport requests except 'destroy' raise the protocol error
|
||||
no_surface.
|
||||
|
||||
If the wp_viewport object is destroyed, the crop and scale
|
||||
state is removed from the wl_surface. The change will be applied
|
||||
on the next wl_surface.commit.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="remove scaling and cropping from the surface">
|
||||
The associated wl_surface's crop and scale state is removed.
|
||||
The change is applied on the next wl_surface.commit.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="bad_value" value="0"
|
||||
summary="negative or zero values in width or height"/>
|
||||
<entry name="bad_size" value="1"
|
||||
summary="destination size is not integer"/>
|
||||
<entry name="out_of_buffer" value="2"
|
||||
summary="source rectangle extends outside of the content area"/>
|
||||
<entry name="no_surface" value="3"
|
||||
summary="the wl_surface was destroyed"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_source">
|
||||
<description summary="set the source rectangle for cropping">
|
||||
Set the source rectangle of the associated wl_surface. See
|
||||
wp_viewport for the description, and relation to the wl_buffer
|
||||
size.
|
||||
|
||||
If all of x, y, width and height are -1.0, the source rectangle is
|
||||
unset instead. Any other set of values where width or height are zero
|
||||
or negative, or x or y are negative, raise the bad_value protocol
|
||||
error.
|
||||
|
||||
The crop and scale state is double-buffered state, and will be
|
||||
applied on the next wl_surface.commit.
|
||||
</description>
|
||||
<arg name="x" type="fixed" summary="source rectangle x"/>
|
||||
<arg name="y" type="fixed" summary="source rectangle y"/>
|
||||
<arg name="width" type="fixed" summary="source rectangle width"/>
|
||||
<arg name="height" type="fixed" summary="source rectangle height"/>
|
||||
</request>
|
||||
|
||||
<request name="set_destination">
|
||||
<description summary="set the surface size for scaling">
|
||||
Set the destination size of the associated wl_surface. See
|
||||
wp_viewport for the description, and relation to the wl_buffer
|
||||
size.
|
||||
|
||||
If width is -1 and height is -1, the destination size is unset
|
||||
instead. Any other pair of values for width and height that
|
||||
contains zero or negative values raises the bad_value protocol
|
||||
error.
|
||||
|
||||
The crop and scale state is double-buffered state, and will be
|
||||
applied on the next wl_surface.commit.
|
||||
</description>
|
||||
<arg name="width" type="int" summary="surface width"/>
|
||||
<arg name="height" type="int" summary="surface height"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
@ -1,220 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_output_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2017 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="Protocol to describe output regions">
|
||||
This protocol aims at describing outputs in a way which is more in line
|
||||
with the concept of an output on desktop oriented systems.
|
||||
|
||||
Some information are more specific to the concept of an output for
|
||||
a desktop oriented system and may not make sense in other applications,
|
||||
such as IVI systems for example.
|
||||
|
||||
Typically, the global compositor space on a desktop system is made of
|
||||
a contiguous or overlapping set of rectangular regions.
|
||||
|
||||
Some of the information provided in this protocol might be identical
|
||||
to their counterparts already available from wl_output, in which case
|
||||
the information provided by this protocol should be preferred to their
|
||||
equivalent in wl_output. The goal is to move the desktop specific
|
||||
concepts (such as output location within the global compositor space,
|
||||
the connector name and types, etc.) out of the core wl_output protocol.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible
|
||||
changes may be added together with the corresponding interface
|
||||
version bump.
|
||||
Backward incompatible changes are done by bumping the version
|
||||
number in the protocol and interface names and resetting the
|
||||
interface version. Once the protocol is to be declared stable,
|
||||
the 'z' prefix and the version number in the protocol and
|
||||
interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zxdg_output_manager_v1" version="3">
|
||||
<description summary="manage xdg_output objects">
|
||||
A global factory interface for xdg_output objects.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_output_manager object">
|
||||
Using this request a client can tell the server that it is not
|
||||
going to use the xdg_output_manager object anymore.
|
||||
|
||||
Any objects already created through this instance are not affected.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_xdg_output">
|
||||
<description summary="create an xdg output from a wl_output">
|
||||
This creates a new xdg_output object for the given wl_output.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zxdg_output_v1"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zxdg_output_v1" version="3">
|
||||
<description summary="compositor logical output region">
|
||||
An xdg_output describes part of the compositor geometry.
|
||||
|
||||
This typically corresponds to a monitor that displays part of the
|
||||
compositor space.
|
||||
|
||||
For objects version 3 onwards, after all xdg_output properties have been
|
||||
sent (when the object is created and when properties are updated), a
|
||||
wl_output.done event is sent. This allows changes to the output
|
||||
properties to be seen as atomic, even if they happen via multiple events.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_output object">
|
||||
Using this request a client can tell the server that it is not
|
||||
going to use the xdg_output object anymore.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="logical_position">
|
||||
<description summary="position of the output within the global compositor space">
|
||||
The position event describes the location of the wl_output within
|
||||
the global compositor space.
|
||||
|
||||
The logical_position event is sent after creating an xdg_output
|
||||
(see xdg_output_manager.get_xdg_output) and whenever the location
|
||||
of the output changes within the global compositor space.
|
||||
</description>
|
||||
<arg name="x" type="int"
|
||||
summary="x position within the global compositor space"/>
|
||||
<arg name="y" type="int"
|
||||
summary="y position within the global compositor space"/>
|
||||
</event>
|
||||
|
||||
<event name="logical_size">
|
||||
<description summary="size of the output in the global compositor space">
|
||||
The logical_size event describes the size of the output in the
|
||||
global compositor space.
|
||||
|
||||
For example, a surface without any buffer scale, transformation
|
||||
nor rotation set, with the size matching the logical_size will
|
||||
have the same size as the corresponding output when displayed.
|
||||
|
||||
Most regular Wayland clients should not pay attention to the
|
||||
logical size and would rather rely on xdg_shell interfaces.
|
||||
|
||||
Some clients such as Xwayland, however, need this to configure
|
||||
their surfaces in the global compositor space as the compositor
|
||||
may apply a different scale from what is advertised by the output
|
||||
scaling property (to achieve fractional scaling, for example).
|
||||
|
||||
For example, for a wl_output mode 3840×2160 and a scale factor 2:
|
||||
|
||||
- A compositor not scaling the surface buffers will advertise a
|
||||
logical size of 3840×2160,
|
||||
|
||||
- A compositor automatically scaling the surface buffers will
|
||||
advertise a logical size of 1920×1080,
|
||||
|
||||
- A compositor using a fractional scale of 1.5 will advertise a
|
||||
logical size of 2560×1440.
|
||||
|
||||
For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
|
||||
the compositor will advertise a logical size of 1080x1920.
|
||||
|
||||
The logical_size event is sent after creating an xdg_output
|
||||
(see xdg_output_manager.get_xdg_output) and whenever the logical
|
||||
size of the output changes, either as a result of a change in the
|
||||
applied scale or because of a change in the corresponding output
|
||||
mode(see wl_output.mode) or transform (see wl_output.transform).
|
||||
</description>
|
||||
<arg name="width" type="int"
|
||||
summary="width in global compositor space"/>
|
||||
<arg name="height" type="int"
|
||||
summary="height in global compositor space"/>
|
||||
</event>
|
||||
|
||||
<event name="done">
|
||||
<description summary="all information about the output have been sent">
|
||||
This event is sent after all other properties of an xdg_output
|
||||
have been sent.
|
||||
|
||||
This allows changes to the xdg_output properties to be seen as
|
||||
atomic, even if they happen via multiple events.
|
||||
|
||||
For objects version 3 onwards, this event is deprecated. Compositors
|
||||
are not required to send it anymore and must send wl_output.done
|
||||
instead.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<!-- Version 2 additions -->
|
||||
|
||||
<event name="name" since="2">
|
||||
<description summary="name of this output">
|
||||
Many compositors will assign names to their outputs, show them to the
|
||||
user, allow them to be configured by name, etc. The client may wish to
|
||||
know this name as well to offer the user similar behaviors.
|
||||
|
||||
The naming convention is compositor defined, but limited to
|
||||
alphanumeric characters and dashes (-). Each name is unique among all
|
||||
wl_output globals, but if a wl_output global is destroyed the same name
|
||||
may be reused later. The names will also remain consistent across
|
||||
sessions with the same hardware and software configuration.
|
||||
|
||||
Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
|
||||
not assume that the name is a reflection of an underlying DRM
|
||||
connector, X11 connection, etc.
|
||||
|
||||
The name event is sent after creating an xdg_output (see
|
||||
xdg_output_manager.get_xdg_output). This event is only sent once per
|
||||
xdg_output, and the name does not change over the lifetime of the
|
||||
wl_output global.
|
||||
</description>
|
||||
<arg name="name" type="string" summary="output name"/>
|
||||
</event>
|
||||
|
||||
<event name="description" since="2">
|
||||
<description summary="human-readable description of this output">
|
||||
Many compositors can produce human-readable descriptions of their
|
||||
outputs. The client may wish to know this description as well, to
|
||||
communicate the user for various purposes.
|
||||
|
||||
The description is a UTF-8 string with no convention defined for its
|
||||
contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
|
||||
output via :1'.
|
||||
|
||||
The description event is sent after creating an xdg_output (see
|
||||
xdg_output_manager.get_xdg_output) and whenever the description
|
||||
changes. The description is optional, and may not be sent at all.
|
||||
|
||||
For objects of version 2 and lower, this event is only sent once per
|
||||
xdg_output, and the description does not change over the lifetime of
|
||||
the wl_output global.
|
||||
</description>
|
||||
<arg name="description" type="string" summary="output description"/>
|
||||
</event>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
36
externals/cpp-httplib/test/Makefile.fuzz_test
vendored
36
externals/cpp-httplib/test/Makefile.fuzz_test
vendored
@ -1,36 +0,0 @@
|
||||
|
||||
#CXX = clang++
|
||||
CXXFLAGS += -ggdb -O0 -std=c++11 -DGTEST_USE_OWN_TR1_TUPLE -I.. -I. -Wall -Wextra -Wtype-limits -Wconversion
|
||||
|
||||
OPENSSL_DIR = /usr/local/opt/openssl@1.1
|
||||
OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
|
||||
|
||||
ZLIB_SUPPORT = -DCPPHTTPLIB_ZLIB_SUPPORT -lz
|
||||
|
||||
BROTLI_DIR = /usr/local/opt/brotli
|
||||
BROTLI_SUPPORT = -DCPPHTTPLIB_BROTLI_SUPPORT -I$(BROTLI_DIR)/include -L$(BROTLI_DIR)/lib -lbrotlicommon -lbrotlienc -lbrotlidec
|
||||
|
||||
# By default, use standalone_fuzz_target_runner.
|
||||
# This runner does no fuzzing, but simply executes the inputs
|
||||
# provided via parameters.
|
||||
# Run e.g. "make all LIB_FUZZING_ENGINE=/path/to/libFuzzer.a"
|
||||
# to link the fuzzer(s) against a real fuzzing engine.
|
||||
# OSS-Fuzz will define its own value for LIB_FUZZING_ENGINE.
|
||||
LIB_FUZZING_ENGINE ?= standalone_fuzz_target_runner.o
|
||||
|
||||
# Runs server_fuzzer.cc based on value of $(LIB_FUZZING_ENGINE).
|
||||
# Usage: make fuzz_test LIB_FUZZING_ENGINE=/path/to/libFuzzer
|
||||
all fuzz_test: server_fuzzer
|
||||
./server_fuzzer fuzzing/corpus/*
|
||||
|
||||
# Fuzz target, so that you can choose which $(LIB_FUZZING_ENGINE) to use.
|
||||
server_fuzzer : fuzzing/server_fuzzer.cc ../httplib.h standalone_fuzz_target_runner.o
|
||||
$(CXX) $(CXXFLAGS) -o $@ $< $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(LIB_FUZZING_ENGINE) -pthread
|
||||
|
||||
# Standalone fuzz runner, which just reads inputs from fuzzing/corpus/ dir and
|
||||
# feeds it to server_fuzzer.
|
||||
standalone_fuzz_target_runner.o : fuzzing/standalone_fuzz_target_runner.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f server_fuzzer pem *.0 *.o *.1 *.srl *.zip
|
1
externals/cpp-httplib/test/proxy/down.sh
vendored
1
externals/cpp-httplib/test/proxy/down.sh
vendored
@ -1 +0,0 @@
|
||||
docker-compose down --rmi all
|
1
externals/cpp-httplib/test/proxy/up.sh
vendored
1
externals/cpp-httplib/test/proxy/up.sh
vendored
@ -1 +0,0 @@
|
||||
docker-compose up -d
|
32
externals/dynarmic/.appveyor.yml
vendored
32
externals/dynarmic/.appveyor.yml
vendored
@ -1,32 +0,0 @@
|
||||
# shallow clone
|
||||
clone_depth: 5
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
cmake_generator: "Visual Studio 15 2017 Win64"
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
install:
|
||||
- git submodule update --init --recursive
|
||||
- cd externals
|
||||
- git clone https://github.com/MerryMage/ext-boost boost
|
||||
- cd ..
|
||||
|
||||
before_build:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake .. -G "%cmake_generator%" -DBoost_INCLUDE_DIRS=%cd%/../externals/boost
|
||||
- cd ..
|
||||
|
||||
build:
|
||||
project: build/dynarmic.sln
|
||||
parallel: true
|
||||
|
||||
test_script:
|
||||
- cd build && ctest -VV -C Release && cd ..
|
@ -1,102 +0,0 @@
|
||||
name: Build and Test
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ windows-latest, ubuntu-latest, macos-latest ]
|
||||
cpu_detection: [ 0, 1 ]
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
|
||||
- name: Install build dependencies
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
run: sudo apt-get install llvm ninja-build
|
||||
|
||||
- name: Install build dependencies
|
||||
if: ${{matrix.os == 'macos-latest'}}
|
||||
run: |
|
||||
brew install llvm ninja
|
||||
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Checkout dynarmic repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout ext-boost repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: MerryMage/ext-boost
|
||||
path: externals/ext-boost
|
||||
|
||||
- name: Checkout unicorn repo
|
||||
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: MerryMage/unicorn
|
||||
path: externals/unicorn
|
||||
|
||||
- name: Build unicorn
|
||||
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
|
||||
working-directory: externals/unicorn
|
||||
run: UNICORN_ARCHS=aarch64,arm ./make.sh
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{matrix.os == 'ubuntu-latest'}}
|
||||
env:
|
||||
CC: gcc-10
|
||||
CXX: g++-10
|
||||
CXXFLAGS: -Wp,-D_GLIBCXX_ASSERTIONS
|
||||
run: >
|
||||
cmake
|
||||
-B ${{github.workspace}}/build
|
||||
-DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
|
||||
-DDYNARMIC_TESTS_USE_UNICORN=1
|
||||
-DDYNARMIC_USE_LLVM=1
|
||||
-DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
|
||||
-DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
|
||||
-G Ninja
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{matrix.os == 'macos-latest'}}
|
||||
run: >
|
||||
cmake
|
||||
-B ${{github.workspace}}/build
|
||||
-DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
|
||||
-DDYNARMIC_TESTS_USE_UNICORN=1
|
||||
-DDYNARMIC_USE_LLVM=1
|
||||
-DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
|
||||
-DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
|
||||
-G Ninja
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{matrix.os == 'windows-latest'}}
|
||||
run: >
|
||||
cmake
|
||||
-B ${{github.workspace}}/build
|
||||
-DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost
|
||||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
|
||||
-G "Visual Studio 17 2022"
|
||||
-A x64
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config Release
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
DYLD_FALLBACK_LIBRARY_PATH: ${{github.workspace}}/externals/unicorn
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --extra-verbose -C ${{env.BUILD_TYPE}}
|
@ -1,2 +0,0 @@
|
||||
#include "xchar.h"
|
||||
#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead
|
856
externals/dynarmic/externals/fmt/test/format
vendored
856
externals/dynarmic/externals/fmt/test/format
vendored
@ -1,856 +0,0 @@
|
||||
// Formatting library for C++ - the standard API implementation
|
||||
//
|
||||
// Copyright (c) 2012 - present, Victor Zverovich
|
||||
// All rights reserved.
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#ifndef FMT_FORMAT_
|
||||
#define FMT_FORMAT_
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <variant>
|
||||
#include "fmt/format.h"
|
||||
|
||||
// This implementation verifies the correctness of the standard API proposed in
|
||||
// P0645 Text Formatting and is optimized for copy-pasting from the paper, not
|
||||
// for efficiency or readability. An efficient implementation should not use
|
||||
// std::variant and should store packed argument type tags separately from
|
||||
// values in basic_format_args for small number of arguments.
|
||||
|
||||
namespace std {
|
||||
template<class T>
|
||||
constexpr bool Integral = is_integral_v<T>;
|
||||
|
||||
template <class O>
|
||||
using iter_difference_t = ptrdiff_t;
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.syn
|
||||
namespace std {
|
||||
// [format.error], class format_error
|
||||
class format_error;
|
||||
|
||||
// [format.formatter], formatter
|
||||
template<class charT> class basic_format_parse_context;
|
||||
using format_parse_context = basic_format_parse_context<char>;
|
||||
using wformat_parse_context = basic_format_parse_context<wchar_t>;
|
||||
|
||||
template<class Out, class charT> class basic_format_context;
|
||||
using format_context = basic_format_context<
|
||||
/* unspecified */ fmt::detail::buffer_appender<char>, char>;
|
||||
using wformat_context = basic_format_context<
|
||||
/* unspecified */ fmt::detail::buffer_appender<wchar_t>, wchar_t>;
|
||||
|
||||
template<class T, class charT = char> struct formatter {
|
||||
formatter() = delete;
|
||||
};
|
||||
|
||||
// [format.arguments], arguments
|
||||
template<class Context> class basic_format_arg;
|
||||
|
||||
template<class Visitor, class Context>
|
||||
/* see below */ auto visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);
|
||||
|
||||
template<class Context, class... Args> struct format_arg_store; // exposition only
|
||||
|
||||
template<class Context> class basic_format_args;
|
||||
using format_args = basic_format_args<format_context>;
|
||||
using wformat_args = basic_format_args<wformat_context>;
|
||||
|
||||
template<class Out, class charT>
|
||||
using format_args_t = basic_format_args<basic_format_context<Out, charT>>;
|
||||
|
||||
template<class Context = format_context, class... Args>
|
||||
format_arg_store<Context, Args...>
|
||||
make_format_args(const Args&... args);
|
||||
template<class... Args>
|
||||
format_arg_store<wformat_context, Args...>
|
||||
make_wformat_args(const Args&... args);
|
||||
|
||||
// [format.functions], formatting functions
|
||||
template<class... Args>
|
||||
string format(string_view fmt, const Args&... args);
|
||||
template<class... Args>
|
||||
wstring format(wstring_view fmt, const Args&... args);
|
||||
|
||||
string vformat(string_view fmt, format_args args);
|
||||
wstring vformat(wstring_view fmt, wformat_args args);
|
||||
|
||||
template<class Out, class... Args>
|
||||
Out format_to(Out out, string_view fmt, const Args&... args);
|
||||
template<class Out, class... Args>
|
||||
Out format_to(Out out, wstring_view fmt, const Args&... args);
|
||||
|
||||
template<class Out>
|
||||
Out vformat_to(Out out, string_view fmt, format_args_t<fmt::type_identity_t<Out>, char> args);
|
||||
template<class Out>
|
||||
Out vformat_to(Out out, wstring_view fmt, format_args_t<fmt::type_identity_t<Out>, wchar_t> args);
|
||||
|
||||
template<class Out>
|
||||
struct format_to_n_result {
|
||||
Out out;
|
||||
iter_difference_t<Out> size;
|
||||
};
|
||||
|
||||
template<class Out, class... Args>
|
||||
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
|
||||
string_view fmt, const Args&... args);
|
||||
template<class Out, class... Args>
|
||||
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
|
||||
wstring_view fmt, const Args&... args);
|
||||
|
||||
template<class... Args>
|
||||
size_t formatted_size(string_view fmt, const Args&... args);
|
||||
template<class... Args>
|
||||
size_t formatted_size(wstring_view fmt, const Args&... args);
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.error
|
||||
namespace std {
|
||||
class format_error : public runtime_error {
|
||||
public:
|
||||
explicit format_error(const string& what_arg) : runtime_error(what_arg) {}
|
||||
explicit format_error(const char* what_arg) : runtime_error(what_arg) {}
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
namespace detail {
|
||||
struct error_handler {
|
||||
// This function is intentionally not constexpr to give a compile-time error.
|
||||
void on_error(const char* message) {
|
||||
throw std::format_error(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.parse_context
|
||||
namespace std {
|
||||
template<class charT>
|
||||
class basic_format_parse_context {
|
||||
public:
|
||||
using char_type = charT;
|
||||
using const_iterator = typename basic_string_view<charT>::const_iterator;
|
||||
using iterator = const_iterator;
|
||||
|
||||
private:
|
||||
iterator begin_; // exposition only
|
||||
iterator end_; // exposition only
|
||||
enum indexing { unknown, manual, automatic }; // exposition only
|
||||
indexing indexing_; // exposition only
|
||||
size_t next_arg_id_; // exposition only
|
||||
size_t num_args_; // exposition only
|
||||
|
||||
public:
|
||||
explicit constexpr basic_format_parse_context(basic_string_view<charT> fmt,
|
||||
size_t num_args = 0) noexcept;
|
||||
basic_format_parse_context(const basic_format_parse_context&) = delete;
|
||||
basic_format_parse_context& operator=(const basic_format_parse_context&) = delete;
|
||||
|
||||
constexpr const_iterator begin() const noexcept;
|
||||
constexpr const_iterator end() const noexcept;
|
||||
constexpr void advance_to(const_iterator it);
|
||||
|
||||
constexpr size_t next_arg_id();
|
||||
constexpr void check_arg_id(size_t id);
|
||||
|
||||
// Implementation detail:
|
||||
constexpr void check_arg_id(fmt::string_view) {}
|
||||
detail::error_handler error_handler() const { return {}; }
|
||||
void on_error(const char* msg) { error_handler().on_error(msg); }
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template<class charT>
|
||||
/* explicit */ constexpr basic_format_parse_context<charT>::
|
||||
basic_format_parse_context(basic_string_view<charT> fmt,
|
||||
size_t num_args) noexcept
|
||||
: begin_(fmt.begin()), end_(fmt.end()), indexing_(unknown), next_arg_id_(0), num_args_(num_args) {}
|
||||
|
||||
template<class charT>
|
||||
constexpr typename basic_format_parse_context<charT>::const_iterator basic_format_parse_context<charT>::begin() const noexcept { return begin_; }
|
||||
|
||||
template<class charT>
|
||||
constexpr typename basic_format_parse_context<charT>::const_iterator basic_format_parse_context<charT>::end() const noexcept { return end_; }
|
||||
|
||||
template<class charT>
|
||||
constexpr void basic_format_parse_context<charT>::advance_to(typename basic_format_parse_context<charT>::iterator it) { begin_ = it; }
|
||||
|
||||
template<class charT>
|
||||
constexpr size_t basic_format_parse_context<charT>::next_arg_id() {
|
||||
if (indexing_ == manual)
|
||||
throw format_error("manual to automatic indexing");
|
||||
if (indexing_ == unknown)
|
||||
indexing_ = automatic;
|
||||
return next_arg_id_++;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
constexpr void basic_format_parse_context<charT>::check_arg_id(size_t id) {
|
||||
// clang doesn't support __builtin_is_constant_evaluated yet
|
||||
//if (!(!__builtin_is_constant_evaluated() || id < num_args_))
|
||||
// throw format_error(invalid index is out of range");
|
||||
if (indexing_ == automatic)
|
||||
throw format_error("automatic to manual indexing");
|
||||
if (indexing_ == unknown)
|
||||
indexing_ = manual;
|
||||
}
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.context
|
||||
namespace std {
|
||||
template<class Out, class charT>
|
||||
class basic_format_context {
|
||||
basic_format_args<basic_format_context> args_; // exposition only
|
||||
Out out_; // exposition only
|
||||
|
||||
public:
|
||||
using iterator = Out;
|
||||
using char_type = charT;
|
||||
template<class T> using formatter_type = formatter<T, charT>;
|
||||
|
||||
basic_format_arg<basic_format_context> arg(size_t id) const;
|
||||
|
||||
iterator out();
|
||||
void advance_to(iterator it);
|
||||
|
||||
// Implementation details:
|
||||
using format_arg = basic_format_arg<basic_format_context>;
|
||||
basic_format_context(Out out, basic_format_args<basic_format_context> args, fmt::detail::locale_ref)
|
||||
: args_(args), out_(out) {}
|
||||
detail::error_handler error_handler() const { return {}; }
|
||||
basic_format_arg<basic_format_context> arg(fmt::basic_string_view<charT>) const {
|
||||
return {}; // unused: named arguments are not supported yet
|
||||
}
|
||||
void on_error(const char* msg) { error_handler().on_error(msg); }
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template<class O, class charT>
|
||||
basic_format_arg<basic_format_context<O, charT>> basic_format_context<O, charT>::arg(size_t id) const { return args_.get(id); }
|
||||
|
||||
template<class O, class charT>
|
||||
typename basic_format_context<O, charT>::iterator basic_format_context<O, charT>::out() { return out_; }
|
||||
|
||||
template<class O, class charT>
|
||||
void basic_format_context<O, charT>::advance_to(typename basic_format_context<O, charT>::iterator it) { out_ = it; }
|
||||
}
|
||||
|
||||
namespace std {
|
||||
namespace detail {
|
||||
template <typename T>
|
||||
constexpr bool is_standard_integer_v =
|
||||
std::is_same_v<T, signed char> ||
|
||||
std::is_same_v<T, short int> ||
|
||||
std::is_same_v<T, int> ||
|
||||
std::is_same_v<T, long int> ||
|
||||
std::is_same_v<T, long long int>;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_standard_unsigned_integer_v =
|
||||
std::is_same_v<T, unsigned char> ||
|
||||
std::is_same_v<T, unsigned short int> ||
|
||||
std::is_same_v<T, unsigned int> ||
|
||||
std::is_same_v<T, unsigned long int> ||
|
||||
std::is_same_v<T, unsigned long long int>;
|
||||
|
||||
template <typename T, typename Char> struct formatter;
|
||||
}
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.arg
|
||||
namespace std {
|
||||
template<class Context>
|
||||
class basic_format_arg {
|
||||
public:
|
||||
class handle;
|
||||
|
||||
private:
|
||||
using char_type = typename Context::char_type; // exposition only
|
||||
|
||||
variant<monostate, bool, char_type,
|
||||
int, unsigned int, long long int, unsigned long long int,
|
||||
double, long double,
|
||||
const char_type*, basic_string_view<char_type>,
|
||||
const void*, handle> value; // exposition only
|
||||
|
||||
template<typename T,
|
||||
typename = enable_if_t<
|
||||
std::is_same_v<T, bool> ||
|
||||
std::is_same_v<T, char_type> ||
|
||||
(std::is_same_v<T, char> && std::is_same_v<char_type, wchar_t>) ||
|
||||
detail::is_standard_integer_v<T> ||
|
||||
detail::is_standard_unsigned_integer_v<T> ||
|
||||
sizeof(typename Context::template formatter_type<T>().format(declval<const T&>(), declval<Context&>())) != 0
|
||||
>> explicit basic_format_arg(const T& v) noexcept; // exposition only
|
||||
explicit basic_format_arg(float n) noexcept; // exposition only
|
||||
explicit basic_format_arg(double n) noexcept; // exposition only
|
||||
explicit basic_format_arg(long double n) noexcept; // exposition only
|
||||
explicit basic_format_arg(const char_type* s); // exposition only
|
||||
|
||||
template<class traits>
|
||||
explicit basic_format_arg(
|
||||
basic_string_view<char_type, traits> s) noexcept; // exposition only
|
||||
|
||||
template<class traits, class Allocator>
|
||||
explicit basic_format_arg(
|
||||
const basic_string<char_type, traits, Allocator>& s) noexcept; // exposition only
|
||||
|
||||
explicit basic_format_arg(nullptr_t) noexcept; // exposition only
|
||||
|
||||
template<class T, typename = enable_if_t<is_void_v<T>>>
|
||||
explicit basic_format_arg(const T* p) noexcept; // exposition only
|
||||
|
||||
// Fails due to a bug in clang
|
||||
//template<class Visitor, class Ctx>
|
||||
// friend auto visit_format_arg(Visitor&& vis,
|
||||
// basic_format_arg<Ctx> arg); // exposition only
|
||||
|
||||
friend auto get_value(basic_format_arg arg) {
|
||||
return arg.value;
|
||||
}
|
||||
|
||||
template <typename T, typename Char> friend struct detail::formatter;
|
||||
|
||||
template<class Ctx, class... Args>
|
||||
friend format_arg_store<Ctx, Args...>
|
||||
make_format_args(const Args&... args); // exposition only
|
||||
|
||||
public:
|
||||
basic_format_arg() noexcept;
|
||||
|
||||
explicit operator bool() const noexcept;
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template<class Context>
|
||||
basic_format_arg<Context>::basic_format_arg() noexcept {}
|
||||
|
||||
template<class Context>
|
||||
template<class T, typename> /* explicit */ basic_format_arg<Context>::basic_format_arg(const T& v) noexcept {
|
||||
if constexpr (std::is_same_v<T, bool> || std::is_same_v<T, char_type>)
|
||||
value = v;
|
||||
else if constexpr (std::is_same_v<T, char> && std::is_same_v<char_type, wchar_t>)
|
||||
value = static_cast<wchar_t>(v);
|
||||
else if constexpr (detail::is_standard_integer_v<T> && sizeof(T) <= sizeof(int))
|
||||
value = static_cast<int>(v);
|
||||
else if constexpr (detail::is_standard_unsigned_integer_v<T> && sizeof(T) <= sizeof(unsigned))
|
||||
value = static_cast<unsigned>(v);
|
||||
else if constexpr (detail::is_standard_integer_v<T>)
|
||||
value = static_cast<long long int>(v);
|
||||
else if constexpr (detail::is_standard_unsigned_integer_v<T>)
|
||||
value = static_cast<unsigned long long int>(v);
|
||||
else if constexpr (sizeof(typename Context::template formatter_type<T>().format(declval<const T&>(), declval<Context&>())) != 0)
|
||||
value = handle(v);
|
||||
}
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(float n) noexcept
|
||||
: value(static_cast<double>(n)) {}
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(double n) noexcept
|
||||
: value(n) {}
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(long double n) noexcept
|
||||
: value(n) {}
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(const typename basic_format_arg<Context>::char_type* s)
|
||||
: value(s) {
|
||||
assert(s != nullptr);
|
||||
}
|
||||
|
||||
template<class Context>
|
||||
template<class traits>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(basic_string_view<char_type, traits> s) noexcept
|
||||
: value(s) {}
|
||||
|
||||
template<class Context>
|
||||
template<class traits, class Allocator>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(
|
||||
const basic_string<char_type, traits, Allocator>& s) noexcept
|
||||
: value(basic_string_view<char_type>(s.data(), s.size())) {}
|
||||
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::basic_format_arg(nullptr_t) noexcept
|
||||
: value(static_cast<const void*>(nullptr)) {}
|
||||
|
||||
template<class Context>
|
||||
template<class T, typename> /* explicit */ basic_format_arg<Context>::basic_format_arg(const T* p) noexcept
|
||||
: value(p) {}
|
||||
|
||||
template<class Context>
|
||||
/* explicit */ basic_format_arg<Context>::operator bool() const noexcept {
|
||||
return !holds_alternative<monostate>(value);
|
||||
}
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template<class Context>
|
||||
class basic_format_arg<Context>::handle {
|
||||
const void* ptr_; // exposition only
|
||||
void (*format_)(basic_format_parse_context<char_type>&,
|
||||
Context&, const void*); // exposition only
|
||||
|
||||
template<class T> explicit handle(const T& val) noexcept; // exposition only
|
||||
|
||||
friend class basic_format_arg<Context>; // exposition only
|
||||
|
||||
public:
|
||||
void format(basic_format_parse_context<char_type>&, Context& ctx) const;
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template<class Context>
|
||||
template<class T> /* explicit */ basic_format_arg<Context>::handle::handle(const T& val) noexcept
|
||||
: ptr_(&val), format_([](basic_format_parse_context<char_type>& parse_ctx, Context& format_ctx, const void* ptr) {
|
||||
typename Context::template formatter_type<T> f;
|
||||
parse_ctx.advance_to(f.parse(parse_ctx));
|
||||
format_ctx.advance_to(f.format(*static_cast<const T*>(ptr), format_ctx));
|
||||
}) {}
|
||||
|
||||
template<class Context>
|
||||
void basic_format_arg<Context>::handle::format(basic_format_parse_context<char_type>& parse_ctx, Context& format_ctx) const {
|
||||
format_(parse_ctx, format_ctx, ptr_);
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.visit
|
||||
template<class Visitor, class Context>
|
||||
auto visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg) {
|
||||
return visit(vis, get_value(arg));
|
||||
}
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.store
|
||||
namespace std {
|
||||
template<class Context, class... Args>
|
||||
struct format_arg_store { // exposition only
|
||||
array<basic_format_arg<Context>, sizeof...(Args)> args;
|
||||
};
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.basic_args
|
||||
namespace std {
|
||||
template<class Context>
|
||||
class basic_format_args {
|
||||
size_t size_; // exposition only
|
||||
const basic_format_arg<Context>* data_; // exposition only
|
||||
|
||||
public:
|
||||
basic_format_args() noexcept;
|
||||
|
||||
template<class... Args>
|
||||
basic_format_args(const format_arg_store<Context, Args...>& store) noexcept;
|
||||
|
||||
basic_format_arg<Context> get(size_t i) const noexcept;
|
||||
};
|
||||
}
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class Context>
|
||||
basic_format_args<Context>::basic_format_args() noexcept : size_(0) {}
|
||||
|
||||
template<class Context>
|
||||
template<class... Args>
|
||||
basic_format_args<Context>::basic_format_args(const format_arg_store<Context, Args...>& store) noexcept
|
||||
: size_(sizeof...(Args)), data_(store.args.data()) {}
|
||||
|
||||
template<class Context>
|
||||
basic_format_arg<Context> basic_format_args<Context>::get(size_t i) const noexcept {
|
||||
return i < size_ ? data_[i] : basic_format_arg<Context>();
|
||||
}
|
||||
}
|
||||
|
||||
namespace std {
|
||||
// https://fmt.dev/Text%20Formatting.html#format.make_args
|
||||
template<class Context /*= format_context*/, class... Args>
|
||||
format_arg_store<Context, Args...> make_format_args(const Args&... args) {
|
||||
return {basic_format_arg<Context>(args)...};
|
||||
}
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.make_wargs
|
||||
template<class... Args>
|
||||
format_arg_store<wformat_context, Args...> make_wformat_args(const Args&... args) {
|
||||
return make_format_args<wformat_context>(args...);
|
||||
}
|
||||
}
|
||||
|
||||
namespace std {
|
||||
namespace detail {
|
||||
|
||||
template <typename OutputIt, typename Char>
|
||||
class arg_formatter
|
||||
: public fmt::detail::arg_formatter_base<OutputIt, Char, error_handler> {
|
||||
private:
|
||||
using char_type = Char;
|
||||
using base = fmt::detail::arg_formatter_base<OutputIt, Char, error_handler>;
|
||||
using format_context = std::basic_format_context<OutputIt, Char>;
|
||||
using parse_context = basic_format_parse_context<Char>;
|
||||
|
||||
parse_context* parse_ctx_;
|
||||
format_context& ctx_;
|
||||
|
||||
public:
|
||||
using iterator = OutputIt;
|
||||
using format_specs = typename base::format_specs;
|
||||
|
||||
/**
|
||||
\rst
|
||||
Constructs an argument formatter object.
|
||||
*ctx* is a reference to the formatting context,
|
||||
*spec* contains format specifier information for standard argument types.
|
||||
\endrst
|
||||
*/
|
||||
arg_formatter(format_context& ctx, parse_context* parse_ctx = nullptr, fmt::format_specs* spec = nullptr)
|
||||
: base(ctx.out(), spec, {}), parse_ctx_(parse_ctx), ctx_(ctx) {}
|
||||
|
||||
using base::operator();
|
||||
|
||||
/** Formats an argument of a user-defined type. */
|
||||
iterator operator()(typename std::basic_format_arg<format_context>::handle handle) {
|
||||
handle.format(*parse_ctx_, ctx_);
|
||||
return this->out();
|
||||
}
|
||||
|
||||
iterator operator()(monostate) {
|
||||
throw format_error("");
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Context>
|
||||
inline fmt::detail::type get_type(basic_format_arg<Context> arg) {
|
||||
return visit_format_arg([&] (auto val) {
|
||||
using char_type = typename Context::char_type;
|
||||
using T = decltype(val);
|
||||
if (std::is_same_v<T, monostate>)
|
||||
return fmt::detail::type::none_type;
|
||||
if (std::is_same_v<T, bool>)
|
||||
return fmt::detail::type::bool_type;
|
||||
if (std::is_same_v<T, char_type>)
|
||||
return fmt::detail::type::char_type;
|
||||
if (std::is_same_v<T, int>)
|
||||
return fmt::detail::type::int_type;
|
||||
if (std::is_same_v<T, unsigned int>)
|
||||
return fmt::detail::type::uint_type;
|
||||
if (std::is_same_v<T, long long int>)
|
||||
return fmt::detail::type::long_long_type;
|
||||
if (std::is_same_v<T, unsigned long long int>)
|
||||
return fmt::detail::type::ulong_long_type;
|
||||
if (std::is_same_v<T, double>)
|
||||
return fmt::detail::type::double_type;
|
||||
if (std::is_same_v<T, long double>)
|
||||
return fmt::detail::type::long_double_type;
|
||||
if (std::is_same_v<T, const char_type*>)
|
||||
return fmt::detail::type::cstring_type;
|
||||
if (std::is_same_v<T, basic_string_view<char_type>>)
|
||||
return fmt::detail::type::string_type;
|
||||
if (std::is_same_v<T, const void*>)
|
||||
return fmt::detail::type::pointer_type;
|
||||
assert(get_value(arg).index() == 12);
|
||||
return fmt::detail::type::custom_type;
|
||||
}, arg);
|
||||
}
|
||||
|
||||
template <typename Context>
|
||||
class custom_formatter {
|
||||
private:
|
||||
using parse_context = basic_format_parse_context<typename Context::char_type>;
|
||||
parse_context& parse_ctx_;
|
||||
Context& format_ctx_;
|
||||
|
||||
public:
|
||||
custom_formatter(parse_context& parse_ctx, Context& ctx) : parse_ctx_(parse_ctx), format_ctx_(ctx) {}
|
||||
|
||||
bool operator()(typename basic_format_arg<Context>::handle h) const {
|
||||
h.format(parse_ctx_, format_ctx_);
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T> bool operator()(T) const { return false; }
|
||||
};
|
||||
|
||||
template <typename ArgFormatter, typename Char, typename Context>
|
||||
struct format_handler : detail::error_handler {
|
||||
using iterator = typename ArgFormatter::iterator;
|
||||
|
||||
format_handler(iterator out, basic_string_view<Char> str,
|
||||
basic_format_args<Context> format_args,
|
||||
fmt::detail::locale_ref loc)
|
||||
: parse_ctx(str), context(out, format_args, loc) {}
|
||||
|
||||
void on_text(const Char* begin, const Char* end) {
|
||||
auto size = fmt::detail::to_unsigned(end - begin);
|
||||
auto out = context.out();
|
||||
auto&& it = fmt::detail::reserve(out, size);
|
||||
it = std::copy_n(begin, size, it);
|
||||
context.advance_to(out);
|
||||
}
|
||||
|
||||
int on_arg_id() { return parse_ctx.next_arg_id(); }
|
||||
int on_arg_id(unsigned id) { return parse_ctx.check_arg_id(id), id; }
|
||||
int on_arg_id(fmt::basic_string_view<Char>) { return 0; }
|
||||
|
||||
void on_replacement_field(int id, const Char* p) {
|
||||
auto arg = context.arg(id);
|
||||
parse_ctx.advance_to(parse_ctx.begin() + (p - &*parse_ctx.begin()));
|
||||
custom_formatter<Context> f(parse_ctx, context);
|
||||
if (!visit_format_arg(f, arg))
|
||||
context.advance_to(visit_format_arg(ArgFormatter(context, &parse_ctx), arg));
|
||||
}
|
||||
|
||||
const Char* on_format_specs(int id, const Char* begin, const Char* end) {
|
||||
auto arg = context.arg(id);
|
||||
parse_ctx.advance_to(parse_ctx.begin() + (begin - &*parse_ctx.begin()));
|
||||
custom_formatter<Context> f(parse_ctx, context);
|
||||
if (visit_format_arg(f, arg)) return &*parse_ctx.begin();
|
||||
fmt::basic_format_specs<Char> specs;
|
||||
using fmt::detail::specs_handler;
|
||||
using parse_context = basic_format_parse_context<Char>;
|
||||
fmt::detail::specs_checker<specs_handler<parse_context, Context>> handler(
|
||||
specs_handler<parse_context, Context>(specs, parse_ctx, context), get_type(arg));
|
||||
begin = parse_format_specs(begin, end, handler);
|
||||
if (begin == end || *begin != '}') on_error("missing '}' in format string");
|
||||
parse_ctx.advance_to(parse_ctx.begin() + (begin - &*parse_ctx.begin()));
|
||||
context.advance_to(visit_format_arg(ArgFormatter(context, &parse_ctx, &specs), arg));
|
||||
return begin;
|
||||
}
|
||||
|
||||
basic_format_parse_context<Char> parse_ctx;
|
||||
Context context;
|
||||
};
|
||||
|
||||
template <typename T, typename Char>
|
||||
struct formatter {
|
||||
// Parses format specifiers stopping either at the end of the range or at the
|
||||
// terminating '}'.
|
||||
template <typename ParseContext>
|
||||
FMT_CONSTEXPR typename ParseContext::iterator parse(ParseContext& ctx) {
|
||||
namespace detail = fmt::detail;
|
||||
typedef detail::dynamic_specs_handler<ParseContext> handler_type;
|
||||
auto type = detail::mapped_type_constant<T, fmt::buffer_context<Char>>::value;
|
||||
detail::specs_checker<handler_type> handler(handler_type(specs_, ctx),
|
||||
type);
|
||||
auto it = parse_format_specs(ctx.begin(), ctx.end(), handler);
|
||||
auto type_spec = specs_.type;
|
||||
auto eh = ctx.error_handler();
|
||||
switch (type) {
|
||||
case detail::type::none_type:
|
||||
FMT_ASSERT(false, "invalid argument type");
|
||||
break;
|
||||
case detail::type::int_type:
|
||||
case detail::type::uint_type:
|
||||
case detail::type::long_long_type:
|
||||
case detail::type::ulong_long_type:
|
||||
case detail::type::bool_type:
|
||||
handle_int_type_spec(type_spec,
|
||||
detail::int_type_checker<decltype(eh)>(eh));
|
||||
break;
|
||||
case detail::type::char_type:
|
||||
handle_char_specs(
|
||||
&specs_, detail::char_specs_checker<decltype(eh)>(type_spec, eh));
|
||||
break;
|
||||
case detail::type::double_type:
|
||||
case detail::type::long_double_type:
|
||||
detail::parse_float_type_spec(specs_, eh);
|
||||
break;
|
||||
case detail::type::cstring_type:
|
||||
detail::handle_cstring_type_spec(
|
||||
type_spec, detail::cstring_type_checker<decltype(eh)>(eh));
|
||||
break;
|
||||
case detail::type::string_type:
|
||||
detail::check_string_type_spec(type_spec, eh);
|
||||
break;
|
||||
case detail::type::pointer_type:
|
||||
detail::check_pointer_type_spec(type_spec, eh);
|
||||
break;
|
||||
case detail::type::custom_type:
|
||||
// Custom format specifiers should be checked in parse functions of
|
||||
// formatter specializations.
|
||||
break;
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const T& val, FormatContext& ctx) -> decltype(ctx.out()) {
|
||||
fmt::detail::handle_dynamic_spec<fmt::detail::width_checker>(
|
||||
specs_.width, specs_.width_ref, ctx);
|
||||
fmt::detail::handle_dynamic_spec<fmt::detail::precision_checker>(
|
||||
specs_.precision, specs_.precision_ref, ctx);
|
||||
using af = arg_formatter<typename FormatContext::iterator,
|
||||
typename FormatContext::char_type>;
|
||||
return visit_format_arg(af(ctx, nullptr, &specs_),
|
||||
basic_format_arg<FormatContext>(val));
|
||||
}
|
||||
|
||||
private:
|
||||
fmt::detail::dynamic_format_specs<Char> specs_;
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
// https://fmt.dev/Text%20Formatting.html#format.functions
|
||||
template<class... Args>
|
||||
string format(string_view fmt, const Args&... args) {
|
||||
return vformat(fmt, make_format_args(args...));
|
||||
}
|
||||
|
||||
template<class... Args>
|
||||
wstring format(wstring_view fmt, const Args&... args) {
|
||||
return vformat(fmt, make_wformat_args(args...));
|
||||
}
|
||||
|
||||
string vformat(string_view fmt, format_args args) {
|
||||
fmt::memory_buffer mbuf;
|
||||
fmt::detail::buffer<char>& buf = mbuf;
|
||||
using af = detail::arg_formatter<fmt::format_context::iterator, char>;
|
||||
detail::format_handler<af, char, format_context>
|
||||
h(fmt::detail::buffer_appender<char>(buf), fmt, args, {});
|
||||
fmt::detail::parse_format_string<false>(fmt::to_string_view(fmt), h);
|
||||
return to_string(mbuf);
|
||||
}
|
||||
|
||||
wstring vformat(wstring_view fmt, wformat_args args);
|
||||
|
||||
template<class Out, class... Args>
|
||||
Out format_to(Out out, string_view fmt, const Args&... args) {
|
||||
using context = basic_format_context<Out, decltype(fmt)::value_type>;
|
||||
return vformat_to(out, fmt, make_format_args<context>(args...));
|
||||
}
|
||||
|
||||
template<class Out, class... Args>
|
||||
Out format_to(Out out, wstring_view fmt, const Args&... args) {
|
||||
using context = basic_format_context<Out, decltype(fmt)::value_type>;
|
||||
return vformat_to(out, fmt, make_format_args<context>(args...));
|
||||
}
|
||||
|
||||
template<class Out>
|
||||
Out vformat_to(Out out, string_view fmt, format_args_t<fmt::type_identity_t<Out>, char> args) {
|
||||
using af = detail::arg_formatter<Out, char>;
|
||||
detail::format_handler<af, char, basic_format_context<Out, char>>
|
||||
h(out, fmt, args, {});
|
||||
fmt::detail::parse_format_string<false>(fmt::to_string_view(fmt), h);
|
||||
return h.context.out();
|
||||
}
|
||||
|
||||
template<class Out>
|
||||
Out vformat_to(Out out, wstring_view fmt, format_args_t<fmt::type_identity_t<Out>, wchar_t> args);
|
||||
|
||||
template<class Out, class... Args>
|
||||
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
|
||||
string_view fmt, const Args&... args);
|
||||
template<class Out, class... Args>
|
||||
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
|
||||
wstring_view fmt, const Args&... args);
|
||||
|
||||
template<class... Args>
|
||||
size_t formatted_size(string_view fmt, const Args&... args);
|
||||
template<class... Args>
|
||||
size_t formatted_size(wstring_view fmt, const Args&... args);
|
||||
|
||||
#define charT char
|
||||
|
||||
template<> struct formatter<charT, charT> : detail::formatter<charT, charT> {};
|
||||
|
||||
template<> struct formatter<char, wchar_t>;
|
||||
|
||||
template<> struct formatter<charT*, charT> : detail::formatter<const charT*, charT> {};
|
||||
|
||||
template<> struct formatter<const charT*, charT> : detail::formatter<const charT*, charT> {};
|
||||
|
||||
template<size_t N> struct formatter<const charT[N], charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template<class traits, class Allocator>
|
||||
struct formatter<basic_string<charT, traits, Allocator>, charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template<class traits>
|
||||
struct formatter<basic_string_view<charT, traits>, charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template <> struct formatter<nullptr_t, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<void*, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<const void*, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<bool, charT> : detail::formatter<bool, charT> {};
|
||||
|
||||
template <> struct formatter<signed char, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<short, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<int, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<long, charT>
|
||||
: detail::formatter<std::conditional_t<sizeof(long) == sizeof(int), int, long long>, charT> {};
|
||||
template <> struct formatter<long long, charT> : detail::formatter<long long, charT> {};
|
||||
template <> struct formatter<unsigned char, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned short, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned int, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned long, charT>
|
||||
: detail::formatter<std::conditional_t<sizeof(long) == sizeof(int), unsigned, unsigned long long>, charT> {};
|
||||
template <> struct formatter<unsigned long long, charT> : detail::formatter<unsigned long long, charT> {};
|
||||
|
||||
template <> struct formatter<float, charT> : detail::formatter<double, charT> {};
|
||||
template <> struct formatter<double, charT> : detail::formatter<double, charT> {};
|
||||
template <> struct formatter<long double, charT> : detail::formatter<long double, charT> {};
|
||||
|
||||
#undef charT
|
||||
|
||||
#define charT wchar_t
|
||||
|
||||
template<> struct formatter<charT, charT> : detail::formatter<charT, charT> {};
|
||||
|
||||
template<> struct formatter<char, wchar_t> : detail::formatter<charT, charT> {};
|
||||
|
||||
template<> struct formatter<charT*, charT> : detail::formatter<const charT*, charT> {};
|
||||
|
||||
template<> struct formatter<const charT*, charT> : detail::formatter<const charT*, charT> {};
|
||||
|
||||
template<size_t N> struct formatter<const charT[N], charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template<class traits, class Allocator>
|
||||
struct formatter<std::basic_string<charT, traits, Allocator>, charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template<class traits>
|
||||
struct formatter<std::basic_string_view<charT, traits>, charT>
|
||||
: detail::formatter<std::basic_string_view<charT>, charT> {};
|
||||
|
||||
template <> struct formatter<nullptr_t, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<void*, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<const void*, charT> : detail::formatter<const void*, charT> {};
|
||||
template <> struct formatter<bool, charT> : detail::formatter<bool, charT> {};
|
||||
|
||||
template <> struct formatter<signed char, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<short, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<int, charT> : detail::formatter<int, charT> {};
|
||||
template <> struct formatter<long, charT>
|
||||
: detail::formatter<std::conditional_t<sizeof(long) == sizeof(int), int, long long>, charT> {};
|
||||
template <> struct formatter<long long, charT> : detail::formatter<long long, charT> {};
|
||||
template <> struct formatter<unsigned char, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned short, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned int, charT> : detail::formatter<unsigned int, charT> {};
|
||||
template <> struct formatter<unsigned long, charT>
|
||||
: detail::formatter<std::conditional_t<sizeof(long) == sizeof(int), unsigned, unsigned long long>, charT> {};
|
||||
template <> struct formatter<unsigned long long, charT> : detail::formatter<unsigned long long, charT> {};
|
||||
|
||||
template <> struct formatter<float, charT> : detail::formatter<double, charT> {};
|
||||
template <> struct formatter<double, charT> : detail::formatter<double, charT> {};
|
||||
template <> struct formatter<long double, charT> : detail::formatter<long double, charT> {};
|
||||
|
||||
#undef charT
|
||||
|
||||
template<> struct formatter<const wchar_t, char> {
|
||||
formatter() = delete;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // FMT_FORMAT_
|
@ -1,161 +0,0 @@
|
||||
#include <format>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(std_format_test, escaping) {
|
||||
using namespace std;
|
||||
string s = format("{0}-{{", 8); // s == "8-{"
|
||||
EXPECT_EQ(s, "8-{");
|
||||
}
|
||||
|
||||
TEST(std_format_test, indexing) {
|
||||
using namespace std;
|
||||
string s0 = format("{} to {}", "a", "b"); // OK: automatic indexing
|
||||
string s1 = format("{1} to {0}", "a", "b"); // OK: manual indexing
|
||||
EXPECT_EQ(s0, "a to b");
|
||||
EXPECT_EQ(s1, "b to a");
|
||||
// Error: mixing automatic and manual indexing
|
||||
EXPECT_THROW(string s2 = format("{0} to {}", "a", "b"), std::format_error);
|
||||
// Error: mixing automatic and manual indexing
|
||||
EXPECT_THROW(string s3 = format("{} to {1}", "a", "b"), std::format_error);
|
||||
}
|
||||
|
||||
TEST(std_format_test, alignment) {
|
||||
using namespace std;
|
||||
char c = 120;
|
||||
string s0 = format("{:6}", 42); // s0 == " 42"
|
||||
string s1 = format("{:6}", 'x'); // s1 == "x "
|
||||
string s2 = format("{:*<6}", 'x'); // s2 == "x*****"
|
||||
string s3 = format("{:*>6}", 'x'); // s3 == "*****x"
|
||||
string s4 = format("{:*^6}", 'x'); // s4 == "**x***"
|
||||
// Error: '=' with charT and no integer presentation type
|
||||
EXPECT_THROW(string s5 = format("{:=6}", 'x'), std::format_error);
|
||||
string s6 = format("{:6d}", c); // s6 == " 120"
|
||||
string s7 = format("{:6}", true); // s9 == "true "
|
||||
EXPECT_EQ(s0, " 42");
|
||||
EXPECT_EQ(s1, "x ");
|
||||
EXPECT_EQ(s2, "x*****");
|
||||
EXPECT_EQ(s3, "*****x");
|
||||
EXPECT_EQ(s4, "**x***");
|
||||
EXPECT_EQ(s6, " 120");
|
||||
EXPECT_EQ(s7, "true ");
|
||||
}
|
||||
|
||||
TEST(std_format_test, float) {
|
||||
using namespace std;
|
||||
double inf = numeric_limits<double>::infinity();
|
||||
double nan = numeric_limits<double>::quiet_NaN();
|
||||
string s0 = format("{0:} {0:+} {0:-} {0: }", 1); // s0 == "1 +1 1 1"
|
||||
string s1 = format("{0:} {0:+} {0:-} {0: }", -1); // s1 == "-1 -1 -1 -1"
|
||||
string s2 =
|
||||
format("{0:} {0:+} {0:-} {0: }", inf); // s2 == "inf +inf inf inf"
|
||||
string s3 =
|
||||
format("{0:} {0:+} {0:-} {0: }", nan); // s3 == "nan +nan nan nan"
|
||||
EXPECT_EQ(s0, "1 +1 1 1");
|
||||
EXPECT_EQ(s1, "-1 -1 -1 -1");
|
||||
EXPECT_EQ(s2, "inf +inf inf inf");
|
||||
EXPECT_EQ(s3, "nan +nan nan nan");
|
||||
}
|
||||
|
||||
TEST(std_format_test, int) {
|
||||
using namespace std;
|
||||
string s0 = format("{}", 42); // s0 == "42"
|
||||
string s1 = format("{0:b} {0:d} {0:o} {0:x}", 42); // s1 == "101010 42 52 2a"
|
||||
string s2 = format("{0:#x} {0:#X}", 42); // s2 == "0x2a 0X2A"
|
||||
string s3 = format("{:L}", 1234); // s3 == "1234" (depends on the locale)
|
||||
EXPECT_EQ(s0, "42");
|
||||
EXPECT_EQ(s1, "101010 42 52 2a");
|
||||
EXPECT_EQ(s2, "0x2a 0X2A");
|
||||
EXPECT_EQ(s3, "1234");
|
||||
}
|
||||
|
||||
#include <format>
|
||||
|
||||
enum color { red, green, blue };
|
||||
|
||||
const char* color_names[] = {"red", "green", "blue"};
|
||||
|
||||
template <> struct std::formatter<color> : std::formatter<const char*> {
|
||||
auto format(color c, format_context& ctx) {
|
||||
return formatter<const char*>::format(color_names[c], ctx);
|
||||
}
|
||||
};
|
||||
|
||||
struct err {};
|
||||
|
||||
TEST(std_format_test, formatter) {
|
||||
std::string s0 = std::format("{}", 42); // OK: library-provided formatter
|
||||
// std::string s1 = std::format("{}", L"foo"); // Ill-formed: disabled
|
||||
// formatter
|
||||
std::string s2 = std::format("{}", red); // OK: user-provided formatter
|
||||
// std::string s3 = std::format("{}", err{}); // Ill-formed: disabled
|
||||
// formatter
|
||||
EXPECT_EQ(s0, "42");
|
||||
EXPECT_EQ(s2, "red");
|
||||
}
|
||||
|
||||
struct S {
|
||||
int value;
|
||||
};
|
||||
|
||||
template <> struct std::formatter<S> {
|
||||
size_t width_arg_id = 0;
|
||||
|
||||
// Parses a width argument id in the format { <digit> }.
|
||||
constexpr auto parse(format_parse_context& ctx) {
|
||||
constexpr auto is_ascii_digit = [](const char c) {
|
||||
return c >= '0' && c <= '9';
|
||||
};
|
||||
|
||||
auto iter = ctx.begin();
|
||||
// auto get_char = [&]() { return iter != ctx.end() ? *iter : 0; };
|
||||
auto get_char = [&]() { return iter != ctx.end() ? *iter : '\0'; };
|
||||
if (get_char() != '{') return iter;
|
||||
++iter;
|
||||
char c = get_char();
|
||||
if (!is_ascii_digit(c) || (++iter, get_char()) != '}')
|
||||
throw format_error("invalid format");
|
||||
width_arg_id = fmt::detail::to_unsigned(c - '0');
|
||||
ctx.check_arg_id(width_arg_id);
|
||||
return ++iter;
|
||||
}
|
||||
|
||||
// Formats S with width given by the argument width_arg_id.
|
||||
auto format(S s, format_context& ctx) {
|
||||
int width = visit_format_arg(
|
||||
[](auto value) -> int {
|
||||
using type = decltype(value);
|
||||
if constexpr (!is_integral_v<type> || is_same_v<type, bool>)
|
||||
throw format_error("width is not integral");
|
||||
// else if (value < 0 || value > numeric_limits<int>::max())
|
||||
else if (fmt::detail::is_negative(value) ||
|
||||
value > numeric_limits<int>::max())
|
||||
throw format_error("invalid width");
|
||||
else
|
||||
return static_cast<int>(value);
|
||||
},
|
||||
ctx.arg(width_arg_id));
|
||||
return format_to(ctx.out(), "{0:{1}}", s.value, width);
|
||||
}
|
||||
};
|
||||
|
||||
TEST(std_format_test, parsing) {
|
||||
std::string s = std::format("{0:{1}}", S{42}, 10); // s == " 42"
|
||||
EXPECT_EQ(s, " 42");
|
||||
}
|
||||
|
||||
#if FMT_USE_INT128
|
||||
template <> struct std::formatter<__int128_t> : std::formatter<long long> {
|
||||
auto format(__int128_t n, format_context& ctx) {
|
||||
// Format as a long long since we only want to check if it is possible to
|
||||
// specialize formatter for __int128_t.
|
||||
return formatter<long long>::format(static_cast<long long>(n), ctx);
|
||||
}
|
||||
};
|
||||
|
||||
TEST(std_format_test, int128) {
|
||||
__int128_t n = 42;
|
||||
auto s = std::format("{}", n);
|
||||
EXPECT_EQ(s, "42");
|
||||
}
|
||||
#endif // FMT_USE_INT128
|
@ -1,6 +0,0 @@
|
||||
// This file is part of the mcl project.
|
||||
// Copyright (c) 2022 merryhime
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch2/catch.hpp"
|
19
externals/dynarmic/externals/mp/.travis.yml
vendored
19
externals/dynarmic/externals/mp/.travis.yml
vendored
@ -1,19 +0,0 @@
|
||||
language: cpp
|
||||
os: linux
|
||||
|
||||
matrix:
|
||||
- compiler: clang
|
||||
env: CXX=clang
|
||||
dist: bionic
|
||||
- compiler: g++-8
|
||||
env: CXX=g++-8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-8
|
||||
|
||||
script:
|
||||
- $CXX --version
|
||||
- $CXX -I./include -std=c++17 -Wall -Wextra -Wcast-qual -pedantic -pedantic-errors -Werror tests/all_tests.cpp
|
12
externals/dynarmic/externals/mp/LICENSE-0BSD
vendored
12
externals/dynarmic/externals/mp/LICENSE-0BSD
vendored
@ -1,12 +0,0 @@
|
||||
Copyright (C) 2017 MerryMage
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
122
externals/dynarmic/externals/mp/README.md
vendored
122
externals/dynarmic/externals/mp/README.md
vendored
@ -1,122 +0,0 @@
|
||||
mp
|
||||
===
|
||||
|
||||
A small, 0BSD-licensed metaprogramming library for C++17.
|
||||
|
||||
This is intended to be a lightweight and easy to understand implementation of a subset of useful metaprogramming utilities.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Just add the `include` directory to your include path. That's it.
|
||||
|
||||
`typelist`
|
||||
----------
|
||||
|
||||
A `mp::list` is a list of types. This set of headers provide metafunctions for manipulating lists of types.
|
||||
|
||||
### Constructor
|
||||
|
||||
* `mp::list`: Constructs a list.
|
||||
* `mp::lift_sequence`: Lifts a value sequence into a list. Intended for use on `std::integral_sequence`.
|
||||
|
||||
### Element access
|
||||
|
||||
* `mp::get`: Gets a numbered element of a list.
|
||||
* `mp::head`: Gets the first element of a list.
|
||||
* `mp::tail`: Gets all-but-the-first-element as a list.
|
||||
|
||||
### Properties
|
||||
|
||||
* `mp::length`: Gets the length of a list.
|
||||
* `mp::contains`: Determines if this list contains a specified element.
|
||||
|
||||
### Modifiers
|
||||
|
||||
* `mp::append`: Constructs a list with the provided elements appended to it.
|
||||
* `mp::prepend`: Constructs a list with the provided elements prepended to it.
|
||||
|
||||
### Operations
|
||||
|
||||
* `mp::concat`: Concantenates multiple lists together.
|
||||
* `mp::cartesian_product`: Construct a list containing the [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the provided lists.
|
||||
|
||||
### Conversions
|
||||
|
||||
* `mp::lower_to_tuple`: This operation only works on a list solely containing metavalues. Results in a `std::tuple` with equivalent values.
|
||||
|
||||
|
||||
`metavalue`
|
||||
-----------
|
||||
|
||||
A metavalue is a type of template `std::integral_constant`.
|
||||
|
||||
### Constants
|
||||
|
||||
* mp::true_type: Aliases to [`std::true_type`](https://en.cppreference.com/w/cpp/types/integral_constant)
|
||||
* mp::false_type: Aliases to [`mp::false_type`](https://en.cppreference.com/w/cpp/types/integral_constant)
|
||||
|
||||
### Constructor
|
||||
|
||||
* mp::value: Aliases to [`std::integral_constant`](https://en.cppreference.com/w/cpp/types/integral_constant)
|
||||
* mp::bool_value: Aliases to [`std::bool_constant`](https://en.cppreference.com/w/cpp/types/integral_constant)
|
||||
* mp::size_value: Constructs a metavalue with value of type std::size_t
|
||||
* `mp::lift_value`: Lifts a value of any arbitrary type to become a metavalue
|
||||
|
||||
### Conversions
|
||||
|
||||
* `mp::value_cast`
|
||||
|
||||
### Operations
|
||||
|
||||
* `mp::value_equal`: Compares value equality, ignores type. Use `std::is_same` for strict comparison.
|
||||
* `mp::logic_if`: Like std::conditional but has a bool metavalue as first argument.
|
||||
* `mp::bit_not`: Bitwise not
|
||||
* `mp::bit_and`: Bitwise and
|
||||
* `mp::bit_or`: Bitwise or
|
||||
* `mp::bit_xor`: Bitwise xor
|
||||
* `mp::logic_not`: Logical not
|
||||
* `mp::logic_and`: Logical conjunction (no short circuiting, always results in a mp:bool_value)
|
||||
* `mp::logic_or`: Logical disjunction (no short circuiting, always results in a mp:bool_value)
|
||||
* `mp::conjunction`: Logical conjunction (with short circuiting, preserves type)
|
||||
* `mp::disjunction`: Logical disjunction (with short circuiting, preserves type)
|
||||
* `mp::sum`: Sum of values
|
||||
* `mp::product`: Product of values
|
||||
|
||||
`metafunction`
|
||||
--------------
|
||||
|
||||
* `std::void_t`: Always returns `void`.
|
||||
* `mp::identity`: Identity metafunction. Can be used to establish a non-deduced context. See also C++20 `std::type_identity`.
|
||||
* `mp::apply`: Invoke a provided metafunction with arguments specified in a list.
|
||||
* `mp::map`: Apply a provided metafunction to each element of a list.
|
||||
* `mp::bind`: Curry a metafunction. A macro `MM_MP_BIND` is provided to make this a little prettier.
|
||||
|
||||
`traits`
|
||||
--------
|
||||
|
||||
Type traits not in the standard library.
|
||||
|
||||
### `function_info`
|
||||
|
||||
* `mp::parameter_count_v`: Number of parameters a function has
|
||||
* `mp::parameter_list`: Get a typelist of the parameter types
|
||||
* `mp::get_parameter`: Get the type of a parameter by index
|
||||
* `mp::equivalent_function_type`: Get an equivalent function type (for MFPs this does not include the class)
|
||||
* `mp::equivalent_function_type_with_class`: Get an equivalent function type with explicit `this` argument (MFPs only)
|
||||
* `mp::return_type`: Return type of the function
|
||||
* `mp::class_type`: Only valid for member function pointer types. Gets the class the member function is associated with.
|
||||
|
||||
### `integer_of_size`
|
||||
|
||||
* `mp::signed_integer_of_size`: Gets a signed integer of the specified bit-size (if it exists)
|
||||
* `mp::unsigned_integer_of_size`: Gets an unsigned integer of the specified bit-size (if it exists)
|
||||
|
||||
### Misc
|
||||
|
||||
* `mp::is_instance_of_template`: Checks if a type is an instance of a template class.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Please see [LICENSE-0BSD](LICENSE-0BSD).
|
@ -1,26 +0,0 @@
|
||||
/* This file is part of the mp project.
|
||||
* Copyright (c) 2017 MerryMage
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace mp {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<template<class...> class F, class L>
|
||||
struct apply_impl;
|
||||
|
||||
template<template<class...> class F, template<class...> class LT, class... Es>
|
||||
struct apply_impl<F, LT<Es...>> {
|
||||
using type = F<Es...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// Invokes metafunction F where the arguments are all the members of list L
|
||||
template<template<class...> class F, class L>
|
||||
using apply = typename detail::apply_impl<F, L>::type;
|
||||
|
||||
} // namespace mp
|
@ -1,19 +0,0 @@
|
||||
/* This file is part of the mp project.
|
||||
* Copyright (c) 2017 MerryMage
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace mp {
|
||||
|
||||
/// Binds the first sizeof...(A) arguments of metafunction F with arguments A
|
||||
template<template<class...> class F, class... As>
|
||||
struct bind {
|
||||
template<class... Rs>
|
||||
using type = F<As..., Rs...>;
|
||||
};
|
||||
|
||||
} // namespace mp
|
||||
|
||||
#define MM_MP_BIND(...) ::mp::bind<__VA_ARGS__>::template type
|
@ -1,23 +0,0 @@
|
||||
/* This file is part of the mp project.
|
||||
* Copyright (c) 2017 MerryMage
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace mp {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct identity_impl {
|
||||
using type = T;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// Identity metafunction
|
||||
template<class T>
|
||||
using identity = typename identity_impl<T>::type;
|
||||
|
||||
} // namespace mp
|
@ -1,26 +0,0 @@
|
||||
/* This file is part of the mp project.
|
||||
* Copyright (c) 2017 MerryMage
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace mp {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<template<class...> class F, class L>
|
||||
struct map_impl;
|
||||
|
||||
template<template<class...> class F, template<class...> class LT, class... Es>
|
||||
struct map_impl<F, LT<Es...>> {
|
||||
using type = LT<F<Es>...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// Applies each element of list L to metafunction F
|
||||
template<template<class...> class F, class L>
|
||||
using map = typename detail::map_impl<F, L>::type;
|
||||
|
||||
} // namespace mp
|
@ -1,20 +0,0 @@
|
||||
/* This file is part of the mp project.
|
||||
* Copyright (c) 2020 MerryMage
|
||||
* SPDX-License-Identifier: 0BSD
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <mp/metavalue/lift_value.h>
|
||||
|
||||
namespace mp {
|
||||
|
||||
/// Bitwise and of metavalues Vs
|
||||
template<class... Vs>
|
||||
using bit_and = lift_value<(Vs::value & ...)>;
|
||||
|
||||
/// Bitwise and of metavalues Vs
|
||||
template<class... Vs>
|
||||
constexpr auto bit_and_v = (Vs::value & ...);
|
||||
|
||||
} // namespace mp
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user