2018-01-31 18:07:57 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 12:40:32 +00:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2019-06-23 22:23:39 +00:00
|
|
|
* Copyright (C) 2016-2019 - Brad Parker
|
2012-04-13 23:02:37 +00:00
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2012-04-13 23:02:37 +00:00
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
2012-04-21 21:13:50 +00:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2012-04-13 23:02:37 +00:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 21:31:57 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2012-04-13 23:02:37 +00:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2019-07-01 15:24:57 +00:00
|
|
|
#define VFS_FRONTEND
|
2018-05-12 17:14:49 +00:00
|
|
|
#include <retro_environment.h>
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2018-02-04 23:25:03 +00:00
|
|
|
#define CINTERFACE
|
2018-05-12 17:14:49 +00:00
|
|
|
|
2017-08-04 13:05:29 +00:00
|
|
|
#define HAVE_IBXM 1
|
|
|
|
|
2014-09-12 19:25:08 +00:00
|
|
|
#if defined(HAVE_ZLIB) || defined(HAVE_7ZIP)
|
2018-01-21 10:52:56 +00:00
|
|
|
#define HAVE_COMPRESSION 1
|
2014-09-12 19:25:08 +00:00
|
|
|
#endif
|
|
|
|
|
2019-12-06 07:21:54 +00:00
|
|
|
#if defined(HAVE_OPENGL) && defined(HAVE_ANGLE)
|
|
|
|
#ifndef HAVE_OPENGLES
|
|
|
|
#define HAVE_OPENGLES 1
|
|
|
|
#endif
|
|
|
|
#if !defined(HAVE_OPENGLES3) && !defined(HAVE_OPENGLES2)
|
|
|
|
#define HAVE_OPENGLES3 1
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_EGL
|
|
|
|
#define HAVE_EGL 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-08-03 20:35:10 +00:00
|
|
|
#ifndef _XBOX
|
2020-08-01 20:51:23 +00:00
|
|
|
#if defined(_WIN32)
|
|
|
|
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
|
|
|
|
|
|
|
#ifndef HAVE_MMAP_WIN32
|
|
|
|
#define HAVE_MMAP_WIN32
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#elif !defined(_MSC_VER)
|
|
|
|
|
|
|
|
#ifndef HAVE_MMAP_WIN32
|
|
|
|
#define HAVE_MMAP_WIN32
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-08-03 20:35:10 +00:00
|
|
|
#endif
|
2020-08-01 20:51:23 +00:00
|
|
|
#endif
|
|
|
|
|
2018-05-12 17:14:49 +00:00
|
|
|
#if _MSC_VER && !defined(__WINRT__)
|
2016-03-20 03:52:15 +00:00
|
|
|
#include "../libretro-common/compat/compat_snprintf.c"
|
|
|
|
#endif
|
|
|
|
|
2015-11-23 11:03:38 +00:00
|
|
|
#include "../verbosity.c"
|
2016-03-20 03:52:15 +00:00
|
|
|
|
2015-08-29 14:24:38 +00:00
|
|
|
#if defined(HAVE_LOGGER) && !defined(ANDROID)
|
2016-05-19 09:46:54 +00:00
|
|
|
#include "../network/net_logger.c"
|
2015-08-29 14:24:38 +00:00
|
|
|
#endif
|
|
|
|
|
2017-09-14 20:56:31 +00:00
|
|
|
/*============================================================
|
|
|
|
COMPATIBILITY
|
|
|
|
============================================================ */
|
|
|
|
#ifndef HAVE_GETOPT_LONG
|
|
|
|
#include "../compat/compat_getopt.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_STRCASESTR
|
|
|
|
#include "../compat/compat_strcasestr.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_STRL
|
|
|
|
#include "../compat/compat_strl.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include "../compat/compat_posix_string.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(WANT_IFADDRS)
|
|
|
|
#include "../compat/compat_ifaddrs.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "../libretro-common/compat/compat_fnmatch.c"
|
2022-08-25 14:50:12 +00:00
|
|
|
#include "../libretro-common/compat/compat_strldup.c"
|
2017-12-04 19:19:35 +00:00
|
|
|
#include "../libretro-common/compat/fopen_utf8.c"
|
2017-09-14 20:56:31 +00:00
|
|
|
#include "../libretro-common/memmap/memalign.c"
|
|
|
|
|
2012-11-25 04:41:12 +00:00
|
|
|
/*============================================================
|
2013-03-18 04:46:19 +00:00
|
|
|
CONSOLE EXTENSIONS
|
2012-11-25 04:41:12 +00:00
|
|
|
============================================================ */
|
2013-03-18 04:46:19 +00:00
|
|
|
#ifdef RARCH_CONSOLE
|
2012-11-25 04:41:12 +00:00
|
|
|
|
2012-09-03 22:05:23 +00:00
|
|
|
#ifdef HW_DOL
|
2015-09-20 12:54:41 +00:00
|
|
|
#include "../memory/ngc/ssaram.c"
|
2012-09-03 22:05:23 +00:00
|
|
|
#endif
|
|
|
|
|
2017-08-19 06:46:04 +00:00
|
|
|
#ifdef INTERNAL_LIBOGC
|
|
|
|
#include "../wii/libogc/libfat/cache.c"
|
|
|
|
#include "../wii/libogc/libfat/directory.c"
|
|
|
|
#include "../wii/libogc/libfat/disc.c"
|
|
|
|
#include "../wii/libogc/libfat/fatdir.c"
|
|
|
|
#include "../wii/libogc/libfat/fatfile.c"
|
|
|
|
#include "../wii/libogc/libfat/file_allocation_table.c"
|
|
|
|
#include "../wii/libogc/libfat/filetime.c"
|
|
|
|
#include "../wii/libogc/libfat/libfat.c"
|
|
|
|
#include "../wii/libogc/libfat/lock.c"
|
|
|
|
#include "../wii/libogc/libfat/partition.c"
|
|
|
|
#endif
|
|
|
|
|
2013-01-11 21:27:31 +00:00
|
|
|
#endif
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2016-05-16 08:27:20 +00:00
|
|
|
/*============================================================
|
|
|
|
ALGORITHMS
|
|
|
|
============================================================ */
|
|
|
|
|
2016-03-20 15:14:40 +00:00
|
|
|
/*============================================================
|
|
|
|
ARCHIVE FILE
|
|
|
|
============================================================ */
|
2016-09-18 14:49:09 +00:00
|
|
|
#include "../libretro-common/file/archive_file.c"
|
2016-03-20 15:14:40 +00:00
|
|
|
|
2013-01-11 21:46:14 +00:00
|
|
|
#ifdef HAVE_ZLIB
|
2016-03-20 15:14:40 +00:00
|
|
|
#include "../libretro-common/file/archive_file_zlib.c"
|
2012-11-03 07:42:33 +00:00
|
|
|
#endif
|
|
|
|
|
2016-09-18 14:49:09 +00:00
|
|
|
#ifdef HAVE_7ZIP
|
|
|
|
#include "../libretro-common/file/archive_file_7z.c"
|
|
|
|
#endif
|
|
|
|
|
2016-11-26 21:11:42 +00:00
|
|
|
/*============================================================
|
|
|
|
COMPRESSION
|
|
|
|
============================================================ */
|
2017-05-20 12:58:51 +00:00
|
|
|
#include "../libretro-common/streams/stdin_stream.c"
|
2016-11-26 21:11:42 +00:00
|
|
|
#include "../libretro-common/streams/trans_stream.c"
|
|
|
|
#include "../libretro-common/streams/trans_stream_pipe.c"
|
|
|
|
|
|
|
|
#ifdef HAVE_ZLIB
|
|
|
|
#include "../libretro-common/streams/trans_stream_zlib.c"
|
2020-04-15 14:48:41 +00:00
|
|
|
#include "../libretro-common/streams/rzip_stream.c"
|
2016-11-26 21:11:42 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-16 06:26:02 +00:00
|
|
|
/*============================================================
|
|
|
|
ENCODINGS
|
|
|
|
============================================================ */
|
|
|
|
#include "../libretro-common/encodings/encoding_utf.c"
|
2016-09-18 16:50:33 +00:00
|
|
|
#include "../libretro-common/encodings/encoding_crc32.c"
|
2019-08-22 21:41:31 +00:00
|
|
|
#include "../libretro-common/encodings/encoding_base64.c"
|
2015-11-16 06:26:02 +00:00
|
|
|
|
2012-11-03 07:42:33 +00:00
|
|
|
/*============================================================
|
|
|
|
PERFORMANCE
|
|
|
|
============================================================ */
|
2016-05-10 18:31:27 +00:00
|
|
|
#include "../libretro-common/features/features_cpu.c"
|
2012-11-03 07:42:33 +00:00
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
CONFIG FILE
|
|
|
|
============================================================ */
|
2014-09-14 04:29:40 +00:00
|
|
|
#if defined(_MSC_VER)
|
2014-10-21 04:55:26 +00:00
|
|
|
#undef __LIBRETRO_SDK_COMPAT_POSIX_STRING_H
|
|
|
|
#undef __LIBRETRO_SDK_COMPAT_MSVC_H
|
2012-04-13 23:02:37 +00:00
|
|
|
#undef strcasecmp
|
|
|
|
#endif
|
2012-05-28 03:21:19 +00:00
|
|
|
|
2020-06-30 19:48:41 +00:00
|
|
|
#ifdef HAVE_CONFIGFILE
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/file/config_file.c"
|
2016-12-12 11:36:46 +00:00
|
|
|
#include "../libretro-common/file/config_file_userdata.c"
|
2020-06-30 19:48:41 +00:00
|
|
|
#endif
|
2013-06-24 11:52:14 +00:00
|
|
|
|
2019-02-27 16:19:29 +00:00
|
|
|
/*============================================================
|
2020-01-22 17:07:50 +00:00
|
|
|
CONTENT METADATA RECORDS
|
2019-02-27 16:19:29 +00:00
|
|
|
============================================================ */
|
2019-03-01 00:22:35 +00:00
|
|
|
#include "../runtime_file.c"
|
2020-01-22 17:07:50 +00:00
|
|
|
#include "../disk_index_file.c"
|
2019-02-27 16:19:29 +00:00
|
|
|
|
2015-10-09 18:29:50 +00:00
|
|
|
/*============================================================
|
|
|
|
ACHIEVEMENTS
|
|
|
|
============================================================ */
|
2017-10-03 20:05:23 +00:00
|
|
|
#if defined(HAVE_CHEEVOS)
|
2016-09-29 19:07:10 +00:00
|
|
|
#if !defined(HAVE_NETWORKING)
|
2015-10-14 03:12:01 +00:00
|
|
|
#include "../libretro-common/net/net_http.c"
|
|
|
|
#endif
|
|
|
|
|
2023-11-02 18:52:36 +00:00
|
|
|
/* rcheevos doesn't actually spawn and manage threads, RC_NO_THREADS
|
|
|
|
* simply disables the mutexes that provide thread safety. */
|
|
|
|
#if !defined(HAVE_THREADS)
|
|
|
|
#define RC_NO_THREADS 1
|
|
|
|
#elif defined(GEKKO) || defined(_3DS)
|
|
|
|
/* Gekko (Wii) and 3DS use custom pthread wrappers (see rthreads.c) */
|
|
|
|
#define RC_NO_THREADS 1
|
|
|
|
#endif
|
|
|
|
|
2019-08-31 01:38:58 +00:00
|
|
|
#include "../libretro-common/formats/cdfs/cdfs.c"
|
2016-05-09 15:47:45 +00:00
|
|
|
#include "../network/net_http_special.c"
|
2018-10-01 13:02:20 +00:00
|
|
|
|
2020-05-21 21:23:01 +00:00
|
|
|
#include "../cheevos/cheevos.c"
|
2021-07-18 15:45:53 +00:00
|
|
|
#include "../cheevos/cheevos_client.c"
|
2021-06-02 01:32:00 +00:00
|
|
|
#include "../cheevos/cheevos_menu.c"
|
2018-09-29 18:58:03 +00:00
|
|
|
|
2023-11-02 18:52:36 +00:00
|
|
|
#include "../deps/rcheevos/src/rc_client.c"
|
|
|
|
#include "../deps/rcheevos/src/rc_compat.c"
|
|
|
|
#include "../deps/rcheevos/src/rc_libretro.c"
|
|
|
|
#include "../deps/rcheevos/src/rc_util.c"
|
2021-07-18 15:45:53 +00:00
|
|
|
#include "../deps/rcheevos/src/rapi/rc_api_common.c"
|
2023-11-02 18:52:36 +00:00
|
|
|
#include "../deps/rcheevos/src/rapi/rc_api_info.c"
|
2021-07-18 15:45:53 +00:00
|
|
|
#include "../deps/rcheevos/src/rapi/rc_api_runtime.c"
|
|
|
|
#include "../deps/rcheevos/src/rapi/rc_api_user.c"
|
2019-03-20 01:36:54 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/alloc.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/condition.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/condset.c"
|
2020-05-04 15:11:16 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/consoleinfo.c"
|
2019-03-20 01:36:54 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/format.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/lboard.c"
|
2020-05-04 15:11:16 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/memref.c"
|
2019-03-20 01:36:54 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/operand.c"
|
2020-05-04 15:11:16 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/richpresence.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/runtime.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/runtime_progress.c"
|
2019-03-20 01:36:54 +00:00
|
|
|
#include "../deps/rcheevos/src/rcheevos/trigger.c"
|
|
|
|
#include "../deps/rcheevos/src/rcheevos/value.c"
|
2024-01-22 02:12:30 +00:00
|
|
|
#include "../deps/rcheevos/src/rhash/aes.c"
|
2022-01-25 03:44:53 +00:00
|
|
|
#include "../deps/rcheevos/src/rhash/cdreader.c"
|
2020-05-04 15:11:16 +00:00
|
|
|
#include "../deps/rcheevos/src/rhash/hash.c"
|
2018-10-01 13:02:20 +00:00
|
|
|
|
2015-10-17 08:56:23 +00:00
|
|
|
#endif
|
2015-10-09 18:29:50 +00:00
|
|
|
|
2016-08-30 22:27:47 +00:00
|
|
|
/*============================================================
|
|
|
|
MD5
|
|
|
|
============================================================ */
|
|
|
|
#include "../libretro-common/utils/md5.c"
|
|
|
|
|
2015-10-27 17:50:41 +00:00
|
|
|
/*============================================================
|
|
|
|
CHEATS
|
|
|
|
============================================================ */
|
2020-06-30 17:35:41 +00:00
|
|
|
#ifdef HAVE_CHEATS
|
2020-10-15 03:29:20 +00:00
|
|
|
#include "../cheat_manager.c"
|
2020-06-30 17:35:41 +00:00
|
|
|
#endif
|
2020-12-28 18:55:54 +00:00
|
|
|
#include "../libretro-common/hash/lrc_hash.c"
|
2015-10-27 17:50:41 +00:00
|
|
|
|
2021-09-27 17:37:22 +00:00
|
|
|
#include "../gfx/video_driver.c"
|
2017-08-09 11:39:14 +00:00
|
|
|
/*============================================================
|
|
|
|
UI COMMON CONTEXT
|
|
|
|
============================================================ */
|
2018-05-12 17:03:39 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
2017-08-09 11:39:14 +00:00
|
|
|
#include "../gfx/common/win32_common.c"
|
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
2012-05-28 03:19:04 +00:00
|
|
|
VIDEO CONTEXT
|
2012-04-13 23:02:37 +00:00
|
|
|
============================================================ */
|
2015-01-12 21:19:31 +00:00
|
|
|
#include "../gfx/drivers_context/gfx_null_ctx.c"
|
2012-05-27 23:15:00 +00:00
|
|
|
|
2021-09-26 17:57:08 +00:00
|
|
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE)
|
|
|
|
#include "../gfx/common/gl_common.c"
|
|
|
|
#endif
|
|
|
|
|
2024-03-02 17:36:17 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX)
|
2017-08-09 11:56:47 +00:00
|
|
|
|
2024-03-02 17:36:17 +00:00
|
|
|
#if (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) || defined(HAVE_OPENGLES)) && !defined(HAVE_ANGLE)
|
2017-08-09 11:51:33 +00:00
|
|
|
#include "../gfx/drivers_context/wgl_ctx.c"
|
|
|
|
#endif
|
2020-07-17 02:28:26 +00:00
|
|
|
#if defined(HAVE_VULKAN)
|
|
|
|
#include "../gfx/drivers_context/w_vk_ctx.c"
|
|
|
|
#endif
|
2017-08-09 11:56:47 +00:00
|
|
|
|
2024-03-02 17:36:17 +00:00
|
|
|
#if !defined(__WINRT__)
|
2017-12-11 23:12:32 +00:00
|
|
|
#include "../gfx/display_servers/dispserv_win32.c"
|
2024-03-02 17:36:17 +00:00
|
|
|
#endif
|
2017-08-09 11:56:47 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_FFMPEG)
|
|
|
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES3)
|
|
|
|
#include "../cores/libretro-ffmpeg/ffmpeg_fft.c"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-08-09 11:51:33 +00:00
|
|
|
#endif
|
|
|
|
|
2020-12-19 14:32:26 +00:00
|
|
|
#if defined(ANDROID)
|
2016-03-01 03:18:43 +00:00
|
|
|
#include "../gfx/drivers_context/android_ctx.c"
|
2020-07-17 11:45:37 +00:00
|
|
|
#if defined(HAVE_VULKAN)
|
|
|
|
#include "../gfx/drivers_context/android_vk_ctx.c"
|
|
|
|
#endif
|
2019-02-21 05:31:55 +00:00
|
|
|
#include "../gfx/display_servers/dispserv_android.c"
|
2014-05-20 00:48:11 +00:00
|
|
|
#elif defined(__QNX__)
|
2017-01-07 21:37:05 +00:00
|
|
|
#include "../gfx/drivers_context/qnx_ctx.c"
|
2013-11-17 22:21:40 +00:00
|
|
|
#elif defined(EMSCRIPTEN)
|
2015-01-12 21:19:31 +00:00
|
|
|
#include "../gfx/drivers_context/emscriptenegl_ctx.c"
|
2021-07-12 07:35:44 +00:00
|
|
|
#elif defined(__PS3__)
|
2020-12-27 17:56:00 +00:00
|
|
|
#include "../gfx/drivers_context/ps3_ctx.c"
|
2012-05-27 20:58:14 +00:00
|
|
|
#endif
|
|
|
|
|
2016-03-01 21:25:53 +00:00
|
|
|
#if defined(HAVE_VIVANTE_FBDEV)
|
|
|
|
#include "../gfx/drivers_context/vivante_fbdev_ctx.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_OPENDINGUX_FBDEV)
|
|
|
|
#include "../gfx/drivers_context/opendingux_fbdev_ctx.c"
|
|
|
|
#endif
|
|
|
|
|
2016-02-17 04:22:17 +00:00
|
|
|
#ifdef HAVE_WAYLAND
|
|
|
|
#include "../gfx/drivers_context/wayland_ctx.c"
|
2020-07-17 11:57:24 +00:00
|
|
|
#ifdef HAVE_VULKAN
|
|
|
|
#include "../gfx/drivers_context/wayland_vk_ctx.c"
|
|
|
|
#endif
|
2016-02-17 04:22:17 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-26 16:12:06 +00:00
|
|
|
#ifdef HAVE_DRM
|
|
|
|
#include "../gfx/common/drm_common.c"
|
|
|
|
#endif
|
2013-07-28 17:55:18 +00:00
|
|
|
|
2016-02-17 04:22:17 +00:00
|
|
|
#ifdef HAVE_VULKAN
|
|
|
|
#include "../gfx/common/vulkan_common.c"
|
2016-06-26 11:10:19 +00:00
|
|
|
#include "../libretro-common/vulkan/vulkan_symbol_wrapper.c"
|
2016-08-27 23:48:13 +00:00
|
|
|
#ifdef HAVE_VULKAN_DISPLAY
|
2016-07-07 20:03:30 +00:00
|
|
|
#include "../gfx/drivers_context/khr_display_ctx.c"
|
|
|
|
#endif
|
2016-02-17 04:22:17 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:25:22 +00:00
|
|
|
#if defined(HAVE_KMS)
|
2016-02-22 12:01:16 +00:00
|
|
|
#include "../gfx/drivers_context/drm_ctx.c"
|
2023-05-19 10:05:57 +00:00
|
|
|
#include "../gfx/display_servers/dispserv_kms.c"
|
2013-07-07 19:25:22 +00:00
|
|
|
#endif
|
2016-02-22 12:01:16 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_EGL)
|
|
|
|
#include "../gfx/common/egl_common.c"
|
|
|
|
|
2013-07-07 19:17:58 +00:00
|
|
|
#if defined(HAVE_VIDEOCORE)
|
2015-01-12 21:19:31 +00:00
|
|
|
#include "../gfx/drivers_context/vc_egl_ctx.c"
|
2012-05-27 20:58:14 +00:00
|
|
|
#endif
|
2014-09-14 04:15:24 +00:00
|
|
|
|
2019-12-06 07:21:54 +00:00
|
|
|
#if defined(_WIN32) && defined(HAVE_ANGLE)
|
2019-12-05 09:53:47 +00:00
|
|
|
#include "../gfx/common/angle_common.c"
|
|
|
|
#endif
|
|
|
|
|
2019-12-05 10:22:04 +00:00
|
|
|
#if defined(__WINRT__)
|
|
|
|
#include "../gfx/drivers_context/uwp_egl_ctx.c"
|
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:17:58 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-16 20:39:28 +00:00
|
|
|
#if defined(HAVE_X11)
|
2015-04-09 03:02:57 +00:00
|
|
|
#include "../gfx/common/x11_common.c"
|
2017-03-23 18:59:11 +00:00
|
|
|
#include "../gfx/common/xinerama_common.c"
|
2019-05-22 18:07:56 +00:00
|
|
|
#include "../gfx/display_servers/dispserv_x11.c"
|
2015-04-16 20:39:28 +00:00
|
|
|
|
2017-12-16 13:16:27 +00:00
|
|
|
#ifdef HAVE_DBUS
|
|
|
|
#include "../gfx/common/dbus_common.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-16 20:39:28 +00:00
|
|
|
#ifndef HAVE_OPENGLES
|
2016-02-20 04:48:45 +00:00
|
|
|
#include "../gfx/drivers_context/x_ctx.c"
|
2015-04-16 20:39:28 +00:00
|
|
|
#endif
|
|
|
|
|
2020-07-17 12:15:30 +00:00
|
|
|
#ifdef HAVE_VULKAN
|
|
|
|
#include "../gfx/drivers_context/x_vk_ctx.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-16 20:39:28 +00:00
|
|
|
#ifdef HAVE_EGL
|
|
|
|
#include "../gfx/drivers_context/xegl_ctx.c"
|
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:25:22 +00:00
|
|
|
#endif
|
|
|
|
|
2012-05-28 03:19:04 +00:00
|
|
|
/*============================================================
|
|
|
|
VIDEO SHADERS
|
|
|
|
============================================================ */
|
2019-07-20 14:50:46 +00:00
|
|
|
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL) || defined(HAVE_SLANG)
|
2015-01-12 22:42:50 +00:00
|
|
|
#include "../gfx/video_shader_parse.c"
|
2019-07-20 14:50:46 +00:00
|
|
|
#endif
|
2013-04-06 09:30:56 +00:00
|
|
|
|
2019-08-18 16:01:21 +00:00
|
|
|
#ifdef HAVE_SLANG
|
|
|
|
#include "../gfx/drivers_shader/glslang_util.c"
|
|
|
|
#endif
|
|
|
|
|
2012-05-27 20:58:14 +00:00
|
|
|
#ifdef HAVE_CG
|
2014-10-02 13:19:21 +00:00
|
|
|
#ifdef HAVE_OPENGL
|
2015-01-12 21:23:48 +00:00
|
|
|
#include "../gfx/drivers_shader/shader_gl_cg.c"
|
2014-10-02 13:19:21 +00:00
|
|
|
#endif
|
2012-05-27 20:39:29 +00:00
|
|
|
#endif
|
|
|
|
|
2012-07-01 20:46:25 +00:00
|
|
|
#ifdef HAVE_GLSL
|
2015-01-12 21:23:48 +00:00
|
|
|
#include "../gfx/drivers_shader/shader_glsl.c"
|
2012-07-01 20:46:25 +00:00
|
|
|
#endif
|
|
|
|
|
2012-05-28 03:19:04 +00:00
|
|
|
/*============================================================
|
|
|
|
VIDEO IMAGE
|
|
|
|
============================================================ */
|
|
|
|
|
2016-05-18 10:57:44 +00:00
|
|
|
#include "../libretro-common/formats/image_texture.c"
|
2015-11-09 00:19:09 +00:00
|
|
|
|
2016-05-11 19:57:41 +00:00
|
|
|
#ifdef HAVE_RTGA
|
2015-09-19 13:36:39 +00:00
|
|
|
#include "../libretro-common/formats/tga/rtga.c"
|
2016-05-11 19:57:41 +00:00
|
|
|
#endif
|
2015-04-19 14:55:03 +00:00
|
|
|
|
2015-06-28 16:55:00 +00:00
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
2016-01-21 18:53:52 +00:00
|
|
|
#include "../cores/libretro-imageviewer/image_core.c"
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
|
|
|
|
2016-05-13 02:38:21 +00:00
|
|
|
#include "../libretro-common/formats/image_transfer.c"
|
2015-04-19 14:55:03 +00:00
|
|
|
#ifdef HAVE_RPNG
|
2015-09-18 23:40:29 +00:00
|
|
|
#include "../libretro-common/formats/png/rpng.c"
|
2015-02-20 22:38:48 +00:00
|
|
|
#include "../libretro-common/formats/png/rpng_encode.c"
|
2015-09-19 00:52:23 +00:00
|
|
|
#endif
|
2016-05-11 19:27:17 +00:00
|
|
|
#ifdef HAVE_RJPEG
|
2016-05-07 02:33:54 +00:00
|
|
|
#include "../libretro-common/formats/jpeg/rjpeg.c"
|
2016-05-11 19:27:17 +00:00
|
|
|
#endif
|
2016-05-18 11:28:20 +00:00
|
|
|
#ifdef HAVE_RBMP
|
2016-05-17 19:21:37 +00:00
|
|
|
#include "../libretro-common/formats/bmp/rbmp.c"
|
2016-06-07 04:14:55 +00:00
|
|
|
#endif
|
2015-09-19 00:44:28 +00:00
|
|
|
|
2019-08-21 19:51:25 +00:00
|
|
|
#include "../libretro-common/formats/bmp/rbmp_encode.c"
|
2020-06-30 15:36:03 +00:00
|
|
|
#ifdef HAVE_RWAV
|
2017-01-27 23:28:51 +00:00
|
|
|
#include "../libretro-common/formats/wav/rwav.c"
|
2020-06-30 15:36:03 +00:00
|
|
|
#endif
|
2017-01-27 23:28:51 +00:00
|
|
|
|
2012-05-28 03:19:04 +00:00
|
|
|
/*============================================================
|
|
|
|
VIDEO DRIVER
|
|
|
|
============================================================ */
|
2017-10-02 01:52:53 +00:00
|
|
|
#if defined(HAVE_D3D)
|
|
|
|
#include "../gfx/common/d3d_common.c"
|
2017-10-02 19:39:35 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_D3D8)
|
2018-01-23 01:55:33 +00:00
|
|
|
#include "../gfx/drivers/d3d8.c"
|
2017-10-02 19:39:35 +00:00
|
|
|
#endif
|
2017-10-03 00:49:06 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_D3D9)
|
2018-03-03 14:30:35 +00:00
|
|
|
#include "../gfx/common/d3d9_common.c"
|
2017-10-03 00:49:06 +00:00
|
|
|
|
2017-11-06 18:49:06 +00:00
|
|
|
#ifdef HAVE_HLSL
|
2022-04-19 13:45:22 +00:00
|
|
|
#include "../gfx/drivers/d3d9hlsl.c"
|
2017-11-06 18:49:06 +00:00
|
|
|
#endif
|
|
|
|
|
2017-10-03 00:49:06 +00:00
|
|
|
#ifdef HAVE_CG
|
2022-04-19 13:45:22 +00:00
|
|
|
#include "../gfx/drivers/d3d9cg.c"
|
2017-10-03 00:49:06 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2017-10-02 01:52:53 +00:00
|
|
|
#endif
|
2012-05-28 03:19:04 +00:00
|
|
|
|
2018-01-21 03:10:45 +00:00
|
|
|
#if defined(HAVE_D3D11)
|
|
|
|
#include "../gfx/drivers/d3d11.c"
|
2018-01-21 06:49:07 +00:00
|
|
|
#include "../gfx/common/d3d11_common.c"
|
2018-01-21 03:10:45 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_D3D12)
|
|
|
|
#include "../gfx/drivers/d3d12.c"
|
2018-01-21 06:49:07 +00:00
|
|
|
#include "../gfx/common/d3d12_common.c"
|
|
|
|
#endif
|
|
|
|
|
2018-01-23 18:29:32 +00:00
|
|
|
#if defined(HAVE_D3D10)
|
|
|
|
#include "../gfx/drivers/d3d10.c"
|
|
|
|
#include "../gfx/common/d3d10_common.c"
|
|
|
|
#endif
|
|
|
|
|
2018-01-23 17:04:55 +00:00
|
|
|
#if defined(HAVE_D3D10) || defined(HAVE_D3D11) || defined(HAVE_D3D12)
|
2018-01-21 06:49:07 +00:00
|
|
|
#include "../gfx/common/d3dcompiler_common.c"
|
|
|
|
#include "../gfx/common/dxgi_common.c"
|
2018-01-21 03:10:45 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-23 00:26:09 +00:00
|
|
|
#if defined(GEKKO)
|
2012-08-08 20:39:19 +00:00
|
|
|
#ifdef HW_RVL
|
2015-09-20 13:05:30 +00:00
|
|
|
#include "../gfx/drivers/gx_gfx_vi_encoder.c"
|
2015-09-20 12:54:41 +00:00
|
|
|
#include "../memory/wii/mem2_manager.c"
|
2012-08-08 20:39:19 +00:00
|
|
|
#endif
|
2012-04-14 11:42:25 +00:00
|
|
|
#endif
|
|
|
|
|
2018-01-11 01:09:34 +00:00
|
|
|
#if defined(__wiiu__)
|
2018-01-12 01:54:45 +00:00
|
|
|
#include "../gfx/drivers/gx2_gfx.c"
|
2018-01-11 01:09:34 +00:00
|
|
|
#endif
|
|
|
|
|
2016-09-03 05:10:55 +00:00
|
|
|
#ifdef HAVE_SDL2
|
|
|
|
#include "../gfx/drivers/sdl2_gfx.c"
|
2019-09-22 10:40:40 +00:00
|
|
|
#include "../gfx/common/sdl2_common.c"
|
2016-09-03 05:10:55 +00:00
|
|
|
#endif
|
|
|
|
|
2021-07-13 16:36:48 +00:00
|
|
|
#if defined(DINGUX) && defined(HAVE_SDL_DINGUX)
|
2021-10-08 11:53:49 +00:00
|
|
|
#if defined(RS90) || defined(MIYOO)
|
2021-07-13 16:36:48 +00:00
|
|
|
#include "../gfx/drivers/sdl_rs90_gfx.c"
|
|
|
|
#else
|
|
|
|
#include "../gfx/drivers/sdl_dingux_gfx.c"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:17:58 +00:00
|
|
|
#ifdef HAVE_VG
|
2015-01-12 05:45:12 +00:00
|
|
|
#include "../gfx/drivers/vg.c"
|
2013-07-07 19:17:58 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-28 17:56:35 +00:00
|
|
|
#ifdef HAVE_OMAP
|
2015-01-12 05:45:12 +00:00
|
|
|
#include "../gfx/drivers/omap_gfx.c"
|
2013-07-28 17:56:35 +00:00
|
|
|
#endif
|
|
|
|
|
2016-02-17 04:22:17 +00:00
|
|
|
#ifdef HAVE_VULKAN
|
|
|
|
#include "../gfx/drivers/vulkan.c"
|
|
|
|
#endif
|
|
|
|
|
2016-07-03 20:08:56 +00:00
|
|
|
#if defined(HAVE_PLAIN_DRM)
|
2016-07-03 08:37:07 +00:00
|
|
|
#include "../gfx/drivers/drm_gfx.c"
|
|
|
|
#endif
|
|
|
|
|
2019-02-08 21:04:23 +00:00
|
|
|
#ifdef HAVE_OPENGL1
|
2019-02-08 17:14:55 +00:00
|
|
|
#include "../gfx/drivers/gl1.c"
|
2019-02-08 21:04:23 +00:00
|
|
|
#endif
|
2019-04-22 20:48:23 +00:00
|
|
|
|
2019-03-02 10:53:14 +00:00
|
|
|
#ifdef HAVE_OPENGL_CORE
|
2021-09-26 12:16:09 +00:00
|
|
|
#include "../gfx/drivers/gl3.c"
|
2019-03-02 10:53:14 +00:00
|
|
|
#endif
|
2019-04-24 01:23:57 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_OPENGL
|
2021-09-26 12:16:09 +00:00
|
|
|
#include "../gfx/drivers/gl2.c"
|
2019-04-24 01:37:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE)
|
2019-04-24 02:05:42 +00:00
|
|
|
#include "../libretro-common/gfx/gl_capabilities.c"
|
2013-08-11 13:06:42 +00:00
|
|
|
|
2013-08-11 13:10:56 +00:00
|
|
|
#ifndef HAVE_PSGL
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/glsym/rglgen.c"
|
2016-12-09 17:07:37 +00:00
|
|
|
#if defined(HAVE_OPENGLES2)
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/glsym/glsym_es2.c"
|
2016-12-09 17:07:37 +00:00
|
|
|
#elif defined(HAVE_OPENGLES3)
|
|
|
|
#include "../libretro-common/glsym/glsym_es3.c"
|
2013-07-05 17:29:48 +00:00
|
|
|
#else
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/glsym/glsym_gl.c"
|
2013-07-05 17:29:48 +00:00
|
|
|
#endif
|
2013-01-10 02:34:43 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-11 13:06:42 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:17:58 +00:00
|
|
|
#ifdef HAVE_XVIDEO
|
2015-01-12 05:45:12 +00:00
|
|
|
#include "../gfx/drivers/xvideo.c"
|
2013-07-07 19:17:58 +00:00
|
|
|
#endif
|
|
|
|
|
2023-02-21 13:24:00 +00:00
|
|
|
#if defined(HAVE_GCM)
|
2021-05-19 20:50:34 +00:00
|
|
|
#include "../gfx/drivers/rsx_gfx.c"
|
2020-03-07 20:27:38 +00:00
|
|
|
#elif defined(GEKKO)
|
2015-01-12 05:55:31 +00:00
|
|
|
#include "../gfx/drivers/gx_gfx.c"
|
2013-07-27 18:47:00 +00:00
|
|
|
#elif defined(PSP)
|
2015-01-12 05:55:31 +00:00
|
|
|
#include "../gfx/drivers/psp1_gfx.c"
|
2018-09-18 06:08:06 +00:00
|
|
|
#elif defined(PS2)
|
2018-10-09 17:20:58 +00:00
|
|
|
#include "../gfx/drivers/ps2_gfx.c"
|
2015-08-30 18:04:52 +00:00
|
|
|
#elif defined(HAVE_VITA2D)
|
2016-07-31 22:50:13 +00:00
|
|
|
#include "../deps/libvita2d/source/vita2d.c"
|
|
|
|
#include "../deps/libvita2d/source/vita2d_texture.c"
|
|
|
|
#include "../deps/libvita2d/source/vita2d_draw.c"
|
|
|
|
#include "../deps/libvita2d/source/utils.c"
|
|
|
|
|
2015-08-30 18:04:52 +00:00
|
|
|
#include "../gfx/drivers/vita2d_gfx.c"
|
2015-04-01 21:14:13 +00:00
|
|
|
#elif defined(_3DS)
|
|
|
|
#include "../gfx/drivers/ctr_gfx.c"
|
2013-01-09 04:54:48 +00:00
|
|
|
#elif defined(XENON)
|
2015-01-12 05:45:12 +00:00
|
|
|
#include "../gfx/drivers/xenon360_gfx.c"
|
2017-01-24 05:55:55 +00:00
|
|
|
#elif defined(DJGPP)
|
|
|
|
#include "../gfx/drivers/vga_gfx.c"
|
2013-01-09 04:57:02 +00:00
|
|
|
#endif
|
2012-06-20 04:39:52 +00:00
|
|
|
|
2018-05-12 17:03:39 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
2019-07-11 11:18:38 +00:00
|
|
|
#ifdef HAVE_GDI
|
2017-01-05 22:21:13 +00:00
|
|
|
#include "../gfx/drivers/gdi_gfx.c"
|
|
|
|
#endif
|
2019-07-11 11:18:38 +00:00
|
|
|
#endif
|
2017-01-05 22:21:13 +00:00
|
|
|
|
2017-08-04 13:05:29 +00:00
|
|
|
#include "../deps/ibxm/ibxm.c"
|
|
|
|
|
2012-05-27 02:02:07 +00:00
|
|
|
/*============================================================
|
|
|
|
FONTS
|
|
|
|
============================================================ */
|
|
|
|
|
2015-01-12 22:34:10 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/bitmapfont.c"
|
2022-03-20 12:49:56 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_LANGEXTRA
|
2020-12-09 16:48:09 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/bitmapfont_10x10.c"
|
2022-03-20 12:49:56 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/bitmapfont_6x10.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-03 18:36:19 +00:00
|
|
|
#include "../gfx/font_driver.c"
|
2014-02-05 15:30:55 +00:00
|
|
|
|
2018-01-04 13:42:13 +00:00
|
|
|
#if defined(HAVE_D3D9) && defined(HAVE_D3DX)
|
2023-05-31 19:32:52 +00:00
|
|
|
#include "../gfx/drivers_font/d3d9x_w32_font.c"
|
2017-10-02 19:52:10 +00:00
|
|
|
#endif
|
|
|
|
|
2015-07-14 15:05:08 +00:00
|
|
|
#if defined(HAVE_STB_FONT)
|
2016-11-05 17:59:44 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/stb_unicode.c"
|
2015-07-14 15:05:08 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/stb.c"
|
|
|
|
#endif
|
|
|
|
|
2013-02-25 00:19:12 +00:00
|
|
|
#if defined(HAVE_FREETYPE)
|
2015-01-12 22:34:10 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/freetype.c"
|
2013-02-25 02:43:19 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-19 14:18:58 +00:00
|
|
|
#if defined(__APPLE__) && defined(HAVE_CORETEXT)
|
2015-01-12 22:34:10 +00:00
|
|
|
#include "../gfx/drivers_font_renderer/coretext.c"
|
2014-10-19 00:19:44 +00:00
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
INPUT
|
|
|
|
============================================================ */
|
2021-07-30 15:38:39 +00:00
|
|
|
|
|
|
|
#include "../input/input_driver.c"
|
|
|
|
#include "../input/input_keymaps.c"
|
2016-12-01 19:38:20 +00:00
|
|
|
#include "../tasks/task_autodetect.c"
|
2021-07-30 15:38:39 +00:00
|
|
|
#include "../input/input_autodetect_builtin.c"
|
|
|
|
|
2020-01-25 16:17:53 +00:00
|
|
|
#ifdef HAVE_BLISSBOX
|
2020-01-19 05:40:07 +00:00
|
|
|
#include "../tasks/task_autodetect_blissbox.c"
|
2020-01-25 16:17:53 +00:00
|
|
|
#endif
|
2021-07-30 15:38:39 +00:00
|
|
|
|
2019-07-11 09:51:06 +00:00
|
|
|
#ifdef HAVE_AUDIOMIXER
|
2017-05-14 00:04:06 +00:00
|
|
|
#include "../tasks/task_audio_mixer.c"
|
2019-07-11 09:51:06 +00:00
|
|
|
#endif
|
2012-12-23 17:39:34 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_OVERLAY
|
2018-01-11 00:52:32 +00:00
|
|
|
#include "../led/drivers/led_overlay.c"
|
2015-05-05 16:16:09 +00:00
|
|
|
#include "../tasks/task_overlay.c"
|
2012-12-23 17:39:34 +00:00
|
|
|
#endif
|
2012-12-20 19:48:09 +00:00
|
|
|
|
2020-07-19 23:45:54 +00:00
|
|
|
#ifdef HAVE_X11
|
|
|
|
#include "../input/common/input_x11_common.c"
|
|
|
|
#endif
|
|
|
|
|
2018-05-12 17:03:39 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__)
|
2020-07-02 04:43:36 +00:00
|
|
|
#ifdef HAVE_WINRAWINPUT
|
2017-05-24 01:02:53 +00:00
|
|
|
/* winraw only available since XP */
|
2017-05-19 03:56:20 +00:00
|
|
|
#include "../input/drivers/winraw_input.c"
|
2017-05-19 03:54:33 +00:00
|
|
|
#endif
|
2020-07-02 04:43:36 +00:00
|
|
|
#endif
|
2017-05-19 03:54:33 +00:00
|
|
|
|
2020-12-27 17:56:00 +00:00
|
|
|
#if defined(SN_TARGET_PSP2) || defined(PSP) || defined(VITA)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/psp_input.c"
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/psp_joypad.c"
|
2018-09-18 06:08:06 +00:00
|
|
|
#elif defined(PS2)
|
2018-10-17 17:02:50 +00:00
|
|
|
#include "../input/drivers/ps2_input.c"
|
2018-10-17 19:11:21 +00:00
|
|
|
#include "../input/drivers_joypad/ps2_joypad.c"
|
2022-03-27 01:51:33 +00:00
|
|
|
#elif defined(__PS3__)
|
2020-12-27 17:56:00 +00:00
|
|
|
#include "../input/drivers/ps3_input.c"
|
|
|
|
#include "../input/drivers_joypad/ps3_joypad.c"
|
|
|
|
#elif defined(ORBIS)
|
|
|
|
#include "../input/drivers/ps4_input.c"
|
|
|
|
#include "../input/drivers_joypad/ps4_joypad.c"
|
2015-04-01 21:14:13 +00:00
|
|
|
#elif defined(_3DS)
|
|
|
|
#include "../input/drivers/ctr_input.c"
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/ctr_joypad.c"
|
2012-04-14 11:42:25 +00:00
|
|
|
#elif defined(GEKKO)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/gx_input.c"
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/gx_joypad.c"
|
2018-01-11 01:09:34 +00:00
|
|
|
#elif defined(__wiiu__)
|
2019-05-27 12:54:27 +00:00
|
|
|
#include "../input/common/hid/hid_device_driver.c"
|
|
|
|
#include "../input/common/hid/device_wiiu_gca.c"
|
|
|
|
#include "../input/common/hid/device_ds3.c"
|
|
|
|
#include "../input/common/hid/device_ds4.c"
|
|
|
|
#include "../input/common/hid/device_null.c"
|
2018-01-11 01:09:34 +00:00
|
|
|
#include "../input/drivers/wiiu_input.c"
|
|
|
|
#include "../input/drivers_joypad/wiiu_joypad.c"
|
2019-05-27 12:12:29 +00:00
|
|
|
#include "../input/drivers_joypad/wiiu/hidpad_driver.c"
|
|
|
|
#include "../input/drivers_joypad/wiiu/kpad_driver.c"
|
|
|
|
#include "../input/drivers_joypad/wiiu/wpad_driver.c"
|
|
|
|
#include "../input/drivers_joypad/wiiu/pad_functions.c"
|
2012-07-31 18:56:05 +00:00
|
|
|
#elif defined(_XBOX)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/xdk_xinput_input.c"
|
2020-07-31 16:32:28 +00:00
|
|
|
#ifdef _XBOX1
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/xdk_joypad.c"
|
2020-07-31 16:32:28 +00:00
|
|
|
#endif
|
2012-11-25 04:41:12 +00:00
|
|
|
#elif defined(XENON)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/xenon360_input.c"
|
2012-11-03 07:42:33 +00:00
|
|
|
#elif defined(ANDROID)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/android_input.c"
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/android_joypad.c"
|
2014-05-20 00:48:11 +00:00
|
|
|
#elif defined(__QNX__)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/qnx_input.c"
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/qnx_joypad.c"
|
2013-11-17 22:21:40 +00:00
|
|
|
#elif defined(EMSCRIPTEN)
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/rwebinput_input.c"
|
2018-01-14 06:15:30 +00:00
|
|
|
#include "../input/drivers_joypad/rwebpad_joypad.c"
|
2017-01-24 05:55:55 +00:00
|
|
|
#elif defined(DJGPP)
|
|
|
|
#include "../input/drivers/dos_input.c"
|
|
|
|
#include "../input/drivers_joypad/dos_joypad.c"
|
2018-12-28 11:41:38 +00:00
|
|
|
#elif defined(__WINRT__)
|
|
|
|
#include "../input/drivers/xdk_xinput_input.c"
|
2018-12-28 11:29:04 +00:00
|
|
|
#include "../input/drivers/uwp_input.c"
|
2020-10-08 12:22:35 +00:00
|
|
|
#elif defined(DINGUX) && defined(HAVE_SDL_DINGUX)
|
|
|
|
#include "../input/drivers/sdl_dingux_input.c"
|
|
|
|
#include "../input/drivers_joypad/sdl_dingux_joypad.c"
|
2013-01-09 04:57:02 +00:00
|
|
|
#endif
|
|
|
|
|
2017-06-06 05:34:33 +00:00
|
|
|
#ifdef HAVE_WAYLAND
|
2020-07-14 13:56:37 +00:00
|
|
|
#include "../input/common/wayland_common.c"
|
2017-06-06 05:34:33 +00:00
|
|
|
#include "../input/drivers/wayland_input.c"
|
|
|
|
#endif
|
|
|
|
|
2014-09-14 04:15:24 +00:00
|
|
|
#ifdef HAVE_DINPUT
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/dinput.c"
|
2015-04-07 23:58:09 +00:00
|
|
|
#include "../input/drivers_joypad/dinput_joypad.c"
|
2014-09-14 04:15:24 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-05 18:43:24 +00:00
|
|
|
#ifdef HAVE_XINPUT
|
2020-07-31 16:57:44 +00:00
|
|
|
#ifdef HAVE_DINPUT
|
|
|
|
#include "../input/drivers_joypad/xinput_hybrid_joypad.c"
|
|
|
|
#else
|
2015-04-02 16:42:15 +00:00
|
|
|
#include "../input/drivers_joypad/xinput_joypad.c"
|
2014-09-14 04:15:24 +00:00
|
|
|
#endif
|
2020-07-31 16:57:44 +00:00
|
|
|
#endif
|
2014-09-14 04:15:24 +00:00
|
|
|
|
2015-04-01 21:14:13 +00:00
|
|
|
#if defined(__linux__) && !defined(ANDROID)
|
2015-11-17 05:46:32 +00:00
|
|
|
#include "../input/common/linux_common.c"
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/linuxraw_input.c"
|
2015-01-12 05:28:39 +00:00
|
|
|
#include "../input/drivers_joypad/linuxraw_joypad.c"
|
2013-07-07 17:22:54 +00:00
|
|
|
#endif
|
|
|
|
|
2013-07-07 19:25:22 +00:00
|
|
|
#ifdef HAVE_X11
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/x11_input.c"
|
2013-07-07 19:25:22 +00:00
|
|
|
#endif
|
|
|
|
|
2014-10-27 18:25:59 +00:00
|
|
|
#ifdef HAVE_UDEV
|
2015-01-12 05:16:52 +00:00
|
|
|
#include "../input/drivers/udev_input.c"
|
2015-01-12 05:28:39 +00:00
|
|
|
#include "../input/drivers_joypad/udev_joypad.c"
|
2014-10-27 18:25:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-11-17 15:59:39 +00:00
|
|
|
#if defined(HAVE_LIBSHAKE)
|
|
|
|
#include "../deps/libShake/src/common/error.c"
|
|
|
|
#include "../deps/libShake/src/common/helpers.c"
|
|
|
|
#include "../deps/libShake/src/common/presets.c"
|
2021-01-17 04:02:07 +00:00
|
|
|
#if defined(OSX)
|
2020-11-17 15:59:39 +00:00
|
|
|
#include "../deps/libShake/src/osx/shake.c"
|
|
|
|
#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__))
|
|
|
|
#include "../deps/libShake/src/linux/shake.c"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2024-03-18 19:07:36 +00:00
|
|
|
#ifdef HAVE_TEST_DRIVERS
|
|
|
|
#include "../input/drivers_joypad/test_joypad.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-02 15:49:32 +00:00
|
|
|
/*============================================================
|
|
|
|
INPUT (HID)
|
|
|
|
============================================================ */
|
2016-06-07 01:01:33 +00:00
|
|
|
#ifdef HAVE_HID
|
2019-05-27 13:01:36 +00:00
|
|
|
#include "../input/common/input_hid_common.c"
|
2016-06-07 03:15:22 +00:00
|
|
|
#include "../input/drivers_joypad/hid_joypad.c"
|
2015-04-02 15:49:32 +00:00
|
|
|
|
2016-05-11 17:02:43 +00:00
|
|
|
#if defined(HAVE_LIBUSB) && defined(HAVE_THREADS)
|
2015-04-02 15:49:32 +00:00
|
|
|
#include "../input/drivers_hid/libusb_hid.c"
|
2015-04-07 04:57:05 +00:00
|
|
|
#endif
|
|
|
|
|
2015-11-16 03:17:13 +00:00
|
|
|
#ifdef HAVE_BTSTACK
|
2015-04-04 03:23:26 +00:00
|
|
|
#include "../input/drivers_hid/btstack_hid.c"
|
2015-11-16 03:17:13 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__APPLE__) && defined(HAVE_IOHIDMANAGER)
|
2015-04-20 09:52:10 +00:00
|
|
|
#include "../input/drivers_hid/iohidmanager_hid.c"
|
2015-04-02 15:49:32 +00:00
|
|
|
#endif
|
|
|
|
|
2015-08-30 07:48:38 +00:00
|
|
|
#ifdef HAVE_WIIUSB_HID
|
|
|
|
#include "../input/drivers_hid/wiiusb_hid.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-02 15:49:32 +00:00
|
|
|
#include "../input/connect/joypad_connection.c"
|
|
|
|
#include "../input/connect/connect_ps3.c"
|
|
|
|
#include "../input/connect/connect_ps4.c"
|
|
|
|
#include "../input/connect/connect_wii.c"
|
2015-12-12 17:30:17 +00:00
|
|
|
#include "../input/connect/connect_wiiupro.c"
|
2016-02-04 22:01:03 +00:00
|
|
|
#include "../input/connect/connect_snesusb.c"
|
|
|
|
#include "../input/connect/connect_nesusb.c"
|
|
|
|
#include "../input/connect/connect_wiiugca.c"
|
2016-04-17 00:33:17 +00:00
|
|
|
#include "../input/connect/connect_ps2adapter.c"
|
2017-06-17 21:19:09 +00:00
|
|
|
#include "../input/connect/connect_psxadapter.c"
|
2019-08-09 11:42:15 +00:00
|
|
|
#include "../input/connect/connect_retrode.c"
|
2020-09-04 11:50:10 +00:00
|
|
|
#include "../input/connect/connect_ps4_hori_mini.c"
|
2022-11-03 02:00:42 +00:00
|
|
|
#include "../input/connect/connect_kade.c"
|
|
|
|
#include "../input/connect/connect_zerodelay_dragonrise.c"
|
2016-02-04 22:01:03 +00:00
|
|
|
#endif
|
2015-04-02 15:49:32 +00:00
|
|
|
|
2014-10-27 13:58:51 +00:00
|
|
|
/*============================================================
|
|
|
|
KEYBOARD EVENT
|
|
|
|
============================================================ */
|
2014-10-27 18:25:59 +00:00
|
|
|
#ifdef HAVE_XKBCOMMON
|
2015-04-04 18:42:16 +00:00
|
|
|
#include "../input/drivers_keyboard/keyboard_event_xkb.c"
|
2014-10-27 18:25:59 +00:00
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
FIFO BUFFER
|
|
|
|
============================================================ */
|
2016-03-20 13:06:21 +00:00
|
|
|
#include "../libretro-common/queues/fifo_queue.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
2013-02-08 10:49:51 +00:00
|
|
|
AUDIO RESAMPLER
|
2012-04-13 23:02:37 +00:00
|
|
|
============================================================ */
|
2016-12-12 12:02:29 +00:00
|
|
|
#include "../libretro-common/audio/resampler/audio_resampler.c"
|
|
|
|
#include "../libretro-common/audio/resampler/drivers/sinc_resampler.c"
|
2020-06-30 19:45:05 +00:00
|
|
|
#ifdef HAVE_NEAREST_RESAMPLER
|
2016-12-12 12:02:29 +00:00
|
|
|
#include "../libretro-common/audio/resampler/drivers/nearest_resampler.c"
|
2020-06-30 19:45:05 +00:00
|
|
|
#endif
|
2016-12-12 11:48:04 +00:00
|
|
|
#ifdef HAVE_CC_RESAMPLER
|
2015-01-12 21:11:13 +00:00
|
|
|
#include "../audio/drivers_resampler/cc_resampler.c"
|
2016-12-12 11:48:04 +00:00
|
|
|
#endif
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2013-11-17 18:47:37 +00:00
|
|
|
/*============================================================
|
|
|
|
CAMERA
|
|
|
|
============================================================ */
|
2021-11-11 06:49:43 +00:00
|
|
|
#include "../camera/camera_driver.c"
|
2013-11-17 18:47:37 +00:00
|
|
|
#if defined(ANDROID)
|
2015-01-12 18:04:12 +00:00
|
|
|
#include "../camera/drivers/android.c"
|
2013-11-17 18:47:37 +00:00
|
|
|
#elif defined(EMSCRIPTEN)
|
2015-01-12 18:04:12 +00:00
|
|
|
#include "../camera/drivers/rwebcam.c"
|
2013-11-17 18:47:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_V4L2
|
2015-01-12 18:04:12 +00:00
|
|
|
#include "../camera/drivers/video4linux2.c"
|
2013-11-17 18:47:37 +00:00
|
|
|
#endif
|
|
|
|
|
2019-01-30 19:51:21 +00:00
|
|
|
#ifdef HAVE_VIDEOPROCESSOR
|
2016-07-28 18:01:38 +00:00
|
|
|
#include "../cores/libretro-video-processor/video_processor_v4l2.c"
|
|
|
|
#endif
|
|
|
|
|
2017-12-27 19:39:49 +00:00
|
|
|
/*============================================================
|
|
|
|
LEDS
|
|
|
|
============================================================ */
|
|
|
|
|
|
|
|
#include "../led/led_driver.c"
|
|
|
|
|
|
|
|
#if defined(HAVE_RPILED)
|
2018-01-11 00:52:32 +00:00
|
|
|
#include "../led/drivers/led_rpi.c"
|
2023-02-14 22:00:35 +00:00
|
|
|
#include "../led/drivers/led_sys_linux.c"
|
2017-12-27 19:39:49 +00:00
|
|
|
#endif
|
|
|
|
|
2020-09-21 20:01:26 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
|
|
|
#include "../led/drivers/led_win32_keyboard.c"
|
|
|
|
#endif
|
|
|
|
|
2013-12-19 00:51:51 +00:00
|
|
|
/*============================================================
|
|
|
|
LOCATION
|
|
|
|
============================================================ */
|
2013-12-19 02:37:26 +00:00
|
|
|
#if defined(ANDROID)
|
2015-01-12 18:05:33 +00:00
|
|
|
#include "../location/drivers/android.c"
|
2013-12-19 02:37:26 +00:00
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
RSOUND
|
|
|
|
============================================================ */
|
2012-05-22 15:26:23 +00:00
|
|
|
#ifdef HAVE_RSOUND
|
2013-10-31 23:07:52 +00:00
|
|
|
#include "../audio/librsound.c"
|
2015-01-12 21:28:59 +00:00
|
|
|
#include "../audio/drivers/rsound.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
AUDIO
|
|
|
|
============================================================ */
|
2021-10-11 16:01:37 +00:00
|
|
|
#include "../audio/audio_driver.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#ifdef HAVE_MICROPHONE
|
|
|
|
#include "../audio/microphone_driver.c"
|
|
|
|
#endif
|
2021-05-16 18:04:43 +00:00
|
|
|
#if defined(__PS3__) || defined (__PSL1GHT__)
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/ps3_audio.c"
|
2012-11-25 04:41:12 +00:00
|
|
|
#elif defined(XENON)
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/xenon360_audio.c"
|
2012-04-14 11:42:25 +00:00
|
|
|
#elif defined(GEKKO)
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/gx_audio.c"
|
2018-01-11 01:09:34 +00:00
|
|
|
#elif defined(__wiiu__)
|
|
|
|
#include "../audio/drivers/wiiu_audio.c"
|
2013-11-17 22:21:40 +00:00
|
|
|
#elif defined(EMSCRIPTEN)
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/rwebaudio.c"
|
2018-12-30 23:37:08 +00:00
|
|
|
#elif defined(PSP) || defined(VITA) || defined(ORBIS)
|
2015-08-12 10:18:45 +00:00
|
|
|
#include "../audio/drivers/psp_audio.c"
|
2018-09-18 06:08:06 +00:00
|
|
|
#elif defined(PS2)
|
2018-12-26 22:40:57 +00:00
|
|
|
#include "../audio/drivers/ps2_audio.c"
|
2015-04-01 21:14:13 +00:00
|
|
|
#elif defined(_3DS)
|
2015-10-27 00:06:34 +00:00
|
|
|
#include "../audio/drivers/ctr_csnd_audio.c"
|
|
|
|
#include "../audio/drivers/ctr_dsp_audio.c"
|
2020-12-08 23:48:45 +00:00
|
|
|
#ifdef HAVE_THREADS
|
2020-08-28 02:36:39 +00:00
|
|
|
#include "../audio/drivers/ctr_dsp_thread_audio.c"
|
2013-01-09 21:04:28 +00:00
|
|
|
#endif
|
2020-12-08 23:48:45 +00:00
|
|
|
#endif
|
2013-01-09 21:04:28 +00:00
|
|
|
|
2017-09-28 14:50:30 +00:00
|
|
|
#ifdef HAVE_XAUDIO
|
|
|
|
#include "../audio/drivers/xaudio.c"
|
|
|
|
#endif
|
|
|
|
|
2016-09-03 05:10:55 +00:00
|
|
|
#if defined(HAVE_SDL2)
|
|
|
|
#include "../audio/drivers/sdl_audio.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#ifdef HAVE_MICROPHONE
|
|
|
|
#include "../audio/drivers_microphone/sdl_microphone.c"
|
|
|
|
#endif
|
2016-09-03 05:10:55 +00:00
|
|
|
#endif
|
|
|
|
|
2013-01-09 21:04:28 +00:00
|
|
|
#ifdef HAVE_DSOUND
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/dsound.c"
|
2013-01-09 21:04:28 +00:00
|
|
|
#endif
|
2017-04-10 22:54:21 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_WASAPI
|
|
|
|
#include "../audio/drivers/wasapi.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#include "../audio/common/wasapi.c"
|
|
|
|
|
|
|
|
#ifdef HAVE_MICROPHONE
|
|
|
|
#include "../audio/drivers_microphone/wasapi.c"
|
|
|
|
#endif
|
2017-04-10 22:54:21 +00:00
|
|
|
#endif
|
2013-01-09 21:04:28 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SL
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/opensl.c"
|
2013-01-09 04:57:02 +00:00
|
|
|
#endif
|
|
|
|
|
2013-06-19 10:52:47 +00:00
|
|
|
#ifdef HAVE_ALSA
|
2013-06-21 16:56:39 +00:00
|
|
|
#ifdef __QNX__
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/alsa_qsa.c"
|
2013-06-21 16:56:39 +00:00
|
|
|
#else
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/alsa.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#include "../audio/common/alsa.c"
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/alsathread.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#include "../audio/common/alsathread.c"
|
|
|
|
|
|
|
|
#ifdef HAVE_MICROPHONE
|
|
|
|
#include "../audio/drivers_microphone/alsa.c"
|
|
|
|
#include "../audio/drivers_microphone/alsathread.c"
|
|
|
|
#endif
|
2013-06-19 10:52:47 +00:00
|
|
|
#endif
|
2013-06-21 16:56:39 +00:00
|
|
|
#endif
|
2013-06-19 10:52:47 +00:00
|
|
|
|
2017-06-24 01:44:00 +00:00
|
|
|
#ifdef HAVE_TINYALSA
|
|
|
|
#include "../audio/drivers/tinyalsa.c"
|
|
|
|
#endif
|
|
|
|
|
2019-05-22 18:07:56 +00:00
|
|
|
#ifdef HAVE_PULSE
|
|
|
|
#include "../audio/drivers/pulse.c"
|
|
|
|
#endif
|
|
|
|
|
2013-02-25 00:19:12 +00:00
|
|
|
#ifdef HAVE_AL
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/openal.c"
|
2013-02-25 00:19:12 +00:00
|
|
|
#endif
|
|
|
|
|
2013-03-18 05:17:00 +00:00
|
|
|
#ifdef HAVE_COREAUDIO
|
2015-01-12 04:05:56 +00:00
|
|
|
#include "../audio/drivers/coreaudio.c"
|
2013-03-18 05:17:00 +00:00
|
|
|
#endif
|
|
|
|
|
2019-07-26 02:00:49 +00:00
|
|
|
#if defined(HAVE_WASAPI) || ((_WIN32_WINNT >= 0x0602) && !defined(__WINRT__))
|
2019-07-25 03:42:23 +00:00
|
|
|
#include "../audio/common/mmdevice_common.c"
|
|
|
|
#endif
|
|
|
|
|
2018-06-17 22:37:51 +00:00
|
|
|
/*============================================================
|
|
|
|
MIDI
|
|
|
|
============================================================ */
|
|
|
|
#ifdef HAVE_WINMM
|
|
|
|
#include "../midi/drivers/winmm_midi.c"
|
|
|
|
#endif
|
|
|
|
|
2012-11-03 15:38:03 +00:00
|
|
|
/*============================================================
|
|
|
|
DRIVERS
|
|
|
|
============================================================ */
|
2021-06-07 15:39:18 +00:00
|
|
|
#ifdef HAVE_CRTSWITCHRES
|
|
|
|
#include "../gfx/video_crt_switch.c"
|
|
|
|
#endif
|
2020-02-16 14:51:58 +00:00
|
|
|
#include "../gfx/gfx_animation.c"
|
|
|
|
#include "../gfx/gfx_display.c"
|
2020-02-16 15:38:17 +00:00
|
|
|
#include "../gfx/gfx_thumbnail_path.c"
|
|
|
|
#include "../gfx/gfx_thumbnail.c"
|
2019-07-11 09:51:06 +00:00
|
|
|
#ifdef HAVE_AUDIOMIXER
|
2017-03-22 02:00:21 +00:00
|
|
|
#include "../libretro-common/audio/audio_mixer.c"
|
2019-07-11 09:51:06 +00:00
|
|
|
#endif
|
2012-11-03 15:38:03 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
SCALERS
|
|
|
|
============================================================ */
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/gfx/scaler/scaler_filter.c"
|
|
|
|
#include "../libretro-common/gfx/scaler/pixconv.c"
|
|
|
|
#include "../libretro-common/gfx/scaler/scaler.c"
|
|
|
|
#include "../libretro-common/gfx/scaler/scaler_int.c"
|
2012-11-03 15:38:03 +00:00
|
|
|
|
2014-04-16 00:09:09 +00:00
|
|
|
/*============================================================
|
|
|
|
FILTERS
|
|
|
|
============================================================ */
|
2014-04-16 01:33:10 +00:00
|
|
|
#ifdef HAVE_FILTERS_BUILTIN
|
2020-07-02 04:28:14 +00:00
|
|
|
#ifdef HAVE_VIDEO_FILTER
|
2014-10-29 06:51:23 +00:00
|
|
|
#include "../gfx/video_filters/2xsai.c"
|
|
|
|
#include "../gfx/video_filters/super2xsai.c"
|
|
|
|
#include "../gfx/video_filters/supereagle.c"
|
|
|
|
#include "../gfx/video_filters/2xbr.c"
|
|
|
|
#include "../gfx/video_filters/darken.c"
|
|
|
|
#include "../gfx/video_filters/epx.c"
|
|
|
|
#include "../gfx/video_filters/scale2x.c"
|
|
|
|
#include "../gfx/video_filters/blargg_ntsc_snes.c"
|
|
|
|
#include "../gfx/video_filters/lq2x.c"
|
|
|
|
#include "../gfx/video_filters/phosphor2x.c"
|
2018-11-02 14:30:26 +00:00
|
|
|
#include "../gfx/video_filters/normal2x.c"
|
2020-10-09 12:59:41 +00:00
|
|
|
#include "../gfx/video_filters/normal2x_width.c"
|
|
|
|
#include "../gfx/video_filters/normal2x_height.c"
|
2020-11-09 16:20:00 +00:00
|
|
|
#include "../gfx/video_filters/normal4x.c"
|
2019-06-14 14:14:45 +00:00
|
|
|
#include "../gfx/video_filters/scanline2x.c"
|
2020-09-24 15:09:21 +00:00
|
|
|
#include "../gfx/video_filters/grid2x.c"
|
2020-10-09 12:59:41 +00:00
|
|
|
#include "../gfx/video_filters/grid3x.c"
|
2020-09-24 15:09:21 +00:00
|
|
|
#include "../gfx/video_filters/gameboy3x.c"
|
|
|
|
#include "../gfx/video_filters/gameboy4x.c"
|
|
|
|
#include "../gfx/video_filters/dot_matrix_3x.c"
|
|
|
|
#include "../gfx/video_filters/dot_matrix_4x.c"
|
2020-11-20 15:22:09 +00:00
|
|
|
#include "../gfx/video_filters/upscale_1_5x.c"
|
2021-01-31 13:37:34 +00:00
|
|
|
#include "../gfx/video_filters/upscale_256x_320x240.c"
|
2021-09-15 18:20:56 +00:00
|
|
|
#include "../gfx/video_filters/picoscale_256x_320x240.c"
|
2022-02-10 11:40:00 +00:00
|
|
|
#include "../gfx/video_filters/upscale_240x160_320x240.c"
|
2022-05-17 19:42:38 +00:00
|
|
|
#include "../gfx/video_filters/upscale_mix_240x160_320x240.c"
|
2020-07-02 04:28:14 +00:00
|
|
|
#endif
|
2014-10-29 06:51:23 +00:00
|
|
|
|
2020-07-02 04:28:14 +00:00
|
|
|
#ifdef HAVE_DSP_FILTER
|
2017-01-09 11:30:11 +00:00
|
|
|
#include "../libretro-common/audio/dsp_filters/echo.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/eq.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/chorus.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/iir.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/panning.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/phaser.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/reverb.c"
|
|
|
|
#include "../libretro-common/audio/dsp_filters/wahwah.c"
|
2014-04-16 00:09:09 +00:00
|
|
|
#endif
|
2020-07-02 00:13:04 +00:00
|
|
|
#endif
|
2017-01-09 11:30:11 +00:00
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
DYNAMIC
|
|
|
|
============================================================ */
|
2015-05-08 07:49:49 +00:00
|
|
|
#include "../libretro-common/dynamic/dylib.c"
|
2020-07-02 04:28:14 +00:00
|
|
|
#ifdef HAVE_VIDEO_FILTER
|
2014-11-20 06:03:25 +00:00
|
|
|
#include "../gfx/video_filter.c"
|
2020-07-02 04:28:14 +00:00
|
|
|
#endif
|
2020-07-02 00:13:04 +00:00
|
|
|
#ifdef HAVE_DSP_FILTER
|
2017-01-09 11:22:29 +00:00
|
|
|
#include "../libretro-common/audio/dsp_filter.c"
|
2020-07-02 00:13:04 +00:00
|
|
|
#endif
|
2014-04-16 00:09:09 +00:00
|
|
|
|
2015-06-20 22:37:19 +00:00
|
|
|
/*============================================================
|
|
|
|
CORES
|
|
|
|
============================================================ */
|
|
|
|
#ifdef HAVE_FFMPEG
|
2015-10-19 14:55:08 +00:00
|
|
|
#include "../cores/libretro-ffmpeg/ffmpeg_core.c"
|
2015-06-20 22:37:19 +00:00
|
|
|
#endif
|
|
|
|
|
2018-06-20 02:50:58 +00:00
|
|
|
#if defined(HAVE_MPV)
|
|
|
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
|
|
|
#include "../cores/libretro-mpv/mpv-libretro.c"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2015-06-20 22:37:19 +00:00
|
|
|
#include "../cores/dynamic_dummy.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
FILE
|
|
|
|
============================================================ */
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/file/file_path.c"
|
2020-01-09 14:44:48 +00:00
|
|
|
#include "../libretro-common/file/file_path_io.c"
|
2015-03-13 04:03:50 +00:00
|
|
|
#include "../file_path_special.c"
|
2016-03-20 13:53:54 +00:00
|
|
|
#include "../libretro-common/lists/dir_list.c"
|
|
|
|
#include "../libretro-common/lists/string_list.c"
|
2021-08-06 14:32:51 +00:00
|
|
|
#include "../libretro-common/lists/nested_list.c"
|
2016-03-20 13:53:54 +00:00
|
|
|
#include "../libretro-common/lists/file_list.c"
|
2015-09-04 16:38:29 +00:00
|
|
|
#include "../libretro-common/file/retro_dirent.c"
|
2016-03-20 15:29:14 +00:00
|
|
|
#include "../libretro-common/streams/file_stream.c"
|
2017-07-27 07:09:19 +00:00
|
|
|
#include "../libretro-common/streams/file_stream_transforms.c"
|
2016-04-06 19:58:23 +00:00
|
|
|
#include "../libretro-common/streams/interface_stream.c"
|
|
|
|
#include "../libretro-common/streams/memory_stream.c"
|
2022-07-17 17:43:48 +00:00
|
|
|
#include "../libretro-common/streams/network_stream.c"
|
2019-04-27 13:01:01 +00:00
|
|
|
#ifndef __WINRT__
|
2017-12-11 19:51:46 +00:00
|
|
|
#include "../libretro-common/vfs/vfs_implementation.c"
|
2019-04-27 13:01:01 +00:00
|
|
|
#endif
|
2019-07-01 17:22:11 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CDROM
|
|
|
|
#include "../libretro-common/cdrom/cdrom.c"
|
2019-08-30 13:55:07 +00:00
|
|
|
#include "../libretro-common/vfs/vfs_implementation_cdrom.c"
|
2019-07-17 21:34:26 +00:00
|
|
|
#include "../libretro-common/media/media_detect_cd.c"
|
2019-07-01 17:22:11 +00:00
|
|
|
#endif
|
|
|
|
|
2015-03-13 14:43:52 +00:00
|
|
|
#include "../libretro-common/string/stdstring.c"
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/file/nbio/nbio_stdio.c"
|
2019-07-11 10:22:18 +00:00
|
|
|
#if defined(__linux__)
|
2017-11-25 04:51:33 +00:00
|
|
|
#include "../libretro-common/file/nbio/nbio_linux.c"
|
2019-07-11 10:22:18 +00:00
|
|
|
#endif
|
|
|
|
#if defined(HAVE_MMAP) && defined(BSD)
|
2017-11-25 04:51:33 +00:00
|
|
|
#include "../libretro-common/file/nbio/nbio_unixmmap.c"
|
2019-07-11 10:22:18 +00:00
|
|
|
#endif
|
2020-08-01 20:51:23 +00:00
|
|
|
#if defined(HAVE_MMAP_WIN32)
|
2017-11-25 04:51:33 +00:00
|
|
|
#include "../libretro-common/file/nbio/nbio_windowsmmap.c"
|
2019-07-11 10:22:18 +00:00
|
|
|
#endif
|
2017-11-25 04:35:55 +00:00
|
|
|
#include "../libretro-common/file/nbio/nbio_intf.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
MESSAGE
|
|
|
|
============================================================ */
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/queues/message_queue.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
2015-03-20 23:42:09 +00:00
|
|
|
CONFIGURATION
|
2012-04-13 23:02:37 +00:00
|
|
|
============================================================ */
|
2015-03-20 23:42:09 +00:00
|
|
|
#include "../configuration.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
2016-05-09 05:14:10 +00:00
|
|
|
STATE MANAGER
|
2012-04-13 23:02:37 +00:00
|
|
|
============================================================ */
|
2020-07-01 19:04:05 +00:00
|
|
|
#ifdef HAVE_REWIND
|
2020-10-15 03:29:20 +00:00
|
|
|
#include "../state_manager.c"
|
2020-07-01 19:04:05 +00:00
|
|
|
#endif
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2013-07-27 10:59:23 +00:00
|
|
|
/*============================================================
|
|
|
|
FRONTEND
|
|
|
|
============================================================ */
|
|
|
|
|
2015-01-12 20:21:08 +00:00
|
|
|
#include "../frontend/frontend_driver.c"
|
2013-07-26 18:58:47 +00:00
|
|
|
|
2018-05-12 17:14:49 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
2015-04-07 19:51:57 +00:00
|
|
|
#include "../frontend/drivers/platform_win32.c"
|
|
|
|
#endif
|
2017-10-03 02:36:43 +00:00
|
|
|
|
2019-01-03 12:55:43 +00:00
|
|
|
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
|
|
|
#include "../frontend/drivers/platform_uwp.c"
|
|
|
|
#endif
|
|
|
|
|
2017-10-03 02:36:43 +00:00
|
|
|
#ifdef _XBOX
|
|
|
|
#include "../frontend/drivers/platform_xdk.c"
|
|
|
|
#endif
|
|
|
|
|
2020-12-27 17:56:00 +00:00
|
|
|
#if defined(GEKKO)
|
2015-01-12 20:47:01 +00:00
|
|
|
#include "../frontend/drivers/platform_gx.c"
|
2013-11-03 16:39:12 +00:00
|
|
|
#ifdef HW_RVL
|
2015-01-12 20:47:01 +00:00
|
|
|
#include "../frontend/drivers/platform_wii.c"
|
2013-11-03 16:39:12 +00:00
|
|
|
#endif
|
2018-01-11 01:09:34 +00:00
|
|
|
#elif defined(__wiiu__)
|
|
|
|
#include "../frontend/drivers/platform_wiiu.c"
|
2018-09-18 06:08:06 +00:00
|
|
|
#elif defined(PS2)
|
|
|
|
#include "../frontend/drivers/platform_ps2.c"
|
2020-12-27 17:56:00 +00:00
|
|
|
#elif defined(__PS3__)
|
|
|
|
#include "../frontend/drivers/platform_ps3.c"
|
|
|
|
#elif defined(ORBIS)
|
|
|
|
#include "../frontend/drivers/platform_orbis.c"
|
|
|
|
#elif defined(PSP) || defined(VITA)
|
|
|
|
#include "../frontend/drivers/platform_psp.c"
|
2015-04-01 21:14:13 +00:00
|
|
|
#elif defined(_3DS)
|
|
|
|
#include "../frontend/drivers/platform_ctr.c"
|
2018-09-14 18:38:42 +00:00
|
|
|
#elif defined(SWITCH) && defined(HAVE_LIBNX)
|
|
|
|
#include "../frontend/drivers/platform_switch.c"
|
2015-09-04 18:45:02 +00:00
|
|
|
#elif defined(XENON)
|
|
|
|
#include "../frontend/drivers/platform_xenon.c"
|
2013-07-27 15:16:46 +00:00
|
|
|
#elif defined(__QNX__)
|
2015-01-12 20:47:01 +00:00
|
|
|
#include "../frontend/drivers/platform_qnx.c"
|
2017-06-19 15:38:49 +00:00
|
|
|
#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__))
|
|
|
|
#include "../frontend/drivers/platform_unix.c"
|
2017-01-24 05:55:55 +00:00
|
|
|
#elif defined(DJGPP)
|
|
|
|
#include "../frontend/drivers/platform_dos.c"
|
2013-07-27 10:59:23 +00:00
|
|
|
#endif
|
|
|
|
|
2020-10-01 14:54:11 +00:00
|
|
|
#if defined(DINGUX)
|
|
|
|
#include "../dingux/dingux_utils.c"
|
|
|
|
#endif
|
|
|
|
|
2014-08-02 12:04:43 +00:00
|
|
|
#include "../core_info.c"
|
2020-06-04 11:19:24 +00:00
|
|
|
#include "../core_backup.c"
|
2021-08-06 14:32:51 +00:00
|
|
|
#include "../core_option_manager.c"
|
2014-03-01 10:53:04 +00:00
|
|
|
|
2019-12-23 17:34:44 +00:00
|
|
|
#if defined(HAVE_NETWORKING)
|
|
|
|
#include "../core_updater_list.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 23:31:03 +00:00
|
|
|
/*============================================================
|
|
|
|
UI
|
|
|
|
============================================================ */
|
2018-05-12 17:14:49 +00:00
|
|
|
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
2015-11-19 06:26:24 +00:00
|
|
|
#include "../ui/drivers/ui_win32.c"
|
|
|
|
#endif
|
|
|
|
|
2015-04-16 18:23:06 +00:00
|
|
|
/*============================================================
|
|
|
|
GIT
|
|
|
|
============================================================ */
|
|
|
|
|
|
|
|
#ifdef HAVE_GIT_VERSION
|
2016-09-01 15:49:28 +00:00
|
|
|
#include "../version_git.c"
|
2015-04-16 18:23:06 +00:00
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
2012-04-22 00:06:34 +00:00
|
|
|
RETROARCH
|
2012-04-13 23:02:37 +00:00
|
|
|
============================================================ */
|
2013-03-18 04:46:19 +00:00
|
|
|
#include "../retroarch.c"
|
2021-11-22 02:27:23 +00:00
|
|
|
#include "../runloop.c"
|
2023-01-11 09:19:56 +00:00
|
|
|
#ifdef HAVE_RUNAHEAD
|
|
|
|
#include "../runahead.c"
|
|
|
|
#endif
|
2021-04-05 17:55:59 +00:00
|
|
|
#include "../command.c"
|
2021-11-21 22:19:23 +00:00
|
|
|
#include "../ui/ui_companion_driver.c"
|
2016-02-09 17:13:47 +00:00
|
|
|
#include "../libretro-common/queues/task_queue.c"
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2015-06-30 23:42:04 +00:00
|
|
|
#include "../msg_hash.c"
|
2016-06-07 04:28:33 +00:00
|
|
|
#include "../intl/msg_hash_us.c"
|
2015-06-20 22:37:19 +00:00
|
|
|
|
2020-06-17 11:56:44 +00:00
|
|
|
/*============================================================
|
|
|
|
BLUETOOTH
|
|
|
|
============================================================ */
|
|
|
|
#ifdef HAVE_BLUETOOTH
|
2021-11-21 19:44:08 +00:00
|
|
|
#include "../bluetooth/bluetooth_driver.c"
|
2020-06-17 11:56:44 +00:00
|
|
|
#include "../bluetooth/drivers/bluetoothctl.c"
|
2020-06-23 23:51:42 +00:00
|
|
|
#ifdef HAVE_DBUS
|
|
|
|
#include "../bluetooth/drivers/bluez.c"
|
|
|
|
#endif
|
2020-06-17 11:56:44 +00:00
|
|
|
#endif
|
|
|
|
|
2016-09-22 01:27:55 +00:00
|
|
|
/*============================================================
|
|
|
|
WIFI
|
|
|
|
============================================================ */
|
2021-11-21 11:37:39 +00:00
|
|
|
#ifdef HAVE_WIFI
|
|
|
|
#include "../network/wifi_driver.c"
|
|
|
|
|
2016-09-22 01:27:55 +00:00
|
|
|
#ifdef HAVE_LAKKA
|
2021-11-21 11:37:39 +00:00
|
|
|
#include "../network/drivers_wifi/connmanctl.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "../tasks/task_wifi.c"
|
|
|
|
|
2016-09-22 01:27:55 +00:00
|
|
|
#endif
|
|
|
|
|
2014-08-12 03:28:43 +00:00
|
|
|
/*============================================================
|
|
|
|
RECORDING
|
|
|
|
============================================================ */
|
2021-11-10 01:34:04 +00:00
|
|
|
#include "../record/record_driver.c"
|
2015-06-20 22:37:19 +00:00
|
|
|
#ifdef HAVE_FFMPEG
|
|
|
|
#include "../record/drivers/record_ffmpeg.c"
|
|
|
|
#endif
|
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
THREAD
|
|
|
|
============================================================ */
|
2018-08-14 09:45:20 +00:00
|
|
|
#if defined(HAVE_THREADS)
|
2017-12-26 22:45:09 +00:00
|
|
|
|
2018-08-14 09:45:20 +00:00
|
|
|
#if defined(XENON)
|
|
|
|
#include "../thread/xenon_sdl_threads.c"
|
2017-12-26 22:45:09 +00:00
|
|
|
#endif
|
|
|
|
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/rthreads/rthreads.c"
|
2013-12-31 21:10:58 +00:00
|
|
|
#include "../gfx/video_thread_wrapper.c"
|
2014-10-01 21:27:52 +00:00
|
|
|
#include "../audio/audio_thread_wrapper.c"
|
2012-04-14 12:08:00 +00:00
|
|
|
#endif
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2020-10-11 18:02:20 +00:00
|
|
|
/* needed for playlists, netplay lobbies and achievements */
|
|
|
|
#include "../libretro-common/formats/json/rjson.c"
|
2019-01-13 05:26:30 +00:00
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
NETPLAY
|
|
|
|
============================================================ */
|
2016-09-29 19:07:10 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
2022-05-19 02:23:40 +00:00
|
|
|
#include "../network/natt.c"
|
2021-09-18 04:14:34 +00:00
|
|
|
#include "../network/netplay/netplay_frontend.c"
|
2017-03-05 03:14:22 +00:00
|
|
|
#include "../network/netplay/netplay_room_parse.c"
|
2015-03-20 16:56:00 +00:00
|
|
|
#include "../libretro-common/net/net_compat.c"
|
2016-05-01 19:18:45 +00:00
|
|
|
#include "../libretro-common/net/net_socket.c"
|
2015-03-20 16:56:00 +00:00
|
|
|
#include "../libretro-common/net/net_http.c"
|
2022-08-01 05:51:02 +00:00
|
|
|
#ifdef HAVE_IFINFO
|
2016-03-02 23:26:26 +00:00
|
|
|
#include "../libretro-common/net/net_ifinfo.c"
|
|
|
|
#endif
|
2015-05-05 15:36:58 +00:00
|
|
|
#include "../tasks/task_http.c"
|
2016-12-03 03:54:14 +00:00
|
|
|
#include "../tasks/task_netplay_lan_scan.c"
|
2017-02-21 00:08:31 +00:00
|
|
|
#include "../tasks/task_netplay_nat_traversal.c"
|
2021-11-21 19:44:08 +00:00
|
|
|
#ifdef HAVE_BLUETOOTH
|
2020-06-17 11:56:44 +00:00
|
|
|
#include "../tasks/task_bluetooth.c"
|
2021-11-21 19:44:08 +00:00
|
|
|
#endif
|
2017-01-22 23:39:07 +00:00
|
|
|
#include "../tasks/task_netplay_find_content.c"
|
2020-02-16 18:49:02 +00:00
|
|
|
#include "../tasks/task_pl_thumbnail_download.c"
|
2012-04-14 12:08:00 +00:00
|
|
|
#endif
|
2012-04-13 23:02:37 +00:00
|
|
|
|
2015-05-05 15:58:37 +00:00
|
|
|
/*============================================================
|
|
|
|
DATA RUNLOOP
|
|
|
|
============================================================ */
|
2016-12-20 20:44:13 +00:00
|
|
|
#include "../tasks/task_powerstate.c"
|
2016-01-23 23:40:34 +00:00
|
|
|
#include "../tasks/task_content.c"
|
2021-05-19 13:53:38 +00:00
|
|
|
#ifdef HAVE_CDROM
|
|
|
|
#include "../tasks/task_content_disc.c"
|
|
|
|
#endif
|
2020-06-30 13:54:31 +00:00
|
|
|
#ifdef HAVE_PATCH
|
2020-01-20 03:31:32 +00:00
|
|
|
#include "../tasks/task_patch.c"
|
2023-11-30 11:29:46 +00:00
|
|
|
#ifdef HAVE_XDELTA
|
|
|
|
#define adler32(...) xdelta_adler32(__VA_ARGS__)
|
|
|
|
#include "../deps/xdelta3/xdelta3.c"
|
|
|
|
#undef adler32
|
|
|
|
#ifdef Q
|
|
|
|
#undef Q
|
|
|
|
#endif
|
|
|
|
#ifdef W
|
|
|
|
#undef W
|
|
|
|
#endif
|
|
|
|
#ifdef Z
|
|
|
|
#undef Z
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-06-30 13:54:31 +00:00
|
|
|
#endif
|
2023-12-28 19:10:46 +00:00
|
|
|
#include "../save.c"
|
2016-09-19 00:57:23 +00:00
|
|
|
#include "../tasks/task_save.c"
|
2023-01-25 06:15:32 +00:00
|
|
|
#include "../tasks/task_movie.c"
|
2016-05-10 07:33:11 +00:00
|
|
|
#include "../tasks/task_image.c"
|
2015-05-05 15:58:37 +00:00
|
|
|
#include "../tasks/task_file_transfer.c"
|
2019-07-02 08:47:02 +00:00
|
|
|
#include "../tasks/task_playlist_manager.c"
|
2019-11-29 17:13:35 +00:00
|
|
|
#include "../tasks/task_manual_content_scan.c"
|
2020-06-04 11:19:24 +00:00
|
|
|
#include "../tasks/task_core_backup.c"
|
2021-11-22 14:19:20 +00:00
|
|
|
#ifdef HAVE_TRANSLATE
|
|
|
|
#include "../tasks/task_translation.c"
|
|
|
|
#endif
|
2015-11-27 22:54:08 +00:00
|
|
|
#ifdef HAVE_ZLIB
|
|
|
|
#include "../tasks/task_decompress.c"
|
|
|
|
#endif
|
2015-05-05 16:05:59 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
#include "../tasks/task_database.c"
|
2015-09-16 20:39:47 +00:00
|
|
|
#include "../tasks/task_database_cue.c"
|
2015-05-05 16:05:59 +00:00
|
|
|
#endif
|
2019-05-15 09:02:55 +00:00
|
|
|
#if defined(HAVE_NETWORKING) && defined(HAVE_MENU)
|
2019-12-23 17:34:44 +00:00
|
|
|
#include "../tasks/task_core_updater.c"
|
2019-05-14 15:24:24 +00:00
|
|
|
#endif
|
2015-05-05 15:58:37 +00:00
|
|
|
|
2012-08-20 01:30:09 +00:00
|
|
|
/*============================================================
|
|
|
|
SCREENSHOTS
|
|
|
|
============================================================ */
|
2020-07-01 15:47:13 +00:00
|
|
|
#ifdef HAVE_SCREENSHOTS
|
2016-05-17 12:31:33 +00:00
|
|
|
#include "../tasks/task_screenshot.c"
|
2020-07-01 15:47:13 +00:00
|
|
|
#endif
|
2014-07-25 18:56:31 +00:00
|
|
|
|
|
|
|
/*============================================================
|
2014-08-15 15:24:28 +00:00
|
|
|
PLAYLISTS
|
2014-07-25 18:56:31 +00:00
|
|
|
============================================================ */
|
2014-08-15 15:24:28 +00:00
|
|
|
#include "../playlist.c"
|
2014-07-25 18:56:31 +00:00
|
|
|
|
2012-04-13 23:02:37 +00:00
|
|
|
/*============================================================
|
|
|
|
MENU
|
|
|
|
============================================================ */
|
2020-02-17 20:28:42 +00:00
|
|
|
#ifdef HAVE_GFX_WIDGETS
|
|
|
|
#include "../gfx/gfx_widgets.c"
|
2020-07-01 15:47:13 +00:00
|
|
|
#ifdef HAVE_SCREENSHOTS
|
2020-03-09 15:10:53 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_screenshot.c"
|
2020-07-01 15:47:13 +00:00
|
|
|
#endif
|
2020-03-11 10:44:45 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_volume.c"
|
2020-03-13 16:12:20 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_generic_message.c"
|
2020-03-17 16:16:21 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_libretro_message.c"
|
2020-06-30 16:13:53 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_progress_message.c"
|
2020-06-17 15:07:04 +00:00
|
|
|
#ifdef HAVE_CHEEVOS
|
|
|
|
#include "../gfx/widgets/gfx_widget_achievement_popup.c"
|
2020-09-24 15:25:56 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_leaderboard_display.c"
|
2020-06-17 15:07:04 +00:00
|
|
|
#endif
|
2020-07-09 12:03:55 +00:00
|
|
|
#include "../gfx/widgets/gfx_widget_load_content_animation.c"
|
2020-02-17 20:28:42 +00:00
|
|
|
#endif
|
|
|
|
|
2013-04-18 13:04:09 +00:00
|
|
|
#ifdef HAVE_MENU
|
2021-08-30 22:43:04 +00:00
|
|
|
#include "../menu/menu_driver.c"
|
2015-02-14 00:51:28 +00:00
|
|
|
#include "../menu/menu_setting.c"
|
2021-04-13 12:58:42 +00:00
|
|
|
#if defined(HAVE_MATERIALUI) || defined(HAVE_XMB) || defined(HAVE_OZONE)
|
|
|
|
#include "../menu/menu_screensaver.c"
|
|
|
|
#endif
|
2017-12-14 18:29:36 +00:00
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
#include "../menu/cbs/menu_cbs_ok.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_cancel.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_select.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_start.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_info.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_left.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_right.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_title.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_deferred_push.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_scan.c"
|
|
|
|
#include "../menu/cbs/menu_cbs_get_value.c"
|
2016-07-08 14:24:05 +00:00
|
|
|
#include "../menu/cbs/menu_cbs_label.c"
|
2016-10-20 13:57:35 +00:00
|
|
|
#include "../menu/cbs/menu_cbs_sublabel.c"
|
2015-05-11 09:11:23 +00:00
|
|
|
#include "../menu/menu_displaylist.c"
|
2022-02-22 18:23:48 +00:00
|
|
|
#include "../menu/menu_contentless_cores.c"
|
2020-07-28 10:15:05 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2020-07-27 16:53:13 +00:00
|
|
|
#include "../menu/menu_explore.c"
|
2021-10-27 15:51:22 +00:00
|
|
|
#include "../tasks/task_menu_explore.c"
|
2017-05-22 00:45:40 +00:00
|
|
|
#endif
|
2020-07-28 10:15:05 +00:00
|
|
|
#endif
|
2017-05-22 00:45:40 +00:00
|
|
|
|
2014-02-26 20:10:17 +00:00
|
|
|
#ifdef HAVE_RGUI
|
2015-01-26 09:54:13 +00:00
|
|
|
#include "../menu/drivers/rgui.c"
|
2014-02-26 20:10:17 +00:00
|
|
|
#endif
|
|
|
|
|
2014-10-09 03:14:41 +00:00
|
|
|
#ifdef HAVE_XMB
|
2015-01-26 09:54:13 +00:00
|
|
|
#include "../menu/drivers/xmb.c"
|
2014-02-26 20:10:17 +00:00
|
|
|
#endif
|
2019-04-22 21:54:58 +00:00
|
|
|
|
2018-09-18 13:13:33 +00:00
|
|
|
#ifdef HAVE_OZONE
|
2021-08-31 16:42:43 +00:00
|
|
|
#include "../menu/drivers/ozone.c"
|
2018-09-18 13:13:33 +00:00
|
|
|
#endif
|
2014-02-26 20:10:17 +00:00
|
|
|
|
2015-11-02 22:23:54 +00:00
|
|
|
#ifdef HAVE_MATERIALUI
|
2015-11-02 19:46:22 +00:00
|
|
|
#include "../menu/drivers/materialui.c"
|
2014-09-13 04:25:41 +00:00
|
|
|
#endif
|
|
|
|
|
2016-06-07 13:23:07 +00:00
|
|
|
#ifdef HAVE_NETWORKGAMEPAD
|
2016-05-26 17:43:15 +00:00
|
|
|
#include "../cores/libretro-net-retropad/net_retropad_core.c"
|
2017-09-08 03:30:42 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-02 01:04:10 +00:00
|
|
|
#if defined(HAVE_NETWORKING)
|
|
|
|
#include "../libretro-common/net/net_http_parse.c"
|
|
|
|
#endif
|
|
|
|
|
2012-11-19 04:43:57 +00:00
|
|
|
/*============================================================
|
2014-09-02 17:41:43 +00:00
|
|
|
DEPENDENCIES
|
2012-11-19 04:43:57 +00:00
|
|
|
============================================================ */
|
2017-09-18 10:27:11 +00:00
|
|
|
#ifdef HAVE_FLAC
|
|
|
|
#include "../deps/libFLAC/bitmath.c"
|
|
|
|
#include "../deps/libFLAC/bitreader.c"
|
|
|
|
#include "../deps/libFLAC/cpu.c"
|
|
|
|
#include "../deps/libFLAC/crc.c"
|
|
|
|
#include "../deps/libFLAC/fixed.c"
|
|
|
|
#include "../deps/libFLAC/float.c"
|
|
|
|
#include "../deps/libFLAC/format.c"
|
|
|
|
#include "../deps/libFLAC/lpc.c"
|
|
|
|
#include "../deps/libFLAC/lpc_intrin_avx2.c"
|
|
|
|
#include "../deps/libFLAC/lpc_intrin_sse2.c"
|
|
|
|
#include "../deps/libFLAC/lpc_intrin_sse41.c"
|
|
|
|
#include "../deps/libFLAC/lpc_intrin_sse.c"
|
|
|
|
#include "../deps/libFLAC/md5.c"
|
|
|
|
#include "../deps/libFLAC/memory.c"
|
|
|
|
#include "../deps/libFLAC/stream_decoder.c"
|
|
|
|
#endif
|
|
|
|
|
2019-02-02 20:21:58 +00:00
|
|
|
#ifdef HAVE_ZLIB
|
2019-07-26 16:22:49 +00:00
|
|
|
#ifndef HAVE_NO_BUILTINZLIB
|
2019-07-25 06:07:24 +00:00
|
|
|
#include "../deps/libz/adler32.c"
|
|
|
|
#include "../deps/libz/compress.c"
|
|
|
|
#include "../deps/libz/libz-crc32.c"
|
|
|
|
#include "../deps/libz/deflate.c"
|
|
|
|
#include "../deps/libz/gzclose.c"
|
|
|
|
#include "../deps/libz/gzlib.c"
|
|
|
|
#include "../deps/libz/gzread.c"
|
|
|
|
#include "../deps/libz/gzwrite.c"
|
|
|
|
#include "../deps/libz/inffast.c"
|
|
|
|
#include "../deps/libz/inflate.c"
|
|
|
|
#include "../deps/libz/inftrees.c"
|
|
|
|
#include "../deps/libz/trees.c"
|
|
|
|
#include "../deps/libz/uncompr.c"
|
|
|
|
#include "../deps/libz/zutil.c"
|
2019-07-26 16:22:49 +00:00
|
|
|
#endif
|
2019-02-02 20:21:58 +00:00
|
|
|
|
2017-09-18 10:27:11 +00:00
|
|
|
#ifdef HAVE_CHD
|
2019-02-02 23:27:34 +00:00
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_zlib.c"
|
2018-04-22 10:10:15 +00:00
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_bitstream.c"
|
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_cdrom.c"
|
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_chd.c"
|
2018-04-22 18:19:07 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_FLAC
|
2018-04-22 10:10:15 +00:00
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_flac.c"
|
2018-04-22 18:19:07 +00:00
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_flac_codec.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_7ZIP
|
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_lzma.c"
|
|
|
|
#endif
|
|
|
|
|
2018-04-22 10:10:15 +00:00
|
|
|
#include "../libretro-common/formats/libchdr/libchdr_huffman.c"
|
2017-09-18 10:27:11 +00:00
|
|
|
|
|
|
|
#include "../libretro-common/streams/chd_stream.c"
|
|
|
|
#endif
|
2019-02-02 20:21:58 +00:00
|
|
|
#endif
|
2017-09-18 10:27:11 +00:00
|
|
|
|
2014-09-02 17:41:43 +00:00
|
|
|
#ifdef HAVE_7ZIP
|
2021-04-27 15:24:28 +00:00
|
|
|
#include "../deps/7zip/7zArcIn.c"
|
|
|
|
#include "../deps/7zip/7zBuf.c"
|
|
|
|
#include "../deps/7zip/7zCrc.c"
|
|
|
|
#include "../deps/7zip/7zCrcOpt.c"
|
|
|
|
#include "../deps/7zip/7zDec.c"
|
|
|
|
#include "../deps/7zip/CpuArch.c"
|
|
|
|
#include "../deps/7zip/Delta.c"
|
|
|
|
#include "../deps/7zip/LzFind.c"
|
2014-09-02 19:45:14 +00:00
|
|
|
#include "../deps/7zip/LzmaDec.c"
|
2021-04-27 15:24:28 +00:00
|
|
|
#include "../deps/7zip/Lzma2Dec.c"
|
2017-09-21 17:37:40 +00:00
|
|
|
#include "../deps/7zip/LzmaEnc.c"
|
2014-09-02 19:45:14 +00:00
|
|
|
#include "../deps/7zip/Bra.c"
|
2021-04-27 15:24:28 +00:00
|
|
|
#include "../deps/7zip/Bra86.c"
|
|
|
|
#include "../deps/7zip/BraIA64.c"
|
2014-09-02 19:45:14 +00:00
|
|
|
#include "../deps/7zip/Bcj2.c"
|
2021-04-27 15:24:28 +00:00
|
|
|
#include "../deps/7zip/7zFile.c"
|
|
|
|
#include "../deps/7zip/7zStream.c"
|
2014-09-02 17:41:43 +00:00
|
|
|
#endif
|
|
|
|
|
2019-05-29 08:23:21 +00:00
|
|
|
#ifdef WANT_LIBFAT
|
|
|
|
#include "../deps/libfat/cache.c"
|
|
|
|
#include "../deps/libfat/directory.c"
|
|
|
|
#include "../deps/libfat/disc.c"
|
|
|
|
#include "../deps/libfat/fatdir.c"
|
|
|
|
#include "../deps/libfat/fatfile.c"
|
|
|
|
#include "../deps/libfat/file_allocation_table.c"
|
|
|
|
#include "../deps/libfat/filetime.c"
|
|
|
|
#include "../deps/libfat/libfat.c"
|
|
|
|
#include "../deps/libfat/lock.c"
|
|
|
|
#include "../deps/libfat/partition.c"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WANT_IOSUHAX
|
2021-07-18 11:34:08 +00:00
|
|
|
#include "../deps/libiosuhax/source/iosuhax.c"
|
|
|
|
#include "../deps/libiosuhax/source/iosuhax_devoptab.c"
|
|
|
|
#include "../deps/libiosuhax/source/iosuhax_disc_interface.c"
|
2019-05-29 08:23:21 +00:00
|
|
|
#endif
|
|
|
|
|
2012-11-20 03:15:12 +00:00
|
|
|
/*============================================================
|
2013-01-02 14:23:22 +00:00
|
|
|
XML
|
|
|
|
============================================================ */
|
2015-02-18 23:04:03 +00:00
|
|
|
#include "../libretro-common/formats/xml/rxml.c"
|
2019-12-04 12:43:51 +00:00
|
|
|
#include "../libretro-common/formats/logiqx_dat/logiqx_dat.c"
|
2019-11-16 00:04:58 +00:00
|
|
|
#include "../deps/yxml/yxml.c"
|
2014-12-15 20:34:22 +00:00
|
|
|
|
2014-05-22 20:00:59 +00:00
|
|
|
/*============================================================
|
|
|
|
AUDIO UTILS
|
|
|
|
============================================================ */
|
2016-12-12 12:35:17 +00:00
|
|
|
#include "../libretro-common/audio/conversion/s16_to_float.c"
|
|
|
|
#include "../libretro-common/audio/conversion/float_to_s16.c"
|
Add microphone support via a new driver (#14731)
* Some slight fixes
* Update libretro.h
* Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
* Finish proof-of-concept for mic support
- It works, but doesn't support floating-point audio yet
- It may need to be resampled, too
* Add macros that aren't available in SDL 2
* Comment out a variable definition for now
- For C89 compliance
* Add some comments for clarity
* Let ALSA tolerate a null new_rate
* Partial ALSA microphone support
- Not yet tested
- Mic is created and destroyed
- Mic can also be paused or unpaused
- Mic is paused or unpaused with the rest of the driver
- Microphone is not yet read
* Install error logging in the ALSA driver
- It defers to RARCH_ERR
* Free the ALSA microphone in alsa_free
* Fix an indent
* First draft of alsa_read_microphone
* Deinitialize SDL Audio in sdl_audio_free
* Save and restore the ALSA error logger
- You should always practice safe global state
* Add newlines to some RARCH_ERRs
* Add some logging
* Check for the mic being active via settings instead of via flags
* Adjusted a log entry to be less misleading
- A frequency of 0Hz looks weird to the uninformed
- In reality, it means the driver used the requested frequency
* Fix an incorrect format string
* Tidy up logging in alsa.c
* Rename audio_enable_microphone to audio_enable_input
* Rename microphone_device to audio_input_device
* Add audio_input_latency and audio_input_block_frames settings
* Add all mic-related settings to the options menu
* Adjust logging for alsa.c
- Log the ALSA library version
- Add errno details
* Refer to the microphone in logs by name
* Use %u instead of %d for some log items
* Add input_samples_buf
* Remove an inaccurate comment
* Change type of input_samples_buf
* Clean up audio_driver_flush_microphone_input
* Comment convert_float_to_s16
- It helped me understand what it's doing
- Turns out it'll work just fine on mono audio
* Don't use the resampler for mic input
* Fix crash in the ALSA driver when reading from a mic
* Update some logging messages
* ALSA support now works for mics
* Reuse some common functions in alsa.c
* Add alsa_thread_microphone_t
* Refactor alsa.c
- Introduce alsa_init_pcm to init any PCM that we're using
- Vastly simplifies the implementation of alsa_init and alsa_init_microphone
- Will be used for the read-based versions next
* Make ALSA logging a little more consistent
* Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
* Remove an unused function
* Move some cleanup in alsa.c to a common function
* First crack at mic support for alsathread
- Refactor some duplicate code into functions
- Use functions introduced in alsa.c
- Create and destroy the mic
* Slight cleanups for clarity
* Implement alsa_thread_set/get_microphone_state
* More work on alsathread
- No more crashing, but the mic just returns silence
* Slight cleanups for clarity
* Add alsa_set_mic_enabled_internal
- For setting the state of a microphone while considering its current state
* Use alsa_set_mic_enabled_internal
* Log a little more info
* Log when the audio driver is started/stopped
* Move base microphone driver code into a new directory
- Add microphone_driver.c to Makefile.common
- Rename functions as needed
* Initialize and deinitialize the microphone driver
* Implement sdl_microphone.c
* Un-const an argument
- In case the driver context needs to do any locking
* Revise comments for microphone_driver.h
* Remove an unimplemented function
* Remove some functions from the mic driver
* Remove mic functions from audio_thread_wrapper
* Remove mic functions from sdl_audio
* Fix microphone_null
* Split the mic code for the alsa audio drivers into microphone drivers
* Fix an extra struct member
* Add a setting for the mic driver
* Add a command to reinitialize the microphone driver
* Rename mic-related settings
* Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
* Rename audio_enable_input to microphone_enable
* Remove some labels from qt_options
* Search for microphone_driver within find_driver_nonempty
* Clean up some mic driver code
* Pending mics now return silence
* Adjust some logging and comments
* Some cleanup in the microphone driver
* Invert a flag check
- Oops
* Fix a log message
* Fix the wrong flags being checked
* Slight refactor of wasapi_init_device
- Add a data_flow parameter
- Declare it in a header
- In preparation for WASAPI mic support
* Add some WASAPI macros for _IAudioCaptureClient
* Move some common WASAPI functions to audio/common/wasapi.c
- They'll be used by the mic and the audio drivers
* Add wasapi_log_hr
* Generalize mmdevice_list_new to look for capture devices, too
* Fix a function declaration
* Move driver-specific device_list_new functions into their respective files
* Clean up some declarations
* First draft of wasapi microphone driver
* Add wasapi_microphone_device_list_free
* Change function parameter names to be consistent with microphone_driver
* Partially implement wasapi_microphone_read
- Mostly copied from the audio driver so far
- It doesn't compile yet
- But it'll be beautiful when I'm done with it
* Refactor the mic driver's functions
- Rename get_mic_active to mic_alive
- Split set_mic_active into start_mic and stop_mic
- Refactor the SDL mic driver accordingly
* Edit some WASAPI functions for logging and clarity
* Implement more of the WASAPI mic driver
* Rename write_event to read_event
* Pass the WASAPI driver context to the various read functions
* Mostly implement the read function for the WASAPI mic driver
* Fix a crash in microphone_driver
- Forgot to move the position of the name of null_driver
* Reduce some logging in wasapi common functions
- Only log the chosen audio client format, not all attempted ones
* Add some macro wrappers for IAudioClient methods
* Update mic driver configuration
- Make the mic driver configurable in the menu
- Add config items for WASAPI-related options similar to the audio driver
* Fix a menu entry scrolling through audio devices instead of mic devices
* Add some utility functions
* Expose the new utility functions in wasapi.h
* Add extra logging in the WASAPI common functions
* Add sharemode_name
* Use _IAudioClient_Initialize macro in some places
* Pass channels to wasapi_init_client
- Remember, mics are in mono
* Use _IAudioClient_Initialize macro some more
* Forgot to pass channels in some places
* Add some utility functions
* Forgot an #include
* Add wasapi_select_device_format
* Simplify the format selection logic in wasapi_init_client_sh
* Unset the microphone in wasapi_microphone_close_mic
- Ought to prevent a potential segfault
* Simplify some logging
* Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
* Remove some unneeded logging
* Add some values to hresult_name
* Polish up wasapi_select_device_format
- Test for formats manually when Windows can't
- Add some debug logging
- Check for channels
* Compute the fields of WAVEFORMATEXTENSIBLE correctly
- As per the doc's stated requirements
* Simplify logic for WASAPI client creation
* Fix a potential hang in wasapi_microphone_read_shared_buffered
* Stop the microphone if the driver is stopped
* Don't name the microphone event
* Ensure that wasapi_init_client reports the correct format and rate
* Implement exclusive microphone read access for WASAPI
* Add _IAudioCaptureClient_GetNextPacketSize macro
* Organize cases in hresult_name
* Clear some extra fields if wasapi_set_format is setting a Pcm format
* Adjust some logs
* Adjust some logs
* Remove unneeded local vars
* Add a log
* Update wasapi.c
* Update wasapi.c
* Fix shared-mode mic support in WASAPI producing broken input
- Turns out it had nothing to do with shared mode
* Reuse a common function
- Remove wasapi_microphone_read_shared_buffered
- Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered
* Remove some code I was using for test purposes
* Clarify some language
* Double the default shared-mode mic buffer length
* Split getting a device's name into a separate function, then use it
* Fix the ALSA mic drivers
- To comply with changes I previously made to the mic driver interface
* Remove unused synchronization primitives from the SDL microphone driver
* Add sdl_microphone_mic_use_float
* Document audio_driver_state_flags
- I needed to understand these to see if similar flags were required for the mic driver
* Remove an unused function in wasapi.c
* Add and document flags in microphone_driver.h
* Remove driver-specific mic start/stop functions
- The mic driver itself doesn't do much processing
- That honor goes to individual mics
* Remove some unused fields in microphone_driver.h
* Add CMD_EVENT_MICROPHONE_STOP/START
* Remove unused functions from microphone_null
* Change how the mic driver state is referenced in some places
* Simplify the SDL microphone driver
- The driver backend no longer keeps a reference to the mic (the frontend does that)
- Remove functions that are no longer needed
- Don't track paused state, just query the mic itself
* Simplify the WASAPI microphone driver
- Don't track the driver running state or the microphone handle, the frontend does that now
- Remove support for unbuffered input (hunterk suggested that it wasn't necessary)
* Make microphone_wasapi_sh_buffer_length a uint, not an int
- It won't be negative anymore
- 0 now represents the default value
* Make the microphone frontend more robust
- Improve documentation for how various functions should be implemented
- Closes all microphones before freeing the driver (so backends don't have to)
- Tracks the enabled state of each microphone, so backends don't have to (but they still can)
* Stop the mic driver in core_unload_game
* Ensure mic support is compatible with the revised menu code
* Move alsa.h into audio/common
* Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
- It was never really needed
* Refactor the ALSA microphone driver
- Move common ALSA functions to audio/common/alsa.c
- Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm
- Don't track the microphone handle in the ALSA driver context
- Remove unneeded fields
* Move some common alsathread code into audio/common/alsathread.c
* Change return type of mic_driver_open_mic_internal to bool
* First crack at resampling mic input
* Remove an extraneous check
- I think something distracted me when I was writing this line
* Add stereo/mono conversion functions
* Make alsa_start_pcm and alsa_stop_pcm more robust
- They now return success if the stream is already running and stopped, respectively
* Revise some mic-related comments in libretro.h
* First crack at resampling mic input
* Simplify an expression
* Simplify an expression
* Fix a log tag
* Allow mic resampler to be configured separately from audio resampler
* Add some comments
* Set the source ratio to something sensible
* Stop deadlock in `alsathread` mic driver
* Allow mics to be initialized even when core is loaded from CLI
- When loading content from CLI, the drivers are initialized a little differently
- That threw off the mic initialization code
* Rename the functions in retro_microphone_interface
* Revise some mic-related comments in libretro.h
* Update retro_microphone_interface
- Add get_mic_rate
- Add a parameter to open_mic
- The modifications don't do anything yet
* Use parameter objects in the microphone handle
* Replace get_mic_rate with get_params
* Add a microphone interface version
* Remove part of a comment
* Set the effective params in mic_driver_microphone_handle_init
* Drop a stray newline
* Change where the mic interface is zeroed
- I was accidentally throwing out the version that the core was asking for
* Reduce logspam for wasapi_set_nonblock_state
- Now it only logs when the sync mode is changed
* Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
- -16 is no longer a valid value
* Set the new_rate in wasapi_init
* Change description of microphone sample rate in the settings
* First attempt at resampling configured mic input
* Forgot a section
* Fix some input samples being skipped
* Rename a variable for clarity
* Add microphone.outgoing_samples
* Update the mic driver
- Processed samples are now buffered
- The resampler is skipped if the ratio is (very close to) 1
* Remove part of a comment
* Update some comments in audio_resampler.h
* Slightly refactor the SDL microphone driver
- Move SDL_AudioSpec to a field of sdl_microphone_handle_t
- Allow SDL to change the requested format and sample rate
- Request floating-point input
- Implement sdl_microphone_mic_use_float
* Fix a non-C89-compliant declaration
* Add new files to griffin.c
* Remove a C++-style comment
* Add two more files to griffin.c
* Remove some unneeded declarations in microphone_driver.h
* Remove a stray comma in configuration.c
- For C89 compliance
* Fix compilation on some platforms
* Change some function signatures
* Make the ALSA drivers always set the audio rate
* Fix the alsathread mic driver
* Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined
* Mute the microphone if the core is running in fast-forward, slow-mo, or rewind
* Clarify a comment
* Clarify a comment
* Add a comment
* Don't allocate memory for slowmo samples in the mic driver
- We're not supporting slowmo for mics, so it's not needed
* Fix a {
* Add my name to AUTHORS.h
* Add driver_lifetime_flags
- For drivers that have special setup/teardown needs
* Ensure that resetting the mic driver maintains active mic handles
- Prevents fullscreen toggle from stopping all mic input
* Update CHANGES.md
* Move some default microphone settings to a new part of the config file
* Ensure that RetroArch can use the audio format that Windows suggests
* Remove references to mic support in the SDL audio driver
* Remove unused WASAPI functions
* Return failure if RetroArch couldn't select a WASAPI format
* Ensure that Windows uses the WASAPI mic driver by default
* Treat disabled mic support as a warning, not an error
* Clarify some WASAPI-related microphone settings
* Remove some unused variables
* Add or revise microphone-related comments
* Rearrange doc comments for microphone types in libretro.h
* Remove a space
* Remove some unused flags
* Remove ALSA error logger
- It was never used anyway
* Remove unneeded microphone-related arguments
* Document a parameter
* Remove a logging call
* Add a constant for the microphone's shared buffer length for WASAPI
* Fix stylistic inconsistencies
* Make mic_driver_get_sample_size a macro instead of a function
* Move the microphone implementation to the audio directory
* Make microphone support optional (but enabled by default)
* Fix the griffin build
2023-06-06 19:55:06 +00:00
|
|
|
#include "../libretro-common/audio/conversion/stereo_to_mono_float.c"
|
|
|
|
#include "../libretro-common/audio/conversion/mono_to_stereo_float.c"
|
2019-07-11 09:51:06 +00:00
|
|
|
#ifdef HAVE_AUDIOMIXER
|
2017-01-23 23:29:40 +00:00
|
|
|
#include "../libretro-common/audio/audio_mix.c"
|
2019-07-11 09:51:06 +00:00
|
|
|
#endif
|
2012-11-20 03:15:12 +00:00
|
|
|
|
2014-12-30 20:12:43 +00:00
|
|
|
/*============================================================
|
2015-01-19 21:47:09 +00:00
|
|
|
LIBRETRODB
|
2014-12-30 20:12:43 +00:00
|
|
|
============================================================ */
|
2015-01-22 02:58:04 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2015-02-18 23:47:19 +00:00
|
|
|
#include "../libretro-db/bintree.c"
|
|
|
|
#include "../libretro-db/libretrodb.c"
|
|
|
|
#include "../libretro-db/rmsgpack.c"
|
|
|
|
#include "../libretro-db/rmsgpack_dom.c"
|
|
|
|
#include "../libretro-db/query.c"
|
2015-01-27 17:09:19 +00:00
|
|
|
#include "../database_info.c"
|
2015-01-22 02:58:04 +00:00
|
|
|
#endif
|
2014-12-30 20:12:43 +00:00
|
|
|
|
2016-07-31 21:45:01 +00:00
|
|
|
/*============================================================
|
|
|
|
HTTP SERVER
|
|
|
|
============================================================ */
|
2018-05-29 08:30:56 +00:00
|
|
|
#if defined(HAVE_DISCORD)
|
2021-11-05 13:00:37 +00:00
|
|
|
#include "../network/discord.c"
|
2019-08-20 19:03:16 +00:00
|
|
|
#if defined(_WIN32)
|
|
|
|
#include "../deps/discord-rpc/src/discord_register_win.c"
|
|
|
|
#endif
|
|
|
|
#if defined(__linux__)
|
|
|
|
#include "../deps/discord-rpc/src/discord_register_linux.c"
|
|
|
|
#endif
|
2018-05-29 08:30:56 +00:00
|
|
|
#endif
|
2018-08-04 17:51:37 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
SSL
|
|
|
|
============================================================ */
|
|
|
|
#if defined(HAVE_SSL)
|
2018-09-25 22:16:37 +00:00
|
|
|
#if defined(HAVE_NETWORKING)
|
2018-12-14 21:56:58 +00:00
|
|
|
#if defined(HAVE_BUILTINMBEDTLS)
|
2018-08-04 17:51:37 +00:00
|
|
|
#include "../deps/mbedtls/aes.c"
|
|
|
|
#include "../deps/mbedtls/aesni.c"
|
|
|
|
#include "../deps/mbedtls/arc4.c"
|
|
|
|
#include "../deps/mbedtls/asn1parse.c"
|
|
|
|
#include "../deps/mbedtls/asn1write.c"
|
|
|
|
#include "../deps/mbedtls/base64.c"
|
|
|
|
#include "../deps/mbedtls/bignum.c"
|
|
|
|
#include "../deps/mbedtls/blowfish.c"
|
|
|
|
#include "../deps/mbedtls/camellia.c"
|
|
|
|
#include "../deps/mbedtls/ccm.c"
|
|
|
|
#include "../deps/mbedtls/cipher.c"
|
|
|
|
#include "../deps/mbedtls/cipher_wrap.c"
|
|
|
|
#include "../deps/mbedtls/ctr_drbg.c"
|
|
|
|
#include "../deps/mbedtls/des.c"
|
|
|
|
#include "../deps/mbedtls/dhm.c"
|
|
|
|
#include "../deps/mbedtls/ecdh.c"
|
|
|
|
#include "../deps/mbedtls/ecdsa.c"
|
|
|
|
#include "../deps/mbedtls/ecp.c"
|
|
|
|
#include "../deps/mbedtls/ecp_curves.c"
|
|
|
|
#include "../deps/mbedtls/entropy.c"
|
|
|
|
#include "../deps/mbedtls/entropy_poll.c"
|
|
|
|
#include "../deps/mbedtls/gcm.c"
|
|
|
|
#include "../deps/mbedtls/hmac_drbg.c"
|
|
|
|
#include "../deps/mbedtls/md.c"
|
|
|
|
#include "../deps/mbedtls/md5.c"
|
|
|
|
#include "../deps/mbedtls/md_wrap.c"
|
|
|
|
#include "../deps/mbedtls/oid.c"
|
|
|
|
#include "../deps/mbedtls/padlock.c"
|
|
|
|
#include "../deps/mbedtls/pem.c"
|
|
|
|
#include "../deps/mbedtls/pk.c"
|
|
|
|
#include "../deps/mbedtls/pk_wrap.c"
|
|
|
|
#include "../deps/mbedtls/pkcs12.c"
|
|
|
|
#include "../deps/mbedtls/pkcs5.c"
|
|
|
|
#include "../deps/mbedtls/pkparse.c"
|
|
|
|
#include "../deps/mbedtls/pkwrite.c"
|
|
|
|
#include "../deps/mbedtls/ripemd160.c"
|
|
|
|
#include "../deps/mbedtls/rsa.c"
|
|
|
|
#include "../deps/mbedtls/sha1.c"
|
|
|
|
#include "../deps/mbedtls/sha256.c"
|
|
|
|
#include "../deps/mbedtls/sha512.c"
|
|
|
|
#include "../deps/mbedtls/threading.c"
|
|
|
|
#include "../deps/mbedtls/timing.c"
|
|
|
|
#include "../deps/mbedtls/xtea.c"
|
|
|
|
|
|
|
|
#include "../deps/mbedtls/certs.c"
|
|
|
|
#include "../deps/mbedtls/x509.c"
|
|
|
|
#include "../deps/mbedtls/x509_create.c"
|
|
|
|
#include "../deps/mbedtls/x509_crl.c"
|
|
|
|
#include "../deps/mbedtls/x509_crt.c"
|
|
|
|
#include "../deps/mbedtls/x509_csr.c"
|
|
|
|
#include "../deps/mbedtls/x509write_crt.c"
|
|
|
|
#include "../deps/mbedtls/x509write_csr.c"
|
|
|
|
|
|
|
|
#include "../deps/mbedtls/debug.c"
|
|
|
|
#include "../deps/mbedtls/net_sockets.c"
|
|
|
|
#include "../deps/mbedtls/ssl_cache.c"
|
|
|
|
#include "../deps/mbedtls/ssl_ciphersuites.c"
|
|
|
|
#include "../deps/mbedtls/ssl_cli.c"
|
|
|
|
#include "../deps/mbedtls/ssl_cookie.c"
|
|
|
|
#include "../deps/mbedtls/ssl_srv.c"
|
|
|
|
#include "../deps/mbedtls/ssl_ticket.c"
|
|
|
|
#include "../deps/mbedtls/ssl_tls.c"
|
2018-09-01 02:20:23 +00:00
|
|
|
|
2020-09-19 13:08:33 +00:00
|
|
|
#include "../libretro-common/net/net_socket_ssl_mbed.c"
|
2018-08-04 17:51:37 +00:00
|
|
|
#endif
|
2018-09-25 22:16:37 +00:00
|
|
|
#endif
|
2018-12-14 21:56:58 +00:00
|
|
|
#endif
|
2019-01-05 23:33:29 +00:00
|
|
|
|
2019-07-28 09:55:46 +00:00
|
|
|
/*============================================================
|
|
|
|
PLAYLIST NAME SANITIZATION
|
|
|
|
============================================================ */
|
2019-07-28 11:41:20 +00:00
|
|
|
#include "../libretro-common/playlists/label_sanitization.c"
|
2019-11-29 17:13:35 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
MANUAL CONTENT SCAN
|
|
|
|
============================================================ */
|
|
|
|
#include "../manual_content_scan.c"
|
2020-01-22 17:07:50 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
DISK CONTROL INTERFACE
|
|
|
|
============================================================ */
|
|
|
|
#include "../disk_control_interface.c"
|
2020-03-20 14:26:08 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
MISC FILE FORMATS
|
|
|
|
============================================================ */
|
|
|
|
#include "../libretro-common/formats/m3u/m3u_file.c"
|
2020-06-04 11:19:24 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
TIME
|
|
|
|
============================================================ */
|
|
|
|
#include "../libretro-common/time/rtime.c"
|
2020-08-28 15:27:48 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
ANDROID PLAY FEATURE DELIVERY
|
|
|
|
============================================================ */
|
|
|
|
#if defined(ANDROID)
|
|
|
|
#include "../play_feature_delivery/play_feature_delivery.c"
|
|
|
|
#endif
|
2023-02-25 16:51:16 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
STEAM INTEGRATION USING MIST
|
|
|
|
============================================================ */
|
|
|
|
#ifdef HAVE_MIST
|
|
|
|
#include "../steam/steam.c"
|
|
|
|
#include "../tasks/task_steam.c"
|
2023-03-06 18:57:08 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_PRESENCE
|
2023-02-25 16:51:16 +00:00
|
|
|
#include "../network/presence.c"
|
|
|
|
#endif
|
2023-08-04 07:20:50 +00:00
|
|
|
|
|
|
|
/*============================================================
|
|
|
|
CLOUD SYNC
|
|
|
|
============================================================ */
|
|
|
|
#ifdef HAVE_CLOUDSYNC
|
|
|
|
#include "../tasks/task_cloudsync.c"
|
|
|
|
#include "../network/cloud_sync_driver.c"
|
|
|
|
#include "../network/cloud_sync/webdav.c"
|
|
|
|
#endif
|