From 479a2170c5789035bd655facc6b9dac9d7760f04 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Tue, 21 May 2019 14:04:10 -0400 Subject: [PATCH 001/275] changes: Remove period marks on list items This change removes all the period marks at the end of list items in CHANGES.md, to make it more ascetically pleasing to read. --- CHANGES.md | 1024 ++++++++++++++++++++++++++-------------------------- 1 file changed, 512 insertions(+), 512 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7131edd437..fbf2dee2ac 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,381 +1,381 @@ # 1.7.8 (future) -- COMMON: Show license per core (if available) inside 'Load Core'. -- LOCALIZATION: Update Portuguese Brazilian Translation. -- LOCALIZATION: Update Polish translation. -- MENU/WIDGETS: All widgets are now properly cleaned up, fixing the frozen widgets bug when loading / closing content. -- MENU/WIDGETS: Widgets are now drawn above the overlay with OpenGL and Vulkan. +- COMMON: Show license per core (if available) inside 'Load Core' +- LOCALIZATION: Update Portuguese Brazilian Translation +- LOCALIZATION: Update Polish translation +- MENU/WIDGETS: All widgets are now properly cleaned up, fixing the frozen widgets bug when loading / closing content +- MENU/WIDGETS: Widgets are now drawn above the overlay with OpenGL and Vulkan - MENU/OZONE: Add it for PS3 -- MENU/OZONE: Fix regression in 1.7.7 - OSX/macOS - was unable to start it. -- MENU/XMB: Add menu animation settings. -- MENU: Fix Record -> Streaming Quality, and Record -> Recording Threads settings. -- MENU/QT/WIMP: Path selector fixes. -- NETBSD: Audioio is now the default audio driver. -- NETBSD: Fix a segfault when starting RetroArch with an empty configuration file and LANG unset in the environment. -- OSD: OSD is now drawn above the overlay with Vulkan. -- RECORD: Fix Twitch streaming. -- X11: Add non-evdev keycodes to fix keyboard input on non-Linux systems with X11. +- MENU/OZONE: Fix regression in 1.7.7 - OSX/macOS - was unable to start it +- MENU/XMB: Add menu animation settings +- MENU: Fix Record -> Streaming Quality, and Record -> Recording Threads settings +- MENU/QT/WIMP: Path selector fixes +- NETBSD: Audioio is now the default audio driver +- NETBSD: Fix a segfault when starting RetroArch with an empty configuration file and LANG unset in the environment +- OSD: OSD is now drawn above the overlay with Vulkan +- RECORD: Fix Twitch streaming +- X11: Add non-evdev keycodes to fix keyboard input on non-Linux systems with X11 # 1.7.7 -- 3DS: Add unique IDs to prevent cores overwriting each other. -- 3DS: Fix screen tearing when running 50Hz content. -- ANDROID: We now target API level 26 (minimum is still API level 9). -- ANDROID: Add option to vibrate on touch (works in menu or overlay). -- ANDROID: Add device vibration option for cores that support rumble. -- ANDROID: Add gamepad vibration support for cores that support rumble. -- ANDROID: Allow stylus/pen to move mouse without pressing down. -- AUDIO: Avoid deadlocks in certain audio drivers when toggling menu sounds on. -- BLISS-BOX: Support PSX Jogcon (requires firmware 3.0). -- CHEEVOS: Fix crash when reading memory that is out of range. -- CHEEVOS: New Cheevos implementation enabled by default. -- CHEEVOS: Pop-up badges when an achievement is triggered. -- CRT: Dynamic super resolution support. -- DISCORD: Fix potential crash when username is empty and discord is disabled. -- DISCORD: Ask to join support for Linux. -- INPUT/ANDROID: Add "Input Block Timeout" option. +- 3DS: Add unique IDs to prevent cores overwriting each other +- 3DS: Fix screen tearing when running 50Hz content +- ANDROID: We now target API level 26 (minimum is still API level 9) +- ANDROID: Add option to vibrate on touch (works in menu or overlay) +- ANDROID: Add device vibration option for cores that support rumble +- ANDROID: Add gamepad vibration support for cores that support rumble +- ANDROID: Allow stylus/pen to move mouse without pressing down +- AUDIO: Avoid deadlocks in certain audio drivers when toggling menu sounds on +- BLISS-BOX: Support PSX Jogcon (requires firmware 3.0) +- CHEEVOS: Fix crash when reading memory that is out of range +- CHEEVOS: New Cheevos implementation enabled by default +- CHEEVOS: Pop-up badges when an achievement is triggered +- CRT: Dynamic super resolution support +- DISCORD: Fix potential crash when username is empty and discord is disabled +- DISCORD: Ask to join support for Linux +- INPUT/ANDROID: Add "Input Block Timeout" option - COMMON: For platforms without HAVE_THREADS, don't automatically resume content when saving/loading states -- COMMON: Make playlist sorting optional and consistent. -- COMMON: Fix sorting of playlists with blank labels. -- COMMON: Fix content scanner creating false positive playlist entries that also have wrong label and crc32. -- COMMON: Add some MMX-optimized pixel conversion routines. -- COMMON: Fix typo preventing some SSE2-optimized pixel conversions from being used. -- COMMON: Add option to track how long content has been running over time. -- COMMON: Fix buffer overflows in system information. -- COMMON: Add option to change screen orientation via the windowing system (Android, Windows, X11). -- COMMON: Show CPU model name in log. -- COMMON: Add "Help -> Send Debug Info" option (and F10 hotkey) to send diagnostic info to the RetroArch team for help with problems. -- COMMON: Show GPU device name/version in log. -- COMMON: Add menu option to write log info to a file. -- COMMON: Add subsystem support for playlists. Subsystem info is automatically saved to the history playlist for easy relaunching. +- COMMON: Make playlist sorting optional and consistent +- COMMON: Fix sorting of playlists with blank labels +- COMMON: Fix content scanner creating false positive playlist entries that also have wrong label and crc32 +- COMMON: Add some MMX-optimized pixel conversion routines +- COMMON: Fix typo preventing some SSE2-optimized pixel conversions from being used +- COMMON: Add option to track how long content has been running over time +- COMMON: Fix buffer overflows in system information +- COMMON: Add option to change screen orientation via the windowing system (Android, Windows, X11) +- COMMON: Show CPU model name in log +- COMMON: Add "Help -> Send Debug Info" option (and F10 hotkey) to send diagnostic info to the RetroArch team for help with problems +- COMMON: Show GPU device name/version in log +- COMMON: Add menu option to write log info to a file +- COMMON: Add subsystem support for playlists. Subsystem info is automatically saved to the history playlist for easy relaunching - GL: Add new "gl1" OpenGL 1.1 compliant video driver for legacy GPUs and software renderers -- GL: Add a new "glcore" driver with slang support (requires GL 3.2+ or GLES3). -- GL: Draw OSD on top of overlay. -- GONG: Add savestate support. -- GONG: Add video refresh rate core options. -- GONG: Two player support via core option. -- GUI: Fix text alignment when using stb_unicode. -- GUI: Fix text display issues when using Japanese (and other unicode-dependent language) text with stb_unicode. -- GUI: Set language on first startup to the user's preferred OS language (Windows, *nix and Android). -- INPUT: Add (scaled radial) analog deadzone and sensitivity options. -- LIBRETRO: Add Turkish language support. -- LIBRETRO: Allow non-accelerated video to rotate the display. -- LOCALIZATION: Update Chinese (Simplified) translation. -- LOCALIZATION: Update Chinese (Traditional) translation. -- LOCALIZATION: Update Dutch translation. -- LOCALIZATION: Update French translation. -- LOCALIZATION: Update German translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Polish translation. -- LOCALIZATION: Update Russian translation. -- LOCALIZATION: Update Spanish translation. -- LOCALIZATION: Add new Turkish translation. -- MIDI: Fix startup crash in midi driver. -- MENU: Bugfix - you can no longer get stuck in Online Updater -> Update Core screen when toggling between ingame and menu. -- MENU: Selectively hide 'Take Screenshot' for video drivers that don't support taking screenshots. -- MENU: Framerate independent menu rendering. MaterialUI/Ozone/XMB/RGUI can now run at higher framerates. -- MENU: Thumbnails work in history list. -- MENU: Menu widgets. -- MENU: Add memory statistics support to more context drivers. -- MENU: Enable ozone driver for UWP builds. -- MENU: Add optional "looping" menu text ticker with configurable speed. -- MENU: Fix core video rendering when using ozone with GL cores that implement the scissor test. -- MENU: Add optional playlist sublabels (associated core + play time, where available). -- MENU: Dropdown list settings now apply immediately. -- MENU: Add setting to require pressing the "Exit RetroArch" hotkey twice to confirm. -- MENU: Now able to run at higher refresh rates than 60Hz. -- MENU: Enable "Add to Favorites" without loading a core. -- MENU: Allow core name to be hidden on history/favorites playlists. -- MENU: Populate crc32 and db_name fields when adding history/favourites playlist entries. -- MENU: Fix TTF files not showing in OSD/menu font selection screen. -- MENU: Fix audio/video filters not showing in file browser. -- MENU/MaterialUI: Add subsystem support. -- MENU/MaterialUI: Add currently selected entry in dropdown menus. -- MENU/OZONE: Add mouse support on entries (no sidebar yet). -- MENU/OZONE: Allow collapsing the sidebar. -- MENU/OZONE: Add thumbnail support. -- MENU/OZONE: Battery notifications. -- MENU/OZONE: Add wifi icon for network entries. -- MENU/QT/WIMP: Add git version and build date to Help->About window. -- MENU/QT/WIMP: Fix content loading via the file browser. -- MENU/QT/WIMP: Add new settings window to control all RetroArch settings. -- MENU/RGUI: Improve playlist titles. -- MENU/RGUI: Add option to hide associated cores in playlists. -- MENU/RGUI: Add internal upscaling option. -- MENU/RGUI: Add subsystem support. -- MENU/RGUI: Add menu sublabel support. -- MENU/RGUI: Re-enable "Load Core" option when content is loaded. -- MENU/RGUI: Add optional "Collections" entry to main menu. -- MENU/RGUI: Add "Lock Menu Aspect Ratio" option. -- MENU/RGUI: Add "full width" layout option. -- MENU/RGUI: Ensure menu color theme is applied immediately. -- MENU/RGUI: Fix "Lock Menu Aspect Ratio" option when using custom viewports. -- MENU/RGUI: Add widescreen support. -- MENU/RGUI: Allow text to be centred when selecting widescreen layouts. -- MENU/RGUI: Add inline playlist thumbnail support. -- MENU/RGUI: Add optional shadow effects. -- MENU/RGUI: Performance optimizations. -- MENU/RGUI: Add optional extended ASCII support. -- MENU/RGUI: Add optional delay when loading thumbnails. -- MENU/RGUI: Add on-screen keyboard. -- MENU/RGUI: Battery notifications. -- MENU/XMB: Prevent crashes when resizing to a tiny window. +- GL: Add a new "glcore" driver with slang support (requires GL 3.2+ or GLES3) +- GL: Draw OSD on top of overlay +- GONG: Add savestate support +- GONG: Add video refresh rate core options +- GONG: Two player support via core option +- GUI: Fix text alignment when using stb_unicode +- GUI: Fix text display issues when using Japanese (and other unicode-dependent language) text with stb_unicode +- GUI: Set language on first startup to the user's preferred OS language (Windows, *nix and Android) +- INPUT: Add (scaled radial) analog deadzone and sensitivity options +- LIBRETRO: Add Turkish language support +- LIBRETRO: Allow non-accelerated video to rotate the display +- LOCALIZATION: Update Chinese (Simplified) translation +- LOCALIZATION: Update Chinese (Traditional) translation +- LOCALIZATION: Update Dutch translation +- LOCALIZATION: Update French translation +- LOCALIZATION: Update German translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Polish translation +- LOCALIZATION: Update Russian translation +- LOCALIZATION: Update Spanish translation +- LOCALIZATION: Add new Turkish translation +- MIDI: Fix startup crash in midi driver +- MENU: Bugfix - you can no longer get stuck in Online Updater -> Update Core screen when toggling between ingame and menu +- MENU: Selectively hide 'Take Screenshot' for video drivers that don't support taking screenshots +- MENU: Framerate independent menu rendering. MaterialUI/Ozone/XMB/RGUI can now run at higher framerates +- MENU: Thumbnails work in history list +- MENU: Menu widgets +- MENU: Add memory statistics support to more context drivers +- MENU: Enable ozone driver for UWP builds +- MENU: Add optional "looping" menu text ticker with configurable speed +- MENU: Fix core video rendering when using ozone with GL cores that implement the scissor test +- MENU: Add optional playlist sublabels (associated core + play time, where available) +- MENU: Dropdown list settings now apply immediately +- MENU: Add setting to require pressing the "Exit RetroArch" hotkey twice to confirm +- MENU: Now able to run at higher refresh rates than 60Hz +- MENU: Enable "Add to Favorites" without loading a core +- MENU: Allow core name to be hidden on history/favorites playlists +- MENU: Populate crc32 and db_name fields when adding history/favourites playlist entries +- MENU: Fix TTF files not showing in OSD/menu font selection screen +- MENU: Fix audio/video filters not showing in file browser +- MENU/MaterialUI: Add subsystem support +- MENU/MaterialUI: Add currently selected entry in dropdown menus +- MENU/OZONE: Add mouse support on entries (no sidebar yet) +- MENU/OZONE: Allow collapsing the sidebar +- MENU/OZONE: Add thumbnail support +- MENU/OZONE: Battery notifications +- MENU/OZONE: Add wifi icon for network entries +- MENU/QT/WIMP: Add git version and build date to Help->About window +- MENU/QT/WIMP: Fix content loading via the file browser +- MENU/QT/WIMP: Add new settings window to control all RetroArch settings +- MENU/RGUI: Improve playlist titles +- MENU/RGUI: Add option to hide associated cores in playlists +- MENU/RGUI: Add internal upscaling option +- MENU/RGUI: Add subsystem support +- MENU/RGUI: Add menu sublabel support +- MENU/RGUI: Re-enable "Load Core" option when content is loaded +- MENU/RGUI: Add optional "Collections" entry to main menu +- MENU/RGUI: Add "Lock Menu Aspect Ratio" option +- MENU/RGUI: Add "full width" layout option +- MENU/RGUI: Ensure menu color theme is applied immediately +- MENU/RGUI: Fix "Lock Menu Aspect Ratio" option when using custom viewports +- MENU/RGUI: Add widescreen support +- MENU/RGUI: Allow text to be centred when selecting widescreen layouts +- MENU/RGUI: Add inline playlist thumbnail support +- MENU/RGUI: Add optional shadow effects +- MENU/RGUI: Performance optimizations +- MENU/RGUI: Add optional extended ASCII support +- MENU/RGUI: Add optional delay when loading thumbnails +- MENU/RGUI: Add on-screen keyboard +- MENU/RGUI: Battery notifications +- MENU/XMB: Prevent crashes when resizing to a tiny window - MENU/XMB: XMB honors the 'show menu sublabels' setting now - was previously RGUI only -- NETPLAY: Fix stall-out causing total disconnection with >2 players. -- NETPLAY: Different (more intuitive?) default netplay share policy. -- NETPLAY: Add hotkey option to toggle hosting on/off. -- NETWORKING: Encode URLs to allow for spaces in directory names. -- OSX: Prevent crash on exit. -- OSX: Metal is now the default video driver for the RetroArch Metal build. -- OSX: Enable CoreAudio v3 driver for Metal. -- OSX/MACOS/IOS: Now uses the STB Unicode font driver. -- PS2: CDFS support. -- PS2: Implemented analog support for ps2 controllers. -- PS2: Fix audio freeze after restarting core. -- PS2: Fix issues with load state and the font driver. -- PS2: File I/O now works for USB and network host. -- PS2: Support cores with extra padding in their frame buffers. +- NETPLAY: Fix stall-out causing total disconnection with >2 players +- NETPLAY: Different (more intuitive?) default netplay share policy +- NETPLAY: Add hotkey option to toggle hosting on/off +- NETWORKING: Encode URLs to allow for spaces in directory names +- OSX: Prevent crash on exit +- OSX: Metal is now the default video driver for the RetroArch Metal build +- OSX: Enable CoreAudio v3 driver for Metal +- OSX/MACOS/IOS: Now uses the STB Unicode font driver +- PS2: CDFS support +- PS2: Implemented analog support for ps2 controllers +- PS2: Fix audio freeze after restarting core +- PS2: Fix issues with load state and the font driver +- PS2: File I/O now works for USB and network host +- PS2: Support cores with extra padding in their frame buffers - SCANNER: New option 'Scan without core match'. When this is enabled, supported extensions by all installed cores are not checked, and instead -it will add all content it finds to a playlist. This way, you can install the core you need later on after scanning. Not enabled by default. -- SHADERS: Don't alphabetize shader presets. -- SWITCH: Add rumble support. -- SWITCH: Add USB keyboard support. -- VITA: Add bluetooth mouse and keyboard support. -- VULKAN: Fix color issues with RGBA8888 swapchains in readback (screenshots). -- WII: Don't init overlay when RAM is beyond 72MB. -- WII: Skip CRC calculation on content load, can improve load times of larger games by several seconds. -- WINDOWS: Fall back to gl1 driver if accelerated GPU driver is unavailable. -- WINDOWS: Allow winraw and xinput to work without dinput (needed for WinRT). -- WINDOWS: Add MSVC2017 ARM desktop support. -- UWP: Fix rewind by opting for slower codepath. -- UWP: Fix relative path name issues when loading shaders. -- UWP: Optimizations for VFS system. +it will add all content it finds to a playlist. This way, you can install the core you need later on after scanning. Not enabled by default +- SHADERS: Don't alphabetize shader presets +- SWITCH: Add rumble support +- SWITCH: Add USB keyboard support +- VITA: Add bluetooth mouse and keyboard support +- VULKAN: Fix color issues with RGBA8888 swapchains in readback (screenshots) +- WII: Don't init overlay when RAM is beyond 72MB +- WII: Skip CRC calculation on content load, can improve load times of larger games by several seconds +- WINDOWS: Fall back to gl1 driver if accelerated GPU driver is unavailable +- WINDOWS: Allow winraw and xinput to work without dinput (needed for WinRT) +- WINDOWS: Add MSVC2017 ARM desktop support +- UWP: Fix rewind by opting for slower codepath +- UWP: Fix relative path name issues when loading shaders +- UWP: Optimizations for VFS system # 1.7.6 -- ANDROID: Fix Xperia Play input binding. -- CHEEVOS: Reset when hardcore mode is toggled. -- CHEEVOS: Update the hashing methods to identify NES, SNES and Lynx games (more accurate and accepting headerless ROMs). -- COMMON: Add new JSON playlist format. -- COMMON: Fix playlist corruption when deleting items. -- COMMON: Fix archive progress display calculation. -- COMMON: Fix playlist entries appearing with previously used names. -- COMMON: Fix screenshot filename with no core or content. -- COMMON: Allow compiling without menu support. -- CORE UPDATER: Allow sideloading cores from the menu. -- CPU FILTERS: Add Normal2x filter. -- CRT/LINUX: New Linux switching method partially implemented. -- CRT/LINUX: Linux restore desktop resolution fixed. -- CRT/LINUX: Monitor index switching and auto enumerate for output detection in Linux (still working on the windows method). -- CRT/RASPBERRY PI: Initial support. -- DATE: Add Date / Time style options. +- ANDROID: Fix Xperia Play input binding +- CHEEVOS: Reset when hardcore mode is toggled +- CHEEVOS: Update the hashing methods to identify NES, SNES and Lynx games (more accurate and accepting headerless ROMs) +- COMMON: Add new JSON playlist format +- COMMON: Fix playlist corruption when deleting items +- COMMON: Fix archive progress display calculation +- COMMON: Fix playlist entries appearing with previously used names +- COMMON: Fix screenshot filename with no core or content +- COMMON: Allow compiling without menu support +- CORE UPDATER: Allow sideloading cores from the menu +- CPU FILTERS: Add Normal2x filter +- CRT/LINUX: New Linux switching method partially implemented +- CRT/LINUX: Linux restore desktop resolution fixed +- CRT/LINUX: Monitor index switching and auto enumerate for output detection in Linux (still working on the windows method) +- CRT/RASPBERRY PI: Initial support +- DATE: Add Date / Time style options - DEBUGGING: Add an integrated crash handler for debug builds (see https://docs.libretro.com/tech/debugging) -- DISCORD: Register the application name properly. -- DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster. +- DISCORD: Register the application name properly +- DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster - INPUT: Add new menu toggle (hold start button for 2 seconds) - INPUT: Fix arrow keys being incorrectly bound as numpad keys -- INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver. -- LOCALIZATION: Add Greek translation. -- LOCALIZATION: Update German translation. -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Simplified Chinese translation. -- LOCALIZATION: Update Spanish translation. -- MENU: New "ozone" menu driver. +- INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver +- LOCALIZATION: Add Greek translation +- LOCALIZATION: Update German translation +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Simplified Chinese translation +- LOCALIZATION: Update Spanish translation +- MENU: New "ozone" menu driver - MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now) -- MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly. -- MENU: Add option to enable in-menu sound effects. -- MENU/D3D: Scissoring support (will be used for Ozone and menu widgets). -- MENU/QT/WIMP: Allow building with MSVC2017. -- MENU/QT/WIMP: Add detailed file browser table. -- MENU/QT/WIMP: New grid view implementation that is faster and loads thumbnails on-demand. -- MENU/QT/WIMP: Thumbnail drag and drop support. -- MENU/RGUI: Overhaul custom theme interface + add wallpaper support. -- MENU/RGUI: Thumbnail support and thumbnail downscaling. -- MENU: Hide password values. -- MENU/SOUNDS: Implement in-menu sound effects (not enabled by default for now, still experimental). -- MIDI: Add a Linux ALSA driver for MIDI. -- NETPLAY: Force fast-save-states when netplay is enabled. -- NETPLAY: Allow quick joining subsystem lobbies. -- OSX: Initial CoreAudio V3 audio driver (not yet used in release builds). -- OSX: OpenGL 3.2 Core support for cores. -- PS2: Initial PlayStation2 port. -- PS4: Initial PlayStation4 port. +- MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly +- MENU: Add option to enable in-menu sound effects +- MENU/D3D: Scissoring support (will be used for Ozone and menu widgets) +- MENU/QT/WIMP: Allow building with MSVC2017 +- MENU/QT/WIMP: Add detailed file browser table +- MENU/QT/WIMP: New grid view implementation that is faster and loads thumbnails on-demand +- MENU/QT/WIMP: Thumbnail drag and drop support +- MENU/RGUI: Overhaul custom theme interface + add wallpaper support +- MENU/RGUI: Thumbnail support and thumbnail downscaling +- MENU: Hide password values +- MENU/SOUNDS: Implement in-menu sound effects (not enabled by default for now, still experimental) +- MIDI: Add a Linux ALSA driver for MIDI +- NETPLAY: Force fast-save-states when netplay is enabled +- NETPLAY: Allow quick joining subsystem lobbies +- OSX: Initial CoreAudio V3 audio driver (not yet used in release builds) +- OSX: OpenGL 3.2 Core support for cores +- PS2: Initial PlayStation2 port +- PS4: Initial PlayStation4 port - RECORDING: Implement recording options in the menu complete with quality profiles, streaming, and proper file naming -- SCANNER: Fix GDI disc scanning. +- SCANNER: Fix GDI disc scanning - SHADERS: Fix auto shader preset loading on D3D10, D3D11, D3D12 - SUBSYSTEM: Allow more than 10 subsystems - SUBSYSTEM: Cores that use subsystem for complex scenarios can now load content without starting a regular content first - SUBSYSTEM: Remember the last used folder to make loading subsystem type content faster -- SWITCH/LIBNX: Improve touch scaling calculation. -- SWITCH: Proper button labels. -- TVOS: Initial tvOS port. -- VULKAN: Fix RGUI crashing at startup. -- VULKAN/RGUI: Enable 'Menu Linear Filter' option. -- VULKAN: Fix secondary screens in overlays not working. -- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend). -- WAYLAND: Fix fullscreen toggle. -- WIIU: Initial netplay peer-to-peer support. Network information working. -- WINDOWS/WSA: Network Information info is blank until first network operation. -- WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows. -- WINDOWS: Remember window size and position if so desired. -- WINDOWS: SSL/TLS connections now work properly. -- WINDOWS: Fall back to GDI driver if no accelerated graphics driver is found. -- UWP: Initial UWP port. -- VFS: Update to version 3. -- XBONE: Initial Xbox One port. +- SWITCH/LIBNX: Improve touch scaling calculation +- SWITCH: Proper button labels +- TVOS: Initial tvOS port +- VULKAN: Fix RGUI crashing at startup +- VULKAN/RGUI: Enable 'Menu Linear Filter' option +- VULKAN: Fix secondary screens in overlays not working +- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend) +- WAYLAND: Fix fullscreen toggle +- WIIU: Initial netplay peer-to-peer support. Network information working +- WINDOWS/WSA: Network Information info is blank until first network operation +- WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows +- WINDOWS: Remember window size and position if so desired +- WINDOWS: SSL/TLS connections now work properly +- WINDOWS: Fall back to GDI driver if no accelerated graphics driver is found +- UWP: Initial UWP port +- VFS: Update to version 3 +- XBONE: Initial Xbox One port - XMB/OZONE: Add more icons - XMB: Add Automatic Inverted theme - ???: Easter Egg # 1.7.5 -- CAMERA: Fix Video4Linux2 driver that broke years ago. -- CONFIG: Add 'Reset To Defaults' setting in Configurations. Thi will reset your config file to defaults. -- CHEATS: Add support for Rumble when increase or decrease by the rumble value. -- CHEATS: Add cheat variables to allow for updating large portions of memory. -- CHEEVOS: Prevent loading states before achievements are fully loaded. -- CRT: New porches and interlaced bug fix. -- CRT: New functionality, ability to switch between 15KHz and 31KHz, etc. -- COMMON: Support for "OEM-102" key (usually '\' on Euro keyboards). -- DISCORD: Add 'Ask To Join' Feature. -- EMSCRIPTEN: Add stb_font support. -- INPUT: Add new menu toggle combos 'L3 + R' and 'L + R' (useful for Switch). -- IOS: Use safe area to account for notch for iPhone X and adjust main view. -- LOCALIZATION: Update Portuguese / Brazilian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Polish translation. -- LOCALIZATION: Update Spanish translation. -- MENU: Add dropdown lists for many settings. -- MENU: Fix crash that could happen when changing core's options on Android. -- MENU/QT/WIMP: Add option to rename playlists. -- MENU/QT/WIMP: Add option to filter extensions inside archives when adding to a playlist. -- MENU/QT/WIMP: Rename playlist entries with 2 single clicks. +- CAMERA: Fix Video4Linux2 driver that broke years ago +- CONFIG: Add 'Reset To Defaults' setting in Configurations. Thi will reset your config file to defaults +- CHEATS: Add support for Rumble when increase or decrease by the rumble value +- CHEATS: Add cheat variables to allow for updating large portions of memory +- CHEEVOS: Prevent loading states before achievements are fully loaded +- CRT: New porches and interlaced bug fix +- CRT: New functionality, ability to switch between 15KHz and 31KHz, etc +- COMMON: Support for "OEM-102" key (usually '\' on Euro keyboards) +- DISCORD: Add 'Ask To Join' Feature +- EMSCRIPTEN: Add stb_font support +- INPUT: Add new menu toggle combos 'L3 + R' and 'L + R' (useful for Switch) +- IOS: Use safe area to account for notch for iPhone X and adjust main view +- LOCALIZATION: Update Portuguese / Brazilian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Polish translation +- LOCALIZATION: Update Spanish translation +- MENU: Add dropdown lists for many settings +- MENU: Fix crash that could happen when changing core's options on Android +- MENU/QT/WIMP: Add option to rename playlists +- MENU/QT/WIMP: Add option to filter extensions inside archives when adding to a playlist +- MENU/QT/WIMP: Rename playlist entries with 2 single clicks - MENU/QT/WIMP: Fix shader parameter checkboxes not working -- METAL: Add screenshot support. -- NETPLAY: Save lobby details received back from server after first announcement. -- OPENGL/GLX: Implement Adaptive VSync - GLX_EXT_swap_control_tear. -- OPENGL/WGL: Implement Adaptive VSync - WGL_EXT_swap_control_tear. -- RUNAHEAD: Fix performance degradation that could happen over time (after approx. 30 mins). Fixed input IDs outside of range 0-35 causing slow performance in runahead. -- SWITCH: Add stb_font support. -- SWITCH: Add Retro Achievements support. -- SWITCH: Add networking support. -- SWITCH: Add touchscreen support. -- SWITCH: Add OpenGL support. -- SWITCH: Merging of RetroNX Nintendo Switch port, based on libnx SDK. -- VULKAN: Fix race condition in threaded mailbox emulation. -- VULKAN: Maintenance fixes. -- WIIU: Fix menu lag when built with DevKitPro r32. +- METAL: Add screenshot support +- NETPLAY: Save lobby details received back from server after first announcement +- OPENGL/GLX: Implement Adaptive VSync - GLX_EXT_swap_control_tear +- OPENGL/WGL: Implement Adaptive VSync - WGL_EXT_swap_control_tear +- RUNAHEAD: Fix performance degradation that could happen over time (after approx. 30 mins). Fixed input IDs outside of range 0-35 causing slow performance in runahead +- SWITCH: Add stb_font support +- SWITCH: Add Retro Achievements support +- SWITCH: Add networking support +- SWITCH: Add touchscreen support +- SWITCH: Add OpenGL support +- SWITCH: Merging of RetroNX Nintendo Switch port, based on libnx SDK +- VULKAN: Fix race condition in threaded mailbox emulation +- VULKAN: Maintenance fixes +- WIIU: Fix menu lag when built with DevKitPro r32 # 1.7.4 -- ANDROID: Add sustained performance mode, can be turned on/off in Power Management settings menu. -- ANDROID: Powerstate/battery level support. -- CHEEVOS: Fix crash when scrolling Achievement List while Unofficial Achievements enabled (#6732). -- CHEEVOS: Added hitcounts support for PauseIf/ResetIf (#6817). -- COMMON: Automatically hide "Configuration Override options" in Quick Menu. -- COMMON: Small Bugfix to not trigger savestate code when pressing Reset. -- COMMON: Added libsixel video driver. -- EMSCRIPTEN: Fix Game Focus Toggle. -- HID/OSX: Fix to set hid device registration deterministic (#6497), to address issue #6640 re-adding dynamic device registration. -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Polish translation. -- LOCALIZATION: Update Portuguese / Brazilian translation. -- LOCALIZATION: Update Russian translation. -- LOCALIZATION: Update Spanish translation. -- MIDI: Add MIDI support to the libretro API. Dosbox is the first proof of concept core implementing libretro MIDI. -- MIDI: Add a Windows driver for MIDI, based on winmm. -- MENU/QT/WIMP: Qt QSlider styling for Dark Theme. -- MENU/QT/WIMP: Remove button ghostly inside highlighting. -- MENU/QT/WIMP: Initial grid view. -- MENU/QT/WIMP: Drag&drop to add new playlist items, add option to add/edit/delete playlists. -- MENU/QT/WIMP: Add menu option to update RetroArch (Windows only for now). -- MENU/QT/WIMP: Add menu option to manage shaders. -- MENU/QT/WIMP: Add menu option to manage core options. +- ANDROID: Add sustained performance mode, can be turned on/off in Power Management settings menu +- ANDROID: Powerstate/battery level support +- CHEEVOS: Fix crash when scrolling Achievement List while Unofficial Achievements enabled (#6732) +- CHEEVOS: Added hitcounts support for PauseIf/ResetIf (#6817) +- COMMON: Automatically hide "Configuration Override options" in Quick Menu +- COMMON: Small Bugfix to not trigger savestate code when pressing Reset +- COMMON: Added libsixel video driver +- EMSCRIPTEN: Fix Game Focus Toggle +- HID/OSX: Fix to set hid device registration deterministic (#6497), to address issue #6640 re-adding dynamic device registration +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Polish translation +- LOCALIZATION: Update Portuguese / Brazilian translation +- LOCALIZATION: Update Russian translation +- LOCALIZATION: Update Spanish translation +- MIDI: Add MIDI support to the libretro API. Dosbox is the first proof of concept core implementing libretro MIDI +- MIDI: Add a Windows driver for MIDI, based on winmm +- MENU/QT/WIMP: Qt QSlider styling for Dark Theme +- MENU/QT/WIMP: Remove button ghostly inside highlighting +- MENU/QT/WIMP: Initial grid view +- MENU/QT/WIMP: Drag&drop to add new playlist items, add option to add/edit/delete playlists +- MENU/QT/WIMP: Add menu option to update RetroArch (Windows only for now) +- MENU/QT/WIMP: Add menu option to manage shaders +- MENU/QT/WIMP: Add menu option to manage core options - MENU/XMB: Add new icons for the settings - MENU/XMB: Add an option to show the desktop ui -- METAL: Initial work-in-progress video driver for Metal. macOS-only right now, and currently requires macOS 10.13. -- METAL: Supports XMB/MaterialUI, has a menu display driver. Has a font rendering driver. -- METAL/SLANG: Slang shaders should be compatible with Metal video driver. -- NETWORK: Enable SSL/TLS support by default for desktop platforms. -- QNX: Fix Game Focus Toggle. -- PS3: Add audio mixer support for FLAC and MP3. -- PSP: Use proper button labels, fix inverted R-Stick Y axis. -- REMAPS: Fix the way offsets are calculated for keyboard remapping. -- RUNAHEAD: Fix full-screen mode change breaking Secondary Core's environment variables. -- VITA: Use proper button labels, fix inverted R-Stick Y axis. -- VITA: Add imc0: mount. -- VITA: Use sceCtrlIsMultiControllerSupported to detect. -- VULKAN: Fix two validation errors. -- VULKAN: Try to avoid creating swapchains redundantly. Should fix black screen and having to alt tab out of window again to get display working on Nvidia GPUs (Windows). -- VULKAN/OSX: Initial MoltenVK support. Not enabled yet, several MoltenVK bugs should be fixed first before we can have it fully working. -- WINDOWS/DINPUT: Add rumble support. -- WINDOWS/DINPUT: Fix Game Focus Toggle. -- WINDOWS/RAWINPUT: Fix Game Focus Toggle. -- X11: Fix Game Focus Toggle. -- WII: Change deflicker setting to work in 480p or higher, and always enables vfilter so that the user can easily change brightness. +- METAL: Initial work-in-progress video driver for Metal. macOS-only right now, and currently requires macOS 10.13 +- METAL: Supports XMB/MaterialUI, has a menu display driver. Has a font rendering driver +- METAL/SLANG: Slang shaders should be compatible with Metal video driver +- NETWORK: Enable SSL/TLS support by default for desktop platforms +- QNX: Fix Game Focus Toggle +- PS3: Add audio mixer support for FLAC and MP3 +- PSP: Use proper button labels, fix inverted R-Stick Y axis +- REMAPS: Fix the way offsets are calculated for keyboard remapping +- RUNAHEAD: Fix full-screen mode change breaking Secondary Core's environment variables +- VITA: Use proper button labels, fix inverted R-Stick Y axis +- VITA: Add imc0: mount +- VITA: Use sceCtrlIsMultiControllerSupported to detect +- VULKAN: Fix two validation errors +- VULKAN: Try to avoid creating swapchains redundantly. Should fix black screen and having to alt tab out of window again to get display working on Nvidia GPUs (Windows) +- VULKAN/OSX: Initial MoltenVK support. Not enabled yet, several MoltenVK bugs should be fixed first before we can have it fully working +- WINDOWS/DINPUT: Add rumble support +- WINDOWS/DINPUT: Fix Game Focus Toggle +- WINDOWS/RAWINPUT: Fix Game Focus Toggle +- X11: Fix Game Focus Toggle +- WII: Change deflicker setting to work in 480p or higher, and always enables vfilter so that the user can easily change brightness - WIIU: Fix out-of-bounds rendering bug -- WIIU: Implement UDP broadcast network logging on Wii U. -- WIIU: Audio should no longer clip. +- WIIU: Implement UDP broadcast network logging on Wii U +- WIIU: Audio should no longer clip # 1.7.3 - AUDIO: Audio mixer supports FLAC/MP3 file types now! -- COMMON: Fixed bug 'crashing in cores that don't range check retro_set_controller_type'. Some people were having crashes when device is set to RETRO_DEVICE_NONE and the cores don't check the number of ports, in VBAM's case it was overflowing and crashing. QuickNES was crashing too. -- COMMON: Fixed buffer overflow in url encoding (affecting MSVC2010/2013). -- COMMON: (QuickMenu) Added Configuration Override submenu. -- HID: Merge new HID subsystem. -- HID: Fix WaveBird support for the Wii U GCA. -- HID/OSX: Fix regression with IODHIDManager - gamepads which are connected later would not be autoconfigured. -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Portuguese translation. +- COMMON: Fixed bug 'crashing in cores that don't range check retro_set_controller_type'. Some people were having crashes when device is set to RETRO_DEVICE_NONE and the cores don't check the number of ports, in VBAM's case it was overflowing and crashing. QuickNES was crashing too +- COMMON: Fixed buffer overflow in url encoding (affecting MSVC2010/2013) +- COMMON: (QuickMenu) Added Configuration Override submenu +- HID: Merge new HID subsystem +- HID: Fix WaveBird support for the Wii U GCA +- HID/OSX: Fix regression with IODHIDManager - gamepads which are connected later would not be autoconfigured +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Portuguese translation - MENU: New WIMP Qt GUI! -- MENU: Audio mixer now works in the menu without any cores loaded. You have to enable the setting 'Enable menu audio' for this to work. -- REMAPPING/OVERLAYS: Fix regression - overlays could no longer be remapped. -- SCANNER: Add Wii Backup File WBFS support. -- X11: CRT SwitchRes support for X11/Linux. +- MENU: Audio mixer now works in the menu without any cores loaded. You have to enable the setting 'Enable menu audio' for this to work +- REMAPPING/OVERLAYS: Fix regression - overlays could no longer be remapped +- SCANNER: Add Wii Backup File WBFS support +- X11: CRT SwitchRes support for X11/Linux # 1.7.2 -- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now). -- CRT: Added CRT SwitchRes. -- COMMON: Hide the 'Core delete' option if the 'Core updater' is also hidden. -- COMMON: Add way to reset core association for playlist entry. +- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now) +- CRT: Added CRT SwitchRes +- COMMON: Hide the 'Core delete' option if the 'Core updater' is also hidden +- COMMON: Add way to reset core association for playlist entry - COMMON: Fix invalid long command line options causing infinite loop on Windows -- COMMON: Add OSD statistics for video/audio/core. -- COMMON: Added runahead system; allows you to drive down latency even further. -- COMMON: Fix buggy behavior that could happen with ZIP file reading on some platforms as a result of not initializing struct. -- CHEEVOS: Support Atari 2600, Virtual Boy, and Arcade (only Neo Geo, CPS-1, CPS-2 and CPS-3 and only with fbalpha core). -- CHEEVOS: Add option to automatically take a screenshot when an achievement is triggered. -- CHEEVOS: Fixed incompatibilities with Neo Geo Pocket achievement sets. -- CHEEVOS: Store only login token, not password. +- COMMON: Add OSD statistics for video/audio/core +- COMMON: Added runahead system; allows you to drive down latency even further +- COMMON: Fix buggy behavior that could happen with ZIP file reading on some platforms as a result of not initializing struct +- CHEEVOS: Support Atari 2600, Virtual Boy, and Arcade (only Neo Geo, CPS-1, CPS-2 and CPS-3 and only with fbalpha core) +- CHEEVOS: Add option to automatically take a screenshot when an achievement is triggered +- CHEEVOS: Fixed incompatibilities with Neo Geo Pocket achievement sets +- CHEEVOS: Store only login token, not password - D3D10: Added D3D10 driver to release build. Has working shaders (Slang), overlay, and menu display driver support. Should be on par capabilities wise -with D3D11 driver except for there being no hardware rendering right now. -- D3D11: Experimental hardware renderer. Allows for libretro cores to use D3D11 for hardware rendering. First core to use this is PPSSPP. -- D3D11: Increase backwards compatibility, shaders compile with Shader Model 4.0 now, added support for more feature levels. -- D3D10/D3D11/D3D12: Fix crashes with completely black or white thumbnail textures in XMB. -- GUI: Support disabling window decorations on Windows and Linux. -- LIBRETRO: Addition - Functions to enable and disable audio and video, and an environment function to query status of audio and video enables. -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Polish translation. +with D3D11 driver except for there being no hardware rendering right now +- D3D11: Experimental hardware renderer. Allows for libretro cores to use D3D11 for hardware rendering. First core to use this is PPSSPP +- D3D11: Increase backwards compatibility, shaders compile with Shader Model 4.0 now, added support for more feature levels +- D3D10/D3D11/D3D12: Fix crashes with completely black or white thumbnail textures in XMB +- GUI: Support disabling window decorations on Windows and Linux +- LIBRETRO: Addition - Functions to enable and disable audio and video, and an environment function to query status of audio and video enables +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Polish translation - MENU: Add Rewind/Latency/Overlay settings to Quick Menu, add options to show/hide them (User Interface -> Views -> Quick Menu) - MENU/RGUI: Only show Menu Linear Filter for RGUI and only show it for video drivers that implement it (D3D8/9/10/11/12/GL) -- MENU/RGUI: Add User Interface -> Appearance options. +- MENU/RGUI: Add User Interface -> Appearance options - MENU/RGUI: D3D8/D3D9: Hookup Menu Linear Filter -- MENU/XMB: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons. -- MENU/XMB: Left/right thumbnails are now automatically scaled according to layout. -- MENU/XMB: Add Left Thumbnails (additional to the right). -- MENU/XMB: Fixed left/right tab regression. -- MENU/XMB: Fix scaling of tall images that were cut on bottom previously. -- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins. -- MENU/XMB: Mouse cursor scales correctly now. -- MENU/XMB: Add toggle to show/hide Playlist tabs. -- MENU/XMB: Add menu layout - can switch between Desktop, Handheld and Auto. +- MENU/XMB: Disable XMB shadow icons by default for PowerPC and ARM for performance reasons +- MENU/XMB: Left/right thumbnails are now automatically scaled according to layout +- MENU/XMB: Add Left Thumbnails (additional to the right) +- MENU/XMB: Fixed left/right tab regression +- MENU/XMB: Fix scaling of tall images that were cut on bottom previously +- MENU/XMB: Menu scale factor setting now changes texts length, image scaling and margins +- MENU/XMB: Mouse cursor scales correctly now +- MENU/XMB: Add toggle to show/hide Playlist tabs +- MENU/XMB: Add menu layout - can switch between Desktop, Handheld and Auto - MENU/XMB: Don't load menu pipeline shaders unless XMB is selected (D3D10/D3D11/D3D12/GL/Vulkan) - MENU/VIDEO: Only show black frame insertion for the video drivers/context drivers that support it (so far this includes - D3D8/D3D9, OpenGL, Vulkan) - MENU/VIDEO: Only show max swapchain images if supported by video driver and/or context driver (so far this includes - DRM EGL context driver, VideoCore EGL context driver, Vulkan) -- MENU/MaterialUI: Automatic DPI Scaling should be much improved now, now scales as expected at 1440p and 4K resolutions. -- MENU/MaterialUI: Fix wrong calculation of an entry height causing long playlists to end up outside of screen range. This also could cause crashes on low DPI screens. -- IOS: Fixed crash when opening downloaded roms from Safari or using the "Open in.." functionality. Added the compiler flag to support keyboard remapping to controls. -- IOS: Fixed buffer overlap that caused a crash while trying to download GLSL shaders from the buildbot. +- MENU/MaterialUI: Automatic DPI Scaling should be much improved now, now scales as expected at 1440p and 4K resolutions +- MENU/MaterialUI: Fix wrong calculation of an entry height causing long playlists to end up outside of screen range. This also could cause crashes on low DPI screens +- IOS: Fixed crash when opening downloaded roms from Safari or using the "Open in.." functionality. Added the compiler flag to support keyboard remapping to controls +- IOS: Fixed buffer overlap that caused a crash while trying to download GLSL shaders from the buildbot - PS3: fix URLS - REMAPS: Mapping keyboard keys from more than one gamepad (works with dosbox) - REMAPS: Mapping more than one button to the same action @@ -384,156 +384,156 @@ that support it (so far this includes - D3D8/D3D9, OpenGL, Vulkan) - REMAPS: Mapping a button to trigger an analog response (tested with mupen, can run on SM64 with the d-pad now, triggers a full analog tilt) - REMAPS: Mapping an analog to another analog (having more than one analog mapped to the same output causes issues) - REMAPS: Mapping an analog to produce a button response -- SCANNER: Should be able to scan dual-layer Wii disc images now, filestream code now supports files larger than 4GB. -- SHADERS/SLANG: Slang shaders should work again on Android version and MSVC versions (basically all the Griffin-based versions). -- SHADERS: If GL context is GLES2/3/Core context, Cg shaders are unavailable. Applies to shader list too. -- SHADERS: Hide cg/glsl shaders from being able to be selected if D3D8/9/10/11/Vulkan video drivers are selected. -- SHADERS: Hide slang shaders from being able to be selected if D3D8/9/OpenGL video drivers are selected. +- SCANNER: Should be able to scan dual-layer Wii disc images now, filestream code now supports files larger than 4GB +- SHADERS/SLANG: Slang shaders should work again on Android version and MSVC versions (basically all the Griffin-based versions) +- SHADERS: If GL context is GLES2/3/Core context, Cg shaders are unavailable. Applies to shader list too +- SHADERS: Hide cg/glsl shaders from being able to be selected if D3D8/9/10/11/Vulkan video drivers are selected +- SHADERS: Hide slang shaders from being able to be selected if D3D8/9/OpenGL video drivers are selected - SHADERS: Prevent crashes from occurring if we have the GL video driver in use and we try to skip to a slang shader through next/previous hotkeys - SHADERS: Fix shader parameter increase / decrease functions - SUBSYSTEM: handle savestates properly (cart1 + cart2.state0) -- VULKAN/X11: Fix X11 Vulkan bug from Wayland driver. -- VULKAN: Fix multi-line text spacing in menus with Vulkan driver. -- WINDOWS XP: Add Cheevos support. -- WINDOWS/MSVC 2003/2005/2010/2013/2015/2017: Add Cheevos support. -- VITA: Bugfix for 'PS Vita takes many time to start to accept input' issue. +- VULKAN/X11: Fix X11 Vulkan bug from Wayland driver +- VULKAN: Fix multi-line text spacing in menus with Vulkan driver +- WINDOWS XP: Add Cheevos support +- WINDOWS/MSVC 2003/2005/2010/2013/2015/2017: Add Cheevos support +- VITA: Bugfix for 'PS Vita takes many time to start to accept input' issue - X11: Allow compositor disabling on X11 fullscreen through _NET_WM_BYPASS_COMPOSITOR - X11: Prioritize _NET_WM_STATE_FULLSCREEN_ in true fullscreen mode -- WIIU: Fix OOB read/write in keyboard driver. +- WIIU: Fix OOB read/write in keyboard driver # 1.7.1 -- 3DS: Now correctly reports amount of CPU cores. -- 3DS: Frontend rating is now correctly implemented for both New 3DS/2DS and Old 3DS/2DS. -- 3DS: Initial networking support, HTTP requests won't work yet. -- 3DS: Now reports memory and battery state. -- AUDIO: Added 'Audio Resampler Quality' setting to Audio Settings. Setting this higher will increase sound quality at the expense of sound latency and/or performance. Setting this value lower will improve sound latency/performance at the expense of sound quality. Only has an effect if the Sinc resampler is used, and you have to restart the game for changes to take effect. -- CHEEVOS: Fix unofficial achievements not being loaded. -- CHEEVOS: Show savestate menu entries when no achievements are found even if hardcore mode is enabled. -- CHEEVOS: Support Neo Geo Pocket. -- COMMON: Bugfix for issue related to 'Windows mouse pointer visible when running MESS or MAME cores'. -- COMMON: Fix bug 'Last item in a Playlist is ignored'. -- COMMON: New LED API. Driver implemented for Raspberry Pi, proof of concept implemented for core MAME 2003. -- COMMON: Add quick menu option to watch shader files for changes and recompile them automatically (Linux only for now). -- D3D8: Direct3D 8 can now work on systems that have Direct3D 8 installed. -- D3D9: Add menu support for MaterialUI/XMB. -- D3D10: Initial video driver implementation. -- D3D11: Initial video driver implementation. -- D3D11: SPIRV-Cross/slang shader support for D3D11. -- D3D12: Initial video driver implementation. +- 3DS: Now correctly reports amount of CPU cores +- 3DS: Frontend rating is now correctly implemented for both New 3DS/2DS and Old 3DS/2DS +- 3DS: Initial networking support, HTTP requests won't work yet +- 3DS: Now reports memory and battery state +- AUDIO: Added 'Audio Resampler Quality' setting to Audio Settings. Setting this higher will increase sound quality at the expense of sound latency and/or performance. Setting this value lower will improve sound latency/performance at the expense of sound quality. Only has an effect if the Sinc resampler is used, and you have to restart the game for changes to take effect +- CHEEVOS: Fix unofficial achievements not being loaded +- CHEEVOS: Show savestate menu entries when no achievements are found even if hardcore mode is enabled +- CHEEVOS: Support Neo Geo Pocket +- COMMON: Bugfix for issue related to 'Windows mouse pointer visible when running MESS or MAME cores' +- COMMON: Fix bug 'Last item in a Playlist is ignored' +- COMMON: New LED API. Driver implemented for Raspberry Pi, proof of concept implemented for core MAME 2003 +- COMMON: Add quick menu option to watch shader files for changes and recompile them automatically (Linux only for now) +- D3D8: Direct3D 8 can now work on systems that have Direct3D 8 installed +- D3D9: Add menu support for MaterialUI/XMB +- D3D10: Initial video driver implementation +- D3D11: Initial video driver implementation +- D3D11: SPIRV-Cross/slang shader support for D3D11 +- D3D12: Initial video driver implementation - DINPUT: don't reinitialize input driver on network events / media insertion / network drive connection - INPUT: show friendly names when available under input binds and system information - INPUT: show the config name when available under system information -- GUI: Allow changing menu font color. -- GUI: Menu visibility options for RGUI and MaterialUI. -- GUI/MaterialUI: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers. -- GUI/XMB: Add Monochrome Inverted icon theme. -- GUI/XMB: Allow changing menu scale to 200%. -- GUI/XMB: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers. Menu shader effects currently don't work on D3D8/D3D9 Cg. -- HAIKU: Restored port. +- GUI: Allow changing menu font color +- GUI: Menu visibility options for RGUI and MaterialUI +- GUI/MaterialUI: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers +- GUI/XMB: Add Monochrome Inverted icon theme +- GUI/XMB: Allow changing menu scale to 200% +- GUI/XMB: Works now with D3D8, D3D9 Cg, D3D11 and D3D12 drivers. Menu shader effects currently don't work on D3D8/D3D9 Cg +- HAIKU: Restored port - KEYMAPPER: prevent a condition that caused input_menu_toggle to stop working when a RETRO_DEVICE_KEYBOARD type device is enabled - GL: ignore hard gpu sync when fast-forwarding - IOS10/11: Handle hardware keyboards and iCade controllers -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Portuguese-Brazilian translation. -- LOCALIZATION: Update Spanish translation. -- NETPLAY: Add menu option to select different MITM (relay) server locations. -- OSX: Modify HID buttons detection algorithm. -- QB: Added --datarootdir, --sysconfdir, --bindir, --docdir and --mandir. -- QB: Deprecated --global-config-dir, --with-bin_dir and --with-man_dir. -- SHADERS: Allow saving of shader presets based on the parent directory (Saving one for */foo/bar/mario.sfc* would result in *shaders/presets/corename/bar.ext*). We decided it's safer to still isolate the presets to a single core because different cores may treat video output differently. +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Portuguese-Brazilian translation +- LOCALIZATION: Update Spanish translation +- NETPLAY: Add menu option to select different MITM (relay) server locations +- OSX: Modify HID buttons detection algorithm +- QB: Added --datarootdir, --sysconfdir, --bindir, --docdir and --mandir +- QB: Deprecated --global-config-dir, --with-bin_dir and --with-man_dir +- SHADERS: Allow saving of shader presets based on the parent directory (Saving one for */foo/bar/mario.sfc* would result in *shaders/presets/corename/bar.ext*). We decided it's safer to still isolate the presets to a single core because different cores may treat video output differently - SHADERS: Don't save the path to the current preset to the main config. This was causing weird behavior, instead it will try to load *currentconfig.ext* and it will save a preset with that name when select *apply shader preset*. The resulting shader will restore properly after restarting and even after core/parent/game specific presets are loaded -- SOLARIS: Initial port. -- SWITCH: Initial Nintendo Switch port, based on libtransistor SDK. -- PS3: Enable Cheevos. -- PSP: Enable threading support through pthreads. -- SHADERS: SPIRV-Cross/slang shader support for D3D11. +- SOLARIS: Initial port +- SWITCH: Initial Nintendo Switch port, based on libtransistor SDK +- PS3: Enable Cheevos +- PSP: Enable threading support through pthreads +- SHADERS: SPIRV-Cross/slang shader support for D3D11 - SHIELD ATV: Allow the remote / gamepad takeover hack to work with the 2017 gamepad - SUBSYSTEM: Subsystem saves now respect the save directory - SUBSYSTEM: You can now load subsystem games from the menu (see https://github.com/libretro/RetroArch/pull/6282 for caveats) -- VULKAN: Fix swapchain recreation bug on Nvidia GPUs with Windows 10 (resolved in Windows Nvidia driver version 390.77). -- WINDOWS: Improved Unicode support (for cores/directory creation and 7zip archives). -- WINDOWS: Show progress meter on taskbar for downloads (Windows 7 and up). -- WINDOWS: WS_EX_LAYERED drastically decreases performance, so only set it when needed (transparency in windowed mode). -- WIIU: Overlay support. -- WIIU: Transparency support in menu + overlays. -- WIIU: Increased stability during core switching. -- WIIU: Shader support. -- WIIU: Menu shader effects added (shaders). +- VULKAN: Fix swapchain recreation bug on Nvidia GPUs with Windows 10 (resolved in Windows Nvidia driver version 390.77) +- WINDOWS: Improved Unicode support (for cores/directory creation and 7zip archives) +- WINDOWS: Show progress meter on taskbar for downloads (Windows 7 and up) +- WINDOWS: WS_EX_LAYERED drastically decreases performance, so only set it when needed (transparency in windowed mode) +- WIIU: Overlay support +- WIIU: Transparency support in menu + overlays +- WIIU: Increased stability during core switching +- WIIU: Shader support +- WIIU: Menu shader effects added (shaders) - WIIU: Add missing time/clock support. (also fixes RTC [Real Time Clock] in Gambatte) -- XBOX OG: Restored port. +- XBOX OG: Restored port # 1.7.0 -- CHEEVOS: Add badges for achievements, shows thumbnail images of achievements. -- CHEEVOS: Leaderboard support. -- CHEEVOS: Only disable savestates on hardcore mode if achievements are not available. -- COMMANDLINE: Fix fullscreen toggle switch. -- COMMON: Add 'Automatically Load Content To Playlist' feature, enabled by default. -- COMMON: Fix slowmotion ratio always being reset back to 1. -- COMMON: Optimized NBIO implementations now for Apple, Windows, and Linux. Uses mmap for Linux/Windows/BSD if/when available. File I/O should now be much faster for loading images inside the menu. -- COMMON: Native Blissbox support now for latest firmware as of writing (2.0). Implementation through libusb and/or native Windows HID. -- COMMON: New lightgun API. -- COMMON: New VFS (Virtual File System) API. -- COMMON: Fixed some playlist bugs. -- COMMON: New snow shader. -- COMMON: Fix Quick Menu title, no longer shows 'Select File'. -- COMMON: Fix loading cores that require no content one after another. -- COMMON: Map Delete key to Y button for non-unified menu keyboard controls. -- COMMON: Fix for relative paths being normalised and generating a duplicate history entry. -- EMSCRIPTEN: Fix references to browserfs. -- FREEBSD: Support libusb HID input driver. -- HAIKU: Buildfix. -- INPUT: Map clear button to DEL key. -- LINUX/X11: Add RetroArch logo to window title bar. -- LINUX/X11: Input driver now supports new lightgun code. -- LINUX/X11: Support window transparency (requires a compositing window manager). -- LOBBIES: Fix for crash on join netplay rooms via touch / glui. -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Portuguese-Brazilian translation. -- LOCALIZATION: Update Polish translation. -- LOCALIZATION: Update Russian translation. -- MENU: Snowflake menu shader effect. -- OSX/PPC: Fix the GL2 renderchain, had to use EXT versions of framebuffer/renderbuffer functions. -- PS3: HTTP requests / downloads should now work. -- PS3: Core Updater now works. -- PS3: Improved font rendering, enable STB Unicode font renderer. -- PSP: Make it work with Vita's Adrenaline. -- PSP: Fix audio sync. -- PSP: Fix content loading, port should be functional again. -- PSP: Use 64MB when available. -- SCANNER: Fix crash from Windows-incompatible format string. -- VITA: Improve packaging, installation times. -- WIIU: Disabled the controller patcher for now since it was the source of many stability issues. -- VULKAN: Various stability fixes for WSI. -- WINDOWS: Add MSVC 2017 solution. -- WINDOWS: Get rid of the empty console window in MSVC 2010 builds. -- WINDOWS: Raw input driver now supports new lightgun code. -- WINDOWS: Use configured OSD/text message color on GDI driver. +- CHEEVOS: Add badges for achievements, shows thumbnail images of achievements +- CHEEVOS: Leaderboard support +- CHEEVOS: Only disable savestates on hardcore mode if achievements are not available +- COMMANDLINE: Fix fullscreen toggle switch +- COMMON: Add 'Automatically Load Content To Playlist' feature, enabled by default +- COMMON: Fix slowmotion ratio always being reset back to 1 +- COMMON: Optimized NBIO implementations now for Apple, Windows, and Linux. Uses mmap for Linux/Windows/BSD if/when available. File I/O should now be much faster for loading images inside the menu +- COMMON: Native Blissbox support now for latest firmware as of writing (2.0). Implementation through libusb and/or native Windows HID +- COMMON: New lightgun API +- COMMON: New VFS (Virtual File System) API +- COMMON: Fixed some playlist bugs +- COMMON: New snow shader +- COMMON: Fix Quick Menu title, no longer shows 'Select File' +- COMMON: Fix loading cores that require no content one after another +- COMMON: Map Delete key to Y button for non-unified menu keyboard controls +- COMMON: Fix for relative paths being normalised and generating a duplicate history entry +- EMSCRIPTEN: Fix references to browserfs +- FREEBSD: Support libusb HID input driver +- HAIKU: Buildfix +- INPUT: Map clear button to DEL key +- LINUX/X11: Add RetroArch logo to window title bar +- LINUX/X11: Input driver now supports new lightgun code +- LINUX/X11: Support window transparency (requires a compositing window manager) +- LOBBIES: Fix for crash on join netplay rooms via touch / glui +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Portuguese-Brazilian translation +- LOCALIZATION: Update Polish translation +- LOCALIZATION: Update Russian translation +- MENU: Snowflake menu shader effect +- OSX/PPC: Fix the GL2 renderchain, had to use EXT versions of framebuffer/renderbuffer functions +- PS3: HTTP requests / downloads should now work +- PS3: Core Updater now works +- PS3: Improved font rendering, enable STB Unicode font renderer +- PSP: Make it work with Vita's Adrenaline +- PSP: Fix audio sync +- PSP: Fix content loading, port should be functional again +- PSP: Use 64MB when available +- SCANNER: Fix crash from Windows-incompatible format string +- VITA: Improve packaging, installation times +- WIIU: Disabled the controller patcher for now since it was the source of many stability issues +- VULKAN: Various stability fixes for WSI +- WINDOWS: Add MSVC 2017 solution +- WINDOWS: Get rid of the empty console window in MSVC 2010 builds +- WINDOWS: Raw input driver now supports new lightgun code +- WINDOWS: Use configured OSD/text message color on GDI driver - WINDOWS/XINPUT: Populate XInput VID/PID from DInput so autoconfig doesn't rely solely on joypad names -- WINDOWS/XINPUT: Fix crash that occurs in some situations with Steam running and a Steam Controller plugged in. -- WINDOWS: Improve version reporting under System Information. -- WINDOWS: Support window transparency. -- WINDOWS: Correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98. -- WINDOWS: Added Visual Studio 2017 support. +- WINDOWS/XINPUT: Fix crash that occurs in some situations with Steam running and a Steam Controller plugged in +- WINDOWS: Improve version reporting under System Information +- WINDOWS: Support window transparency +- WINDOWS: Correct usage of GetWindowPlacement per MS docs, fixes game window position on Win95/98 +- WINDOWS: Added Visual Studio 2017 support # 1.6.9 -- COMMON: Small memory leak. -- NETPLAY: Fix network command only working once. +- COMMON: Small memory leak +- NETPLAY: Fix network command only working once # 1.6.8 - Audio: Fix the Audio DSP picker -- CHEEVOS: Add support for Atari Lynx cheevos. -- CHEEVOS: Add support for RetroAchievements Leaderboards. -- GUI: (MaterialUI) Fix crash that happened on context reset with Vulkan. -- GUI: (MaterialUI) Skip querying and drawing items that are not visible; Cache content height and bbox calculation. -- GUI: (MaterialUI) Fix entry box highlight calculation. -- GUI: (XMB) Skip drawing the fading list when it is already transparent. Optimization. -- GUI: (XMB) Comment out visible item calculation in xmb_draw_items(). -- GUI: (RGUI) Prevent crashes when using a non-English language reliant on UTF8. -- GUI: Add menu option for OSD background color. -- GUI: Add menu option for OSD text color. -- GUI: Add menu option to remove frame count from OSD. +- CHEEVOS: Add support for Atari Lynx cheevos +- CHEEVOS: Add support for RetroAchievements Leaderboards +- GUI: (MaterialUI) Fix crash that happened on context reset with Vulkan +- GUI: (MaterialUI) Skip querying and drawing items that are not visible; Cache content height and bbox calculation +- GUI: (MaterialUI) Fix entry box highlight calculation +- GUI: (XMB) Skip drawing the fading list when it is already transparent. Optimization +- GUI: (XMB) Comment out visible item calculation in xmb_draw_items() +- GUI: (RGUI) Prevent crashes when using a non-English language reliant on UTF8 +- GUI: Add menu option for OSD background color +- GUI: Add menu option for OSD text color +- GUI: Add menu option to remove frame count from OSD - GUI: Allow wraparound of int/float settings when pressing the left key - INPUT/LIBRETRO: Add support for more mouse buttons (buttons 4/5) - INPUT/LIBRETRO: Add support for analog buttons @@ -546,62 +546,62 @@ that support it (so far this includes - D3D8/D3D9, OpenGL, Vulkan) - INPUT: Sanitize the filenames of autoconfig profiles before saving - LOBBIES: Fix crash on navigating left / right from the lobby menu - LOCALIZATION: Update Dutch translation -- LOCALIZATION: Update Italian translation. -- LOCALIZATION: Update Japanese translation. -- LOCALIZATION: Update Portuguese-Brazilian translation. -- LOCALIZATION: Update Russian translation. +- LOCALIZATION: Update Italian translation +- LOCALIZATION: Update Japanese translation +- LOCALIZATION: Update Portuguese-Brazilian translation +- LOCALIZATION: Update Russian translation - LINUX/ARMHF: Set buildbot updater URL to armhf location instead of blank string - LINUX/PI: Broadcom VC4: Add Videocore config option -- LINUX/UDEV: Fix - RetroArch reads keyboard input when not focused with the udev input driver. -- NETPLAY: Fix disconnection not fully deinitializing Netplay. +- LINUX/UDEV: Fix - RetroArch reads keyboard input when not focused with the udev input driver +- NETPLAY: Fix disconnection not fully deinitializing Netplay - NETPLAY: Fix lan rooms when there is more than one room - NETPLAY: Fix lan rooms on systems where all addresses are treated as IPv6 -- COMMON: Fix clear/free loop conditionals in playlists. -- WINDOWS/GDI: Fix flickering of text. +- COMMON: Fix clear/free loop conditionals in playlists +- WINDOWS/GDI: Fix flickering of text - WINDOWS/GDI: Fix graphics corruption on Windows 98 - WINDOWS/GDI: Allow compiling without DirectInput8 for NT support -- WINDOWS/WGL: Try to use wglSwapLayerBuffers instead of SwapBuffers if possible (for more optimal performance). +- WINDOWS/WGL: Try to use wglSwapLayerBuffers instead of SwapBuffers if possible (for more optimal performance) - WINDOWS: Fix menubar text corruption on Japanese locale systems -- WINDOWS: Support Unicode file I/O (can now display CJK characters in file browser for example). +- WINDOWS: Support Unicode file I/O (can now display CJK characters in file browser for example) - WINDOWS: Support Windows 95, NT3.51, NT4 - WINDOWS: add Makefile.griffin targets for msvc6,2003,2005,2010,2012,2013 -- WII: Use custom, embedded libogc SDK. -- WIIU: Initial touchscreen support for WiiU gamepad. -- WIIU: Add Cheevos support. -- SCANNER: Fix archive scanning. -- SCANNER: Support CHD files. -- SCANNER: Support Gamecube ISO scanning. +- WII: Use custom, embedded libogc SDK +- WIIU: Initial touchscreen support for WiiU gamepad +- WIIU: Add Cheevos support +- SCANNER: Fix archive scanning +- SCANNER: Support CHD files +- SCANNER: Support Gamecube ISO scanning - SCANNER: Use primary data track of disc images for CRC lookups rather than cue files. This is slower but finds matches more reliably, and is necessary for CHD files to work at all. Update your databases! - SCANNER: Fall back on looking inside archives when matching MAME/FBA content (most recent cores only). If you had difficulty with content being detected before, you may have better luck now. Update your databases and core info! # 1.6.7 -- SCANNER: Fix directory scanning. -- SCANNER: Fix file scanning. -- COMMON: Fix 'Disk Image Append' option. -- FREEBSD: Compatibility fixes for Video4Linux2 camera driver. -- GUI: (MaterialUI) Add disk image append icons. -- GUI: (MaterialUI) Improve word wrapping when menu icons are enabled. -- GUI: (MaterialUI) Add User Interface -> Appearance -> Menu Icons Enable. You can turn on/off the icons on the lefthand side of the menu entries. -- GUI: Performance optimizations for XMB menu driver - only calculates visible items. -- LOCALIZATION: Update Italian translation. +- SCANNER: Fix directory scanning +- SCANNER: Fix file scanning +- COMMON: Fix 'Disk Image Append' option +- FREEBSD: Compatibility fixes for Video4Linux2 camera driver +- GUI: (MaterialUI) Add disk image append icons +- GUI: (MaterialUI) Improve word wrapping when menu icons are enabled +- GUI: (MaterialUI) Add User Interface -> Appearance -> Menu Icons Enable. You can turn on/off the icons on the lefthand side of the menu entries +- GUI: Performance optimizations for XMB menu driver - only calculates visible items +- LOCALIZATION: Update Italian translation # 1.6.6 -- 3DS: Fixes serious performance regression that affected every core; rewind was always implicitly enabled. -- AUDIO: MOD/S3M/XM sound should now be properly mixed in with the core's sound. -- GUI: Visual makeover of MaterialUI. -- GUI: Added 'Music', 'Images' and 'Video' collection options to RGUI/MaterialUI. -- GUI: Allow the user to add 'Favorites'. -- GUI: Allow the user to rename entries. -- GUI: Performance optimizations for XMB menu driver. +- 3DS: Fixes serious performance regression that affected every core; rewind was always implicitly enabled +- AUDIO: MOD/S3M/XM sound should now be properly mixed in with the core's sound +- GUI: Visual makeover of MaterialUI +- GUI: Added 'Music', 'Images' and 'Video' collection options to RGUI/MaterialUI +- GUI: Allow the user to add 'Favorites' +- GUI: Allow the user to rename entries +- GUI: Performance optimizations for XMB menu driver - LOCALIZATION: Update Italian translation -- INPUT: Overlay controller response - when we press buttons on the gamepad or keyboard, the corresponding buttons on the overlay will be highlighted as well. -- NETBSD: Silence some compilation warnings. -- COMMON: Fixed bug 'Deleting an entry from a playlist would not update the list view inside XMB'. +- INPUT: Overlay controller response - when we press buttons on the gamepad or keyboard, the corresponding buttons on the overlay will be highlighted as well +- NETBSD: Silence some compilation warnings +- COMMON: Fixed bug 'Deleting an entry from a playlist would not update the list view inside XMB' - COMMON: Fix inet_ntop_compat on Unix - LOBBY: Add skeleton to add help descriptions to lobbies # 1.6.5 -Skipped this one. +Skipped this one # 1.6.4 @@ -614,11 +614,11 @@ Skipped this one. - INPUT: allow saving libretro device to remap files - INPUT: allow saving analog dpad mode to remap files - INPUT: allow removing core and game remap files from the menu -- COMMON: Cores can now request to set a 'shared context'. You no longer need to explicitly enable 'Shared Hardware Context' for Citra/OpenLara/Dolphin. -- COMMON: Add 'Delete Core' option to Core Information menu. -- COMMON: Allow Max Timing Skew to be set to 0. +- COMMON: Cores can now request to set a 'shared context'. You no longer need to explicitly enable 'Shared Hardware Context' for Citra/OpenLara/Dolphin +- COMMON: Add 'Delete Core' option to Core Information menu +- COMMON: Allow Max Timing Skew to be set to 0 - COMMON: Change the "content dir" behavior so it works on either a flag or an empty directory setting, now platform drivers can provide defaults for save / system / state / screenshot dirs and still allow the content dir functionality, these settings are under settings / saving and flagged as advanced -- GUI: You can turn on/off 'Horizontal Animation' now for the XMB menu. Turning animations off can result in a performance boost. +- GUI: You can turn on/off 'Horizontal Animation' now for the XMB menu. Turning animations off can result in a performance boost - GUI: Fix sublabel word-wrapping in XMB where multi-byte languages were cut off too soon - LOCALIZATION: Update Dutch translation - LOCALIZATION: Update Traditional Chinese translation @@ -627,26 +627,26 @@ Skipped this one. - WINDOWS: Provide default save / system / state / screenshot locations - LOBBIES: Show what country the host is in - MENU: Enable OSD text rendering for gdi and libcaca drivers -- WINDOWS 98/ME/2K: Set default directory for MSVC 2005 RetroArch version. -- WII: Better V-Sync handling, backported from SuperrSonic. -- WIIU: Exception handler rewritten. +- WINDOWS 98/ME/2K: Set default directory for MSVC 2005 RetroArch version +- WII: Better V-Sync handling, backported from SuperrSonic +- WIIU: Exception handler rewritten # 1.6.3 - IOS: Fix GL regression - 32bit color format cores were no longer rendering -- CHEEVOS: Add support for N64 cheevos and other small fixes. -- CHEEVOS: Add 'Achievements -> Achievements Verbose Mode'. Ability to display cheevos related messages in OSD, useful for RetroAchievements users. -- AUDIO: Audio mixer's volume can now be independently increased/decreased, and muted. -- AUDIO: Mute now no longer disables/enables audio but instead properly mutes the audio volume. Mute is also independent from the audio mixer volume. +- CHEEVOS: Add support for N64 cheevos and other small fixes +- CHEEVOS: Add 'Achievements -> Achievements Verbose Mode'. Ability to display cheevos related messages in OSD, useful for RetroAchievements users +- AUDIO: Audio mixer's volume can now be independently increased/decreased, and muted +- AUDIO: Mute now no longer disables/enables audio but instead properly mutes the audio volume. Mute is also independent from the audio mixer volume - INPUT: Add mouse index selection; ability now to select between different mice - INPUT: Fix 'All Users Control Menu' setting -- LINUX: Add a tinyalsa audio driver. Doesn't require asoundlib, should be self-contained and lower-level. +- LINUX: Add a tinyalsa audio driver. Doesn't require asoundlib, should be self-contained and lower-level - LOBBIES: Announce the RetroArch version too - LOCALIZATION: Add Traditional Chinese translation - LOCALIZATION: Update French translation - LOCALIZATION: Update Italian translation - LOCALIZATION: Update Japanese translation - LOCALIZATION: Update Russian translation -- MENU: Add 'User Interface -> Views'. Ability to display/hide online updater and core updater options. +- MENU: Add 'User Interface -> Views'. Ability to display/hide online updater and core updater options - NETPLAY: Disconnecting one client shouldn't cause everyone to disconnect anymore - NETWORK: SSL/TLS support, disabled by default - SCANNER: Fix PS1 game scanning @@ -663,9 +663,9 @@ Skipped this one. - ANDROID: Improve autoconf fallback - ANDROID: Improve shield portable/gamepad device grouping workaround - ANDROID: Runtime permission checking -- AUDIO: Audio mixer support. Mix up to 8 streams with the game's audio. +- AUDIO: Audio mixer support. Mix up to 8 streams with the game's audio - AUTOSAVE/SRAM - Fix bug #3829 / #4820 (https://github.com/libretro/RetroArch/issues/3829) -- ENDIANNESS: Fixed database scanning. Should fix scanning on PS3/WiiU/Wii, etc. +- ENDIANNESS: Fixed database scanning. Should fix scanning on PS3/WiiU/Wii, etc - LOBBIES: Fallback to filename based matching if no CRC matches are found (for people making playlists by hand) - LOBBIES: GUI refinement, show stop hosting when a host has been started, show disconnect when playing as client - LOBBIES: if the game is already loaded it will try to connect directly instead of re-loading content (non-fullpath cores only) @@ -676,22 +676,22 @@ Skipped this one. - LOCALIZATION: Update Russian translation - LOCALIZATION: Update/finish French translation - MENU: Improved rendering for XMB ribbon; using additive blending (Vulkan/GL) -- MISC: Various frontend optimizations. +- MISC: Various frontend optimizations - NET: Fix bug #4703 (https://github.com/libretro/RetroArch/issues/4703) - OSX/MACOS: Fixes serious memory leak - THUMBNAILS: Thumbnails show up now in Load Content -> Collection, Information -> Database -- VIDEO: Fix threaded video regression; tickering of menu entries would no longer work. +- VIDEO: Fix threaded video regression; tickering of menu entries would no longer work - VITA: Fix 30fps menu (poke into input now instead of reading the entire input buffer which apparently is slow) - VITA: Fix frame throttle - VITA: Fix slow I/O - VULKAN: Fix some crashes on loading some thumbnails -- VULKAN: Unicode font rendering support. Should fix bad character encoding for French characters, etc. +- VULKAN: Unicode font rendering support. Should fix bad character encoding for French characters, etc - WII: Fix crashing issues which could occur with the dummy core - WIIU: HID Controller support - WIIU: Initial network/netplay support - WIIU: XMB/MaterialUI menu driver support -- WINDOWS: Added RawInput input driver for low-latency, low-level input. -- WINDOWS: Added WASAPI audio driver for low-latency audio. Both shared and exclusive mode. +- WINDOWS: Added RawInput input driver for low-latency, low-level input +- WINDOWS: Added WASAPI audio driver for low-latency audio. Both shared and exclusive mode - WINDOWS: Core mouse input should be relative again in cores # 1.5.0 @@ -702,7 +702,7 @@ Skipped this one. - CHEEVOS: WIP leaderboards support - COMMON: 9-slice texture drawing support - COMMON: Threading fixes -- CORETEXT/APPLE: Ability to load menu display font drivers and loading of custom font. +- CORETEXT/APPLE: Ability to load menu display font drivers and loading of custom font - DOS: Add keyboard driver - DOS: Improve color accuracy and scaling - GUI: Add a symbol page in the OSK From 450feb46cc245a900e2408cb409b9b634f7b70e2 Mon Sep 17 00:00:00 2001 From: ZornTaov Date: Thu, 18 Jul 2019 14:02:17 -0700 Subject: [PATCH 002/275] Update libretro-db/README.md Looking through libretro-db/query.c I discovered the b prefix to strings that turns the string into binary, this is useful for searching up hexadecimal hashes. This information was not described in the documentation, so I've added it before the Names only search to group with the other find commands, though it will work with get-names as well. --- libretro-db/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libretro-db/README.md b/libretro-db/README.md index 5b4fc0ade7..debe81daf2 100644 --- a/libretro-db/README.md +++ b/libretro-db/README.md @@ -69,7 +69,12 @@ Usecase: Search for all games released on October 1995. `libretrodb_tool find "{'releasemonth':10,'releaseyear':1995}"` -3) Names only search +3) Hash matching query +Usecase: Search for any game matching a given crc32, in this case Soul Blazer (USA) for the SNES. Also works with serial, md5, and sha1. + +`libretrodb_tool find "{'crc':b'31B965DB'}"` + +4) Names only search Usecase: Search for all games released on October 1995, wont print checksums, filename or rom size, only the game name. `libretrodb_tool get-names "{'releasemonth':10,'releaseyear':1995}"` From e1ab933bf2d0cb542e8c29c8b9e00e6fdf840b22 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 18 Jul 2019 23:40:32 +0200 Subject: [PATCH 003/275] (Android) These arrays should be at least as big as MAX_USERS --- input/drivers/android_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 6362d1f9d3..026dabc0e4 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -151,9 +151,9 @@ typedef struct android_input bool blocked; const input_device_driver_t *joypad; - state_device_t pad_states[MAX_PADS]; - int16_t analog_state[MAX_PADS][MAX_AXIS]; - int8_t hat_state[MAX_PADS][2]; + state_device_t pad_states[MAX_USERS]; + int16_t analog_state[MAX_USERS][MAX_AXIS]; + int8_t hat_state[MAX_USERS][2]; unsigned pads_connected; sensor_t accelerometer_state; From 04bcef01b8a2776b02fdfd515b56cd1531206907 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 12:06:58 +0200 Subject: [PATCH 004/275] (MSVC 2005) Fix NoAccel targets --- pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index dc72b31a46..c192a78800 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -280,7 +280,7 @@ Date: Fri, 19 Jul 2019 12:55:38 +0200 Subject: [PATCH 005/275] Define DEFAULT_MAX_PADS inside config.def.h - get rid of the messy MAX_PADS macros everywhere --- config.def.h | 40 +++++++++++++++++++ frontend/drivers/platform_unix.h | 10 ++--- gfx/common/win32_common.c | 6 --- input/drivers/android_input.c | 10 +++-- input/drivers/ctr_input.c | 2 - input/drivers/dos_input.c | 6 ++- input/drivers/gx_input.c | 8 ++-- input/drivers/ps3_input.c | 4 -- input/drivers/qnx_input.c | 27 ++++++------- input/drivers/switch_input.c | 6 +-- input/drivers/wiiu_input.c | 10 ++--- input/drivers/xdk_xinput_input.c | 6 +-- input/drivers/xenon360_input.c | 10 ++--- input/drivers_joypad/android_joypad.c | 6 ++- input/drivers_joypad/ctr_joypad.c | 12 +++--- input/drivers_joypad/dos_joypad.c | 6 ++- input/drivers_joypad/gx_joypad.c | 24 +++++------ input/drivers_joypad/ps2_joypad.c | 19 ++++----- input/drivers_joypad/ps3_joypad.c | 20 +++++----- input/drivers_joypad/psp_joypad.c | 24 +++++------ input/drivers_joypad/qnx_joypad.c | 6 ++- input/drivers_joypad/switch_joypad.c | 40 +++++++------------ input/drivers_joypad/xdk_joypad.c | 14 ++++--- input/drivers_joypad/xinput_joypad.c | 5 ++- .../drivers_keyboard/keyboard_event_android.h | 6 --- input/drivers_keyboard/keyboard_event_dos.h | 8 +--- input/input_keymaps.c | 2 + 27 files changed, 173 insertions(+), 164 deletions(-) diff --git a/config.def.h b/config.def.h index 86ceb1d755..1e34eb37d5 100644 --- a/config.def.h +++ b/config.def.h @@ -53,6 +53,46 @@ #define DEFAULT_ASPECT_RATIO -1.0f #endif +#if defined(ANDROID) +#define DEFAULT_MAX_PADS 8 +#define ANDROID_KEYBOARD_PORT DEFAULT_MAX_PADS +#elif defined(_3DS) +#define DEFAULT_MAX_PADS 1 +#elif defined(SWITCH) || defined(HAVE_LIBNX) +#define DEFAULT_MAX_PADS 8 +#elif defined(WIIU) +#ifdef WIIU_HID +#define DEFAULT_MAX_PADS 16 +#else +#define DEFAULT_MAX_PADS 5 +#endif +#elif defined(DJGPP) +#define DEFAULT_MAX_PADS 1 +#define DOS_KEYBOARD_PORT DEFAULT_MAX_PADS +#elif defined(XENON) +#define DEFAULT_MAX_PADS 4 +#elif defined(VITA) || defined(SN_TARGET_PSP2) +#define DEFAULT_MAX_PADS 4 +#elif defined(PSP) +#define DEFAULT_MAX_PADS 1 +#elif defined(PS2) +#define DEFAULT_MAX_PADS 2 +#elif defined(GEKKO) || defined(HW_RVL) +#define DEFAULT_MAX_PADS 4 +#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__)) +#define DEFAULT_MAX_PADS 8 +#elif defined(__QNX__) +#define DEFAULT_MAX_PADS 8 +#elif defined(__CELLOS_LV2__) +#define DEFAULT_MAX_PADS 7 +#elif defined(_XBOX) +#define DEFAULT_MAX_PADS 4 +#elif defined(HAVE_XINPUT) && !defined(HAVE_DINPUT) +#define DEFAULT_MAX_PADS 4 +#else +#define DEFAULT_MAX_PADS 16 +#endif + #if defined(RARCH_MOBILE) || defined(HAVE_LIBNX) #define DEFAULT_POINTER_ENABLE true #else diff --git a/frontend/drivers/platform_unix.h b/frontend/drivers/platform_unix.h index 0252e3993d..75f5578967 100644 --- a/frontend/drivers/platform_unix.h +++ b/frontend/drivers/platform_unix.h @@ -22,9 +22,7 @@ #include -#ifndef MAX_PADS -#define MAX_PADS 8 -#endif +#include "../../config.def.h" #ifndef MAX_AXIS #define MAX_AXIS 10 @@ -43,6 +41,8 @@ #include +#include "../../config.def.h" + bool test_permissions(const char *path); char internal_storage_path[PATH_MAX_LENGTH]; @@ -144,8 +144,8 @@ struct android_app uint64_t sensor_state_mask; char current_ime[PATH_MAX_LENGTH]; bool input_alive; - int16_t analog_state[MAX_PADS][MAX_AXIS]; - int8_t hat_state[MAX_PADS][2]; + int16_t analog_state[DEFAULT_MAX_PADS][MAX_AXIS]; + int8_t hat_state[DEFAULT_MAX_PADS][2]; jmethodID getIntent; jmethodID onRetroArchExit; jmethodID getStringExtra; diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 1f5515829f..3fffc9e97e 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -105,12 +105,6 @@ extern void *dinput_wgl; extern void *dinput; #endif -#if defined(HAVE_XINPUT) && !defined(HAVE_DINPUT) -#ifndef MAX_PADS -#define MAX_PADS 4 -#endif -#endif - typedef struct DISPLAYCONFIG_RATIONAL_CUSTOM { UINT32 Numerator; UINT32 Denominator; diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 026dabc0e4..16cd5ea066 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -29,6 +29,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #ifdef HAVE_MENU #include "../../menu/menu_driver.h" #endif @@ -81,7 +83,7 @@ enum { /* First ports are used to keep track of gamepad states. * Last port is used for keyboard state */ -static uint8_t android_key_state[MAX_PADS+1][MAX_KEYS]; +static uint8_t android_key_state[DEFAULT_MAX_PADS + 1][MAX_KEYS]; #define android_keyboard_port_input_pressed(binds, id) (BIT_GET(android_key_state[ANDROID_KEYBOARD_PORT], rarch_keysym_lut[(binds)[(id)].key])) @@ -96,7 +98,7 @@ static void android_keyboard_free(void) { unsigned i, j; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) for (j = 0; j < MAX_KEYS; j++) android_key_state[i][j] = 0; } @@ -956,7 +958,7 @@ static void handle_hotplug(android_input_t *android, RARCH_LOG("Device model: (%s).\n", device_model); - if (*port > MAX_PADS) + if (*port > DEFAULT_MAX_PADS) { RARCH_ERR("Max number of pads reached.\n"); return; @@ -1348,7 +1350,7 @@ static void android_input_poll_memcpy(android_input_t *android) unsigned i, j; struct android_app *android_app = (struct android_app*)g_android; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { for (j = 0; j < 2; j++) android_app->hat_state[i][j] = android->hat_state[i][j]; diff --git a/input/drivers/ctr_input.c b/input/drivers/ctr_input.c index 9187d699ca..950b538dba 100644 --- a/input/drivers/ctr_input.c +++ b/input/drivers/ctr_input.c @@ -27,8 +27,6 @@ #include "../input_driver.h" -#define MAX_PADS 1 - /* TODO/FIXME - * fix game focus toggle */ diff --git a/input/drivers/dos_input.c b/input/drivers/dos_input.c index c5a67a4952..f346b689a6 100644 --- a/input/drivers/dos_input.c +++ b/input/drivers/dos_input.c @@ -20,6 +20,8 @@ #include +#include "../../config.def.h" + #include "../input_driver.h" #include "../input_keymaps.h" #include "../drivers_keyboard/keyboard_event_dos.h" @@ -35,7 +37,7 @@ typedef struct dos_input #define MAX_KEYS LAST_KEYCODE + 1 /* First ports are used to keeping track of gamepad states. Last port is used for keyboard state */ -static uint16_t dos_key_state[MAX_PADS+1][MAX_KEYS]; +static uint16_t dos_key_state[DEFAULT_MAX_PADS+1][MAX_KEYS]; static bool dos_keyboard_port_input_pressed( const struct retro_keybind *binds, unsigned id) @@ -54,7 +56,7 @@ static void dos_keyboard_free(void) { unsigned i, j; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) for (j = 0; j < MAX_KEYS; j++) dos_key_state[i][j] = 0; } diff --git a/input/drivers/gx_input.c b/input/drivers/gx_input.c index e5e25a03cf..40d585fc44 100644 --- a/input/drivers/gx_input.c +++ b/input/drivers/gx_input.c @@ -25,11 +25,9 @@ #include -#include "../input_driver.h" +#include "../../config.def.h" -#ifndef MAX_PADS -#define MAX_PADS 4 -#endif +#include "../input_driver.h" /* TODO/FIXME - * fix game focus toggle */ @@ -49,7 +47,7 @@ static int16_t gx_input_state(void *data, gx_input_t *gx = (gx_input_t*)data; int16_t ret = 0; - if (port >= MAX_PADS || !gx) + if (port >= DEFAULT_MAX_PADS || !gx) return 0; switch (device) diff --git a/input/drivers/ps3_input.c b/input/drivers/ps3_input.c index 9cb6f89ba0..7fbe1bf183 100644 --- a/input/drivers/ps3_input.c +++ b/input/drivers/ps3_input.c @@ -36,10 +36,6 @@ #endif #endif -#ifndef __PSL1GHT__ -#define MAX_PADS 7 -#endif - /* TODO/FIXME - * fix game focus toggle */ diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index aa61f13bdb..78681f82ff 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -27,6 +27,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #include "../input_driver.h" #include "../../retroarch.h" @@ -34,8 +36,6 @@ #include "../../command.h" -#define MAX_PADS 8 - #ifdef HAVE_BB10 #define MAX_TOUCH 16 #else @@ -72,6 +72,10 @@ struct input_pointer int map; }; +#define QNX_MAX_KEYS (65535 + 7) / 8 +#define TRACKPAD_CPI 500 +#define TRACKPAD_THRESHOLD TRACKPAD_CPI / 2 + typedef struct qnx_input { bool blocked; @@ -86,16 +90,13 @@ typedef struct qnx_input unsigned pointer_count; int touch_map[MAX_TOUCH]; - qnx_input_device_t devices[MAX_PADS]; + qnx_input_device_t devices[DEFAULT_MAX_PADS]; const input_device_driver_t *joypad; -#define QNX_MAX_KEYS (65535 + 7) / 8 uint8_t keyboard_state[QNX_MAX_KEYS]; - uint64_t pad_state[MAX_PADS]; + uint64_t pad_state[DEFAULT_MAX_PADS]; -#define TRACKPAD_CPI 500 -#define TRACKPAD_THRESHOLD TRACKPAD_CPI / 2 int trackpad_acc[2]; } qnx_input_t; @@ -143,7 +144,7 @@ static void qnx_process_gamepad_event( screen_get_event_property_pv(screen_event, SCREEN_PROPERTY_DEVICE, (void**)&device); - for (i = 0; i < MAX_PADS; ++i) + for (i = 0; i < DEFAULT_MAX_PADS; ++i) { if (device == qnx->devices[i].handle) { @@ -343,7 +344,7 @@ static void qnx_discover_controllers(qnx_input_t *qnx) qnx->devices[qnx->pads_connected].index = qnx->pads_connected; qnx_handle_device(qnx, &qnx->devices[qnx->pads_connected]); - if (qnx->pads_connected == MAX_PADS) + if (qnx->pads_connected == DEFAULT_MAX_PADS) break; } } @@ -563,7 +564,7 @@ static void qnx_handle_screen_event(qnx_input_t *qnx, bps_event_t *event) type == SCREEN_EVENT_KEYBOARD) ) { - for (i = 0; i < MAX_PADS; ++i) + for (i = 0; i < DEFAULT_MAX_PADS; ++i) { if (!qnx->devices[i].handle) { @@ -575,7 +576,7 @@ static void qnx_handle_screen_event(qnx_input_t *qnx, bps_event_t *event) } else { - for (i = 0; i < MAX_PADS; ++i) + for (i = 0; i < DEFAULT_MAX_PADS; ++i) { if (device == qnx->devices[i].handle) { @@ -679,10 +680,8 @@ static void *qnx_input_init(const char *joypad_driver) qnx->joypad = input_joypad_init_driver(joypad_driver, qnx); - for (i = 0; i < MAX_PADS; ++i) - { + for (i = 0; i < DEFAULT_MAX_PADS; ++i) qnx_init_controller(qnx, &qnx->devices[i]); - } #ifdef HAVE_BB10 qnx_discover_controllers(qnx); diff --git a/input/drivers/switch_input.c b/input/drivers/switch_input.c index 066a1c332c..8a29ed3d75 100644 --- a/input/drivers/switch_input.c +++ b/input/drivers/switch_input.c @@ -9,6 +9,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #include "../../retroarch.h" #ifdef HAVE_LIBNX @@ -81,8 +83,6 @@ typedef struct #include "../input_driver.h" #include "../input_keymaps.h" -#define MAX_PADS 10 - /* TODO/FIXME - * fix game focus toggle */ @@ -376,7 +376,7 @@ static int16_t switch_input_state(void *data, int16_t ret = 0; switch_input_t *sw = (switch_input_t*) data; - if (port > MAX_PADS-1) + if (port > DEFAULT_MAX_PADS - 1) return 0; switch (device) diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index fae0945f99..385561ad53 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -28,17 +28,13 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #include "../input_driver.h" #include "../input_keymaps.h" #include "wiiu_dbg.h" -#ifdef WIIU_HID -#define MAX_PADS 16 -#else -#define MAX_PADS 5 -#endif - static uint8_t keyboardChannel = 0x00; static bool keyboardState[RETROK_LAST] = { 0 }; @@ -136,7 +132,7 @@ static int16_t wiiu_input_state(void *data, int16_t ret = 0; wiiu_input_t *wiiu = (wiiu_input_t*)data; - if(!wiiu || !(port < MAX_PADS) || !binds || !binds[port]) + if(!wiiu || !(port < DEFAULT_MAX_PADS) || !binds || !binds[port]) return 0; switch (device) diff --git a/input/drivers/xdk_xinput_input.c b/input/drivers/xdk_xinput_input.c index 641715e9ab..f203f1683a 100644 --- a/input/drivers/xdk_xinput_input.c +++ b/input/drivers/xdk_xinput_input.c @@ -28,9 +28,9 @@ #include #include -#include "../input_driver.h" +#include "../../config.def.h" -#define MAX_PADS 4 +#include "../input_driver.h" /* TODO/FIXME - * fix game focus toggle */ @@ -58,7 +58,7 @@ static int16_t xdk_input_state(void *data, int16_t ret = 0; xdk_input_t *xdk = (xdk_input_t*)data; - if (port >= MAX_PADS) + if (port >= DEFAULT_MAX_PADS) return 0; switch (device) diff --git a/input/drivers/xenon360_input.c b/input/drivers/xenon360_input.c index bf81e21bd2..2cf8d6b5a2 100644 --- a/input/drivers/xenon360_input.c +++ b/input/drivers/xenon360_input.c @@ -23,19 +23,19 @@ #include -#include "../input_driver.h" +#include "../../config.def.h" -#define MAX_PADS 4 +#include "../input_driver.h" /* TODO/FIXME - * fix game focus toggle */ -static uint64_t state[MAX_PADS]; +static uint64_t state[DEFAULT_MAX_PADS]; static void xenon360_input_poll(void *data) { (void)data; - for (unsigned i = 0; i < MAX_PADS; i++) + for (unsigned i = 0; i < DEFAULT_MAX_PADS; i++) { struct controller_data_s pad; usb_do_poll(); @@ -67,7 +67,7 @@ static int16_t xenon360_input_state(void *data, int16_t ret = 0; uint64_t button = binds[port][id].joykey; - if (port >= MAX_PADS) + if (port >= DEFAULT_MAX_PADS) return 0; switch (device) diff --git a/input/drivers_joypad/android_joypad.c b/input/drivers_joypad/android_joypad.c index fa1b8e3596..164007b263 100644 --- a/input/drivers_joypad/android_joypad.c +++ b/input/drivers_joypad/android_joypad.c @@ -15,6 +15,8 @@ * If not, see . */ +#include "../../config.def.h" + #include "../input_driver.h" #include "../drivers_keyboard/keyboard_event_android.h" @@ -34,7 +36,7 @@ static bool android_joypad_button(unsigned port, uint16_t joykey) struct android_app *android_app = (struct android_app*)g_android; unsigned hat_dir = GET_HAT_DIR(joykey); - if (port >= MAX_PADS) + if (port >= DEFAULT_MAX_PADS) return false; if (hat_dir) @@ -99,7 +101,7 @@ static void android_joypad_destroy(void) unsigned i, j; struct android_app *android_app = (struct android_app*)g_android; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { for (j = 0; j < 2; j++) android_app->hat_state[i][j] = 0; diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index 8f60c9d6fd..1a3473c9a0 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -18,6 +18,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #include "../input_driver.h" #include "../../tasks/tasks_internal.h" @@ -27,10 +29,6 @@ #include "string.h" #include "3ds.h" -#ifndef MAX_PADS -#define MAX_PADS 1 -#endif - static uint32_t pad_state; static int16_t analog_state[1][2][2]; extern uint64_t lifecycle_state; @@ -63,7 +61,7 @@ static bool ctr_joypad_init(void *data) static bool ctr_joypad_button(unsigned port_num, uint16_t key) { - if (port_num >= MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; return (pad_state & (1 << key)); @@ -71,7 +69,7 @@ static bool ctr_joypad_button(unsigned port_num, uint16_t key) static void ctr_joypad_get_buttons(unsigned port_num, input_bits_t *state) { - if ( port_num < MAX_PADS ) + if (port_num < DEFAULT_MAX_PADS) { BITS_COPY16_PTR( state, pad_state ); } @@ -86,7 +84,7 @@ static int16_t ctr_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= MAX_PADS) + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) diff --git a/input/drivers_joypad/dos_joypad.c b/input/drivers_joypad/dos_joypad.c index 4d4dc455c1..658aa6c731 100644 --- a/input/drivers_joypad/dos_joypad.c +++ b/input/drivers_joypad/dos_joypad.c @@ -26,6 +26,8 @@ #include +#include "../../config.def.h" + #include "../input_driver.h" #include "../input_keymaps.h" #include "../../tasks/tasks_internal.h" @@ -176,7 +178,7 @@ static bool dos_joypad_button(unsigned port_num, uint16_t key) { uint16_t *buf = dos_keyboard_state_get(port_num); - if (port_num >= MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; switch (key) @@ -210,7 +212,7 @@ static void dos_joypad_poll(void) { uint32_t i; - for (i = 0; i <= MAX_PADS; i++) + for (i = 0; i <= DEFAULT_MAX_PADS; i++) { uint16_t *cur_state = dos_keyboard_state_get(i); uint32_t key; diff --git a/input/drivers_joypad/gx_joypad.c b/input/drivers_joypad/gx_joypad.c index f58301f941..5af82e6113 100644 --- a/input/drivers_joypad/gx_joypad.c +++ b/input/drivers_joypad/gx_joypad.c @@ -21,6 +21,8 @@ #include #endif +#include "../../config.def.h" + #include "../../tasks/tasks_internal.h" #ifdef GEKKO @@ -39,10 +41,6 @@ #define NUM_DEVICES 1 #endif -#ifndef MAX_PADS -#define MAX_PADS 4 -#endif - enum { GX_GC_A = 0, @@ -99,9 +97,9 @@ enum #define WII_JOYSTICK_THRESHOLD (40 * 256) extern uint64_t lifecycle_state; -static uint64_t pad_state[MAX_PADS]; -static uint32_t pad_type[MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER }; -static int16_t analog_state[MAX_PADS][2][2]; +static uint64_t pad_state[DEFAULT_MAX_PADS]; +static uint32_t pad_type[DEFAULT_MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER }; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; static bool g_menu = false; #ifdef HW_RVL @@ -154,14 +152,14 @@ static void handle_hotplug(unsigned port, uint32_t ptype) static bool gx_joypad_button(unsigned port, uint16_t key) { - if (port >= MAX_PADS) + if (port >= DEFAULT_MAX_PADS) return false; return (pad_state[port] & (UINT64_C(1) << key)); } static void gx_joypad_get_buttons(unsigned port, input_bits_t *state) { - if (port < MAX_PADS) + if (port < DEFAULT_MAX_PADS) { BITS_COPY16_PTR( state, pad_state[port] ); } @@ -176,7 +174,7 @@ static int16_t gx_joypad_axis(unsigned port, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port >= MAX_PADS) + if (joyaxis == AXIS_NONE || port >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) @@ -333,7 +331,7 @@ static void gx_joypad_poll(void) WPAD_ReadPending(WPAD_CHAN_ALL, NULL); #endif - for (port = 0; port < MAX_PADS; port++) + for (port = 0; port < DEFAULT_MAX_PADS; port++) { uint32_t down = 0, ptype = WPAD_EXP_NOCONTROLLER; uint64_t *state_cur = &pad_state[port]; @@ -478,7 +476,7 @@ static bool gx_joypad_init(void *data) (void)data; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) pad_type[i] = WPAD_EXP_NOCONTROLLER; PAD_Init(); @@ -501,7 +499,7 @@ static void gx_joypad_destroy(void) #ifdef HW_RVL #if 0 int i; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { /* Commenting this out fixes the Wii * remote not reconnecting after diff --git a/input/drivers_joypad/ps2_joypad.c b/input/drivers_joypad/ps2_joypad.c index dc40b6d787..6ea578d310 100644 --- a/input/drivers_joypad/ps2_joypad.c +++ b/input/drivers_joypad/ps2_joypad.c @@ -17,19 +17,20 @@ #include #include +#include "../../config.def.h" + #include "../input_driver.h" #include "libpad.h" -#define PS2_MAX_PADS 2 #define PS2_PAD_SLOT 0 /* Always zero if not using multitap */ #define PS2_ANALOG_STICKS 2 #define PS2_ANALOG_AXIS 2 static unsigned char padBuf[2][256] ALIGNED(64); -static uint64_t pad_state[PS2_MAX_PADS]; -static int16_t analog_state[PS2_MAX_PADS][PS2_ANALOG_STICKS][PS2_ANALOG_AXIS]; +static uint64_t pad_state[DEFAULT_MAX_PADS]; +static int16_t analog_state[DEFAULT_MAX_PADS][PS2_ANALOG_STICKS][PS2_ANALOG_AXIS]; extern uint64_t lifecycle_state; @@ -64,7 +65,7 @@ static bool ps2_joypad_init(void *data) printf("PortMax: %d\n", padGetPortMax()); printf("SlotMax: %d\n", padGetSlotMax(port)); - for (port = 0; port < PS2_MAX_PADS; port++) + for (port = 0; port < DEFAULT_MAX_PADS; port++) { input_autoconfigure_connect( ps2_joypad_name(port), NULL, @@ -87,7 +88,7 @@ static bool ps2_joypad_init(void *data) static bool ps2_joypad_button(unsigned port_num, uint16_t joykey) { - if (port_num >= PS2_MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; return (pad_state[port_num] & (UINT64_C(1) << joykey)); @@ -105,7 +106,7 @@ static int16_t ps2_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= PS2_MAX_PADS) + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) @@ -148,7 +149,7 @@ static void ps2_joypad_poll(void) unsigned player; struct padButtonStatus buttons; - for (player = 0; player < PS2_MAX_PADS; player++) + for (player = 0; player < DEFAULT_MAX_PADS; player++) { int state = padGetState(player, PS2_PAD_SLOT); if (state == PAD_STATE_STABLE) @@ -193,7 +194,7 @@ static void ps2_joypad_poll(void) static bool ps2_joypad_query_pad(unsigned pad) { - return pad < PS2_MAX_PADS && pad_state[pad]; + return pad < DEFAULT_MAX_PADS && pad_state[pad]; } static bool ps2_joypad_rumble(unsigned pad, @@ -205,7 +206,7 @@ static bool ps2_joypad_rumble(unsigned pad, static void ps2_joypad_destroy(void) { unsigned port; - for (port = 0; port < PS2_MAX_PADS; port++) + for (port = 0; port < DEFAULT_MAX_PADS; port++) padPortClose(port, PS2_PAD_SLOT); } diff --git a/input/drivers_joypad/ps3_joypad.c b/input/drivers_joypad/ps3_joypad.c index cee170603e..9847e2c62f 100644 --- a/input/drivers_joypad/ps3_joypad.c +++ b/input/drivers_joypad/ps3_joypad.c @@ -17,13 +17,15 @@ #include #include +#include "../../config.def.h" + #include "../../tasks/tasks_internal.h" -static uint64_t pad_state[MAX_PADS]; -static int16_t analog_state[MAX_PADS][2][2]; -static uint64_t pads_connected[MAX_PADS]; +static uint64_t pad_state[DEFAULT_MAX_PADS]; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; +static uint64_t pads_connected[DEFAULT_MAX_PADS]; #if 0 -sensor_t accelerometer_state[MAX_PADS]; +sensor_t accelerometer_state[DEFAULT_MAX_PADS]; #endif static INLINE int16_t convert_u8_to_s16(uint8_t val) @@ -54,14 +56,14 @@ static bool ps3_joypad_init(void *data) { (void)data; - cellPadInit(MAX_PADS); + cellPadInit(DEFAULT_MAX_PADS); return true; } static bool ps3_joypad_button(unsigned port_num, uint16_t joykey) { - if (port_num >= MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; return pad_state[port_num] & (UINT64_C(1) << joykey); @@ -69,7 +71,7 @@ static bool ps3_joypad_button(unsigned port_num, uint16_t joykey) static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state) { - if (port_num < MAX_PADS) + if (port_num < DEFAULT_MAX_PADS) { BITS_COPY16_PTR( state, pad_state[port_num] ); } @@ -84,7 +86,7 @@ static int16_t ps3_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= MAX_PADS) + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) @@ -129,7 +131,7 @@ static void ps3_joypad_poll(void) cellPadGetInfo2(&pad_info); - for (port = 0; port < MAX_PADS; port++) + for (port = 0; port < DEFAULT_MAX_PADS; port++) { CellPadData state_tmp; diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index 40cade7047..47712cd8a0 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -33,10 +33,9 @@ #include #include #include -#define PSP_MAX_PADS 4 static int psp2_model; static SceCtrlPortInfo old_ctrl_info, curr_ctrl_info; -static SceCtrlActuator actuators[PSP_MAX_PADS] = {0}; +static SceCtrlActuator actuators[DEFAULT_MAX_PADS] = {0}; #define LERP(p, f, t) ((((p * 10) * (t * 10)) / (f * 10)) / 10) #define AREA(lx, ly, rx, ry, x, y) (lx <= x && x < rx && ly <= y && y < ry) @@ -51,13 +50,8 @@ static SceCtrlActuator actuators[PSP_MAX_PADS] = {0}; #define SW_AREA(x, y) AREA(0, SCREEN_HALF_HEIGHT, SCREEN_HALF_WIDTH, SCREEN_HEIGHT, (x), (y)) #define SE_AREA(x, y) AREA(SCREEN_HALF_WIDTH, SCREEN_HALF_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT, (x), (y)) -#elif defined(SN_TARGET_PSP2) -#define PSP_MAX_PADS 4 -#else -#define PSP_MAX_PADS 1 -#endif -static uint64_t pad_state[PSP_MAX_PADS]; -static int16_t analog_state[PSP_MAX_PADS][2][2]; +static uint64_t pad_state[DEFAULT_MAX_PADS]; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; extern uint64_t lifecycle_state; @@ -84,7 +78,7 @@ static const char *psp_joypad_name(unsigned pad) static bool psp_joypad_init(void *data) { unsigned i; - unsigned players_count = PSP_MAX_PADS; + unsigned players_count = DEFAULT_MAX_PADS; (void)data; @@ -115,7 +109,7 @@ static bool psp_joypad_init(void *data) static bool psp_joypad_button(unsigned port_num, uint16_t key) { - if (port_num >= PSP_MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; return (pad_state[port_num] & (UINT64_C(1) << key)); @@ -123,7 +117,7 @@ static bool psp_joypad_button(unsigned port_num, uint16_t key) static void psp_joypad_get_buttons(unsigned port_num, input_bits_t *state) { - if (port_num < PSP_MAX_PADS) + if (port_num < DEFAULT_MAX_PADS) { BITS_COPY16_PTR( state, pad_state[port_num] ); } @@ -138,7 +132,7 @@ static int16_t psp_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= PSP_MAX_PADS) + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) @@ -179,7 +173,7 @@ static int16_t psp_joypad_axis(unsigned port_num, uint32_t joyaxis) static void psp_joypad_poll(void) { unsigned player; - unsigned players_count = PSP_MAX_PADS; + unsigned players_count = DEFAULT_MAX_PADS; #if defined(VITA) settings_t *settings = config_get_ptr(); #endif @@ -319,7 +313,7 @@ static void psp_joypad_poll(void) static bool psp_joypad_query_pad(unsigned pad) { - return pad < PSP_MAX_PADS && pad_state[pad]; + return pad < DEFAULT_MAX_PADS && pad_state[pad]; } static bool psp_joypad_rumble(unsigned pad, diff --git a/input/drivers_joypad/qnx_joypad.c b/input/drivers_joypad/qnx_joypad.c index 8f516f12f1..586093607e 100644 --- a/input/drivers_joypad/qnx_joypad.c +++ b/input/drivers_joypad/qnx_joypad.c @@ -15,6 +15,8 @@ * If not, see . */ +#include "../../config.def.h" + #include "../../tasks/tasks_internal.h" #include "../../configuration.h" @@ -47,7 +49,7 @@ static bool qnx_joypad_button(unsigned port_num, uint16_t joykey) qnx_input_device_t* controller = NULL; qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); - if (!qnx || port_num >= MAX_PADS) + if (!qnx || port_num >= DEFAULT_MAX_PADS) return 0; controller = (qnx_input_device_t*)&qnx->devices[port_num]; @@ -66,7 +68,7 @@ static int16_t qnx_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_pos = false; qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); - if (!qnx || joyaxis == AXIS_NONE || port_num >= MAX_PADS) + if (!qnx || joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) diff --git a/input/drivers_joypad/switch_joypad.c b/input/drivers_joypad/switch_joypad.c index 8e3c8282fe..cb8dcfbcda 100644 --- a/input/drivers_joypad/switch_joypad.c +++ b/input/drivers_joypad/switch_joypad.c @@ -2,6 +2,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #ifdef HAVE_LIBNX #include #else @@ -17,28 +19,14 @@ #include "../../command.h" #include "string.h" -#ifdef HAVE_LIBNX - -#ifndef MAX_PADS -#define MAX_PADS 8 -#endif - -#else - -#ifndef MAX_PADS -#define MAX_PADS 10 -#endif - -#endif - -static uint16_t pad_state[MAX_PADS]; -static int16_t analog_state[MAX_PADS][2][2]; +static uint16_t pad_state[DEFAULT_MAX_PADS]; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; extern uint64_t lifecycle_state; #ifdef HAVE_LIBNX -static u32 vibration_handles[MAX_PADS][2]; +static u32 vibration_handles[DEFAULT_MAX_PADS][2]; static u32 vibration_handleheld[2]; -static HidVibrationValue vibration_values[MAX_PADS][2]; +static HidVibrationValue vibration_values[DEFAULT_MAX_PADS][2]; static HidVibrationValue vibration_stop; #endif @@ -71,7 +59,7 @@ static bool switch_joypad_init(void *data) vibration_stop.amp_high = 0.0f; vibration_stop.freq_high = 320.0f; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { switch_joypad_autodetect_add(i); hidInitializeVibrationDevices(vibration_handles[i], 2, i, TYPE_HANDHELD | TYPE_JOYCON_PAIR); @@ -90,7 +78,7 @@ static bool switch_joypad_init(void *data) static bool switch_joypad_button(unsigned port_num, uint16_t key) { - if (port_num >= MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; #if 0 @@ -102,7 +90,7 @@ static bool switch_joypad_button(unsigned port_num, uint16_t key) static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state) { - if (port_num < MAX_PADS) + if (port_num < DEFAULT_MAX_PADS) { BITS_COPY16_PTR(state, pad_state[port_num]); } @@ -121,7 +109,7 @@ static int16_t switch_joypad_axis(unsigned port_num, uint32_t joyaxis) #if 0 /* TODO/FIXME - implement */ - if (joyaxis == AXIS_NONE || port_num >= MAX_PADS) { } + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) { } #endif if (AXIS_NEG_GET(joyaxis) < 4) @@ -161,14 +149,14 @@ static int16_t switch_joypad_axis(unsigned port_num, uint32_t joyaxis) static bool switch_joypad_query_pad(unsigned pad) { - return pad < MAX_PADS && pad_state[pad]; + return pad < DEFAULT_MAX_PADS && pad_state[pad]; } static void switch_joypad_destroy(void) { #ifdef HAVE_LIBNX unsigned i; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { memcpy(&vibration_values[i][0], &vibration_stop, sizeof(HidVibrationValue)); @@ -227,7 +215,7 @@ static void switch_joypad_poll(void) } } - for (int i = 0; i < MAX_PADS; i++) + for (int i = 0; i < DEFAULT_MAX_PADS; i++) { HidControllerID target = (i == 0) ? CONTROLLER_P1_AUTO : i; pad_state[i] = hidKeysDown(target) | hidKeysHeld(target); @@ -283,7 +271,7 @@ bool switch_joypad_set_rumble(unsigned pad, u32* handle; float amp; - if (pad >= MAX_PADS || !vibration_handles[pad]) + if (pad >= DEFAULT_MAX_PADS || !vibration_handles[pad]) return false; amp = (float)strength / 65535.0f; diff --git a/input/drivers_joypad/xdk_joypad.c b/input/drivers_joypad/xdk_joypad.c index 9e36268437..1d88746d65 100644 --- a/input/drivers_joypad/xdk_joypad.c +++ b/input/drivers_joypad/xdk_joypad.c @@ -16,6 +16,8 @@ #include +#include "../../config.def.h" + #include "../input_driver.h" #include "../../tasks/tasks_internal.h" @@ -25,10 +27,10 @@ typedef struct bool connected; } xinput_joypad_state; -static xinput_joypad_state g_xinput_states[MAX_PADS]; +static xinput_joypad_state g_xinput_states[DEFAULT_MAX_PADS]; #ifdef _XBOX1 -static HANDLE gamepads[MAX_PADS]; +static HANDLE gamepads[DEFAULT_MAX_PADS]; #endif static const char* const XBOX_CONTROLLER_NAMES[4] = @@ -93,7 +95,7 @@ static bool xdk_joypad_button(unsigned port_num, uint16_t joykey) uint16_t btn_word = 0; unsigned hat_dir = 0; - if (port_num >= MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return false; btn_word = g_xinput_states[port_num].xstate.Gamepad.wButtons; @@ -162,7 +164,7 @@ static int16_t xdk_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_pos = false; XINPUT_GAMEPAD *pad = NULL; - if (joyaxis == AXIS_NONE || port_num >= MAX_PADS) + if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) <= 3) @@ -233,7 +235,7 @@ static void xdk_joypad_poll(void) #endif #endif - for (port = 0; port < MAX_PADS; port++) + for (port = 0; port < DEFAULT_MAX_PADS; port++) { #if defined(_XBOX1) bool device_removed = false; @@ -307,7 +309,7 @@ static void xdk_joypad_destroy(void) { unsigned i; - for (i = 0; i < MAX_PADS; i++) + for (i = 0; i < DEFAULT_MAX_PADS; i++) { memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state)); #if defined(_XBOX1) diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index 14c37e0b24..ad943a1375 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -35,6 +35,8 @@ #include "../../config.h" #endif +#include "../../config.def.h" + #include "../../tasks/tasks_internal.h" #include "../input_driver.h" @@ -144,7 +146,8 @@ static INLINE int pad_index_to_xuser_index(unsigned pad) #ifdef HAVE_DINPUT return g_xinput_pad_indexes[pad]; #else - return pad < MAX_PADS && g_xinput_states[pad].connected ? pad : -1; + return pad < DEFAULT_MAX_PADS + && g_xinput_states[pad].connected ? pad : -1; #endif } diff --git a/input/drivers_keyboard/keyboard_event_android.h b/input/drivers_keyboard/keyboard_event_android.h index 069caeac83..ccc8d268d3 100644 --- a/input/drivers_keyboard/keyboard_event_android.h +++ b/input/drivers_keyboard/keyboard_event_android.h @@ -131,12 +131,6 @@ enum { #include -#ifndef MAX_PADS -#define MAX_PADS 8 -#endif - -#define ANDROID_KEYBOARD_PORT MAX_PADS - uint8_t *android_keyboard_state_get(unsigned port); #endif diff --git a/input/drivers_keyboard/keyboard_event_dos.h b/input/drivers_keyboard/keyboard_event_dos.h index d1d2cd68ff..bf65385fd4 100644 --- a/input/drivers_keyboard/keyboard_event_dos.h +++ b/input/drivers_keyboard/keyboard_event_dos.h @@ -116,14 +116,10 @@ enum { #include +#include "../../config.def.h" + #define LAST_KEYCODE 0x1ff -#ifndef MAX_PADS -#define MAX_PADS 1 -#endif - -#define DOS_KEYBOARD_PORT MAX_PADS - uint16_t *dos_keyboard_state_get(unsigned port); #endif diff --git a/input/input_keymaps.c b/input/input_keymaps.c index b0ec268640..1434b5742d 100644 --- a/input/input_keymaps.c +++ b/input/input_keymaps.c @@ -27,6 +27,8 @@ #include "../config.h" #endif +#include "../config.def.h" + #ifdef ANDROID #include #include "drivers_keyboard/keyboard_event_android.h" From 5de9f855331fd6abb89246354c58de486270c2db Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:01:45 +0200 Subject: [PATCH 006/275] Cleanups --- input/drivers_joypad/ctr_joypad.c | 2 +- input/drivers_joypad/dos_joypad.c | 22 ++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index 1a3473c9a0..4ea5dd9667 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -30,7 +30,7 @@ #include "3ds.h" static uint32_t pad_state; -static int16_t analog_state[1][2][2]; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; extern uint64_t lifecycle_state; static const char *ctr_joypad_name(unsigned pad) diff --git a/input/drivers_joypad/dos_joypad.c b/input/drivers_joypad/dos_joypad.c index 658aa6c731..49b53be44a 100644 --- a/input/drivers_joypad/dos_joypad.c +++ b/input/drivers_joypad/dos_joypad.c @@ -82,36 +82,26 @@ int LockCode(void *a, int size) static void keyb_int(void) { static unsigned char buffer = 0; - unsigned char rawcode; - unsigned char make_break; - int scancode; - - rawcode = inp(0x60); /* read scancode from keyboard controller */ - make_break = !(rawcode & 0x80); /* bit 7: 0 = make, 1 = break */ - scancode = rawcode & 0x7F; + unsigned char rawcode = inp(0x60); + /* read scancode from keyboard controller */ + unsigned char make_break = !(rawcode & 0x80); + /* bit 7: 0 = make, 1 = break */ + int scancode = rawcode & 0x7F; if (buffer == 0xE0) { /* second byte of an extended key */ if (scancode < 0x60) - { normal_keys[scancode | (1 << 8)] = make_break; - } buffer = 0; } else if (buffer >= 0xE1 && buffer <= 0xE2) - { buffer = 0; /* ignore these extended keys */ - } else if (rawcode >= 0xE0 && rawcode <= 0xE2) - { buffer = rawcode; /* first byte of an extended key */ - } else if (scancode < 0x60) - { normal_keys[scancode] = make_break; - } outp(0x20, 0x20); /* must send EOI to finish interrupt */ } @@ -214,8 +204,8 @@ static void dos_joypad_poll(void) for (i = 0; i <= DEFAULT_MAX_PADS; i++) { - uint16_t *cur_state = dos_keyboard_state_get(i); uint32_t key; + uint16_t *cur_state = dos_keyboard_state_get(i); for (key = 0; key < LAST_KEYCODE; key++) { From d7e1099a97adbf10e8aafa984679e41c4f61556b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:06:07 +0200 Subject: [PATCH 007/275] Set default refresh rate to 60Hz --- config.def.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 1e34eb37d5..1699865088 100644 --- a/config.def.h +++ b/config.def.h @@ -564,9 +564,12 @@ static const float message_bgcolor_opacity = 1.0f; #ifdef _3DS static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ; static const float crt_refresh_rate = (32730.0 * 8192.0) / 4481134.0 ; -#else +#elif defined(RARCH_CONSOLE) static const float refresh_rate = 60/1.001; static const float crt_refresh_rate = 60/1.001; +#else +static const float refresh_rate = 60; +static const float crt_refresh_rate = 60; #endif /* Allow games to set rotation. If false, rotation requests are From fdf28e5259876941205ba84eca4bd113131b9927 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:14:29 +0200 Subject: [PATCH 008/275] Turn more default values into macros --- config.def.h | 10 ++++------ configuration.c | 6 +++--- menu/menu_setting.c | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/config.def.h b/config.def.h index 1699865088..7297fbe501 100644 --- a/config.def.h +++ b/config.def.h @@ -562,15 +562,13 @@ static const float message_bgcolor_opacity = 1.0f; * If your monitor does not run at 60Hz, or something close to it, * disable VSync, and leave this at its default. */ #ifdef _3DS -static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ; -static const float crt_refresh_rate = (32730.0 * 8192.0) / 4481134.0 ; +#define DEFAULT_REFRESH_RATE ((32730.0 * 8192.0) / 4481134.0) #elif defined(RARCH_CONSOLE) -static const float refresh_rate = 60/1.001; -static const float crt_refresh_rate = 60/1.001; +#define DEFAULT_REFRESH_RATE (60/1.001) #else -static const float refresh_rate = 60; -static const float crt_refresh_rate = 60; +#define DEFAULT_REFRESH_RATE (60) #endif +#define DEFAULT_CRT_REFRESH_RATE (DEFAULT_REFRESH_RATE) /* Allow games to set rotation. If false, rotation requests are * honored, but ignored. diff --git a/configuration.c b/configuration.c index 67b4e5d65e..15b8f494ca 100644 --- a/configuration.c +++ b/configuration.c @@ -1638,8 +1638,8 @@ static struct config_float_setting *populate_settings_float(settings_t *settings SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, DEFAULT_ASPECT_RATIO, false); SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false); - SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false); - SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, refresh_rate, false); + SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, DEFAULT_CRT_REFRESH_RATE, false); + SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, DEFAULT_REFRESH_RATE, false); SETTING_FLOAT("audio_rate_control_delta", audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA), true, DEFAULT_RATE_CONTROL_DELTA, false); SETTING_FLOAT("audio_max_timing_skew", &settings->floats.audio_max_timing_skew, true, DEFAULT_MAX_TIMING_SKEW, false); SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, DEFAULT_AUDIO_VOLUME, false); @@ -2048,7 +2048,7 @@ void config_set_defaults(void) settings->floats.video_msg_color_b = ((message_color >> 0) & 0xff) / 255.0f; if (g_defaults.settings.video_refresh_rate > 0.0 && - g_defaults.settings.video_refresh_rate != refresh_rate) + g_defaults.settings.video_refresh_rate != DEFAULT_REFRESH_RATE) settings->floats.video_refresh_rate = g_defaults.settings.video_refresh_rate; if (DEFAULT_AUDIO_DEVICE) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index b4aada538c..842dc36002 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -8547,7 +8547,7 @@ static bool setting_append_list( &settings->floats.video_refresh_rate, MENU_ENUM_LABEL_VIDEO_REFRESH_RATE, MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, - refresh_rate, + DEFAULT_REFRESH_RATE, "%.3f Hz", &group_info, &subgroup_info, @@ -8562,7 +8562,7 @@ static bool setting_append_list( &settings->floats.video_refresh_rate, MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO, MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, - refresh_rate, + DEFAULT_REFRESH_RATE, "%.3f Hz", &group_info, &subgroup_info, From 433a27b76a5ada1d3c4fcdd7c939a92faed279f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:20:13 +0200 Subject: [PATCH 009/275] (config.def.h) Turn more into macros --- config.def.h | 10 +++++----- configuration.c | 6 +++--- menu/menu_setting.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config.def.h b/config.def.h index 7297fbe501..7eb3ff226d 100644 --- a/config.def.h +++ b/config.def.h @@ -812,18 +812,18 @@ static const bool playlist_fuzzy_archive_match = false; /* Show Menu start-up screen on boot. */ static const bool default_menu_show_start_screen = true; -static const bool menu_dpi_override_enable = false; +#define DEFAULT_MENU_DPI_OVERRIDE_ENABLE false #ifdef RARCH_MOBILE -static const unsigned menu_dpi_override_value = 72; +#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 72 #elif defined(__CELLOS_LV2__) -static const unsigned menu_dpi_override_value = 360; +#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 360 #else -static const unsigned menu_dpi_override_value = 200; +#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 200 #endif /* Log level for libretro cores (GET_LOG_INTERFACE). */ -static const unsigned libretro_log_level = 1; +#define DEFAULT_LIBRETRO_LOG_LEVEL 1 #ifndef RARCH_DEFAULT_PORT #define RARCH_DEFAULT_PORT 55435 diff --git a/configuration.c b/configuration.c index 15b8f494ca..44bdf83bf3 100644 --- a/configuration.c +++ b/configuration.c @@ -1442,7 +1442,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false); SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, true, false); SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false); - SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, menu_dpi_override_enable, false); + SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, DEFAULT_MENU_DPI_OVERRIDE_ENABLE, false); SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false); SETTING_BOOL("menu_savestate_resume", &settings->bools.menu_savestate_resume, true, menu_savestate_resume, false); SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, DEFAULT_MOUSE_ENABLE, false); @@ -1699,7 +1699,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings, SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, DEFAULT_REWIND_GRANULARITY, false); SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, DEFAULT_REWIND_BUFFER_SIZE_STEP, false); SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, DEFAULT_AUTOSAVE_INTERVAL, false); - SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, libretro_log_level, false); + SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, DEFAULT_LIBRETRO_LOG_LEVEL, false); SETTING_UINT("keyboard_gamepad_mapping_type",&settings->uints.input_keyboard_gamepad_mapping_type, true, 1, false); SETTING_UINT("input_poll_type_behavior", &settings->uints.input_poll_type_behavior, true, 2, false); SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, DEFAULT_MONITOR_INDEX, false); @@ -1721,7 +1721,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings, SETTING_UINT("video_overscan_correction_bottom", &settings->uints.video_overscan_correction_bottom, true, DEFAULT_VIDEO_OVERSCAN_CORRECTION_BOTTOM, false); #endif #ifdef HAVE_MENU - SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false); + SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, DEFAULT_MENU_DPI_OVERRIDE_VALUE, false); SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false); SETTING_UINT("menu_left_thumbnails", &settings->uints.menu_left_thumbnails, true, menu_left_thumbnails_default, false); SETTING_UINT("menu_thumbnail_upscale_threshold", &settings->uints.menu_thumbnail_upscale_threshold, true, menu_thumbnail_upscale_threshold, false); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 842dc36002..9cb7cd4ec9 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -7549,7 +7549,7 @@ static bool setting_append_list( &settings->uints.libretro_log_level, MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL, MENU_ENUM_LABEL_VALUE_LIBRETRO_LOG_LEVEL, - libretro_log_level, + DEFAULT_LIBRETRO_LOG_LEVEL, &group_info, &subgroup_info, parent_group, @@ -11609,7 +11609,7 @@ static bool setting_append_list( &settings->bools.menu_dpi_override_enable, MENU_ENUM_LABEL_DPI_OVERRIDE_ENABLE, MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE, - menu_dpi_override_enable, + DEFAULT_MENU_DPI_OVERRIDE_ENABLE, MENU_ENUM_LABEL_VALUE_OFF, MENU_ENUM_LABEL_VALUE_ON, &group_info, @@ -11624,7 +11624,7 @@ static bool setting_append_list( &settings->uints.menu_dpi_override_value, MENU_ENUM_LABEL_DPI_OVERRIDE_VALUE, MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_VALUE, - menu_dpi_override_value, + DEFAULT_MENU_DPI_OVERRIDE_VALUE, &group_info, &subgroup_info, parent_group, From f9a2a79f5dc2eba07e75a17c6e83f7a907b80f11 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:30:11 +0200 Subject: [PATCH 010/275] Rename const variables to macros --- config.def.h | 13 +++++++------ configuration.c | 10 +++++----- menu/menu_setting.c | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/config.def.h b/config.def.h index 7eb3ff226d..c5b8566700 100644 --- a/config.def.h +++ b/config.def.h @@ -458,7 +458,7 @@ static bool rgui_extended_ascii = false; #define DEFAULT_BLOCK_CONFIG_READ false #endif -static bool automatically_add_content_to_playlist = false; +#define DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST false static bool default_game_specific_options = true; static bool default_auto_overrides_enable = true; @@ -497,15 +497,16 @@ static unsigned input_backtouch_toggle = false; #define DEFAULT_ALL_USERS_CONTROL_MENU false #if defined(ANDROID) || defined(_WIN32) -static bool menu_swap_ok_cancel_buttons = true; +#define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS true #else -static bool menu_swap_ok_cancel_buttons = false; +#define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS false #endif -static bool quit_press_twice = true; +#define DEFAULT_QUIT_PRESS_TWICE true -static bool default_log_to_file = false; -static bool log_to_file_timestamp = false; +#define DEFAULT_LOG_TO_FILE false + +#define DEFAULT_LOG_TO_FILE_TIMESTAMP false /* Crop overscanned frames. */ #define DEFAULT_CROP_OVERSCAN true diff --git a/configuration.c b/configuration.c index 44bdf83bf3..1192720b7a 100644 --- a/configuration.c +++ b/configuration.c @@ -1325,7 +1325,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, unsigned count = 0; SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false); - SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, automatically_add_content_to_playlist, false); + SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, false); SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false); SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false); SETTING_BOOL("ui_companion_toggle", &settings->bools.ui_companion_toggle, false, ui_companion_toggle, false); @@ -1333,7 +1333,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, DEFAULT_GPU_RECORD, false); SETTING_BOOL("input_remap_binds_enable", &settings->bools.input_remap_binds_enable, true, true, false); SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, DEFAULT_ALL_USERS_CONTROL_MENU, false); - SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, menu_swap_ok_cancel_buttons, false); + SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS, false); #ifdef HAVE_NETWORKING SETTING_BOOL("netplay_public_announce", &settings->bools.netplay_public_announce, true, DEFAULT_NETPLAY_PUBLIC_ANNOUNCE, false); SETTING_BOOL("netplay_start_as_spectator", &settings->bools.netplay_start_as_spectator, false, netplay_start_as_spectator, false); @@ -1611,16 +1611,16 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("playlist_sort_alphabetical", &settings->bools.playlist_sort_alphabetical, true, playlist_sort_alphabetical, false); SETTING_BOOL("playlist_fuzzy_archive_match", &settings->bools.playlist_fuzzy_archive_match, true, playlist_fuzzy_archive_match, false); - SETTING_BOOL("quit_press_twice", &settings->bools.quit_press_twice, true, quit_press_twice, false); + SETTING_BOOL("quit_press_twice", &settings->bools.quit_press_twice, true, DEFAULT_QUIT_PRESS_TWICE, false); SETTING_BOOL("vibrate_on_keypress", &settings->bools.vibrate_on_keypress, true, vibrate_on_keypress, false); SETTING_BOOL("enable_device_vibration", &settings->bools.enable_device_vibration, true, enable_device_vibration, false); #ifdef HAVE_OZONE SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, DEFAULT_OZONE_COLLAPSE_SIDEBAR, false); #endif - SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, default_log_to_file, false); + SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false); SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE); - SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, log_to_file_timestamp, false); + SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, DEFAULT_LOG_TO_FILE_TIMESTAMP, false); SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, true, false, false); *size = count; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 9cb7cd4ec9..6a5f64191d 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -7567,7 +7567,7 @@ static bool setting_append_list( &settings->bools.log_to_file, MENU_ENUM_LABEL_LOG_TO_FILE, MENU_ENUM_LABEL_VALUE_LOG_TO_FILE, - default_log_to_file, + DEFAULT_LOG_TO_FILE, MENU_ENUM_LABEL_VALUE_OFF, MENU_ENUM_LABEL_VALUE_ON, &group_info, @@ -7582,7 +7582,7 @@ static bool setting_append_list( &settings->bools.log_to_file_timestamp, MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP, MENU_ENUM_LABEL_VALUE_LOG_TO_FILE_TIMESTAMP, - log_to_file_timestamp, + DEFAULT_LOG_TO_FILE_TIMESTAMP, MENU_ENUM_LABEL_VALUE_OFF, MENU_ENUM_LABEL_VALUE_ON, &group_info, @@ -9942,7 +9942,7 @@ static bool setting_append_list( &settings->bools.input_menu_swap_ok_cancel_buttons, MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL, MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - menu_swap_ok_cancel_buttons, + DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS, MENU_ENUM_LABEL_VALUE_OFF, MENU_ENUM_LABEL_VALUE_ON, &group_info, From 10d40cc2e81ecc55afc50701dfaeaa52301701ee Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:41:32 +0200 Subject: [PATCH 011/275] Fix some dangerous warnings --- libretro-common/media/media_detect_cd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libretro-common/media/media_detect_cd.c b/libretro-common/media/media_detect_cd.c index 7fd3c8a082..a33f3f3b5b 100644 --- a/libretro-common/media/media_detect_cd.c +++ b/libretro-common/media/media_detect_cd.c @@ -154,7 +154,7 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info) if (media_skip_spaces(&serial_pos, 8)) memcpy(info->serial, serial_pos, 8 - (serial_pos - (buf + offset + 0x183))); else - strlcpy(info->serial, "N/A", sizeof(info->title)); + strlcpy(info->serial, "N/A", sizeof(info->serial)); } else if (!memcmp(buf + offset, "SEGA SEGASATURN", strlen("SEGA SEGASATURN"))) { @@ -183,7 +183,7 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info) if (media_skip_spaces(&serial_pos, 10)) memcpy(info->serial, serial_pos, 10 - (serial_pos - (buf + offset + 0x20))); else - strlcpy(info->serial, "N/A", sizeof(info->title)); + strlcpy(info->serial, "N/A", sizeof(info->serial)); version_pos = buf + offset + 0x2a; @@ -197,7 +197,7 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info) if (media_skip_spaces(&release_date_pos, 8)) memcpy(info->release_date, release_date_pos, 8 - (release_date_pos - (buf + offset + 0x30))); else - strlcpy(info->release_date, "N/A", sizeof(info->title)); + strlcpy(info->release_date, "N/A", sizeof(info->release_date)); } else if (!memcmp(buf + offset, "SEGA SEGAKATANA", strlen("SEGA SEGAKATANA"))) { @@ -226,21 +226,21 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info) if (media_skip_spaces(&serial_pos, 10)) memcpy(info->serial, serial_pos, 10 - (serial_pos - (buf + offset + 0x40))); else - strlcpy(info->serial, "N/A", sizeof(info->title)); + strlcpy(info->serial, "N/A", sizeof(info->serial)); version_pos = buf + offset + 0x4a; if (media_skip_spaces(&version_pos, 6)) memcpy(info->version, version_pos, 6 - (version_pos - (buf + offset + 0x4a))); else - strlcpy(info->version, "N/A", sizeof(info->title)); + strlcpy(info->version, "N/A", sizeof(info->version)); release_date_pos = buf + offset + 0x50; if (media_skip_spaces(&release_date_pos, 8)) memcpy(info->release_date, release_date_pos, 8 - (release_date_pos - (buf + offset + 0x50))); else - strlcpy(info->release_date, "N/A", sizeof(info->title)); + strlcpy(info->release_date, "N/A", sizeof(info->release_date)); } /* Primary Volume Descriptor fields of ISO9660 */ else if (!memcmp(buf + offset + (16 * sector_size), "\1CD001\1\0PLAYSTATION", 19)) From a92bac4ceab808c21c92eb76da5d8086c48d9242 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 13:42:35 +0200 Subject: [PATCH 012/275] Fix last warning --- libretro-common/media/media_detect_cd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/media/media_detect_cd.c b/libretro-common/media/media_detect_cd.c index a33f3f3b5b..985864d33c 100644 --- a/libretro-common/media/media_detect_cd.c +++ b/libretro-common/media/media_detect_cd.c @@ -190,7 +190,7 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info) if (media_skip_spaces(&version_pos, 6)) memcpy(info->version, version_pos, 6 - (version_pos - (buf + offset + 0x2a))); else - strlcpy(info->version, "N/A", sizeof(info->title)); + strlcpy(info->version, "N/A", sizeof(info->version)); release_date_pos = buf + offset + 0x30; From db6a4f8368974938cfb200061687fc569c207259 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Fri, 19 Jul 2019 13:59:07 +0200 Subject: [PATCH 013/275] (UI Companion) Get rid of unused iterate function callback --- gfx/drivers_context/cocoa_gl_ctx.m | 3 +-- ui/drivers/cocoa/cocoatouch_menu.m | 3 +++ ui/drivers/ui_cocoa.m | 8 -------- ui/drivers/ui_cocoatouch.m | 13 ------------- ui/drivers/ui_qt.cpp | 8 -------- ui/drivers/ui_win32.c | 9 --------- ui/ui_companion_driver.h | 1 - 7 files changed, 4 insertions(+), 41 deletions(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 2bdee23250..b12b55b367 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -687,9 +687,8 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data, #elif defined(HAVE_COCOA) CocoaView *g_view = (CocoaView*)nsview_get_ptr(); #endif - cocoa_ctx_data_t *cocoa_ctx = (cocoa_ctx_data_t*)data; - #if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL) + cocoa_ctx_data_t *cocoa_ctx = (cocoa_ctx_data_t*)data; cocoa_ctx->width = width; cocoa_ctx->height = height; #endif diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index e6517baf45..7379860005 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -781,6 +781,9 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath case MENU_ENTRY_ENUM: me = [RAMenuItemEnum new]; break; + case MENU_ENTRY_SIZE: + /* TODO/FIXME - implement this */ + break; }; [me initialize:self idx:i]; diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 25acb63a90..8036348653 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -710,13 +710,6 @@ static void ui_companion_cocoa_toggle(void *data, bool force) (void)force; } -static int ui_companion_cocoa_iterate(void *data, unsigned action) -{ - (void)data; - - return 0; -} - static void ui_companion_cocoa_deinit(void *data) { ui_companion_cocoa_t *handle = (ui_companion_cocoa_t*)data; @@ -763,7 +756,6 @@ static void *ui_companion_cocoa_get_main_window(void *data) ui_companion_driver_t ui_companion_cocoa = { ui_companion_cocoa_init, ui_companion_cocoa_deinit, - ui_companion_cocoa_iterate, ui_companion_cocoa_toggle, ui_companion_cocoa_event_command, ui_companion_cocoa_notify_content_loaded, diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index c9eadf6afc..fd2d3a2409 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -580,18 +580,6 @@ static void ui_companion_cocoatouch_toggle(void *data, bool force) [ap toggleUI]; } -static int ui_companion_cocoatouch_iterate(void *data, unsigned action) -{ - RetroArch_iOS *ap = (RetroArch_iOS*)apple_platform; - - (void)data; - - if (ap) - [ap showPauseMenu:ap]; - - return 0; -} - static void ui_companion_cocoatouch_deinit(void *data) { ui_companion_cocoatouch_t *handle = (ui_companion_cocoatouch_t*)data; @@ -679,7 +667,6 @@ static void ui_companion_cocoatouch_msg_queue_push(void *data, const char *msg, ui_companion_driver_t ui_companion_cocoatouch = { ui_companion_cocoatouch_init, ui_companion_cocoatouch_deinit, - ui_companion_cocoatouch_iterate, ui_companion_cocoatouch_toggle, ui_companion_cocoatouch_event_command, ui_companion_cocoatouch_notify_content_loaded, diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 61f9f3c314..42eec02288 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -645,13 +645,6 @@ static void* ui_companion_qt_init(void) return handle; } -static int ui_companion_qt_iterate(void *data, unsigned action) -{ - (void)data; - (void)action; - return 0; -} - static void ui_companion_qt_notify_content_loaded(void *data) { (void)data; @@ -747,7 +740,6 @@ void ui_companion_qt_msg_queue_push(void *data, const char *msg, unsigned priori ui_companion_driver_t ui_companion_qt = { ui_companion_qt_init, ui_companion_qt_deinit, - ui_companion_qt_iterate, ui_companion_qt_toggle, ui_companion_qt_event_command, ui_companion_qt_notify_content_loaded, diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 1d75ab029b..0de663603b 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -290,14 +290,6 @@ static void *ui_companion_win32_init(void) return handle; } -static int ui_companion_win32_iterate(void *data, unsigned action) -{ - (void)data; - (void)action; - - return 0; -} - static void ui_companion_win32_notify_content_loaded(void *data) { (void)data; @@ -327,7 +319,6 @@ static void ui_companion_win32_notify_list_pushed(void *data, ui_companion_driver_t ui_companion_win32 = { ui_companion_win32_init, ui_companion_win32_deinit, - ui_companion_win32_iterate, ui_companion_win32_toggle, ui_companion_win32_event_command, ui_companion_win32_notify_content_loaded, diff --git a/ui/ui_companion_driver.h b/ui/ui_companion_driver.h index 3317a695fc..ae6e9de6e0 100644 --- a/ui/ui_companion_driver.h +++ b/ui/ui_companion_driver.h @@ -127,7 +127,6 @@ typedef struct ui_companion_driver { void *(*init)(void); void (*deinit)(void *data); - int (*iterate)(void *data, unsigned action); void (*toggle)(void *data, bool force); void (*event_command)(void *data, enum event_command action); void (*notify_content_loaded)(void *data); From 42783fb2258226872b596925e8068947299586dd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 16:02:00 +0200 Subject: [PATCH 014/275] (Qt) Combine some files into one --- Makefile.common | 6 +- griffin/griffin_cpp.cpp | 6 +- ui/drivers/qt/options/configuration.cpp | 27 ----- ui/drivers/qt/options/core.cpp | 27 ----- ui/drivers/qt/options/directory.cpp | 27 ----- ui/drivers/qt/options/drivers.cpp | 28 ----- ui/drivers/qt/options/generic.cpp | 142 ++++++++++++++++++++++++ ui/drivers/qt/options/logging.cpp | 27 ----- 8 files changed, 144 insertions(+), 146 deletions(-) delete mode 100644 ui/drivers/qt/options/configuration.cpp delete mode 100644 ui/drivers/qt/options/core.cpp delete mode 100644 ui/drivers/qt/options/directory.cpp delete mode 100644 ui/drivers/qt/options/drivers.cpp create mode 100644 ui/drivers/qt/options/generic.cpp delete mode 100644 ui/drivers/qt/options/logging.cpp diff --git a/Makefile.common b/Makefile.common index 0cff7dcd58..7d6af76b24 100644 --- a/Makefile.common +++ b/Makefile.common @@ -357,13 +357,9 @@ ifeq ($(HAVE_QT), 1) OBJ += ui/drivers/qt/settingswidgets.o \ ui/drivers/qt/options/achievements.o \ ui/drivers/qt/options/audio.o \ - ui/drivers/qt/options/configuration.o \ - ui/drivers/qt/options/core.o \ - ui/drivers/qt/options/directory.o \ - ui/drivers/qt/options/drivers.o \ + ui/drivers/qt/options/generic.o \ ui/drivers/qt/options/input.o \ ui/drivers/qt/options/latency.o \ - ui/drivers/qt/options/logging.o \ ui/drivers/qt/options/network.o \ ui/drivers/qt/options/osd.o \ ui/drivers/qt/options/playlists.o \ diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index 686c70b20c..9267eb7fda 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -61,17 +61,13 @@ UI #include "../ui/drivers/qt/playlistthumbnaildownload.cpp" #ifdef HAVE_MENU #include "../ui/drivers/qt/settingswidgets.cpp" -#include "../ui/drivers/qt/options/drivers.cpp" +#include "../ui/drivers/qt/options/generic.cpp" #include "../ui/drivers/qt/options/video.cpp" #include "../ui/drivers/qt/options/audio.cpp" #include "../ui/drivers/qt/options/saving.cpp" #include "../ui/drivers/qt/options/throttle.cpp" #include "../ui/drivers/qt/options/osd.cpp" #include "../ui/drivers/qt/options/input.cpp" -#include "../ui/drivers/qt/options/directory.cpp" -#include "../ui/drivers/qt/options/logging.cpp" -#include "../ui/drivers/qt/options/core.cpp" -#include "../ui/drivers/qt/options/configuration.cpp" #include "../ui/drivers/qt/options/latency.cpp" #include "../ui/drivers/qt/options/playlists.cpp" #include "../ui/drivers/qt/options/user.cpp" diff --git a/ui/drivers/qt/options/configuration.cpp b/ui/drivers/qt/options/configuration.cpp deleted file mode 100644 index 4af468a7a4..0000000000 --- a/ui/drivers/qt/options/configuration.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "options.h" - -ConfigurationCategory::ConfigurationCategory(QWidget *parent) : - OptionsCategory(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS); - setCategoryIcon("setting"); -} - -QVector ConfigurationCategory::pages() -{ - QVector pages; - - pages << new ConfigurationPage(this); - - return pages; -} - -ConfigurationPage::ConfigurationPage(QObject *parent) : - OptionsPage(parent) -{ -} - -QWidget *ConfigurationPage::widget() -{ - return create_widget(DISPLAYLIST_CONFIGURATION_SETTINGS_LIST); -} diff --git a/ui/drivers/qt/options/core.cpp b/ui/drivers/qt/options/core.cpp deleted file mode 100644 index 0252f353f8..0000000000 --- a/ui/drivers/qt/options/core.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "options.h" - -CoreCategory::CoreCategory(QWidget *parent) : - OptionsCategory(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS); - setCategoryIcon("core-options"); -} - -QVector CoreCategory::pages() -{ - QVector pages; - - pages << new CorePage(this); - - return pages; -} - -CorePage::CorePage(QObject *parent) : - OptionsPage(parent) -{ -} - -QWidget *CorePage::widget() -{ - return create_widget(DISPLAYLIST_CORE_SETTINGS_LIST); -} diff --git a/ui/drivers/qt/options/directory.cpp b/ui/drivers/qt/options/directory.cpp deleted file mode 100644 index a2b268aab4..0000000000 --- a/ui/drivers/qt/options/directory.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "options.h" - -DirectoryCategory::DirectoryCategory(QWidget *parent) : - OptionsCategory(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS); - setCategoryIcon("folder"); -} - -QVector DirectoryCategory::pages() -{ - QVector pages; - - pages << new DirectoryPage(this); - - return pages; -} - -DirectoryPage::DirectoryPage(QObject *parent) : - OptionsPage(parent) -{ -} - -QWidget *DirectoryPage::widget() -{ - return create_widget(DISPLAYLIST_DIRECTORY_SETTINGS_LIST); -} diff --git a/ui/drivers/qt/options/drivers.cpp b/ui/drivers/qt/options/drivers.cpp deleted file mode 100644 index 3c2f52c420..0000000000 --- a/ui/drivers/qt/options/drivers.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "options.h" - -DriversCategory::DriversCategory(QWidget *parent) : - OptionsCategory(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS); - setCategoryIcon("menu_drivers"); -} - -QVector DriversCategory::pages() -{ - QVector pages; - - pages << new DriversPage(this); - - return pages; -} - -DriversPage::DriversPage(QObject *parent) : - OptionsPage(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS); -} - -QWidget *DriversPage::widget() -{ - return create_widget(DISPLAYLIST_DRIVER_SETTINGS_LIST); -} diff --git a/ui/drivers/qt/options/generic.cpp b/ui/drivers/qt/options/generic.cpp new file mode 100644 index 0000000000..1cd79441ef --- /dev/null +++ b/ui/drivers/qt/options/generic.cpp @@ -0,0 +1,142 @@ +#include "options.h" + +/* DRIVERS */ + +DriversCategory::DriversCategory(QWidget *parent) : + OptionsCategory(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS); + setCategoryIcon("menu_drivers"); +} + +QVector DriversCategory::pages() +{ + QVector pages; + + pages << new DriversPage(this); + + return pages; +} + +DriversPage::DriversPage(QObject *parent) : + OptionsPage(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS); +} + +QWidget *DriversPage::widget() +{ + return create_widget(DISPLAYLIST_DRIVER_SETTINGS_LIST); +} + +/* DIRECTORY */ + +DirectoryCategory::DirectoryCategory(QWidget *parent) : + OptionsCategory(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS); + setCategoryIcon("folder"); +} + +QVector DirectoryCategory::pages() +{ + QVector pages; + + pages << new DirectoryPage(this); + + return pages; +} + +DirectoryPage::DirectoryPage(QObject *parent) : + OptionsPage(parent) +{ +} + +QWidget *DirectoryPage::widget() +{ + return create_widget(DISPLAYLIST_DIRECTORY_SETTINGS_LIST); +} + +/* CONFIGURATION */ + +ConfigurationCategory::ConfigurationCategory(QWidget *parent) : + OptionsCategory(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS); + setCategoryIcon("setting"); +} + +QVector ConfigurationCategory::pages() +{ + QVector pages; + + pages << new ConfigurationPage(this); + + return pages; +} + +ConfigurationPage::ConfigurationPage(QObject *parent) : + OptionsPage(parent) +{ +} + +QWidget *ConfigurationPage::widget() +{ + return create_widget(DISPLAYLIST_CONFIGURATION_SETTINGS_LIST); +} + +/* CORE */ + +CoreCategory::CoreCategory(QWidget *parent) : + OptionsCategory(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS); + setCategoryIcon("core-options"); +} + +QVector CoreCategory::pages() +{ + QVector pages; + + pages << new CorePage(this); + + return pages; +} + +CorePage::CorePage(QObject *parent) : + OptionsPage(parent) +{ +} + +QWidget *CorePage::widget() +{ + return create_widget(DISPLAYLIST_CORE_SETTINGS_LIST); +} + +/* LOGGING */ + +LoggingCategory::LoggingCategory(QWidget *parent) : + OptionsCategory(parent) +{ + setDisplayName(MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS); + setCategoryIcon("menu_log"); +} + +QVector LoggingCategory::pages() +{ + QVector pages; + + pages << new LoggingPage(this); + + return pages; +} + +LoggingPage::LoggingPage(QObject *parent) : + OptionsPage(parent) +{ +} + +QWidget *LoggingPage::widget() +{ + return create_widget(DISPLAYLIST_LOGGING_SETTINGS_LIST); +} diff --git a/ui/drivers/qt/options/logging.cpp b/ui/drivers/qt/options/logging.cpp deleted file mode 100644 index f34c18c695..0000000000 --- a/ui/drivers/qt/options/logging.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "options.h" - -LoggingCategory::LoggingCategory(QWidget *parent) : - OptionsCategory(parent) -{ - setDisplayName(MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS); - setCategoryIcon("menu_log"); -} - -QVector LoggingCategory::pages() -{ - QVector pages; - - pages << new LoggingPage(this); - - return pages; -} - -LoggingPage::LoggingPage(QObject *parent) : - OptionsPage(parent) -{ -} - -QWidget *LoggingPage::widget() -{ - return create_widget(DISPLAYLIST_LOGGING_SETTINGS_LIST); -} From 0b6ced74acaa758880e0ce79438874f6516263a4 Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Fri, 19 Jul 2019 16:02:37 +0100 Subject: [PATCH 015/275] Increase menu sublabel buffer size + fix Ozone sublabel spacing --- menu/drivers/materialui.c | 4 ++-- menu/drivers/ozone/ozone_entries.c | 11 ++++++----- menu/drivers/rgui.c | 4 ++-- menu/drivers/stripes.c | 2 +- menu/drivers/xmb.c | 4 +++- menu/menu_entries.c | 2 +- menu/menu_entries.h | 6 ++++-- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 44182dfc94..911410a199 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -605,7 +605,7 @@ static void materialui_compute_entries_box(materialui_handle_t* mui, int width) for (i = 0; i < entries_end; i++) { menu_entry_t entry; - char wrapped_sublabel_str[512]; + char wrapped_sublabel_str[MENU_SUBLABEL_MAX_LENGTH]; const char *sublabel_str = NULL; unsigned lines = 0; materialui_node_t *node = (materialui_node_t*) @@ -744,7 +744,7 @@ static void materialui_render_label_value( menu_animation_ctx_ticker_t ticker; char label_str[255]; char value_str[255]; - char wrapped_sublabel_str[512]; + char wrapped_sublabel_str[MENU_SUBLABEL_MAX_LENGTH]; unsigned entry_type = 0; const char *sublabel_str = NULL; bool switch_is_on = true; diff --git a/menu/drivers/ozone/ozone_entries.c b/menu/drivers/ozone/ozone_entries.c index 1d8cc2a4cc..3907729ba3 100644 --- a/menu/drivers/ozone/ozone_entries.c +++ b/menu/drivers/ozone/ozone_entries.c @@ -197,8 +197,9 @@ void ozone_compute_entries_position(ozone_handle_t *ozone) unsigned lines; size_t i, entries_end; - file_list_t *selection_buf = NULL; - int entry_padding = ozone_get_entries_padding(ozone, false); + file_list_t *selection_buf = NULL; + int entry_padding = ozone_get_entries_padding(ozone, false); + unsigned sublabel_line_height = font_driver_get_line_height(ozone->fonts.entries_sublabel, 1.0f); menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i); @@ -250,7 +251,7 @@ void ozone_compute_entries_position(ozone_handle_t *ozone) if (!string_is_empty(sublabel_str)) { int sublabel_max_width; - char wrapped_sublabel_str[512]; + char wrapped_sublabel_str[MENU_SUBLABEL_MAX_LENGTH]; wrapped_sublabel_str[0] = '\0'; node->height += ozone->dimensions.entry_spacing + 40; @@ -270,7 +271,7 @@ void ozone_compute_entries_position(ozone_handle_t *ozone) if (lines > 1) { - node->height += lines * 15; + node->height += (lines - 1) * sublabel_line_height; node->wrap = true; } } @@ -476,7 +477,7 @@ border_iterate: static const char* const ticker_spacer = OZONE_TICKER_SPACER; char rich_label[255]; char entry_value_ticker[255]; - char wrapped_sublabel_str[512]; + char wrapped_sublabel_str[MENU_SUBLABEL_MAX_LENGTH]; const char *sublabel_str = NULL; ozone_node_t *node = NULL; const char *entry_rich_label = NULL; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 280038f399..17a08bd8dc 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -545,7 +545,7 @@ typedef struct bool show_wallpaper; char theme_preset_path[PATH_MAX_LENGTH]; /* Must be a fixed length array... */ char menu_title[255]; /* Must be a fixed length array... */ - char menu_sublabel[255]; /* Must be a fixed length array... */ + char menu_sublabel[MENU_SUBLABEL_MAX_LENGTH]; /* Must be a fixed length array... */ unsigned menu_aspect_ratio; unsigned menu_aspect_ratio_lock; bool aspect_update_pending; @@ -3537,7 +3537,7 @@ static void rgui_render(void *data, bool is_idle) /* Print menu sublabel/core name (if required) */ if (settings->bools.menu_show_sublabels && !string_is_empty(rgui->menu_sublabel)) { - char sublabel_buf[255]; + char sublabel_buf[MENU_SUBLABEL_MAX_LENGTH]; sublabel_buf[0] = '\0'; ticker.s = sublabel_buf; diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c index 59ee7cfa13..c70cdd305d 100644 --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -2472,7 +2472,7 @@ static int stripes_draw_item( if (i == current && width > 320 && height > 240 && !string_is_empty(entry->sublabel)) { - char entry_sublabel[255] = {0}; + char entry_sublabel[MENU_SUBLABEL_MAX_LENGTH] = {0}; label_offset = - stripes->margins_label_top; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 350f58c905..b1b99d5cce 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2994,7 +2994,9 @@ static int xmb_draw_item( && !string_is_empty(entry->sublabel)) { menu_animation_ctx_line_ticker_t line_ticker; - char entry_sublabel[512] = {0}; + char entry_sublabel[MENU_SUBLABEL_MAX_LENGTH]; + + entry_sublabel[0] = '\0'; line_ticker.type_enum = (enum menu_animation_ticker_type)settings->uints.menu_ticker_type; line_ticker.idx = menu_animation_get_ticker_idx(); diff --git a/menu/menu_entries.c b/menu/menu_entries.c index eef2f1642b..c86b94c83a 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -449,7 +449,7 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx, cbs->action_sublabel_cache, sizeof(entry->sublabel)); else if (cbs->action_sublabel) { - char tmp[512]; + char tmp[MENU_SUBLABEL_MAX_LENGTH]; tmp[0] = '\0'; if (cbs->action_sublabel(list, diff --git a/menu/menu_entries.h b/menu/menu_entries.h index ed48b7faa5..753bb8e6fc 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -30,6 +30,8 @@ RETRO_BEGIN_DECLS +#define MENU_SUBLABEL_MAX_LENGTH 1024 + enum menu_entries_ctl_state { MENU_ENTRIES_CTL_NONE = 0, @@ -80,7 +82,7 @@ typedef struct menu_ctx_list typedef struct menu_file_list_cbs { - char action_sublabel_cache[512]; + char action_sublabel_cache[MENU_SUBLABEL_MAX_LENGTH]; char action_title_cache [512]; enum msg_hash_enums enum_idx; @@ -210,7 +212,7 @@ typedef struct menu_entry size_t entry_idx; char path[255]; char label[255]; - char sublabel[512]; + char sublabel[MENU_SUBLABEL_MAX_LENGTH]; char rich_label[255]; char value[255]; char password_value[255]; From 0cd4f6623fc157044388c5fb09146e4a23358bba Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 17:18:51 +0200 Subject: [PATCH 016/275] (qb) Add HAVE_DSOUND option --- qb/config.params.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/qb/config.params.sh b/qb/config.params.sh index 439727e673..24de0c20c0 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -18,6 +18,7 @@ HAVE_OZONE=auto # Ozone menu HAVE_STRIPES=no # Stripes menu HAVE_RUNAHEAD=yes # Runahead support HAVE_SSL=auto # SSL/mbedtls support +HAVE_DSOUND=auto # DirectSound support C89_SSL=no HAVE_BUILTINMBEDTLS=auto # Bake in the mbedtls library C89_BUILTINMBEDTLS=no From 0ad02dc72d2c3c6b7570cd18ab7f990cacee459e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 17:31:08 +0200 Subject: [PATCH 017/275] (Qb) Add way to exclude WASAPI --- qb/config.libs.sh | 5 ++++- qb/config.params.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index d43768018d..454a41ee5c 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -315,7 +315,10 @@ if [ "$OS" = 'Win32' ]; then HAVE_XINPUT=yes fi - HAVE_WASAPI=yes + if [ "$HAVE_WASAPI" != 'no' ]; then + HAVE_WASAPI=yes + fi + HAVE_XAUDIO=yes HAVE_WINMM=yes fi diff --git a/qb/config.params.sh b/qb/config.params.sh index 24de0c20c0..d0ae56fe9a 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -19,6 +19,7 @@ HAVE_STRIPES=no # Stripes menu HAVE_RUNAHEAD=yes # Runahead support HAVE_SSL=auto # SSL/mbedtls support HAVE_DSOUND=auto # DirectSound support +HAVE_WASAPI=auto # WASAPI support C89_SSL=no HAVE_BUILTINMBEDTLS=auto # Bake in the mbedtls library C89_BUILTINMBEDTLS=no From c5be03c20931b5b056a1bf2099b683ae7a72d786 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 17:53:19 +0200 Subject: [PATCH 018/275] (Qb) Add winmm switch --- qb/config.libs.sh | 5 ++++- qb/config.params.sh | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 454a41ee5c..d5879a3700 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -320,7 +320,10 @@ if [ "$OS" = 'Win32' ]; then fi HAVE_XAUDIO=yes - HAVE_WINMM=yes + + if [ "$HAVE_WINMM" != 'no' ]; then + HAVE_WINMM=yes + fi fi check_platform Win32 D3D8 'Direct3D 8 is' true diff --git a/qb/config.params.sh b/qb/config.params.sh index d0ae56fe9a..197c410111 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -17,9 +17,10 @@ HAVE_XMB=auto # XMB menu HAVE_OZONE=auto # Ozone menu HAVE_STRIPES=no # Stripes menu HAVE_RUNAHEAD=yes # Runahead support -HAVE_SSL=auto # SSL/mbedtls support HAVE_DSOUND=auto # DirectSound support HAVE_WASAPI=auto # WASAPI support +HAVE_WINMM=auto # WinMM support +HAVE_SSL=auto # SSL/mbedtls support C89_SSL=no HAVE_BUILTINMBEDTLS=auto # Bake in the mbedtls library C89_BUILTINMBEDTLS=no From 836ce3bfbb693d126dc150b3ddc313b1d82a485b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 18:42:06 +0200 Subject: [PATCH 019/275] Add HAVE_COMPRESSION ifdef --- menu/menu_displaylist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index babb92abcd..5f0dd31bcc 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -7296,6 +7296,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, MENU_SETTING_ACTION, 0, 0)) count++; +#ifdef HAVE_COMPRESSION if (settings->bools.menu_show_core_updater) { if (menu_entries_append_enum(info->list, @@ -7376,6 +7377,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, MENU_SETTING_ACTION, 0, 0)) count++; } +#endif #endif } From 78f62806f96038348690dd95f620a549a80597d4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 18:52:19 +0200 Subject: [PATCH 020/275] Only compile menu_networking.c when HAVE_NETWORKING is defined --- Makefile.common | 4 ++-- griffin/griffin.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 7d6af76b24..71891d2d27 100644 --- a/Makefile.common +++ b/Makefile.common @@ -773,7 +773,6 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/menu_content.o \ menu/menu_entries.o \ menu/menu_setting.o \ - menu/menu_networking.o \ menu/widgets/menu_filebrowser.o \ menu/widgets/menu_dialog.o \ menu/widgets/menu_input_dialog.o \ @@ -1686,7 +1685,8 @@ ifeq ($(HAVE_NETWORKING), 1) tasks/task_netplay_find_content.o ifeq ($(HAVE_MENU_COMMON), 1) - OBJ += tasks/task_pl_thumbnail_download.o + OBJ += tasks/task_pl_thumbnail_download.o \ + menu/menu_networking.o endif ifeq ($(HAVE_SSL), 1) diff --git a/griffin/griffin.c b/griffin/griffin.c index 9fddb7982e..d268d3143c 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1231,7 +1231,9 @@ MENU #include "../menu/menu_cbs.c" #include "../menu/menu_content.c" +#if defined(HAVE_NETWORKING) #include "../menu/menu_networking.c" +#endif #include "../menu/widgets/menu_filebrowser.c" #include "../menu/widgets/menu_dialog.c" From 0b6e66f109dd11146edf28c103991cbaa709bfa2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 18:55:16 +0200 Subject: [PATCH 021/275] Update Makefile.common --- Makefile.common | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.common b/Makefile.common index 71891d2d27..9c89c83fae 100644 --- a/Makefile.common +++ b/Makefile.common @@ -201,8 +201,11 @@ else ifneq ($(findstring Darwin,$(OS)),) OBJ += $(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o endif +ifeq ($(TARGET), retroarch_orbis) + OBJ += $(LIBRETRO_COMM_DIR)/file/nbio/nbio_orbis.o +endif + OBJ += \ - $(LIBRETRO_COMM_DIR)/file/nbio/nbio_orbis.o \ $(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \ $(LIBRETRO_COMM_DIR)/file/file_path.o \ file_path_special.o \ From 2f2c53586c1c094edfa205efb06ec519abac579f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 19:03:48 +0200 Subject: [PATCH 022/275] (qb) Add HAVE_CC_RESAMPLER --- Makefile | 1 - Makefile.common | 5 ++++- qb/config.params.sh | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 57ac5534c0..0438eba7c5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ HAVE_FILE_LOGGER=1 -HAVE_CC_RESAMPLER=1 NEED_CXX_LINKER=0 MISSING_DECLS =0 diff --git a/Makefile.common b/Makefile.common index 9c89c83fae..a6347c4324 100644 --- a/Makefile.common +++ b/Makefile.common @@ -285,6 +285,10 @@ endif ifeq ($(HAVE_CC_RESAMPLER), 1) DEFINES += -DHAVE_CC_RESAMPLER OBJ += audio/drivers_resampler/cc_resampler.o + +ifeq ($(HAVE_NEON),1) + OBJ += audio/drivers_resampler/cc_resampler_neon.o +endif endif ifeq ($(HAVE_LANGEXTRA), 1) @@ -662,7 +666,6 @@ endif ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \ - audio/drivers_resampler/cc_resampler_neon.o \ memory/neon/memcpy-neon.o DEFINES += -DHAVE_NEON diff --git a/qb/config.params.sh b/qb/config.params.sh index 197c410111..d5429186e8 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -20,6 +20,7 @@ HAVE_RUNAHEAD=yes # Runahead support HAVE_DSOUND=auto # DirectSound support HAVE_WASAPI=auto # WASAPI support HAVE_WINMM=auto # WinMM support +HAVE_CC_RESAMPLER=yes # CC Resampler HAVE_SSL=auto # SSL/mbedtls support C89_SSL=no HAVE_BUILTINMBEDTLS=auto # Bake in the mbedtls library From 11291cc703c1e8f5c166a9fd5ddfbeec62f0ee6b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 19:24:27 +0200 Subject: [PATCH 023/275] Dehardcode program name string --- retroarch.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/retroarch.c b/retroarch.c index 0710479701..fb6e544cdf 100644 --- a/retroarch.c +++ b/retroarch.c @@ -16493,7 +16493,8 @@ void drivers_init(int flags) **/ /** - * Driver ownership - set this to true if the platform in question needs to 'own' + * Driver ownership - set this to true if the platform in + * question needs to 'own' * the respective handle and therefore skip regular RetroArch * driver teardown/reiniting procedure. * @@ -18177,7 +18178,8 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) rarch_log_file_init(); #ifdef HAVE_GIT_VERSION - RARCH_LOG("RetroArch %s (Git %s)\n", + RARCH_LOG("%s %s (Git %s)\n", + msg_hash_to_str(MSG_PROGRAM), PACKAGE_VERSION, retroarch_git_version); #endif @@ -21172,7 +21174,8 @@ bool rarch_write_debug_info(void) filestream_printf(file, "Log Date/Time: %s\n", timedate); } #endif - filestream_printf(file, "RetroArch Version: %s\n", PACKAGE_VERSION); + filestream_printf(file, "%s Version: %s\n", + msg_hash_to_str(MSG_PROGRAM), PACKAGE_VERSION); #ifdef HAVE_LAKKA if (frontend->get_lakka_version) @@ -21183,9 +21186,13 @@ bool rarch_write_debug_info(void) } #endif - filestream_printf(file, "RetroArch Build Date: %s\n", __DATE__); + filestream_printf(file, "%s Build Date: %s\n", + msg_hash_to_str(MSG_PROGRAM), + __DATE__); #ifdef HAVE_GIT_VERSION - filestream_printf(file, "RetroArch Git Commit: %s\n", retroarch_git_version); + filestream_printf(file, "%s Git Commit: %s\n", + msg_hash_to_str(MSG_PROGRAM), + retroarch_git_version); #endif filestream_printf(file, "\n"); From 5cefcb83273c145e8aafc9b7b6988ffbb6071289 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 19:27:24 +0200 Subject: [PATCH 024/275] (Win32/Vulkan) Dehardcode more program name strings --- gfx/common/vulkan_common.c | 4 ++-- gfx/common/win32_common.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 2b69f989fd..b63a69615d 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -2034,9 +2034,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, use_instance_ext = vulkan_find_instance_extensions(instance_extensions, ext_count); - app.pApplicationName = "RetroArch"; + app.pApplicationName = msg_hash_to_str(MSG_PROGRAM); app.applicationVersion = 0; - app.pEngineName = "RetroArch"; + app.pEngineName = msg_hash_to_str(MSG_PROGRAM); app.engineVersion = 0; app.apiVersion = VK_MAKE_VERSION(1, 0, 18); diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 3fffc9e97e..a0f6c408b7 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1000,7 +1000,8 @@ bool win32_window_create(void *data, unsigned style, user_height= g_win32_pos_height; } main_window.hwnd = CreateWindowEx(0, - "RetroArch", "RetroArch", + msg_hash_to_str(MSG_PROGRAM), + msg_hash_to_str(MSG_PROGRAM), style, fullscreen ? mon_rect->left : g_win32_pos_x, fullscreen ? mon_rect->top : g_win32_pos_y, @@ -1441,7 +1442,7 @@ void win32_window_reset(void) void win32_destroy_window(void) { #ifndef _XBOX - UnregisterClass("RetroArch", GetModuleHandle(NULL)); + UnregisterClass(msg_hash_to_str(MSG_PROGRAM), GetModuleHandle(NULL)); #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */ UnregisterDeviceNotification(notification_handler); #endif From b04e057b5dbe7a379929e396254f9a418f3047c3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 19:39:43 +0200 Subject: [PATCH 025/275] Revert "(Win32/Vulkan) Dehardcode more program name strings" This reverts commit 5cefcb83273c145e8aafc9b7b6988ffbb6071289. --- gfx/common/vulkan_common.c | 4 ++-- gfx/common/win32_common.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index b63a69615d..2b69f989fd 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -2034,9 +2034,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, use_instance_ext = vulkan_find_instance_extensions(instance_extensions, ext_count); - app.pApplicationName = msg_hash_to_str(MSG_PROGRAM); + app.pApplicationName = "RetroArch"; app.applicationVersion = 0; - app.pEngineName = msg_hash_to_str(MSG_PROGRAM); + app.pEngineName = "RetroArch"; app.engineVersion = 0; app.apiVersion = VK_MAKE_VERSION(1, 0, 18); diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index a0f6c408b7..3fffc9e97e 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1000,8 +1000,7 @@ bool win32_window_create(void *data, unsigned style, user_height= g_win32_pos_height; } main_window.hwnd = CreateWindowEx(0, - msg_hash_to_str(MSG_PROGRAM), - msg_hash_to_str(MSG_PROGRAM), + "RetroArch", "RetroArch", style, fullscreen ? mon_rect->left : g_win32_pos_x, fullscreen ? mon_rect->top : g_win32_pos_y, @@ -1442,7 +1441,7 @@ void win32_window_reset(void) void win32_destroy_window(void) { #ifndef _XBOX - UnregisterClass(msg_hash_to_str(MSG_PROGRAM), GetModuleHandle(NULL)); + UnregisterClass("RetroArch", GetModuleHandle(NULL)); #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */ UnregisterDeviceNotification(notification_handler); #endif From f787e77c25274c169e9afddce52168c401ff4adc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 19:39:51 +0200 Subject: [PATCH 026/275] Revert "Dehardcode program name string" This reverts commit 11291cc703c1e8f5c166a9fd5ddfbeec62f0ee6b. --- retroarch.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/retroarch.c b/retroarch.c index fb6e544cdf..0710479701 100644 --- a/retroarch.c +++ b/retroarch.c @@ -16493,8 +16493,7 @@ void drivers_init(int flags) **/ /** - * Driver ownership - set this to true if the platform in - * question needs to 'own' + * Driver ownership - set this to true if the platform in question needs to 'own' * the respective handle and therefore skip regular RetroArch * driver teardown/reiniting procedure. * @@ -18178,8 +18177,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) rarch_log_file_init(); #ifdef HAVE_GIT_VERSION - RARCH_LOG("%s %s (Git %s)\n", - msg_hash_to_str(MSG_PROGRAM), + RARCH_LOG("RetroArch %s (Git %s)\n", PACKAGE_VERSION, retroarch_git_version); #endif @@ -21174,8 +21172,7 @@ bool rarch_write_debug_info(void) filestream_printf(file, "Log Date/Time: %s\n", timedate); } #endif - filestream_printf(file, "%s Version: %s\n", - msg_hash_to_str(MSG_PROGRAM), PACKAGE_VERSION); + filestream_printf(file, "RetroArch Version: %s\n", PACKAGE_VERSION); #ifdef HAVE_LAKKA if (frontend->get_lakka_version) @@ -21186,13 +21183,9 @@ bool rarch_write_debug_info(void) } #endif - filestream_printf(file, "%s Build Date: %s\n", - msg_hash_to_str(MSG_PROGRAM), - __DATE__); + filestream_printf(file, "RetroArch Build Date: %s\n", __DATE__); #ifdef HAVE_GIT_VERSION - filestream_printf(file, "%s Git Commit: %s\n", - msg_hash_to_str(MSG_PROGRAM), - retroarch_git_version); + filestream_printf(file, "RetroArch Git Commit: %s\n", retroarch_git_version); #endif filestream_printf(file, "\n"); From 70581a70b2b41d3f5d96833b6b1ec19ef9a36298 Mon Sep 17 00:00:00 2001 From: MrHuu Date: Fri, 19 Jul 2019 19:56:35 +0200 Subject: [PATCH 027/275] (CTR) Add ID for 4DO --- pkg/ctr/Makefile.cores | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/ctr/Makefile.cores b/pkg/ctr/Makefile.cores index d7567039fc..972397bb0e 100644 --- a/pkg/ctr/Makefile.cores +++ b/pkg/ctr/Makefile.cores @@ -5,6 +5,14 @@ ifeq ($(LIBRETRO), 2048) APP_ICON = pkg/ctr/assets/2048.png APP_BANNER = pkg/ctr/assets/2048_banner.png +else ifeq ($(LIBRETRO), 4do) + APP_TITLE = 4DO + APP_AUTHOR = various + APP_PRODUCT_CODE = RARCH-4DO + APP_UNIQUE_ID = 0xBAC91 + APP_ICON = pkg/ctr/assets/4do.png + APP_BANNER = pkg/ctr/assets/4do_banner.png + else ifeq ($(LIBRETRO), 81) APP_TITLE = lr-81 APP_AUTHOR = various From eebfa11528296734064dce05cf288ffdded5e26b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 20:00:31 +0200 Subject: [PATCH 028/275] Show UI menubar setting --- config.def.h | 2 ++ configuration.c | 2 +- intl/msg_hash_us.h | 2 +- menu/menu_setting.c | 71 ++++++++++++++++++++++++++------------------- 4 files changed, 45 insertions(+), 32 deletions(-) diff --git a/config.def.h b/config.def.h index c5b8566700..f6beb535ef 100644 --- a/config.def.h +++ b/config.def.h @@ -898,6 +898,8 @@ static const bool content_runtime_log = false; /* Keep track of how long each content has been running for over time (ignores core) */ static const bool content_runtime_log_aggregate = false; +#define DEFAULT_UI_MENUBAR_ENABLE true + #if defined(__QNX__) || defined(_XBOX1) || defined(_XBOX360) || defined(__CELLOS_LV2__) || (defined(__MACH__) && defined(IOS)) || defined(ANDROID) || defined(WIIU) || defined(HAVE_NEON) || defined(GEKKO) || defined(__ARM_NEON__) static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWER; #elif defined(PSP) || defined(_3DS) || defined(VITA) || defined(PS2) diff --git a/configuration.c b/configuration.c index 1192720b7a..7cd76f9164 100644 --- a/configuration.c +++ b/configuration.c @@ -1370,7 +1370,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, DEFAULT_STATISTICS_SHOW, false); SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, DEFAULT_FRAMECOUNT_SHOW, false); SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, DEFAULT_MEMORY_SHOW, false); - SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false); + SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, DEFAULT_UI_MENUBAR_ENABLE, false); SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false); SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, DEFAULT_REWIND_ENABLE, false); SETTING_BOOL("vrr_runloop_enable", &settings->bools.vrr_runloop_enable, true, DEFAULT_VRR_RUNLOOP_ENABLE, false); diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 895f04762f..68549c89f3 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3512,7 +3512,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, - "Menubar" + "Menu Bar" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 6a5f64191d..8ab9822067 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -13158,13 +13158,19 @@ static bool setting_append_list( general_write_handler, general_read_handler, SD_FLAG_ADVANCED); + } +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) +#else + if (string_is_not_equal(ui_companion_driver_get_ident(), "null")) +#endif + { CONFIG_BOOL( list, list_info, &settings->bools.ui_menubar_enable, MENU_ENUM_LABEL_UI_MENUBAR_ENABLE, MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, - true, + DEFAULT_UI_MENUBAR_ENABLE, MENU_ENUM_LABEL_VALUE_OFF, MENU_ENUM_LABEL_VALUE_ON, &group_info, @@ -13174,37 +13180,42 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); } -#ifdef HAVE_QT - CONFIG_BOOL( - list, list_info, - &settings->bools.desktop_menu_enable, - MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE, - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - desktop_menu_enable, - MENU_ENUM_LABEL_VALUE_OFF, - MENU_ENUM_LABEL_VALUE_ON, - &group_info, - &subgroup_info, - parent_group, - general_write_handler, - general_read_handler, - SD_FLAG_NONE); - CONFIG_BOOL( - list, list_info, - &settings->bools.ui_companion_toggle, - MENU_ENUM_LABEL_UI_COMPANION_TOGGLE, - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - ui_companion_toggle, - MENU_ENUM_LABEL_VALUE_OFF, - MENU_ENUM_LABEL_VALUE_ON, - &group_info, - &subgroup_info, - parent_group, - general_write_handler, - general_read_handler, - SD_FLAG_NONE); + if (string_is_not_equal(ui_companion_driver_get_ident(), "null")) + { +#ifdef HAVE_QT + CONFIG_BOOL( + list, list_info, + &settings->bools.desktop_menu_enable, + MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE, + MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, + desktop_menu_enable, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + CONFIG_BOOL( + list, list_info, + &settings->bools.ui_companion_toggle, + MENU_ENUM_LABEL_UI_COMPANION_TOGGLE, + MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, + ui_companion_toggle, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); #endif + } + END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); break; From b747bb22f45046788918285f544ef4c508ed3130 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 20:08:45 +0200 Subject: [PATCH 029/275] Properly dehardcode program name now --- gfx/common/win32_common.c | 5 +++-- ui/drivers/ui_win32.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 3fffc9e97e..726d44245a 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1000,7 +1000,7 @@ bool win32_window_create(void *data, unsigned style, user_height= g_win32_pos_height; } main_window.hwnd = CreateWindowEx(0, - "RetroArch", "RetroArch", + msg_hash_to_str(MSG_PROGRAM), msg_hash_to_str(MSG_PROGRAM), style, fullscreen ? mon_rect->left : g_win32_pos_x, fullscreen ? mon_rect->top : g_win32_pos_y, @@ -1441,7 +1441,8 @@ void win32_window_reset(void) void win32_destroy_window(void) { #ifndef _XBOX - UnregisterClass("RetroArch", GetModuleHandle(NULL)); + UnregisterClass(msg_hash_to_str(MSG_PROGRAM), + GetModuleHandle(NULL)); #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */ UnregisterDeviceNotification(notification_handler); #endif diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 0de663603b..6db502db12 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -64,7 +64,7 @@ bool win32_window_init(WNDCLASSEX *wndclass, wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wndclass->hInstance = GetModuleHandle(NULL); wndclass->hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass->lpszClassName = (class_name != NULL) ? class_name : "RetroArch"; + wndclass->lpszClassName = (class_name != NULL) ? class_name : msg_hash_to_str(MSG_PROGRAM); wndclass->hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON)); wndclass->hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0); From c4c7a1b8cc0a3f6a42cafef91d579f954ef75d14 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 19 Jul 2019 20:12:12 +0200 Subject: [PATCH 030/275] (Vulkan) Dehardcode application name --- gfx/common/vulkan_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 2b69f989fd..b63a69615d 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -2034,9 +2034,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, use_instance_ext = vulkan_find_instance_extensions(instance_extensions, ext_count); - app.pApplicationName = "RetroArch"; + app.pApplicationName = msg_hash_to_str(MSG_PROGRAM); app.applicationVersion = 0; - app.pEngineName = "RetroArch"; + app.pEngineName = msg_hash_to_str(MSG_PROGRAM); app.engineVersion = 0; app.apiVersion = VK_MAKE_VERSION(1, 0, 18); From 4b8a5fb0f9a67c014762d2e44a304b6ba59ce534 Mon Sep 17 00:00:00 2001 From: MrHuu Date: Fri, 19 Jul 2019 23:12:16 +0200 Subject: [PATCH 031/275] (CTR) Add / Update core ID's Add more missing id's --- pkg/ctr/Makefile.cores | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg/ctr/Makefile.cores b/pkg/ctr/Makefile.cores index 972397bb0e..fb4be19c9a 100644 --- a/pkg/ctr/Makefile.cores +++ b/pkg/ctr/Makefile.cores @@ -80,6 +80,23 @@ else ifeq ($(LIBRETRO), fbalpha2012_cps2) APP_BANNER = pkg/ctr/assets/fbalpha2012_cps2_banner.png APP_SYSTEM_MODE = 80MB +else ifeq ($(LIBRETRO), fbalpha2012_cps3) + APP_TITLE = Final Burn Alpha 2012 - CPS-3 + APP_AUTHOR = Team FB Alpha + APP_PRODUCT_CODE = RARCH-FBACPS3 + APP_UNIQUE_ID = 0xBAC92 + APP_ICON = pkg/ctr/assets/fbalpha2012_cps3.png + APP_BANNER = pkg/ctr/assets/fbalpha2012_cps3_banner.png + APP_SYSTEM_MODE = 80MB + +else ifeq ($(LIBRETRO), fbneo) + APP_TITLE = FinalBurn Neo + APP_AUTHOR = Team FBNeo + APP_PRODUCT_CODE = RARCH-FBNEO + APP_UNIQUE_ID = 0xBAC93 + APP_ICON = pkg/ctr/assets/default.png + APP_BANNER = pkg/ctr/assets/libretro_banner.png + else ifeq ($(LIBRETRO), fceumm) APP_TITLE = FCeumm Libretro APP_PRODUCT_CODE = RARCH-FCEUMM @@ -334,6 +351,14 @@ else ifeq ($(LIBRETRO), snes9x2010) APP_ICON = pkg/ctr/assets/snes9x2010.png APP_BANNER = pkg/ctr/assets/snes9x2010_banner.png +else ifeq ($(LIBRETRO), squirreljme) + APP_TITLE = SquirrelJME + APP_AUTHOR = XerTheSquirrel + APP_PRODUCT_CODE = RARCH-SQUIRRELJME + APP_UNIQUE_ID = 0xBAC94 + APP_ICON = pkg/ctr/assets/default.png + APP_BANNER = pkg/ctr/assets/libretro_banner.png + else ifeq ($(LIBRETRO), stella2014) APP_TITLE = Stella2014 Libretro APP_PRODUCT_CODE = RARCH-STELLA2014 From a60463fd762aa7464db3685dd79d1fdc819539eb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 00:12:55 +0200 Subject: [PATCH 032/275] (qb) Add HAVE_XAUDIO --- qb/config.libs.sh | 4 +++- qb/config.params.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index d5879a3700..ee725d03cb 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -319,7 +319,9 @@ if [ "$OS" = 'Win32' ]; then HAVE_WASAPI=yes fi - HAVE_XAUDIO=yes + if [ "$HAVE_XAUDIO" != 'no' ]; then + HAVE_XAUDIO=yes + fi if [ "$HAVE_WINMM" != 'no' ]; then HAVE_WINMM=yes diff --git a/qb/config.params.sh b/qb/config.params.sh index d5429186e8..312f2fe9c2 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -18,6 +18,7 @@ HAVE_OZONE=auto # Ozone menu HAVE_STRIPES=no # Stripes menu HAVE_RUNAHEAD=yes # Runahead support HAVE_DSOUND=auto # DirectSound support +HAVE_XAUDIO=auto # XAudio support HAVE_WASAPI=auto # WASAPI support HAVE_WINMM=auto # WinMM support HAVE_CC_RESAMPLER=yes # CC Resampler From 65a777855fd83c4f0a5b9828a2f66c186e6e113e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 00:34:47 +0200 Subject: [PATCH 033/275] Cleanups --- retroarch.c | 69 +++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/retroarch.c b/retroarch.c index 0710479701..f74c28e6b4 100644 --- a/retroarch.c +++ b/retroarch.c @@ -5536,7 +5536,7 @@ bool recording_init(void) output[0] = '\0'; - if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) + if (current_core_type == CORE_TYPE_DUMMY) { RARCH_WARN("[recording] %s\n", msg_hash_to_str(MSG_USING_LIBRETRO_DUMMY_CORE_RECORDING_SKIPPED)); @@ -5560,7 +5560,7 @@ bool recording_init(void) strlcpy(output, global->record.path, sizeof(output)); else { - if (streaming_is_enabled()) + if (streaming_enable) if (!string_is_empty(settings->paths.path_stream_url)) strlcpy(output, settings->paths.path_stream_url, sizeof(output)); else @@ -5614,7 +5614,7 @@ bool recording_init(void) params.config = global->record.config; else { - if (streaming_is_enabled()) + if (streaming_enable) { params.config = settings->paths.path_stream_config; params.preset = (enum record_config_type) @@ -5656,8 +5656,8 @@ bool recording_init(void) params.fb_height = next_pow2(vp.height); if (settings->bools.video_force_aspect && - (video_driver_get_aspect_ratio() > 0.0f)) - params.aspect_ratio = video_driver_get_aspect_ratio(); + (video_driver_aspect_ratio > 0.0f)) + params.aspect_ratio = video_driver_aspect_ratio; else params.aspect_ratio = (float)vp.width / vp.height; @@ -5681,8 +5681,8 @@ bool recording_init(void) } if (settings->bools.video_force_aspect && - (video_driver_get_aspect_ratio() > 0.0f)) - params.aspect_ratio = video_driver_get_aspect_ratio(); + (video_driver_aspect_ratio > 0.0f)) + params.aspect_ratio = video_driver_aspect_ratio; else params.aspect_ratio = (float)params.out_width / params.out_height; @@ -5736,8 +5736,9 @@ void recording_driver_update_streaming_url(void) { case STREAMING_MODE_TWITCH: if (!string_is_empty(settings->arrays.twitch_stream_key)) - snprintf(settings->paths.path_stream_url, sizeof(settings->paths.path_stream_url), - "%s%s", twitch_url, settings->arrays.twitch_stream_key); + snprintf(settings->paths.path_stream_url, + sizeof(settings->paths.path_stream_url), + "%s%s", twitch_url, settings->arrays.twitch_stream_key); else { /* TODO: Show input box for twitch_stream_key*/ @@ -5746,10 +5747,9 @@ void recording_driver_update_streaming_url(void) break; case STREAMING_MODE_YOUTUBE: if (!string_is_empty(settings->arrays.youtube_stream_key)) - { - snprintf(settings->paths.path_stream_url, sizeof(settings->paths.path_stream_url), - "%s%s", youtube_url, settings->arrays.youtube_stream_key); - } + snprintf(settings->paths.path_stream_url, + sizeof(settings->paths.path_stream_url), + "%s%s", youtube_url, settings->arrays.youtube_stream_key); else { /* TODO: Show input box for youtube_stream_key*/ @@ -13289,15 +13289,11 @@ static void video_driver_init_input(const input_driver_t *tmp) /* This should never really happen as tmp (driver.input) is always * found before this in find_driver_input(), or we have aborted * in a similar fashion anyways. */ - if (!current_input) - goto error; - - if (input_driver_init()) - return; - -error: - RARCH_ERR("[Video]: Cannot initialize input driver. Exiting ...\n"); - retroarch_fail(1, "video_driver_init_input()"); + if (!current_input || !input_driver_init()) + { + RARCH_ERR("[Video]: Cannot initialize input driver. Exiting ...\n"); + retroarch_fail(1, "video_driver_init_input()"); + } } /** @@ -13331,9 +13327,6 @@ static void video_driver_monitor_compute_fps_statistics(void) static void video_driver_pixel_converter_free(void) { - if (!video_driver_scaler_ptr) - return; - scaler_ctx_gen_reset(video_driver_scaler_ptr->scaler); if (video_driver_scaler_ptr->scaler) @@ -13390,7 +13383,8 @@ static void video_driver_free_internal(void) ) current_video->free(video_driver_data); - video_driver_pixel_converter_free(); + if (video_driver_scaler_ptr) + video_driver_pixel_converter_free(); video_driver_filter_free(); command_event(CMD_EVENT_SHADER_DIR_DEINIT, NULL); @@ -13456,7 +13450,8 @@ static bool video_driver_pixel_converter_init(unsigned size) return true; error: - video_driver_pixel_converter_free(); + if (video_driver_scaler_ptr) + video_driver_pixel_converter_free(); video_driver_filter_free(); return false; @@ -13523,7 +13518,7 @@ static bool video_driver_init_internal(bool *video_is_threaded) { /* Do rounding here to simplify integer scale correctness. */ unsigned base_width = - roundf(geom->base_height * video_driver_get_aspect_ratio()); + roundf(geom->base_height * video_driver_aspect_ratio); width = roundf(base_width * settings->floats.video_scale); } else @@ -13837,7 +13832,8 @@ void video_monitor_set_refresh_rate(float hz) snprintf(msg, sizeof(msg), "Setting refresh rate to: %.3f Hz.", hz); - runloop_msg_queue_push(msg, 1, 180, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + runloop_msg_queue_push(msg, 1, 180, false, NULL, + MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); RARCH_LOG("%s\n", msg); configuration_set_float(settings, @@ -14088,10 +14084,8 @@ void video_driver_set_viewport_config(void) } } else - { aspectratio_lut[ASPECT_RATIO_CONFIG].value = settings->floats.video_aspect_ratio; - } } void video_driver_set_viewport_square_pixel(void) @@ -14230,7 +14224,8 @@ void video_driver_set_aspect_ratio(void) video_driver_data, aspect_ratio_idx); } -void video_driver_update_viewport(struct video_viewport* vp, bool force_full, bool keep_aspect) +void video_driver_update_viewport( + struct video_viewport* vp, bool force_full, bool keep_aspect) { gfx_ctx_aspect_t aspect_data; float device_aspect = (float)vp->full_width / vp->full_height; @@ -14249,10 +14244,10 @@ void video_driver_update_viewport(struct video_viewport* vp, bool force_full, bo if (settings->bools.video_scale_integer && !force_full) video_viewport_get_scaled_integer( - vp, vp->full_width, vp->full_height, video_driver_get_aspect_ratio(), keep_aspect); + vp, vp->full_width, vp->full_height, video_driver_aspect_ratio, keep_aspect); else if (keep_aspect && !force_full) { - float desired_aspect = video_driver_get_aspect_ratio(); + float desired_aspect = video_driver_aspect_ratio; #if defined(HAVE_MENU) if (settings->uints.video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM) @@ -14330,8 +14325,8 @@ static bool video_driver_find_driver(void) if (video_driver_is_hw_context()) { - struct retro_hw_render_callback *hwr = video_driver_get_hw_context_internal(); - + struct retro_hw_render_callback *hwr = + video_driver_get_hw_context_internal(); current_video = NULL; (void)hwr; @@ -14350,7 +14345,7 @@ static bool video_driver_find_driver(void) RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n"); /* If we have configured one of the HW render capable GL drivers, go with that. */ - if (!string_is_equal(settings->arrays.video_driver, "gl") && + if ( !string_is_equal(settings->arrays.video_driver, "gl") && !string_is_equal(settings->arrays.video_driver, "glcore")) { #if defined(HAVE_OPENGL_CORE) From c2c7c106a12a5284d42ee26aa58b54de2c89d106 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 00:39:55 +0200 Subject: [PATCH 034/275] Add conf->path for config_file_new_from_path_to_string --- libretro-common/file/config_file.c | 14 +++++++++----- libretro-common/include/file/config_file.h | 3 ++- tasks/task_autodetect.c | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index eb2b9abbed..dc833f7e49 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -530,7 +530,8 @@ bool config_append_file(config_file_t *conf, const char *path) return true; } -config_file_t *config_file_new_from_string(const char *from_string) +config_file_t *config_file_new_from_string(const char *from_string, + const char *path) { size_t i; struct string_list *lines = NULL; @@ -549,6 +550,9 @@ config_file_t *config_file_new_from_string(const char *from_string) conf->include_depth = 0; conf->guaranteed_no_duplicates = false ; + if (!string_is_empty(path)) + conf->path = strdup(path); + lines = string_split(from_string, "\n"); if (!lines) return conf; @@ -602,9 +606,9 @@ config_file_t *config_file_new_from_path_to_string(const char *path) if (filestream_read_file(path, (void**)&ret_buf, &length)) { if (length >= 0) - if ((conf = config_file_new_from_string((const char*)ret_buf))) - conf->path = strdup(path); - free((void*)ret_buf); + conf = config_file_new_from_string((const char*)ret_buf, path); + if ((void*)ret_buf) + free((void*)ret_buf); } return conf; @@ -1142,7 +1146,7 @@ static void test_config_file_parse_contains( const char * cfgtext, const char *key, const char *val) { - config_file_t *cfg = config_file_new_from_string(cfgtext); + config_file_t *cfg = config_file_new_from_string(cfgtext, NULL); char *out = NULL; bool ok = false; diff --git a/libretro-common/include/file/config_file.h b/libretro-common/include/file/config_file.h index d441ff5505..e13e655a90 100644 --- a/libretro-common/include/file/config_file.h +++ b/libretro-common/include/file/config_file.h @@ -94,7 +94,8 @@ config_file_t *config_file_new_alloc(void); config_file_t *config_file_new_with_callback(const char *path, config_file_cb_t *cb); /* Load a config file from a string. */ -config_file_t *config_file_new_from_string(const char *from_string); +config_file_t *config_file_new_from_string(const char *from_string, + const char *path); config_file_t *config_file_new_from_path_to_string(const char *path); diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index a0a745e86b..947ca1c318 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -407,7 +407,7 @@ static bool input_autoconfigure_joypad_from_conf_internal( for (i = 0; input_builtin_autoconfs[i]; i++) { config_file_t *conf = config_file_new_from_string( - input_builtin_autoconfs[i]); + input_builtin_autoconfs[i], NULL); if (conf && input_autoconfigure_joypad_from_conf(conf, params, task)) return true; } From 88a4c3e21bb65090e0d064cf1a90cee6062252fe Mon Sep 17 00:00:00 2001 From: Yoshi Sugawara Date: Thu, 18 Jul 2019 09:15:13 -1000 Subject: [PATCH 035/275] Created method playlist_resolve_path() to keep the platform specific ifdef in one location to resolve the path for the playlist. Also fix setting the core path from the default core path. --- menu/cbs/menu_cbs_ok.c | 53 ++++++++++++------------------ playlist.c | 73 +++++++++++++++++++++++++++++------------- playlist.h | 21 ++++++++++++ 3 files changed, 91 insertions(+), 56 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index b95bc75d64..5c208bfff6 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -69,6 +69,7 @@ #include "../../tasks/tasks_internal.h" #include "../../input/input_remapping.h" #include "../../paths.h" +#include "../../playlist.h" #include "../../retroarch.h" #include "../../verbosity.h" #include "../../lakka.h" @@ -1018,21 +1019,14 @@ end: **/ static bool menu_content_playlist_load(playlist_t *playlist, size_t idx) { - const char *path = NULL; + char path[PATH_MAX_LENGTH]; const struct playlist_entry *entry = NULL; -#ifdef HAVE_COCOATOUCH - char expanded_path[PATH_MAX_LENGTH]; -#endif playlist_get_index(playlist, idx, &entry); - path = entry->path; - -#ifdef HAVE_COCOATOUCH - expanded_path[0] = '\0'; - fill_pathname_expand_special(expanded_path, entry->path, sizeof(expanded_path)); - path = expanded_path; -#endif + path[0] = '\0'; + strlcpy(path, entry->path, sizeof(path)); + playlist_resolve_path(PLAYLIST_LOAD, path, sizeof(path)); if (!string_is_empty(path)) { @@ -1789,6 +1783,7 @@ static int action_ok_file_load(const char *path, static int action_ok_playlist_entry_collection(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { + char new_path[PATH_MAX_LENGTH]; char new_core_path[PATH_MAX_LENGTH]; size_t selection_ptr = 0; bool playlist_initialized = false; @@ -1798,22 +1793,13 @@ static int action_ok_playlist_entry_collection(const char *path, const struct playlist_entry *entry = NULL; unsigned i = 0; -#ifdef HAVE_COCOATOUCH - char expanded_path[PATH_MAX_LENGTH]; - char expanded_core_path[PATH_MAX_LENGTH] = {0}; -#endif - if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu)) return menu_cbs_exit(); + new_path[0] = '\0'; new_core_path[0] = '\0'; tmp_playlist = playlist_get_cached(); -#ifdef HAVE_COCOATOUCH - expanded_path[0] = '\0'; - expanded_core_path[0] = '\0'; -#endif - if (!tmp_playlist) { tmp_playlist = playlist_init( @@ -1870,6 +1856,7 @@ static int action_ok_playlist_entry_collection(const char *path, if (!string_is_empty(default_core_path)) { strlcpy(new_core_path, default_core_path, sizeof(new_core_path)); + playlist_resolve_path(PLAYLIST_LOAD, new_core_path, sizeof(new_core_path)); found_associated_core = true; } @@ -1908,10 +1895,7 @@ static int action_ok_playlist_entry_collection(const char *path, else { strlcpy(new_core_path, entry->core_path, sizeof(new_core_path)); -#ifdef HAVE_COCOATOUCH - fill_pathname_expand_special(expanded_core_path, new_core_path, sizeof(expanded_core_path)); - strlcpy(new_core_path, expanded_core_path, sizeof(new_core_path)); -#endif + playlist_resolve_path(PLAYLIST_LOAD, new_core_path, sizeof(new_core_path)); } if (!playlist || !menu_content_playlist_load(playlist, selection_ptr)) @@ -1927,14 +1911,10 @@ static int action_ok_playlist_entry_collection(const char *path, playlist_get_index(playlist, selection_ptr, &entry); -#ifdef HAVE_COCOATOUCH - fill_pathname_expand_special(expanded_path, entry->path, sizeof(expanded_path)); - return default_action_ok_load_content_from_playlist_from_menu( - new_core_path, expanded_path, entry->label); -#else - return default_action_ok_load_content_from_playlist_from_menu( - new_core_path, entry->path, entry->label); -#endif + strlcpy(new_path, entry->path, sizeof(new_path)); + playlist_resolve_path(PLAYLIST_LOAD, new_path, sizeof(new_path)); + return default_action_ok_load_content_from_playlist_from_menu( + new_core_path, new_path, entry->label); } static int action_ok_playlist_entry(const char *path, @@ -2919,6 +2899,13 @@ static int action_ok_core_deferred_set(const char *new_core_path, entry.core_path = (char*)new_core_path; entry.core_name = core_display_name; +#ifdef HAVE_COCOATOUCH + // for iOS, change abbreviate the bundle path with ":" because bundle path changes on each install + char abbreviated_core_path[PATH_MAX_LENGTH] = {0}; + fill_pathname_abbreviate_special(abbreviated_core_path, new_core_path, sizeof(abbreviated_core_path)); + entry.core_path = abbreviated_core_path; +#endif + command_playlist_update_write( NULL, menu->scratchpad.unsigned_var, diff --git a/playlist.c b/playlist.c index 166c6591d4..8a98e53826 100644 --- a/playlist.c +++ b/playlist.c @@ -624,6 +624,53 @@ success: return true; } +/** + * playlist_resolve_path: + * @mode : PLAYLIST_LOAD or PLAYLIST_SAVE + * @path : The path to be modified + * + * Resolves the path of an item, such as the content path or path to the core, to a format + * appropriate for saving or loading depending on the @mode parameter + * + * Can be platform specific. File paths for saving can be abbreviated to avoid saving absolute + * paths, as the base directory (home or application dir) may change after each subsequent + * install (iOS) +**/ +void playlist_resolve_path(enum playlist_file_mode mode, char *path, size_t size) +{ + char tmp[PATH_MAX_LENGTH]; + tmp[0] = '\0'; +#ifdef HAVE_COCOATOUCH + char resolved_path[PATH_MAX_LENGTH] = {0}; + strlcpy(tmp, path, sizeof(tmp)); + if ( mode == PLAYLIST_LOAD ) + { + strlcpy(resolved_path, tmp, sizeof(resolved_path)); + fill_pathname_expand_special(tmp, resolved_path, sizeof(tmp)); + } + else + { + // iOS needs to call realpath here since the call above fails due to possibly + // buffer related issues + realpath(tmp, resolved_path); + fill_pathname_abbreviate_special(tmp, resolved_path, sizeof(tmp)); + } + strlcpy(path, tmp, size); + return; +#else + if ( mode == PLAYLIST_LOAD) + { + return; + } + else + { + strlcpy(tmp, path, sizeof(tmp)); + path_resolve_realpath(tmp, sizeof(tmp)); + strlcpy(path, tmp, size); + } +#endif +} + /** * playlist_push: * @playlist : Playlist handle. @@ -639,19 +686,9 @@ bool playlist_push(playlist_t *playlist, const char *core_name = entry->core_name; bool entry_updated = false; -#ifdef HAVE_COCOATOUCH - char abbreviated_path[PATH_MAX_LENGTH]; - char abbreviated_core_path[PATH_MAX_LENGTH]; -#endif - real_path[0] = '\0'; real_core_path[0] = '\0'; -#ifdef HAVE_COCOATOUCH - abbreviated_path[0] = '\0'; - abbreviated_core_path[0] = '\0'; -#endif - if (!playlist || !entry) return false; @@ -665,29 +702,19 @@ bool playlist_push(playlist_t *playlist, if (!string_is_empty(entry->path)) { strlcpy(real_path, entry->path, sizeof(real_path)); - path_resolve_realpath(real_path, sizeof(real_path)); -#ifdef HAVE_COCOATOUCH - strlcpy(abbreviated_path, real_path, sizeof(abbreviated_path)); - fill_pathname_abbreviate_special(abbreviated_path, real_path, sizeof(abbreviated_path)); - strlcpy(real_path, abbreviated_path, sizeof(real_path)); -#endif + playlist_resolve_path(PLAYLIST_SAVE, real_path, sizeof(real_path)); } /* Get 'real' core path */ strlcpy(real_core_path, entry->core_path, sizeof(real_core_path)); if (!string_is_equal(real_core_path, file_path_str(FILE_PATH_DETECT))) - path_resolve_realpath(real_core_path, sizeof(real_core_path)); + playlist_resolve_path(PLAYLIST_SAVE, real_core_path, sizeof(real_core_path)); if (string_is_empty(real_core_path)) { RARCH_ERR("cannot push NULL or empty core path into the playlist.\n"); return false; } -#ifdef HAVE_COCOATOUCH - strlcpy(abbreviated_core_path, real_core_path, sizeof(abbreviated_core_path)); - fill_pathname_abbreviate_special(abbreviated_core_path, real_core_path, sizeof(abbreviated_core_path)); - strlcpy(real_core_path, abbreviated_core_path, sizeof(real_core_path)); -#endif if (string_is_empty(core_name)) { @@ -2330,7 +2357,7 @@ void playlist_set_default_core_path(playlist_t *playlist, const char *core_path) /* Get 'real' core path */ strlcpy(real_core_path, core_path, sizeof(real_core_path)); if (!string_is_equal(real_core_path, file_path_str(FILE_PATH_DETECT))) - path_resolve_realpath(real_core_path, sizeof(real_core_path)); + playlist_resolve_path(PLAYLIST_SAVE, real_core_path, sizeof(real_core_path)); if (string_is_empty(real_core_path)) return; diff --git a/playlist.h b/playlist.h index 7a82fd999b..ce29f849cb 100644 --- a/playlist.h +++ b/playlist.h @@ -35,6 +35,12 @@ enum playlist_runtime_status PLAYLIST_RUNTIME_VALID }; +enum playlist_file_mode +{ + PLAYLIST_LOAD, + PLAYLIST_SAVE +}; + struct playlist_entry { char *path; @@ -118,6 +124,21 @@ void playlist_get_index(playlist_t *playlist, void playlist_delete_index(playlist_t *playlist, size_t idx); +/** + * playlist_resolve_path: + * @mode : PLAYLIST_LOAD or PLAYLIST_SAVE + * @path : The path to be modified + * + * Resolves the path of an item, such as the content path or path to the core, to a format + * appropriate for saving or loading depending on the @mode parameter + * + * Can be platform specific. File paths for saving can be abbreviated to avoid saving absolute + * paths, as the base directory (home or application dir) may change after each subsequent + * install (iOS) + **/ +void playlist_resolve_path(enum playlist_file_mode mode, + char *path, size_t size); + /** * playlist_push: * @playlist : Playlist handle. From ac47f54a8ee3210cb7347055fc447597560e4035 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 11:44:54 +0200 Subject: [PATCH 036/275] (Win32) Not sure why menubar was disabled when threaded video is enabled, going to assume enabling it is thread-safe --- gfx/common/win32_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index 726d44245a..021d4d0609 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -686,7 +686,7 @@ static void win32_save_position(void) settings->uints.window_position_x = g_win32_pos_x; settings->uints.window_position_y = g_win32_pos_y; settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2; - settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - ((settings->bools.ui_menubar_enable && !video_driver_is_threaded()) ? menu_bar_height : 0); + settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0); } } } @@ -1300,7 +1300,7 @@ void win32_set_window(unsigned *width, unsigned *height, settings_t *settings = config_get_ptr(); const ui_window_t *window = ui_companion_driver_get_window_ptr(); - if (!fullscreen && settings->bools.ui_menubar_enable && !video_driver_is_threaded()) + if (!fullscreen && settings->bools.ui_menubar_enable) { RECT rc_temp; rc_temp.left = 0; From 66a44aae987d95c6e57fed8dc133acce53f7485c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 12:04:50 +0200 Subject: [PATCH 037/275] Cleanup --- ui/drivers/ui_qt.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 42eec02288..45fe0f318b 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -118,9 +118,8 @@ void ThumbnailWidget::dropEvent(QDropEvent *event) emit(filesDropped(image, m_thumbnailType)); else { - QByteArray stringArray = QDir::toNativeSeparators(imageString).toUtf8(); - const char *stringData = stringArray.constData(); - RARCH_ERR("[Qt]: Could not read image: %s\n", stringData); + const char *string_data = QDir::toNativeSeparators(imageString).toUtf8().constData(); + RARCH_ERR("[Qt]: Could not read image: %s\n", string_data); } } } @@ -652,9 +651,9 @@ static void ui_companion_qt_notify_content_loaded(void *data) static void ui_companion_qt_toggle(void *data, bool force) { - ui_companion_qt_t *handle = (ui_companion_qt_t*)data; + ui_companion_qt_t *handle = (ui_companion_qt_t*)data; ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window; - settings_t *settings = config_get_ptr(); + settings_t *settings = config_get_ptr(); if (settings->bools.ui_companion_toggle || force) { @@ -681,7 +680,7 @@ static void ui_companion_qt_toggle(void *data, bool force) static void ui_companion_qt_event_command(void *data, enum event_command cmd) { - ui_companion_qt_t *handle = (ui_companion_qt_t*)data; + ui_companion_qt_t *handle = (ui_companion_qt_t*)data; ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window; if (!handle) @@ -709,7 +708,7 @@ static void ui_companion_qt_notify_list_pushed(void *data, file_list_t *list, static void ui_companion_qt_notify_refresh(void *data) { - ui_companion_qt_t *handle = (ui_companion_qt_t*)data; + ui_companion_qt_t *handle = (ui_companion_qt_t*)data; ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window; win_handle->qtWindow->deferReloadPlaylists(); @@ -717,7 +716,7 @@ static void ui_companion_qt_notify_refresh(void *data) static void ui_companion_qt_log_msg(void *data, const char *msg) { - ui_companion_qt_t *handle = (ui_companion_qt_t*)data; + ui_companion_qt_t *handle = (ui_companion_qt_t*)data; ui_window_qt_t *win_handle = (ui_window_qt_t*)handle->window; win_handle->qtWindow->appendLogMessage(msg); @@ -725,7 +724,7 @@ static void ui_companion_qt_log_msg(void *data, const char *msg) void ui_companion_qt_msg_queue_push(void *data, const char *msg, unsigned priority, unsigned duration, bool flush) { - ui_companion_qt_t *handle = (ui_companion_qt_t*)data; + ui_companion_qt_t *handle = (ui_companion_qt_t*)data; ui_window_qt_t *win_handle = NULL; if (!handle) From 430fc16f617f8d24b9e6bfdc1e042f212072a4d1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 12:28:50 +0200 Subject: [PATCH 038/275] Cleanups --- retroarch.c | 488 ++++++++++++++++++++++++++-------------------------- retroarch.h | 6 - 2 files changed, 242 insertions(+), 252 deletions(-) diff --git a/retroarch.c b/retroarch.c index f74c28e6b4..4c4d09da63 100644 --- a/retroarch.c +++ b/retroarch.c @@ -768,6 +768,8 @@ static enum rarch_core_type current_core_type = CORE_TYPE_PLAI static enum rarch_core_type explicit_current_core_type = CORE_TYPE_PLAIN; static char error_string[255] = {0}; static char runtime_shader_preset[255] = {0}; + +static bool has_set_username = false; static bool shader_presets_need_reload = true; #ifdef HAVE_THREAD_STORAGE @@ -1673,6 +1675,37 @@ void *video_driver_get_ptr(bool force_nonthreaded_data) return video_driver_get_ptr_internal(force_nonthreaded_data); } +/* MESSAGE QUEUE */ + +static void retroarch_msg_queue_deinit(void) +{ + runloop_msg_queue_lock(); + + if (!runloop_msg_queue) + return; + + msg_queue_free(runloop_msg_queue); + + runloop_msg_queue_unlock(); +#ifdef HAVE_THREADS + slock_free(_runloop_msg_queue_lock); + _runloop_msg_queue_lock = NULL; +#endif + + runloop_msg_queue = NULL; +} + +static void retroarch_msg_queue_init(void) +{ + retroarch_msg_queue_deinit(); + runloop_msg_queue = msg_queue_new(8); + +#ifdef HAVE_THREADS + _runloop_msg_queue_lock = slock_new(); +#endif +} + + /* FRONTEND */ /* Griffin hack */ @@ -1682,6 +1715,188 @@ void *video_driver_get_ptr(bool force_nonthreaded_data) #endif #endif +void retroarch_override_setting_set(enum rarch_override_setting enum_idx, void *data) +{ + switch (enum_idx) + { + case RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE: + { + unsigned *val = (unsigned*)data; + if (val) + { + unsigned bit = *val; + BIT256_SET(has_set_libretro_device, bit); + } + } + break; + case RARCH_OVERRIDE_SETTING_VERBOSITY: + has_set_verbosity = true; + break; + case RARCH_OVERRIDE_SETTING_LIBRETRO: + has_set_libretro = true; + break; + case RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY: + has_set_libretro_directory = true; + break; + case RARCH_OVERRIDE_SETTING_SAVE_PATH: + has_set_save_path = true; + break; + case RARCH_OVERRIDE_SETTING_STATE_PATH: + has_set_state_path = true; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_MODE: + has_set_netplay_mode = true; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS: + has_set_netplay_ip_address = true; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT: + has_set_netplay_ip_port = true; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE: + has_set_netplay_stateless_mode = true; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES: + has_set_netplay_check_frames = true; + break; + case RARCH_OVERRIDE_SETTING_UPS_PREF: + has_set_ups_pref = true; + break; + case RARCH_OVERRIDE_SETTING_BPS_PREF: + has_set_bps_pref = true; + break; + case RARCH_OVERRIDE_SETTING_IPS_PREF: + has_set_ips_pref = true; + break; + case RARCH_OVERRIDE_SETTING_LOG_TO_FILE: + has_set_log_to_file = true; + break; + case RARCH_OVERRIDE_SETTING_NONE: + default: + break; + } +} + +void retroarch_override_setting_unset(enum rarch_override_setting enum_idx, void *data) +{ + switch (enum_idx) + { + case RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE: + { + unsigned *val = (unsigned*)data; + if (val) + { + unsigned bit = *val; + BIT256_CLEAR(has_set_libretro_device, bit); + } + } + break; + case RARCH_OVERRIDE_SETTING_VERBOSITY: + has_set_verbosity = false; + break; + case RARCH_OVERRIDE_SETTING_LIBRETRO: + has_set_libretro = false; + break; + case RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY: + has_set_libretro_directory = false; + break; + case RARCH_OVERRIDE_SETTING_SAVE_PATH: + has_set_save_path = false; + break; + case RARCH_OVERRIDE_SETTING_STATE_PATH: + has_set_state_path = false; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_MODE: + has_set_netplay_mode = false; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS: + has_set_netplay_ip_address = false; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT: + has_set_netplay_ip_port = false; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE: + has_set_netplay_stateless_mode = false; + break; + case RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES: + has_set_netplay_check_frames = false; + break; + case RARCH_OVERRIDE_SETTING_UPS_PREF: + has_set_ups_pref = false; + break; + case RARCH_OVERRIDE_SETTING_BPS_PREF: + has_set_bps_pref = false; + break; + case RARCH_OVERRIDE_SETTING_IPS_PREF: + has_set_ips_pref = false; + break; + case RARCH_OVERRIDE_SETTING_LOG_TO_FILE: + has_set_log_to_file = false; + break; + case RARCH_OVERRIDE_SETTING_NONE: + default: + break; + } +} + + +static void retroarch_override_setting_free_state(void) +{ + unsigned i; + for (i = 0; i < RARCH_OVERRIDE_SETTING_LAST; i++) + { + if (i == RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE) + { + unsigned j; + for (j = 0; j < MAX_USERS; j++) + retroarch_override_setting_unset( + (enum rarch_override_setting)(i), &j); + } + else + retroarch_override_setting_unset( + (enum rarch_override_setting)(i), NULL); + } +} + + +static void global_free(void) +{ + global_t *global = NULL; + + content_deinit(); + + path_deinit_subsystem(); + command_event(CMD_EVENT_RECORD_DEINIT, NULL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); + + rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); + rarch_is_sram_load_disabled = false; + rarch_is_sram_save_disabled = false; + rarch_use_sram = false; + rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL); + rarch_ctl(RARCH_CTL_UNSET_PATCH_BLOCKED, NULL); + runloop_overrides_active = false; + runloop_remaps_core_active = false; + runloop_remaps_game_active = false; + runloop_remaps_content_dir_active = false; + + current_core.has_set_input_descriptors = false; + + global = &g_extern; + path_clear_all(); + dir_clear_all(); + if (global) + { + if (!string_is_empty(global->name.remapfile)) + free(global->name.remapfile); + memset(global, 0, sizeof(struct global)); + } + retroarch_override_setting_free_state(); +} + + /** * main_exit: * @@ -1714,7 +1929,22 @@ void main_exit(void *args) path_get_ptr(RARCH_PATH_CORE), path_get_realsize(RARCH_PATH_CORE)); - rarch_ctl(RARCH_CTL_DESTROY, NULL); + has_set_username = false; + rarch_is_inited = false; + rarch_error_on_init = false; + rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); + + retroarch_msg_queue_deinit(); + driver_uninit(DRIVERS_CMD_ALL); + command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); + + rarch_ctl(RARCH_CTL_STATE_FREE, NULL); + global_free(); + rarch_ctl(RARCH_CTL_DATA_DEINIT, NULL); + + if (configuration_settings) + free(configuration_settings); + configuration_settings = NULL; ui_companion_driver_deinit(); @@ -1750,7 +1980,15 @@ int rarch_main(int argc, char *argv[], void *data) } #endif - rarch_ctl(RARCH_CTL_PREINIT, NULL); + libretro_free_system_info(&runloop_system.info); + command_event(CMD_EVENT_HISTORY_DEINIT, NULL); + + configuration_settings = (settings_t*)calloc(1, sizeof(settings_t)); + + driver_ctl(RARCH_DRIVER_CTL_DEINIT, NULL); + rarch_ctl(RARCH_CTL_STATE_FREE, NULL); + global_free(); + frontend_driver_init_first(data); rarch_ctl(RARCH_CTL_INIT, NULL); @@ -4848,35 +5086,6 @@ static void clear_controller_port_map(void) #endif -/* MESSAGE QUEUE */ -static void retroarch_msg_queue_deinit(void) -{ - runloop_msg_queue_lock(); - - if (!runloop_msg_queue) - return; - - msg_queue_free(runloop_msg_queue); - - runloop_msg_queue_unlock(); -#ifdef HAVE_THREADS - slock_free(_runloop_msg_queue_lock); - _runloop_msg_queue_lock = NULL; -#endif - - runloop_msg_queue = NULL; -} - -static void retroarch_msg_queue_init(void) -{ - retroarch_msg_queue_deinit(); - runloop_msg_queue = msg_queue_new(8); - -#ifdef HAVE_THREADS - _runloop_msg_queue_lock = slock_new(); -#endif -} - /* WIFI DRIVER */ /** @@ -17312,62 +17521,6 @@ static void update_runtime_log(bool log_per_core) free(runtime_log); } - -static void retroarch_override_setting_free_state(void) -{ - unsigned i; - for (i = 0; i < RARCH_OVERRIDE_SETTING_LAST; i++) - { - if (i == RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE) - { - unsigned j; - for (j = 0; j < MAX_USERS; j++) - retroarch_override_setting_unset( - (enum rarch_override_setting)(i), &j); - } - else - retroarch_override_setting_unset( - (enum rarch_override_setting)(i), NULL); - } -} - -static void global_free(void) -{ - global_t *global = NULL; - - content_deinit(); - - path_deinit_subsystem(); - command_event(CMD_EVENT_RECORD_DEINIT, NULL); - command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); - - rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); - rarch_is_sram_load_disabled = false; - rarch_is_sram_save_disabled = false; - rarch_use_sram = false; - rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL); - rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL); - rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL); - rarch_ctl(RARCH_CTL_UNSET_PATCH_BLOCKED, NULL); - runloop_overrides_active = false; - runloop_remaps_core_active = false; - runloop_remaps_game_active = false; - runloop_remaps_content_dir_active = false; - - current_core.has_set_input_descriptors = false; - - global = &g_extern; - path_clear_all(); - dir_clear_all(); - if (global) - { - if (!string_is_empty(global->name.remapfile)) - free(global->name.remapfile); - memset(global, 0, sizeof(struct global)); - } - retroarch_override_setting_free_state(); -} - static void retroarch_print_features(void) { frontend_driver_attach_console(); @@ -17716,7 +17869,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) retroarch_override_setting_free_state(); - rarch_ctl(RARCH_CTL_USERNAME_UNSET, NULL); + has_set_username = false; rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL); rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL); rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL); @@ -18082,7 +18235,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[]) { settings_t *settings = configuration_settings; - rarch_ctl(RARCH_CTL_USERNAME_SET, NULL); + has_set_username = true; strlcpy(settings->paths.username, optarg, sizeof(settings->paths.username)); @@ -18644,7 +18797,6 @@ static void rarch_init_core_options( bool rarch_ctl(enum rarch_ctl_state state, void *data) { - static bool has_set_username = false; static bool rarch_patch_blocked = false; static bool runloop_missing_bios = false; /* TODO/FIXME - not used right now? */ @@ -18678,42 +18830,10 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) break; case RARCH_CTL_IS_DUMMY_CORE: return (current_core_type == CORE_TYPE_DUMMY); - case RARCH_CTL_USERNAME_SET: - has_set_username = true; - break; - case RARCH_CTL_USERNAME_UNSET: - has_set_username = false; - break; case RARCH_CTL_HAS_SET_USERNAME: return has_set_username; case RARCH_CTL_IS_INITED: return rarch_is_inited; - case RARCH_CTL_DESTROY: - has_set_username = false; - rarch_is_inited = false; - rarch_error_on_init = false; - rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); - - retroarch_msg_queue_deinit(); - driver_uninit(DRIVERS_CMD_ALL); - command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); - - rarch_ctl(RARCH_CTL_STATE_FREE, NULL); - global_free(); - rarch_ctl(RARCH_CTL_DATA_DEINIT, NULL); - free(configuration_settings); - configuration_settings = NULL; - break; - case RARCH_CTL_PREINIT: - libretro_free_system_info(&runloop_system.info); - command_event(CMD_EVENT_HISTORY_DEINIT, NULL); - - configuration_settings = (settings_t*)calloc(1, sizeof(settings_t)); - - driver_ctl(RARCH_DRIVER_CTL_DEINIT, NULL); - rarch_ctl(RARCH_CTL_STATE_FREE, NULL); - global_free(); - break; case RARCH_CTL_MAIN_DEINIT: if (!rarch_is_inited) return false; @@ -19490,130 +19610,6 @@ bool retroarch_override_setting_is_set(enum rarch_override_setting enum_idx, voi return false; } -void retroarch_override_setting_set(enum rarch_override_setting enum_idx, void *data) -{ - switch (enum_idx) - { - case RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE: - { - unsigned *val = (unsigned*)data; - if (val) - { - unsigned bit = *val; - BIT256_SET(has_set_libretro_device, bit); - } - } - break; - case RARCH_OVERRIDE_SETTING_VERBOSITY: - has_set_verbosity = true; - break; - case RARCH_OVERRIDE_SETTING_LIBRETRO: - has_set_libretro = true; - break; - case RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY: - has_set_libretro_directory = true; - break; - case RARCH_OVERRIDE_SETTING_SAVE_PATH: - has_set_save_path = true; - break; - case RARCH_OVERRIDE_SETTING_STATE_PATH: - has_set_state_path = true; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_MODE: - has_set_netplay_mode = true; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS: - has_set_netplay_ip_address = true; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT: - has_set_netplay_ip_port = true; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE: - has_set_netplay_stateless_mode = true; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES: - has_set_netplay_check_frames = true; - break; - case RARCH_OVERRIDE_SETTING_UPS_PREF: - has_set_ups_pref = true; - break; - case RARCH_OVERRIDE_SETTING_BPS_PREF: - has_set_bps_pref = true; - break; - case RARCH_OVERRIDE_SETTING_IPS_PREF: - has_set_ips_pref = true; - break; - case RARCH_OVERRIDE_SETTING_LOG_TO_FILE: - has_set_log_to_file = true; - break; - case RARCH_OVERRIDE_SETTING_NONE: - default: - break; - } -} - -void retroarch_override_setting_unset(enum rarch_override_setting enum_idx, void *data) -{ - switch (enum_idx) - { - case RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE: - { - unsigned *val = (unsigned*)data; - if (val) - { - unsigned bit = *val; - BIT256_CLEAR(has_set_libretro_device, bit); - } - } - break; - case RARCH_OVERRIDE_SETTING_VERBOSITY: - has_set_verbosity = false; - break; - case RARCH_OVERRIDE_SETTING_LIBRETRO: - has_set_libretro = false; - break; - case RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY: - has_set_libretro_directory = false; - break; - case RARCH_OVERRIDE_SETTING_SAVE_PATH: - has_set_save_path = false; - break; - case RARCH_OVERRIDE_SETTING_STATE_PATH: - has_set_state_path = false; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_MODE: - has_set_netplay_mode = false; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS: - has_set_netplay_ip_address = false; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT: - has_set_netplay_ip_port = false; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE: - has_set_netplay_stateless_mode = false; - break; - case RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES: - has_set_netplay_check_frames = false; - break; - case RARCH_OVERRIDE_SETTING_UPS_PREF: - has_set_ups_pref = false; - break; - case RARCH_OVERRIDE_SETTING_BPS_PREF: - has_set_bps_pref = false; - break; - case RARCH_OVERRIDE_SETTING_IPS_PREF: - has_set_ips_pref = false; - break; - case RARCH_OVERRIDE_SETTING_LOG_TO_FILE: - has_set_log_to_file = false; - break; - case RARCH_OVERRIDE_SETTING_NONE: - default: - break; - } -} - int retroarch_get_capabilities(enum rarch_capabilities type, char *s, size_t len) { diff --git a/retroarch.h b/retroarch.h index 2340b50b68..1eee04221c 100644 --- a/retroarch.h +++ b/retroarch.h @@ -77,10 +77,6 @@ enum rarch_ctl_state RARCH_CTL_IS_DUMMY_CORE, - RARCH_CTL_PREINIT, - - RARCH_CTL_DESTROY, - RARCH_CTL_IS_BPS_PREF, RARCH_CTL_UNSET_BPS_PREF, @@ -109,8 +105,6 @@ enum rarch_ctl_state /* Username */ RARCH_CTL_HAS_SET_USERNAME, - RARCH_CTL_USERNAME_SET, - RARCH_CTL_USERNAME_UNSET, RARCH_CTL_SET_FRAME_LIMIT, From 16dde76a68fd0c6b9070a90d6b4d152dd10cff48 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 12:34:49 +0200 Subject: [PATCH 039/275] Cleanups --- retroarch.c | 10 ++-------- retroarch.h | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/retroarch.c b/retroarch.c index 4c4d09da63..533fa105ef 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3409,7 +3409,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL); rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL); - rarch_ctl(RARCH_CTL_SET_CORE_SHUTDOWN, NULL); + runloop_core_shutdown_initiated = true; break; case RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL: @@ -19182,15 +19182,9 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) task_queue_init(threaded_enable, runloop_task_msg_queue_push); } break; - case RARCH_CTL_SET_CORE_SHUTDOWN: - runloop_core_shutdown_initiated = true; - break; case RARCH_CTL_SET_SHUTDOWN: runloop_shutdown_initiated = true; break; - case RARCH_CTL_UNSET_SHUTDOWN: - runloop_shutdown_initiated = false; - break; case RARCH_CTL_IS_SHUTDOWN: return runloop_shutdown_initiated; case RARCH_CTL_DATA_DEINIT: @@ -20146,7 +20140,7 @@ static enum runloop_state runloop_check_state( { /* Loads dummy core instead of exiting RetroArch completely. * Aborts core shutdown if invoked. */ - rarch_ctl(RARCH_CTL_UNSET_SHUTDOWN, NULL); + runloop_shutdown_initiated = false; runloop_core_shutdown_initiated = false; } else diff --git a/retroarch.h b/retroarch.h index 1eee04221c..e0f597835e 100644 --- a/retroarch.h +++ b/retroarch.h @@ -144,10 +144,7 @@ enum rarch_ctl_state RARCH_CTL_IS_PAUSED, RARCH_CTL_SET_PAUSED, - RARCH_CTL_SET_CORE_SHUTDOWN, - RARCH_CTL_SET_SHUTDOWN, - RARCH_CTL_UNSET_SHUTDOWN, RARCH_CTL_IS_SHUTDOWN, /* Runloop state */ From d905986a52aff0a7131a9a2044941d0df340f059 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 12:43:43 +0200 Subject: [PATCH 040/275] Rename functions - change rarch_ prefix to retroarch_ --- command.c | 6 +++--- discord/discord.c | 4 ++-- gfx/drivers/gl.c | 4 ++-- gfx/drivers/gl_core.c | 4 ++-- menu/cbs/menu_cbs_ok.c | 2 +- network/netplay/netplay_handshake.c | 4 ++-- retroarch.c | 16 ++++++++-------- retroarch.h | 6 +++--- tasks/task_content.c | 14 +++++++------- ui/drivers/ui_cocoatouch.m | 4 ++-- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/command.c b/command.c index e750dd2574..dc0ce5a561 100644 --- a/command.c +++ b/command.c @@ -1923,9 +1923,9 @@ bool command_event(enum event_command cmd, void *data) case CMD_EVENT_MENU_TOGGLE: #ifdef HAVE_MENU if (menu_driver_is_alive()) - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); else - rarch_menu_running(); + retroarch_menu_running(); #endif break; case CMD_EVENT_CONTROLLERS_INIT: @@ -2421,7 +2421,7 @@ TODO: Add a setting for these tweaks */ #endif break; case CMD_EVENT_RESUME: - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); if (ui_companion_is_on_foreground()) ui_companion_driver_toggle(false); break; diff --git a/discord/discord.c b/discord/discord.c index b24fe6e09a..6c0a6354c0 100644 --- a/discord/discord.c +++ b/discord/discord.c @@ -261,7 +261,7 @@ static void handle_discord_join_response(void *ignore, const char *line) #ifdef HAVE_MENU menu_input_dialog_end(); - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); #endif */ } @@ -286,7 +286,7 @@ static void handle_discord_join_request(const DiscordUser* request) #ifdef HAVE_MENU discord_download_avatar(request->userId, request->avatar); /* To-Do: needs in-game widgets - rarch_menu_running(); + retroarch_menu_running(); */ memset(&line, 0, sizeof(line)); diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index e8bc51e87c..2fc9a6575c 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -3743,9 +3743,9 @@ static void *gl2_init(const video_info_t *video, if (string_is_equal(vendor, "Microsoft Corporation")) if (string_is_equal(renderer, "GDI Generic")) #ifdef HAVE_OPENGL1 - rarch_force_video_driver_fallback("gl1"); + retroarch_force_video_driver_fallback("gl1"); #else - rarch_force_video_driver_fallback("gdi"); + retroarch_force_video_driver_fallback("gdi"); #endif #endif diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index 181f0ae1cc..577ad894ff 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -1048,9 +1048,9 @@ static void *gl_core_init(const video_info_t *video, if (string_is_equal(vendor, "Microsoft Corporation")) if (string_is_equal(renderer, "GDI Generic")) #ifdef HAVE_OPENGL1 - rarch_force_video_driver_fallback("gl1"); + retroarch_force_video_driver_fallback("gl1"); #else - rarch_force_video_driver_fallback("gdi"); + retroarch_force_video_driver_fallback("gdi"); #endif #endif diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index b95bc75d64..71815395b6 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -5589,7 +5589,7 @@ static void action_ok_netplay_enable_client_hostname_cb( } menu_input_dialog_end(); - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); } #endif diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index f550884b7c..1895956271 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -295,7 +295,7 @@ static void handshake_password(void *ignore, const char *line) #ifdef HAVE_MENU menu_input_dialog_end(); - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); #endif } #endif @@ -420,7 +420,7 @@ bool netplay_handshake_init(netplay_t *netplay, { #ifdef HAVE_MENU menu_input_ctx_line_t line; - rarch_menu_running(); + retroarch_menu_running(); #endif handshake_password_netplay = netplay; diff --git a/retroarch.c b/retroarch.c index 533fa105ef..c3017e2764 100644 --- a/retroarch.c +++ b/retroarch.c @@ -18657,7 +18657,7 @@ bool retroarch_is_on_main_thread(void) return true; } -void rarch_menu_running(void) +void retroarch_menu_running(void) { #if defined(HAVE_MENU) || defined(HAVE_OVERLAY) settings_t *settings = configuration_settings; @@ -18680,7 +18680,7 @@ void rarch_menu_running(void) #endif } -void rarch_menu_running_finished(bool quit) +void retroarch_menu_running_finished(bool quit) { #if defined(HAVE_MENU) || defined(HAVE_OVERLAY) settings_t *settings = configuration_settings; @@ -19743,7 +19743,7 @@ bool retroarch_main_quit(void) } rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL); - rarch_menu_running_finished(true); + retroarch_menu_running_finished(true); return true; } @@ -20235,7 +20235,7 @@ static enum runloop_state runloop_check_state( } if (!menu_driver_iterate(&iter)) - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); if (focused || !runloop_idle) { @@ -20319,7 +20319,7 @@ static enum runloop_state runloop_check_state( { if (rarch_is_initialized && !core_type_is_dummy) { - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); menu_event_kb_set(false, RETROK_F1); } } @@ -20331,12 +20331,12 @@ static enum runloop_state runloop_check_state( if (menu_driver_is_alive()) { if (rarch_is_initialized && !core_type_is_dummy) - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); } else { menu_display_toggle_set_reason(MENU_TOGGLE_REASON_USER); - rarch_menu_running(); + retroarch_menu_running(); } } else @@ -21023,7 +21023,7 @@ char *get_retroarch_launch_arguments(void) return launch_arguments; } -void rarch_force_video_driver_fallback(const char *driver) +void retroarch_force_video_driver_fallback(const char *driver) { settings_t *settings = configuration_settings; ui_msg_window_t *msg_window = NULL; diff --git a/retroarch.h b/retroarch.h index e0f597835e..816c6260d2 100644 --- a/retroarch.h +++ b/retroarch.h @@ -391,9 +391,9 @@ void runloop_set(enum runloop_action action); void runloop_unset(enum runloop_action action); -void rarch_menu_running(void); +void retroarch_menu_running(void); -void rarch_menu_running_finished(bool quit); +void retroarch_menu_running_finished(bool quit); bool retroarch_is_on_main_thread(void); @@ -403,7 +403,7 @@ rarch_system_info_t *runloop_get_system_info(void); struct retro_system_info *runloop_get_libretro_system_info(void); -void rarch_force_video_driver_fallback(const char *driver); +void retroarch_force_video_driver_fallback(const char *driver); void rarch_core_runtime_tick(void); diff --git a/tasks/task_content.c b/tasks/task_content.c index 9067741005..013279a482 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -1684,7 +1684,7 @@ bool task_push_load_content_from_playlist_from_menu( free(error_string); } - rarch_menu_running(); + retroarch_menu_running(); ret = false; goto end; @@ -1700,7 +1700,7 @@ bool task_push_load_content_from_playlist_from_menu( #endif #else rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL); - rarch_menu_running_finished(true); + retroarch_menu_running_finished(true); #endif end: @@ -1785,7 +1785,7 @@ bool task_push_start_current_core(content_ctx_info_t *content_info) free(error_string); } - rarch_menu_running(); + retroarch_menu_running(); ret = false; goto end; @@ -1911,7 +1911,7 @@ bool task_push_load_content_with_new_core_from_menu( free(error_string); } - rarch_menu_running(); + retroarch_menu_running(); ret = false; goto end; @@ -2128,7 +2128,7 @@ bool task_push_start_builtin_core( /* Load content */ if (!task_load_content_callback(content_info, true, false)) { - rarch_menu_running(); + retroarch_menu_running(); return false; } @@ -2174,7 +2174,7 @@ bool task_push_load_content_with_core_from_menu( /* Load content */ if (!task_load_content_callback(content_info, true, false)) { - rarch_menu_running(); + retroarch_menu_running(); return false; } @@ -2199,7 +2199,7 @@ bool task_push_load_subsystem_with_core_from_menu( /* Load content */ if (!task_load_content_callback(content_info, true, false)) { - rarch_menu_running(); + retroarch_menu_running(); return false; } diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index fd2d3a2409..0d7da67532 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -56,7 +56,7 @@ static void rarch_enable_ui(void) rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean); rarch_ctl(RARCH_CTL_SET_IDLE, &boolean); - rarch_menu_running(); + retroarch_menu_running(); } static void rarch_disable_ui(void) @@ -67,7 +67,7 @@ static void rarch_disable_ui(void) rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean); rarch_ctl(RARCH_CTL_SET_IDLE, &boolean); - rarch_menu_running_finished(false); + retroarch_menu_running_finished(false); } static void ui_companion_cocoatouch_event_command( From 7fe0662918c50f8fa8c5549e5ca5edcbd5238edf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 12:51:52 +0200 Subject: [PATCH 041/275] Cleanups --- command.c | 4 ---- command.h | 4 ---- retroarch.c | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/command.c b/command.c index dc0ce5a561..9819d49c13 100644 --- a/command.c +++ b/command.c @@ -2359,16 +2359,12 @@ TODO: Add a setting for these tweaks */ case CMD_EVENT_VIDEO_APPLY_STATE_CHANGES: video_driver_apply_state_changes(); break; - case CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE: - boolean = true; /* fall-through */ case CMD_EVENT_VIDEO_SET_BLOCKING_STATE: video_driver_set_nonblock_state(boolean); break; case CMD_EVENT_VIDEO_SET_ASPECT_RATIO: video_driver_set_aspect_ratio(); break; - case CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE: - boolean = true; /* fall-through */ case CMD_EVENT_AUDIO_SET_BLOCKING_STATE: audio_driver_set_nonblocking_state(boolean); break; diff --git a/command.h b/command.h index d53f6ba747..3dde658e93 100644 --- a/command.h +++ b/command.h @@ -123,14 +123,10 @@ enum event_command CMD_EVENT_CORE_INIT, /* Set audio blocking state. */ CMD_EVENT_AUDIO_SET_BLOCKING_STATE, - /* Set audio nonblocking state. */ - CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, /* Apply video state changes. */ CMD_EVENT_VIDEO_APPLY_STATE_CHANGES, /* Set video blocking state. */ CMD_EVENT_VIDEO_SET_BLOCKING_STATE, - /* Set video nonblocking state. */ - CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, /* Sets current aspect ratio index. */ CMD_EVENT_VIDEO_SET_ASPECT_RATIO, CMD_EVENT_RESET_CONTEXT, diff --git a/retroarch.c b/retroarch.c index c3017e2764..10c4521a27 100644 --- a/retroarch.c +++ b/retroarch.c @@ -11964,7 +11964,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited) if (!settings->bools.audio_sync && audio_driver_active) { - command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL); + audio_driver_set_nonblocking_state(true); audio_driver_chunk_size = audio_driver_chunk_nonblock_size; } @@ -16474,7 +16474,7 @@ static void driver_adjust_system_rates(void) return; if (runloop_force_nonblock) - command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL); + video_driver_set_nonblock_state(true); else driver_set_nonblock_state(); } From bcb9762ec8698fcf695840328cbb06061e685f57 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 13:52:18 +0200 Subject: [PATCH 042/275] (qb) Add HAVE_SLANG, HAVE_SPIRV_CROSS, HAVE_GLSLANG --- Makefile.common | 13 ------------- qb/config.libs.sh | 37 +++++++++++++++++++++++++++++++++++++ qb/config.params.sh | 5 +++++ 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/Makefile.common b/Makefile.common index a6347c4324..12670995fa 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1263,10 +1263,6 @@ ifeq ($(HAVE_VULKAN), 1) NEED_CXX_LINKER = 1 DEFINES += -DHAVE_VULKAN INCLUDE_DIRS += -Igfx/include - - HAVE_SLANG = 1 - HAVE_GLSLANG = 1 - HAVE_SPIRV_CROSS = 1 endif ifeq ($(HAVE_OPENGL_CORE), 1) @@ -1278,9 +1274,6 @@ ifeq ($(HAVE_OPENGL_CORE), 1) endif DEFINES += -DHAVE_OPENGL_CORE - HAVE_SLANG = 1 - HAVE_GLSLANG = 1 - HAVE_SPIRV_CROSS = 1 NEED_CXX_LINKER = 1 endif @@ -1369,9 +1362,6 @@ ifeq ($(HAVE_D3D11), 1) OBJ += menu/drivers_display/menu_display_d3d11.o endif DEFINES += -DHAVE_D3D11 - HAVE_SLANG = 1 - HAVE_GLSLANG = 1 - HAVE_SPIRV_CROSS = 1 endif ifeq ($(HAVE_D3D12), 1) @@ -1382,9 +1372,6 @@ ifeq ($(HAVE_D3D12), 1) OBJ += menu/drivers_display/menu_display_d3d12.o endif DEFINES += -DHAVE_D3D12 - HAVE_SLANG = 1 - HAVE_GLSLANG = 1 - HAVE_SPIRV_CROSS = 1 endif ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index ee725d03cb..5ba07148cc 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -518,6 +518,43 @@ if [ "$HAVE_MENU" != 'no' ]; then fi fi +if [ "$HAVE_SLANG" = 'no' ] || + [ "$HAVE_GLSLANG" = 'no' ] || + [ "$HAVE_SPIRV_CROSS" = 'no' ]; then + die : 'Notice: slang/glslang/SPIRV Cross disabled, disabling video drivers:' + +if [ "$HAVE_SLANG" != "no" ]; then + HAVE_SLANG=no +fi +if [ "$HAVE_GLSLANG" != "no" ]; then + HAVE_GLSLANG=no +fi +if [ "$HAVE_SPIRV_CROSS" != "no" ]; then + HAVE_SPIRV_CROSS=no +fi + +if [ "$HAVE_D3D10" != "no" ]; then + die : 'd3d10' + HAVE_D3D10=no +fi +if [ "$HAVE_D3D11" != "no" ]; then + die : 'd3d11' + HAVE_D3D11=no +fi +if [ "$HAVE_D3D12" != "no" ]; then + die : 'd3d12' + HAVE_D3D12=no +fi +if [ "$HAVE_OPENGL_CORE" != "no" ]; then + die : 'glcore' + HAVE_OPENGL_CORE=no +fi +if [ "$HAVE_VULKAN" != "no" ]; then + die : 'vulkan' + HAVE_VULKAN=no +fi +fi + check_macro NEON __ARM_NEON__ add_define MAKEFILE OS "$OS" diff --git a/qb/config.params.sh b/qb/config.params.sh index 312f2fe9c2..925866ac06 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -150,3 +150,8 @@ HAVE_VIDEOCORE=auto # Broadcom Videocore 4 support HAVE_DRMINGW=no # DrMingw exception handler HAVE_EASTEREGG=yes # Easter egg HAVE_CDROM=auto # CD-ROM support +HAVE_SLANG=yes # slang support +HAVE_GLSLANG=auto # glslang support (requires C++11) +C89_GLSLANG=no +HAVE_SPIRV_CROSS=auto # SPIRV-Cross support (requires C++11) +C89_SPIRV_CROSS=no From 13fa504919c8d24d3d7b1115807bca88e0682ecb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 14:06:19 +0200 Subject: [PATCH 043/275] Set these to enable by default --- qb/config.params.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index 925866ac06..5ccdbdd5d8 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -151,7 +151,7 @@ HAVE_DRMINGW=no # DrMingw exception handler HAVE_EASTEREGG=yes # Easter egg HAVE_CDROM=auto # CD-ROM support HAVE_SLANG=yes # slang support -HAVE_GLSLANG=auto # glslang support (requires C++11) +HAVE_GLSLANG=yes # glslang support (requires C++11) C89_GLSLANG=no -HAVE_SPIRV_CROSS=auto # SPIRV-Cross support (requires C++11) +HAVE_SPIRV_CROSS=yes # SPIRV-Cross support (requires C++11) C89_SPIRV_CROSS=no From a4573f1dd546d2ba0e3ba9286feda1ff0ad5fc33 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 15:05:06 +0200 Subject: [PATCH 044/275] (Qb) Update config.libs.sh - there are more hardware renderers now --- qb/config.libs.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 5ba07148cc..d0c92700af 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -499,7 +499,15 @@ else fi if [ "$HAVE_MENU" != 'no' ]; then - if [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then + if [ "$HAVE_OPENGL" = 'no' ] && + [ "$HAVE_OPENGL1" = 'no' ] && + [ "$HAVE_OPENGLES" = 'no' ] && + [ "$HAVE_OPENGL_CORE" = 'no' ] && + [ "$HAVE_VULKAN" = 'no' ] && + [ "$HAVE_D3D10" = 'no' ] && + [ "$HAVE_D3D11" = 'no' ] && + [ "$HAVE_D3D12" = 'no' ] && + [ "$HAVE_METAL" = 'no' ]; then if [ "$OS" = 'Win32' ]; then HAVE_SHADERPIPELINE=no HAVE_VULKAN=no From 7b7ac06653b1b1b5848d3b13f70563240f158bb8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 15:07:09 +0200 Subject: [PATCH 045/275] (playlist.c) Cleanups --- playlist.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/playlist.c b/playlist.c index 27357e47dc..44ef1ee6c6 100644 --- a/playlist.c +++ b/playlist.c @@ -637,7 +637,8 @@ success: * paths, as the base directory (home or application dir) may change after each subsequent * install (iOS) **/ -void playlist_resolve_path(enum playlist_file_mode mode, char *path, size_t size) +void playlist_resolve_path(enum playlist_file_mode mode, + char *path, size_t size) { char tmp[PATH_MAX_LENGTH]; tmp[0] = '\0'; @@ -646,29 +647,25 @@ void playlist_resolve_path(enum playlist_file_mode mode, char *path, size_t size strlcpy(tmp, path, sizeof(tmp)); if ( mode == PLAYLIST_LOAD ) { - strlcpy(resolved_path, tmp, sizeof(resolved_path)); - fill_pathname_expand_special(tmp, resolved_path, sizeof(tmp)); + strlcpy(resolved_path, tmp, sizeof(resolved_path)); + fill_pathname_expand_special(tmp, resolved_path, sizeof(tmp)); } else { - // iOS needs to call realpath here since the call above fails due to possibly - // buffer related issues - realpath(tmp, resolved_path); - fill_pathname_abbreviate_special(tmp, resolved_path, sizeof(tmp)); + /* iOS needs to call realpath here since the call + * above fails due to possibly buffer related issues. */ + realpath(tmp, resolved_path); + fill_pathname_abbreviate_special(tmp, resolved_path, sizeof(tmp)); } strlcpy(path, tmp, size); return; #else if ( mode == PLAYLIST_LOAD) - { - return; - } - else - { - strlcpy(tmp, path, sizeof(tmp)); - path_resolve_realpath(tmp, sizeof(tmp)); - strlcpy(path, tmp, size); - } + return; + + strlcpy(tmp, path, sizeof(tmp)); + path_resolve_realpath(tmp, sizeof(tmp)); + strlcpy(path, tmp, size); #endif } From 39120e8ffc587bb9f1f1fc2b6aca1ccfaf6f9ad4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 15:17:04 +0200 Subject: [PATCH 046/275] Fix C89_BUILD --- qb/config.params.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/qb/config.params.sh b/qb/config.params.sh index 5ccdbdd5d8..c89cd17b0d 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -151,6 +151,7 @@ HAVE_DRMINGW=no # DrMingw exception handler HAVE_EASTEREGG=yes # Easter egg HAVE_CDROM=auto # CD-ROM support HAVE_SLANG=yes # slang support +C89_SLANG=no HAVE_GLSLANG=yes # glslang support (requires C++11) C89_GLSLANG=no HAVE_SPIRV_CROSS=yes # SPIRV-Cross support (requires C++11) From 9868b4acdb07c1869b42e451832343e4895f6e93 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 15:43:12 +0200 Subject: [PATCH 047/275] Style nits --- retroarch.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/retroarch.c b/retroarch.c index 10c4521a27..f18ab213d8 100644 --- a/retroarch.c +++ b/retroarch.c @@ -4943,9 +4943,9 @@ static bool secondary_core_create(void) bool contentless = false; bool is_inited = false; - if ( last_core_type != CORE_TYPE_PLAIN || - !load_content_info || - load_content_info->special) + if ( last_core_type != CORE_TYPE_PLAIN || + !load_content_info || + load_content_info->special) return false; if (secondary_library_path) @@ -7226,7 +7226,7 @@ void retroarch_overlay_init(void) #if defined(GEKKO) /* Avoid a crash at startup or even when toggling overlay in rgui */ uint64_t memory_used = frontend_driver_get_used_memory(); - if(memory_used > (72 * 1024 * 1024)) + if (memory_used > (72 * 1024 * 1024)) return; #endif @@ -7372,7 +7372,7 @@ void fire_connection_listener(unsigned port, input_device_driver_t *driver) || ((normal_bind)->mbutton != NO_BTN) \ || ((normal_bind)->joykey != NO_BTN) \ || ((normal_bind)->joyaxis != AXIS_NONE) \ - || ((autoconf_bind)->key != RETROK_UNKNOWN ) \ + || ((autoconf_bind)->key != RETROK_UNKNOWN) \ || ((autoconf_bind)->joykey != NO_BTN) \ || ((autoconf_bind)->joyaxis != AXIS_NONE)) \ ) @@ -10554,7 +10554,7 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, /*empty?*/ if (*key != '\0') { - if (delim ) + if (delim) strlcat(buf, ", ", size); snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key); strlcat(buf, keybuf, size); @@ -10600,7 +10600,7 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, { if (delim) strlcat(buf, ", ", size); - strlcat(buf, msg_hash_to_str((enum msg_hash_enums)tag), size ); + strlcat(buf, msg_hash_to_str((enum msg_hash_enums)tag), size); } } @@ -11947,9 +11947,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited) } if (new_rate != 0) - { configuration_set_int(settings, settings->uints.audio_out_rate, new_rate); - } if (!audio_driver_context_audio_data) { @@ -12784,8 +12782,7 @@ void audio_driver_load_menu_sounds(void) sounds_fallback_path, settings->paths.directory_assets, "sounds", - PATH_MAX_LENGTH * sizeof(char) - ); + PATH_MAX_LENGTH * sizeof(char)); fill_pathname_application_special( sounds_path, @@ -13588,9 +13585,8 @@ static void video_driver_free_internal(void) } if (video_driver_data - && current_video && current_video->free - ) - current_video->free(video_driver_data); + && current_video && current_video->free) + current_video->free(video_driver_data); if (video_driver_scaler_ptr) video_driver_pixel_converter_free(); @@ -15006,8 +15002,7 @@ void video_driver_frame(const void *data, unsigned width, || !data || video_driver_record_gpu_buffer ) && recording_data - && recording_driver && recording_driver->push_video - ) + && recording_driver && recording_driver->push_video) recording_dump_frame(data, width, height, pitch, video_info.runloop_is_idle); From efb98a8a01106bf556d3862ed470251f187311cb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 16:01:56 +0200 Subject: [PATCH 048/275] Cleanup file_archive_get_file_backend --- libretro-common/file/archive_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretro-common/file/archive_file.c b/libretro-common/file/archive_file.c index fad89cdd43..2450508a99 100644 --- a/libretro-common/file/archive_file.c +++ b/libretro-common/file/archive_file.c @@ -780,6 +780,7 @@ const struct file_archive_file_backend *file_archive_get_7z_file_backend(void) const struct file_archive_file_backend* file_archive_get_file_backend(const char *path) { +#if defined(HAVE_7ZIP) || defined(HAVE_ZLIB) char newpath[PATH_MAX_LENGTH]; const char *file_ext = NULL; char *last = NULL; @@ -805,6 +806,7 @@ const struct file_archive_file_backend* file_archive_get_file_backend(const char || string_is_equal_noncase(file_ext, "apk") ) return &zlib_backend; +#endif #endif return NULL; From a0060182e3de3353db920029cc020726271c10e7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jul 2019 16:09:39 +0200 Subject: [PATCH 049/275] Add more ifdefs covering HAVE_THREADS and HAVE_AUDIOMIXER --- gfx/drivers/d3d9.c | 4 ++++ retroarch.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 22bccae001..0c4980ddba 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -1943,6 +1943,7 @@ static void d3d9_video_texture_load_d3d( *id = (uintptr_t)tex; } +#ifdef HAVE_THREADS static int d3d9_video_texture_load_wrap_d3d(void *data) { uintptr_t id = 0; @@ -1952,6 +1953,7 @@ static int d3d9_video_texture_load_wrap_d3d(void *data) d3d9_video_texture_load_d3d(info, &id); return id; } +#endif static uintptr_t d3d9_load_texture(void *video_data, void *data, bool threaded, enum texture_filter_type filter_type) @@ -1963,9 +1965,11 @@ static uintptr_t d3d9_load_texture(void *video_data, void *data, info.data = data; info.type = filter_type; +#ifdef HAVE_THREADS if (threaded) return video_thread_texture_load(&info, d3d9_video_texture_load_wrap_d3d); +#endif d3d9_video_texture_load_d3d(&info, &id); return id; diff --git a/retroarch.c b/retroarch.c index f18ab213d8..e3cea53474 100644 --- a/retroarch.c +++ b/retroarch.c @@ -73,7 +73,9 @@ #include #include