Compare commits

...
1382 Commits
Author SHA1 Message Date
MrHuu 62da78ca3d CTR / Update Makefile.cores (#8719)
* Update Makefile.cores

* (CTR) Add Stella
2019-05-08 01:56:49 +02:00
Nathan S 4fad77304f menu_widgets: better sanity check for threaded video wrapper (#8722) 2019-05-08 01:56:39 +02:00
twinaphex ba3f164bdd Disable scan_without_core_match by default 2019-05-07 00:58:17 +02:00
twinaphex 7530436918 Better way to check if there is a resolution list - should
hide this entry on Android
2019-05-07 00:32:07 +02:00
twinaphex 5e9bfd52db command_set_shader - set settings->bools.video_shader_enable to
true if not already enabled when command_set_shader succeeds
2019-05-06 23:40:19 +02:00
Nathan S 775c272029 Menu widgets stuff + vulkan sanity check (#8710)
* task_screenshot: fix hang with menu widgets

* word_wrap: add max_lines parameter

* vulkan: better instance creation sanity check
2019-05-06 21:10:57 +02:00
meleu e8c9a272ee having a badge file is enough to show it in popup (#8709) 2019-05-06 19:14:24 +02:00
Ömercan Kömür 9da9f4bad0 Every .h files && tr.c&.h files edited (#8648)
* Every .h files && tr.c&.h files edited

each .h file  is edited in their own language, Menu_ENUM_LABEL_VALUE_LANG_GREEK & Menu_ENUM_LABEL_VALUE_LANG_TURKISH added into missed .h files, according to the frequency of use Turkish translations changed. some unnecessary blank spaces deleted

* added )

added ) end of #988 & #986 lines

* Added New Turkish Translations

added some translations

* update msg_hash_tr.c

some lines deleted, new translations added

* Update msg_hash_tr.c

* Delete msg_hash_fr.h

Since they are revision french translations, there is no need to add Turkish & Greek colum for right now.

* Newest FR translate added

since they are added Greek & Turkish into their FR files no need to add
2019-05-06 17:25:52 +02:00
Twinaphex 9dd5a55310 Merge pull request #8707 from WeedyWeedSmoker/French-translation-(C89-buildfix)
(C89 buildfix) French translation fix
2019-05-06 17:24:35 +02:00
Twinaphex 739a8d70a7 Merge pull request #8708 from meleu/patch-6
CHANGES.md: Pop-up badges when a cheevo is triggered
2019-05-06 14:57:22 +02:00
twinaphex 5f8f029c6e (OSX PPC) Move MainMenu_PPC.xib to pkg/apple/OSX/en.lproj/PPC and
rename it MainMenu.xib - CompileXib would create a MainMenu_PPC.nib
and then on startup no MainMenu.nib file could be found
2019-05-06 14:49:15 +02:00
twinaphex 652d89cbf4 (OSX PPC) Use MainMenu_PPC.xib 2019-05-06 14:30:41 +02:00
neville 7c4329f31d (OSX PPC) Buildfixes 2019-05-06 14:12:25 +02:00
twinaphex 34c5d2ef07 Remove 'Core Remap File Loaded' message - happens too early - before
menu widgets have been initialized
2019-05-06 13:54:15 +02:00
twinaphex 68e91e3121 video_display_server_get_flags - conditional was wrong 2019-05-06 13:18:25 +02:00
meleu d22d627d94 CHEEVOS: Pop-up badges when a cheevo is triggered 2019-05-06 05:58:33 -03:00
Weedy Weed Smoker c3af160f08 (C89 buildfix) French translation fix
Shortened the problematic text strings to accomodate C89 compilation
2019-05-06 11:27:30 +07:00
Twinaphex 8092f601a6 Merge pull request #8705 from WeedyWeedSmoker/French-translation-part-2
French translation part 2
2019-05-06 05:09:11 +02:00
neville 82be4ea0e5 (OSX PPC) One buildfix 2019-05-06 04:46:23 +02:00
Weedy Weed Smoker 41e2346880 Merge branch 'master' into French-translation-part-2 2019-05-06 09:35:27 +07:00
twinaphex ccbb3f0960 (HTTP Task) Fix progress indicator on 32bit systems 2019-05-06 03:45:58 +02:00
twinaphex 5794c2051c path_mkdir - safety check 2019-05-06 03:09:44 +02:00
twinaphex 0919cd9746 (Legacy Win32) Be more careful with retro_vfs_stat_impl 2019-05-06 03:00:51 +02:00
Brad Parker 720ebc6834 update Japanese win32 resource file 2019-05-05 20:51:38 -04:00
twinaphex 7be2e75c08 Update CHANGELOG 2019-05-06 02:38:47 +02:00
Weedy Weed Smoker 9108ce514f French translation part 2 — done
Full translation of "msg_hash_fr.c" done... The french translation is now fully completed !
Thanks to everyone involved, and please look into allowing us to translate more of the QT desktop interface... ;)
2019-05-06 06:04:33 +07:00
twinaphex 4ac4b779a9 (Qt desktop) Add some missing menu entries 2019-05-06 00:11:57 +02:00
Weedy Weed Smoker 30f1148835 More "msg_hash_fr.c" translation goodness
More than 2/3 of it is translated... There are only 48 more things not yet translated, but it's coming...
2019-05-06 04:35:56 +07:00
twinaphex 705851b147 Add 'Scan without Core Match' 2019-05-05 21:54:49 +02:00
Weedy Weed Smoker e59bafccbe More translation of the "msg_hash_fr.c" file 2019-05-06 02:29:46 +07:00
twinaphex aaff9d6d55 (Lakka) SD_FLAG_LAKKA_ADVANCED should only be honored by Lakka 2019-05-05 21:21:43 +02:00
Weedy Weed Smoker b0c6b8bf0f Unify syntax for readability 2019-05-06 02:02:29 +07:00
Weedy Weed Smoker 1e55ac33d7 Merge pull request #2 from WeedyWeedSmoker/master
Merge new changes
2019-05-06 02:01:18 +07:00
Weedy Weed Smoker f1a060cc5a Merge pull request #1 from libretro/master
Merge new changes
2019-05-06 02:00:06 +07:00
Weedy Weed Smoker 5171c28196 French translation part 2 (continued...)
Second part of the "msg_hash_fr.c" translation, and one small cosmetic change to "msg_hash_fr.h"...
2019-05-06 01:54:33 +07:00
twinaphex 18fd85de24 Add easy way to enable/disable shaders 2019-05-05 20:52:09 +02:00
Weedy Weed Smoker f1c8f78c16 French translation part 2
Cosmetic changes to fit XMB menu, and preliminary translation of "msg_hash_fr.c" file
2019-05-05 23:13:07 +07:00
twinaphex 14bd37415b (MaterialUI) Add more menu category setting icons 2019-05-05 17:31:29 +02:00
twinaphex 0f9fd971e2 (Windows) Add Toggle Desktop Menu to UI menubar 2019-05-05 17:00:11 +02:00
twinaphex 0b426b2022 This should hide the CRT SwitchRes option on systems
where it's not supported
2019-05-05 16:33:25 +02:00
Twinaphex 5d018db08d Merge pull request #8704 from jdgleaver/rgui-rain-fix
(RGUI) Fix typo in 'rain' particle effect initialisation
2019-05-05 15:49:07 +02:00
jdgleaver 087eb939a5 (RGUI) Fix typo in 'rain' particle effect initialisation 2019-05-05 14:29:24 +01:00
twinaphex 360f8189e0 (D3D8/D3D9) Screenshots don't seem to work, disabling 2019-05-05 14:25:16 +02:00
twinaphex 50a57b03a1 (MSVC 2003) core_info - remove all_ext from heap - fixes crash with MSVC2003
and makes for easier code
2019-05-05 14:23:29 +02:00
twinaphex f349410082 (CTR/3DS) hide 'Take Screenshot' since screenshots are not implemented
anyway
2019-05-05 14:14:14 +02:00
Twinaphex c0f8f2cab6 Merge pull request #8703 from jdgleaver/playlist-detect-fix
(playlist) Don't resolve real path when core path is DETECT
2019-05-05 13:56:04 +02:00
twinaphex 3b110c0e3b (D3D8) Add 'Screenshots supported' 2019-05-05 13:55:12 +02:00
jdgleaver 79e8adb90e (playlist) Don't resolve real path when core path is DETECT 2019-05-05 12:49:07 +01:00
twinaphex c3d2b190f2 (dispmanx) Implement get_flags 2019-05-05 13:49:06 +02:00
twinaphex a0b2d97ca3 Hide 'Take Screenshot' for video drivers that don't support
taking screenshots yet
2019-05-05 13:46:26 +02:00
twinaphex 8094e02823 (MaterialUI) Add checkmark 2019-05-05 04:12:16 +02:00
twinaphex a038dc785d Bump up version to 1.7.7 2019-05-05 03:30:17 +02:00
Twinaphex e63b85cbba Merge pull request #8698 from orbea/cxx
qb: Enable menu widgets with CXX_BUILD again.
2019-05-05 02:30:51 +02:00
Twinaphex 53185e3715 Merge pull request #8699 from DEX357/patch-29
Update msg_hash_pl.h
2019-05-05 02:30:41 +02:00
DEX357 7b5f32eed6 Update msg_hash_pl.h 2019-05-05 02:00:57 +02:00
orbea 26b8334c6b qb: Enable menu widgets with CXX_BUILD again. 2019-05-04 16:53:21 -07:00
Twinaphex 108a54a7f2 Merge pull request #8694 from orbea/menu
A few --disable-menu fixes.
2019-05-05 01:19:30 +02:00
Twinaphex f5879dfad7 Merge pull request #8695 from orbea/c89
Fix C89_BUILD=1 with clang.
2019-05-05 01:19:14 +02:00
Twinaphex 786a5bd9a8 Merge pull request #8693 from meleu/patch-5
add "Use Old Implementation" in the Achievements menu
2019-05-05 01:19:01 +02:00
Twinaphex 1f0b1fb61c Merge pull request #8696 from natinusala/master
Menu widgets improvements
2019-05-05 01:18:33 +02:00
twinaphex 23abe5025b Fix for playlist items that have been scanned and don't have an
associated core - we don't want to resolve the path if core_path
is set to "DETECT"
2019-05-05 01:17:51 +02:00
natinusala a381c2180d menu_widgets: implement generic message widget, have shaders selection use it 2019-05-04 23:21:17 +02:00
natinusala 872e8ffb99 Fix multiple CXX warning 2019-05-04 22:24:59 +02:00
orbea 493083f5c7 qb: Disable HAVE_MENU_WIDGETS with CXX_BUILD for now. 2019-05-04 10:19:41 -07:00
orbea ab7cc305e5 Fix C89_BUILD=1 with clang. 2019-05-04 09:27:12 -07:00
orbea 9a41ccd694 travis: Test building with --disable-menu for linux. 2019-05-04 09:12:16 -07:00
orbea 5f8bf221c6 travis: Refactor configure argument handling. 2019-05-04 08:59:53 -07:00
meleu 22a956f663 replace 'cheevos_rcheevos_enable' by 'cheevos_old_enable' 2019-05-04 12:52:49 -03:00
orbea 9e9849170d Silence unused function with --disable-menu.
gfx/drivers/gl_core.c:1529:13: warning: ‘gl_core_draw_menu_texture’ defined but not used [-Wunused-function]
 static void gl_core_draw_menu_texture(gl_core_t *gl, video_frame_info_t *video_info)
             ^~~~~~~~~~~~~~~~~~~~~~~~~
2019-05-04 08:26:49 -07:00
orbea 6552828244 qb: Fix --disable-menu.
Menu widgets must also be disabled with --disable-menu, now
configure will do so or error if --disable-menu and
--enable-menu_widgets are explicitly used.
2019-05-04 08:23:44 -07:00
Twinaphex 95c585e864 Merge pull request #8692 from natinusala/master
menu_widgets: notifications duration is now framerate independent
2019-05-04 16:56:29 +02:00
natinusala 03e3e3f520 menu_widgets: notifications duration is now framerate independent 2019-05-04 16:36:40 +02:00
twinaphex 8a92ad7dbf Fix C89_BUILD 2019-05-04 15:58:32 +02:00
twinaphex 3c2307de80 Merge branch 'master' of https://github.com/libretro/RetroArch 2019-05-04 15:58:23 +02:00
Twinaphex 182c44df70 Merge pull request #8688 from jdgleaver/rgui-d3d-colours
(RGUI) Fix colours when using D3D10/11/12 gfx drivers
2019-05-04 15:58:09 +02:00
Twinaphex 2ed4fbf2f7 Merge pull request #8691 from meleu/patch-5
use new cheevos implementation as default
2019-05-04 15:55:22 +02:00
meleu b85cd1f1ab use new cheevos implementation as default 2019-05-04 10:27:36 -03:00
twinaphex 17b4cdb60a Merge branch 'rgui-d3d-colours' of git://github.com/jdgleaver/RetroArch 2019-05-04 14:56:41 +02:00
Twinaphex b30b7d01f1 Merge pull request #8690 from natinusala/master
menu_widgets: fix C4018 warnings
2019-05-04 14:55:54 +02:00
jdgleaver 0ce40be87e (RGUI) Try again - D3D10/11/12 actually seem to use bgra4444 2019-05-04 13:53:37 +01:00
natinusala 619ea2e627 menu_widgets: fix C4018 warnings 2019-05-04 14:48:41 +02:00
Twinaphex c176ad605d Merge pull request #8689 from jdgleaver/rgui-warn-fix
(RGUI) Fix trivial build warnings
2019-05-04 14:44:23 +02:00
Twinaphex aed4c6b34d Merge pull request #8687 from meleu/patch-5
lboard null pointer check must be done by caller
2019-05-04 14:39:33 +02:00
jdgleaver ee2f66bbd3 (RGUI) Fix trivial build warnings 2019-05-04 13:37:28 +01:00
twinaphex 990c2c405b (menu_widgets) C89_BUILD fix 2019-05-04 14:07:09 +02:00
jdgleaver d8d4fefb48 (RGUI) Fix colours when using D3D10/11/12 gfx drivers 2019-05-04 13:01:02 +01:00
meleu 27189029c4 lboard null pointer check must be done by caller
also, show lboard error description in OSD message
2019-05-04 08:01:20 -03:00
twinaphex ad7da9736a (BaseConfig.xcconfig) Add HAVE_MENU_WIDGETS 2019-05-04 01:16:35 +02:00
Twinaphex 53a872aa5b Merge pull request #8670 from WeedyWeedSmoker/French-translation-complete-overhaul
French translation complete overhaul
2019-05-03 22:38:37 +02:00
Weedy Weed Smoker c93272de15 (iOS) Buildfix
Changed "widgets/menu_entry.h" to "menu_entries.h", as no one did it before anyway...
2019-05-04 03:31:33 +07:00
Weedy Weed Smoker 5455f6bcf6 French translation completed
Incorporated the latest changes to my fork, and re-uploaded the complete translation... @twinaphex am I doing it wrong ??? :D
2019-05-04 03:27:04 +07:00
Weedy Weed Smoker 869b47ead3 Merge pull request #3 from libretro/master
Update fork
2019-05-04 03:23:59 +07:00
twinaphex 6a71aa06c8 (Apple) Add HAVE_MENU_WIDGETS 2019-05-03 21:52:59 +02:00
Twinaphex 64918cab99 Merge pull request #8682 from natinusala/master
menu_widgets: implement the user setting
2019-05-03 21:34:57 +02:00
natinusala 636f2ddb28 menu_widgets: implement the user setting 2019-05-03 21:25:20 +02:00
Weedy Weed Smoker 937ae55934 Merge branch 'master' into French-translation-complete-overhaul 2019-05-04 01:49:14 +07:00
Twinaphex 1d1cc87c4f Merge pull request #8677 from jdgleaver/rgui-performance
(RGUI) Further performance optimisations
2019-05-03 19:48:17 +02:00
Twinaphex 27712d648a Merge pull request #8681 from meleu/patch-5
minor fixes for cheevos-new
2019-05-03 19:33:47 +02:00
Twinaphex 792031c45e Merge pull request #8680 from jdgleaver/state-no-resume
For platforms without HAVE_THREADS, don't automatically resume content when saving/loading states
2019-05-03 18:03:56 +02:00
jdgleaver 6bb5dea1d4 Add TODO/FIXME comment 2019-05-03 17:03:00 +01:00
twinaphex f2fbaf2cb4 (Android) Add HAVE_MENU_WIDGETS 2019-05-03 17:52:30 +02:00
jdgleaver 4502b58ab3 For platforms without HAVE_THREADS, don't automatically resume content when saving/loading states 2019-05-03 16:32:48 +01:00
meleu eb81597871 ignore buggy leaderboards 2019-05-03 12:20:56 -03:00
twinaphex b9cdeebf35 Make menu widgets the new default 2019-05-03 15:55:44 +02:00
Twinaphex 048f025ca5 Merge pull request #8678 from jdgleaver/thumb-fallback
(menu_thumbnail_path) Use content directory name as fallback for 'db_name' in history and favorites playlists
2019-05-03 15:46:08 +02:00
jdgleaver d8eb6819b0 (menu_thumbnail_path) Use content directory name as fallback for 'db_name' in history and favorites playlists 2019-05-03 14:03:18 +01:00
twinaphex b7e7f6a651 (Menu widgets) Add menu widgets setting 2019-05-03 13:58:33 +02:00
jdgleaver 2424049fdf (RGUI) Further performance optimisations 2019-05-03 11:26:02 +01:00
meleu 7b47787887 handle hardcore mode toggle for cheevos-new 2019-05-03 01:59:05 -03:00
twinaphex 8b0f083a4e (UWP) UWP cannot deal with relative paths, turn them into absolute
paths first before reading shader pass files
2019-05-02 18:24:54 +02:00
Weedy Weed Smoker 6bc29174b7 French translation complete overhaul-done
Clarified the meaning of the latest additions from the US english language file...
2019-05-02 22:45:59 +07:00
Weedy Weed Smoker c4d328af8e French translation complete overhaul-latest
Added the latest additions from the US english file to the french translation
2019-05-02 22:36:39 +07:00
Twinaphex a162613a16 Merge pull request #8674 from jdgleaver/history-duplicates
Prevent duplicate content history entries (+ general sanitisation of playlist searching)
2019-05-02 17:30:22 +02:00
twinaphex c205e59f57 (menu entries) Cleanups 2019-05-02 16:21:12 +02:00
twinaphex 18568718ca (Vita) Add HAVE_UPDATE_ASSETS 2019-05-02 15:17:48 +02:00
jdgleaver 05e0a6c8d2 Prevent duplicate content history entries (+ general sanitisation of playlist searching) 2019-05-02 09:58:37 +01:00
Weedy Weed Smoker e8722195e9 French translation complete overhaul
The translation is now complete ! Thanks to everyone involved to make this happen... ;-)
2019-05-02 15:05:25 +07:00
Weedy Weed Smoker 6963fefc53 French translation overhaul
More cosmetic changes after testing
2019-05-02 13:23:58 +07:00
Twinaphex 7cc7a6df75 Merge pull request #8671 from alfrix/new_batt_icons
Ozone extra battery icons
2019-05-01 21:19:42 +02:00
Weedy Weed Smoker b5a7422b54 Last minute changes
Last minute changes after testing
2019-05-02 00:53:06 +07:00
Alfredo Monclus ff578de39e Ozone extra battery icons 2019-05-01 14:31:55 -03:00
Weedy Weed Smoker abd5e72856 French translation complete overhaul
French translation complete overhaul, thanks to BlaCkMatiK who gave me the motivation to do so, and to twinaphex for fixing it on macOS and iOS !
2019-05-02 00:03:27 +07:00
Twinaphex c8cf92ee5d Merge pull request #8669 from alfrix/new_batt_icons
XMB extra battery icons
2019-05-01 18:51:49 +02:00
alfrix 19f3be21c2 XMB extra battery icons 2019-05-01 13:42:00 -03:00
Twinaphex 7d72a1b6ab Merge pull request #8668 from natinusala/master
Menu widgets and database task improvements
2019-05-01 18:23:50 +02:00
natinusala a253fac207 menu_widgets: fix screenshot notification data race 2019-05-01 15:46:57 +02:00
natinusala 90fb11cb9a task_database: set task title upon completion 2019-05-01 15:26:21 +02:00
natinusala 486f438cc3 task_database: reimplement task progression 2019-05-01 15:13:41 +02:00
Twinaphex c59fbbd2f2 Merge pull request #8667 from jdgleaver/menu-datetime
Optimise menu_display_timedate()
2019-05-01 12:57:23 +02:00
twinaphex f0f8e8a208 Cleanup menu_entries_get_last_stack 2019-05-01 12:44:51 +02:00
twinaphex d170f99c03 (menu_entries.c) Simplify code 2019-05-01 12:32:49 +02:00
jdgleaver 2e68a634a2 Optimise menu_display_timedate() 2019-05-01 10:58:40 +01:00
twinaphex c9f98fce2f (menu_entries.c) Turn some static functions into macros 2019-05-01 11:48:44 +02:00
twinaphex 9ee33a6a1d (Menu) Merge menu_entry into menu_entries.c 2019-05-01 11:41:13 +02:00
twinaphex cce4aa9c86 (core_info.c) Use string_concat for constants 2019-05-01 00:21:50 +02:00
twinaphex 7ffbba6187 (WiiU) Silence warning - enumeration value not handled in switch 2019-05-01 00:13:12 +02:00
twinaphex 066643ac6e (GX2) Buildfix 2019-05-01 00:11:43 +02:00
twinaphex dbb9fb448d (menu_setting.c) Update 2019-05-01 00:10:38 +02:00
twinaphex 29b8ddef28 Move video_driver_menu_settings 2019-05-01 00:09:49 +02:00
twinaphex 39eadbab6f Use string_concat in more performance critical areas 2019-04-30 21:17:51 +02:00
twinaphex 4b22522ae0 We need faster string concatenation for performance-critical
codepaths - this is being run every frame
2019-04-30 19:36:40 +02:00
twinaphex 662976608a (Shader) Fix regression - when a game was loaded with a core
preset, it would load the preset inside shader slot 1 (menu)
instead of properly setting each pass
2019-04-30 19:26:36 +02:00
twinaphex 6683be9c44 (OSX 10.7) Use STB_FONT 2019-04-30 18:41:03 +02:00
twinaphex 49f5e6e2cc (macOS Metal) Use STB font instead of CoreText for font rendering 2019-04-30 18:40:07 +02:00
Twinaphex 5465c2b345 Merge pull request #8662 from jdgleaver/rgui-battery
Standardise menu powerstate access + add battery indicator to RGUI
2019-04-30 18:29:21 +02:00
jdgleaver 17f3bc2255 (RGUI) Make battery icon have a continuous fill 2019-04-30 17:13:00 +01:00
jdgleaver 55737ba127 Standardise menu powerstate access + add battery indicator to RGUI 2019-04-30 15:57:38 +01:00
twinaphex 01284c0231 Remove setting_list.c and reintegrate it into menu_setting.c 2019-04-30 16:18:26 +02:00
twinaphex ce5b1b2c0a (iOS10) Add rcheevos include dir 2019-04-30 14:26:01 +02:00
twinaphex 5bd0fdcc13 Cleanups 2019-04-30 13:51:32 +02:00
twinaphex 06cfdfdcbb Make some log messages uniform 2019-04-30 13:43:01 +02:00
twinaphex bc2bdd5734 config_file_read not needed anymore 2019-04-30 13:37:10 +02:00
Twinaphex 2dbb334fb1 (iOS) Fix two function pointers 2019-04-30 11:57:15 +02:00
Twinaphex 43d217668d (STB/iOS) Add HAVE_STB_FONT for iOS solutions too 2019-04-30 11:46:52 +02:00
twinaphex e76a8e6a75 (Apple/STB) Add Apple to STB unicode 2019-04-30 11:40:06 +02:00
Twinaphex 1819584d74 (General) Fix some warnings
(OSX) Add HAVE_STB_FONT
2019-04-30 11:38:47 +02:00
twinaphex 44b83cf353 Cleanups 2019-04-30 11:16:14 +02:00
twinaphex 34be5862ee (task_database) Use task_init 2019-04-30 10:25:23 +02:00
twinaphex 2d99cdcbf3 Add function parameter to task_iterate_database_start 2019-04-30 10:18:25 +02:00
twinaphex 9e2c82c26e (Scanner) Shorten scanner string 2019-04-30 10:12:00 +02:00
Twinaphex 2315362997 Merge pull request #8660 from libretro/revert-8658-master
Revert "task_database: use regular progress report"
2019-04-30 10:01:18 +02:00
Twinaphex a797324133 Revert "task_database: use regular progress report" 2019-04-30 10:01:07 +02:00
Twinaphex 90ea42c2d9 Merge pull request #8658 from natinusala/master
task_database: use regular progress report
2019-04-30 09:42:42 +02:00
Twinaphex b0b4f859cc Merge pull request #8657 from jdgleaver/rgui-particle-effects
(RGUI) Add 'particle effect' animation system
2019-04-29 23:07:38 +02:00
natinusala 8c7db837b4 task_database: use regular progress report 2019-04-29 20:04:41 +02:00
Twinaphex 3b5954b877 Merge pull request #8656 from m4xw/libnx_fixes
Libnx fixes
2019-04-29 18:26:38 +02:00
M4xw 6bfa3fa807 [LIBNX] Better Horizon Ver. Detection
-Save the current Path via frontend_switch_process_args (fixes loader)
2019-04-29 18:14:21 +02:00
jdgleaver ecdb5383ba (RGUI) Add 'particle effect' animation system 2019-04-29 15:43:19 +01:00
M4xw 24dadb276e [LIBNX] Unconditional Mutex for logging 2019-04-29 16:43:01 +02:00
twinaphex 0984a13665 We can't use RARCH_LOG and friends inside libretro-common code 2019-04-29 14:49:24 +02:00
twinaphex ff906a9228 (MSVC 2017) Add HAVE_OZONE 2019-04-29 12:00:21 +02:00
twinaphex c2f95940fb (GL1) Whether GL1 driver has windowed mode support or not
depends on the video context driver and not the video driver itself
2019-04-29 07:21:37 +02:00
twinaphex 4f8e59a3f8 (UWP) Rewind should now work - issues with the BitScanReverse
codepath for compat_ctz on UWP/WinRT - have not figured out a
solution yet, so just make it default to slowest ctz codepath
for now
2019-04-29 07:06:06 +02:00
twinaphex 4c3e0d44b8 Revert "Start using string_is_equal_memcmp and"
This reverts commit 26d6aee1eb.
2019-04-29 04:04:33 +02:00
twinaphex bae73a0ccc Revert "(dir_list) Use string_is_equal_memcmp_fast"
This reverts commit c8ad747a46.
2019-04-29 04:03:57 +02:00
twinaphex c8ad747a46 (dir_list) Use string_is_equal_memcmp_fast 2019-04-28 19:05:51 +02:00
twinaphex 26d6aee1eb Start using string_is_equal_memcmp and
string_is_equal_memcmp_fast
2019-04-28 17:23:11 +02:00
twinaphex 161d4caa8f Get rid of two retro_assert calls 2019-04-28 15:16:42 +02:00
Twinaphex 4c154f347d Merge pull request #8649 from Ghabry/uwp-vfs
UWP VFS: Calculate buffer offset correctly when read fails due to EOF
2019-04-28 12:20:13 +02:00
Ghabry 5faf6a124d UWP VFS: Calculate buffer offset correctly when read fails due to EOF 2019-04-28 12:15:46 +02:00
twinaphex 3b24565b66 Be more careful with dangling pointer 2019-04-28 10:17:03 +02:00
twinaphex 8784d21c74 (STB) WinRT/UWP can't deal with relative paths, so don't look for
osd-font.ttf
2019-04-28 07:24:34 +02:00
twinaphex 2aa0b74d55 Remove core_manager - not used 2019-04-28 06:35:16 +02:00
twinaphex a6998d593a Update some logs 2019-04-28 05:48:09 +02:00
twinaphex 8ea1305d75 (menu_shader.c) Cleanups 2019-04-28 05:26:56 +02:00
twinaphex 2b5b67d663 Simplify core_info code 2019-04-28 05:15:21 +02:00
twinaphex 706a63fedf use config_file_exists where applicable in per-game/per-core config
functions
2019-04-28 03:21:30 +02:00
twinaphex 6888a0cc71 (config_file.c) Seems unnecesary to check if a config file is a
directory first
2019-04-28 03:12:59 +02:00
twinaphex 39c3a25ad6 Start using smaller buffers for stdout logging 2019-04-28 02:54:02 +02:00
twinaphex 2a164f2034 Don't need all this log spam for core/game initialization
if log level is not set to at least 'Debug'
2019-04-28 02:03:56 +02:00
twinaphex 415646111b (Settings) Libretro log level should be available again
(Logging) SET_SUBSYSTEM_INFO and GET_VARIABLE should only
do verbose logging if libretro logging level is set to DEBUG
2019-04-28 01:55:49 +02:00
Twinaphex 9fbc3c0769 Merge pull request #8647 from Ghabry/uwp-vfs
UWP VFS Performance
2019-04-28 00:06:08 +02:00
Ghabry c209b0b3d9 UWP: Improve IO performance by manually buffering short reads.
Reduce copies by binding by reference in the lambdas
2019-04-27 23:47:52 +02:00
Twinaphex a41f23240d Merge pull request #8646 from orbea/tinyalsa
Attempt to fix LGTM alerts for tinyalsa.
2019-04-27 21:16:17 +02:00
orbea ecd7f3c1fd Attempt to fix LGTM alerts for tinyalsa. 2019-04-27 07:40:32 -07:00
Ghabry 4390317992 Revert "(UWP/WinRT)"
This reverts commit b43b3e2bb0.
2019-04-27 15:01:01 +02:00
twinaphex 5044537625 (core_info.c) Small opts for core_info.c 2019-04-27 14:23:07 +02:00
twinaphex ac2fec7298 Revert "(command.c) Cleanups"
This reverts commit f7d4bd5faa.
2019-04-27 14:05:05 +02:00
twinaphex 2c47d571aa Use path_is_valid instead of filestream_exists when we only
need to know if a file exists on the filesystem
2019-04-27 14:01:50 +02:00
twinaphex 627c86721f (task_patch) Get rid of extraneous filestream_exists checks -
we already check if the file exists with path_is_valid
2019-04-27 13:35:28 +02:00
twinaphex 7502914a1d parse_horizontal_content_actions - use path_is_valid instead of
filestream_exists
2019-04-27 13:33:05 +02:00
twinaphex f7d4bd5faa (command.c) Cleanups 2019-04-27 13:18:05 +02:00
twinaphex b43b3e2bb0 (UWP/WinRT)
- Disable VFS for now - seems to be very problematic right now
- Move uwp_is_path_accessible_using_standard_io to file_path.c
since it seems to have no VFS dependencies, and rename it to
is_path_accessible_using_standard_io so it could possibly be later
used for other platforms as well that also have sandboxed filesystems
2019-04-27 09:20:19 +02:00
twinaphex cff92152db (VFS UWP) Revert this back 2019-04-27 09:05:39 +02:00
twinaphex e1b11593fc (file_list.c) Cleanups/optimizations 2019-04-27 07:32:40 +02:00
twinaphex 890e1eb064 (file_list.c) file_list_expand_if_needed - unroll this function 2019-04-27 07:21:50 +02:00
twinaphex c56225ab65 (Menu displaylist) Cleanups 2019-04-27 06:22:49 +02:00
twinaphex 9a6df2b591 (Menu displaylist) Cleanups 2019-04-27 06:18:40 +02:00
twinaphex 636e1bef50 (playlist.c) Cleanups 2019-04-27 05:35:16 +02:00
twinaphex 49156e645e task_push_decompress - use path_is_valid instead of filestream_exists 2019-04-27 05:16:02 +02:00
twinaphex 7fb5d9da62 Revert this 2019-04-27 04:44:01 +02:00
twinaphex 58073eeb15 Small cleanup 2019-04-27 04:43:07 +02:00
twinaphex 3e72c502a8 strlen optimizations :
- use STRLEN_CONST for constant strings, translates to sizeof
which should be computed at compile-time
- found some places where we are needlessly calling strlen two
times instead of just once
2019-04-27 04:21:10 +02:00
twinaphex 2b401ce13b (archive_file) Small optimizations - use one strlen less in one instance 2019-04-27 02:39:33 +02:00
twinaphex 7af68ca0b9 (libretro-common) Update 2019-04-27 02:21:35 +02:00
twinaphex a2cb3f60a4 path_get_extension - fix regression 2019-04-27 02:17:17 +02:00
twinaphex fbae4efc97 Simplify path_basename and path_get_extension 2019-04-27 02:07:25 +02:00
twinaphex 1c2cbe596c Fix selected entries on dropdown menus 2019-04-27 01:15:14 +02:00
twinaphex 5c3d340e01 (UTF) Small optimizations 2019-04-27 00:46:26 +02:00
Twinaphex f4f1212372 Merge pull request #8644 from m4xw/libnx
[Libnx] Toolchain related changes
2019-04-26 22:10:40 +02:00
M4xw ca80a3a4da [Libnx] Toolchain related changes
-Remove switch_pthread - It should be no longer used
-Increase SAVE_STATE_CHUNK to 4MB
-Fix overclocking on Horizon 8.0+

Note: This requires the updated Toolchain before Merge
2019-04-26 21:58:40 +02:00
Twinaphex fce660de29 Merge pull request #8643 from theheroGAC/patch-43
Update msg_hash_it.h
2019-04-26 20:40:04 +02:00
theheroGAC 1ee127fe68 Update msg_hash_it.h 2019-04-26 17:22:27 +02:00
twinaphex 7201d0bf22 Revert "Use path_is_valid instead of filestream_exists where possible -"
This reverts commit 88e3abd6fd.
2019-04-26 13:46:21 +02:00
twinaphex 88e3abd6fd Use path_is_valid instead of filestream_exists where possible -
stat should be faster than fopen
2019-04-26 13:33:25 +02:00
twinaphex 1598cc773c More small cleanups 2019-04-26 12:53:12 +02:00
twinaphex 68ab984603 (archive_file) Safe optimizations 2019-04-26 12:46:44 +02:00
twinaphex aa156bd804 Have to revert this for now 2019-04-26 11:28:08 +02:00
twinaphex 60c028a562 (archive_file) Some optimizations 2019-04-26 10:26:48 +02:00
twinaphex cec858748f (dir_list) Optimize dir_list_read 2019-04-26 08:23:56 +02:00
twinaphex 1433a587b2 (dir_list) Simplify parse_dir_entry 2019-04-26 07:54:37 +02:00
twinaphex ad03ac055d dir_list - simplify dir_list_append 2019-04-26 06:36:55 +02:00
twinaphex ddace03872 (config_file.c) Cleanups 2019-04-26 06:28:10 +02:00
twinaphex 89563ce9c8 (stdstring) Small cleanups 2019-04-26 06:07:40 +02:00
twinaphex d41827ec7e (VFS implementation) Small cleanups 2019-04-26 05:53:59 +02:00
twinaphex fb653d22dc (file_path.c) Small simplifications 2019-04-26 04:49:42 +02:00
twinaphex c9caa5c39b (iOS10/11/9) Add rcheevos include dirs 2019-04-26 04:07:16 +02:00
twinaphex 246e224626 (menu displaylist) Fix shader preset/shader pass selection 2019-04-26 02:58:57 +02:00
twinaphex cd11385348 Fix bug with Quick Menu -> Controls 2019-04-26 02:53:57 +02:00
twinaphex 1f53eea4ee (Cocoa GL/GLES) Set this flag for OpenGLES 2019-04-26 02:27:48 +02:00
twinaphex 0b5a62ff9e (Menu) Cleanups 2019-04-26 01:44:52 +02:00
twinaphex 9edf8ecab0 (menu displaylist) Cleanups 2019-04-26 01:16:55 +02:00
twinaphex 30c08c369c (menu displaylists) Simplifications 2019-04-26 01:07:26 +02:00
twinaphex aed89c053b (menu displaylist) Cleanups 2019-04-25 05:32:19 +02:00
twinaphex fa09b29ad9 (menu displaylist) Cleanups 2019-04-25 05:28:52 +02:00
twinaphex c45699aeae (menu displaylist) Cleanups 2019-04-25 05:15:29 +02:00
twinaphex 71e07316db (menu displaylist) Cleanups 2019-04-25 04:52:52 +02:00
twinaphex ff40ae2486 Refactor slang_preprocess.cpp - try to remove auto variables 2019-04-25 04:07:18 +02:00
twinaphex a42b8f616f (slang reflection) Cleanups - start getting rid of most auto
variables
2019-04-25 03:54:04 +02:00
twinaphex 0bae77d199 (Shaders Vulkan/GLcore) Cleanups 2019-04-25 02:37:13 +02:00
twinaphex 15afaedaa8 (Shaders vulkan/GLcore) Simplify 2019-04-25 02:34:26 +02:00
twinaphex e40c3ec07b (Shader Vulkan/GL core) Make code more the same 2019-04-25 01:42:56 +02:00
twinaphex 55b53929db (shader GL/Vulkan) Cleanups 2019-04-24 23:45:57 +02:00
twinaphex 604403fe90 (shader_vulkan) Simplifications - start making shader_gl_Core
and shader_vulkan more alike
2019-04-24 23:13:42 +02:00
twinaphex e42dae928e (gl shader core) Simplifications 2019-04-24 22:20:48 +02:00
twinaphex 51a69dff44 (gl core shaders) Simplification 2019-04-24 22:10:21 +02:00
twinaphex 3225876f0b (shader_gl_core.cpp) Simplify 2019-04-24 20:25:37 +02:00
Twinaphex c85bf21fbb Merge pull request #8629 from orbea/wayland
qb: Disable wayland for CXX_BUILD for now.
2019-04-24 18:59:12 +02:00
orbea 780fa2679f qb: Disable wayland for CXX_BUILD for now. 2019-04-24 09:32:01 -07:00
twinaphex 8fc40d2a2a Menu displaylist - prevent segfault with shader parameters screen
when a shader has no parameters and handle does not exist
2019-04-24 18:07:12 +02:00
twinaphex 5e82940a08 (VFS) Reimplement path_mkdir_error 2019-04-24 17:41:02 +02:00
twinaphex a60844897f (Shader GL core) Simplify some code 2019-04-24 04:24:48 +02:00
twinaphex c3c3b6c2a2 (GL_CORE) Add gl_capabilities.c 2019-04-24 04:05:42 +02:00
Twinaphex f3d04b7562 (OSX10.7) Add C++ source files 2019-04-24 03:59:55 +02:00
Twinaphex e9bbc8d8dd (gl_core.c) Remove unused variable 2019-04-24 03:49:34 +02:00
twinaphex c422ec1a0f (OSX10.7) Add header include dirs 2019-04-24 03:46:33 +02:00
Twinaphex fb4e9f560f (OSX 10.7) Update 2019-04-24 03:42:14 +02:00
twinaphex 9ac971050d (GL_CORE) Add RGL/glsym 2019-04-24 03:37:17 +02:00
twinaphex c55873c324 (GL_CORE) More updates 2019-04-24 03:33:32 +02:00
twinaphex 4f542c051d (OSX 10.7) Add defines 2019-04-24 03:29:46 +02:00
twinaphex 59b45f7812 Start making HAVE_OPENGL_CORE independent 2019-04-24 03:23:57 +02:00
Twinaphex 21cd11acb4 Merge pull request #8628 from orbea/c89
Fix C89_BUILD.
2019-04-24 02:55:16 +02:00
orbea 552cc08549 Fix C89_BUILD. 2019-04-23 17:51:26 -07:00
twinaphex d6e9776ab8 (VFS) Small cleanups 2019-04-24 02:19:09 +02:00
twinaphex b3686aee4c Initialize playlist_entry manually 2019-04-24 02:10:45 +02:00
twinaphex c854d0916b (XMB) XMB honors the 'show menu sublabels' setting now - was previously
RGUI only
2019-04-24 01:48:28 +02:00
Twinaphex 3e15f1b512 Merge pull request #8626 from retrotails/master
add rgui snow
2019-04-24 01:39:44 +02:00
twinaphex f3a31ffd8d Increment count correctly per entry added 2019-04-24 01:21:24 +02:00
twinaphex 22ac50d39c (menu displaylist) Cleanups 2019-04-23 23:59:05 +02:00
twinaphex e7cb5ccdee menu_displaylist_parse_playlist - cleanups 2019-04-23 23:50:30 +02:00
twinaphex 70d0bd5092 If we are inside online updater screen and go back ingame and then
go back to the menu, we would become stuck inside this menu because
there were no entries. This has now been fixed
2019-04-23 23:35:52 +02:00
twinaphex f573626144 Simplify path_parent_dir 2019-04-23 23:21:16 +02:00
twinaphex b8694ff127 (file_path.c) More simplifications 2019-04-23 23:10:53 +02:00
twinaphex 7fe3f5f7ff (file_path.c) Turn path_stat into a macro 2019-04-23 22:59:57 +02:00
twinaphex cca51030d7 simplify path_mkdir 2019-04-23 22:53:07 +02:00
twinaphex f9f66a14b3 Simplify retro_vfs_mkdir_impl 2019-04-23 22:30:38 +02:00
twinaphex 589e886954 (Database menu) Add no entries to display when there are no entries
inside a database file
2019-04-23 21:59:58 +02:00
twinaphex 4d7f9a85f1 Cleanup menu_displaylist_parse_playlists 2019-04-23 21:52:41 +02:00
twinaphex b5a7020366 Cleanups 2019-04-23 21:15:15 +02:00
twinaphex f8881f7cbe Cleanup retroarch_validate_game_options 2019-04-23 21:06:12 +02:00
twinaphex 4eb2d8ae09 Cleanups 2019-04-23 20:22:07 +02:00
twinaphex 95ad896f9b Cleanups 2019-04-23 20:07:29 +02:00
retrotails b69c005c85 fix compiler errors 2019-04-23 13:48:06 -04:00
twinaphex ff3467a79f (Ozone) Add wifi icon for network info entries 2019-04-23 19:28:53 +02:00
twinaphex 6268d979c0 Cleanups 2019-04-23 19:20:49 +02:00
twinaphex aba9cbb5b4 Cleanups 2019-04-23 18:51:03 +02:00
twinaphex ff3a3f80d3 Cleanups 2019-04-23 18:41:50 +02:00
twinaphex b25372b6f7 (menu displaylist) Cleanups 2019-04-23 18:39:24 +02:00
twinaphex a2d4577a1f Simplify parse_settings_internal_enum 2019-04-23 18:21:48 +02:00
twinaphex d1e4ada773 menu_displaylist_parse_settings_internal_enum - optimize - if
setting is flagged as advanced and advanced settings are not
enabled, then do early return
2019-04-23 17:11:29 +02:00
twinaphex 804fab61bc SImplify menu_displaylist_parse_type 2019-04-23 17:03:29 +02:00
twinaphex a53c67791b Simplify menu_displaylist_parse_settings_internal_enum 2019-04-23 14:39:36 +02:00
retrotails 499d61cb3d added rgui snow 2019-04-23 04:33:10 -04:00
twinaphex 4b3b9add3e (menu displaylist) Cleanups 2019-04-23 07:26:58 +02:00
twinaphex d1f99e4610 (menu displaylist) Cleanups 2019-04-23 07:24:40 +02:00
twinaphex 5ca821c9db (menu displaylist) Cleanups 2019-04-23 07:13:26 +02:00
twinaphex 485b41163c Cleanup create_string_list_rdb_entry_int 2019-04-23 06:14:54 +02:00
twinaphex e686cb34b0 (menu displaylist) Cleanups 2019-04-23 04:28:53 +02:00
twinaphex afbc113e7b (Menu displaylist) Cleanups 2019-04-23 04:19:28 +02:00
twinaphex 3c130927d3 (menu displaylist) Refactor latency settings list 2019-04-23 04:03:29 +02:00
twinaphex 15000edf11 (menu_displaylist) Cleanups 2019-04-23 03:54:33 +02:00
twinaphex 4dd95212ac (menu displaylist) Get rid of duplicate function 2019-04-23 03:10:55 +02:00
twinaphex 7311aa6a69 (menu displaylist) More simplifications 2019-04-23 03:06:07 +02:00
twinaphex 52874b6316 Make the two parse_settings functions more alike 2019-04-23 02:51:44 +02:00
twinaphex e4f48fac19 (C89_BUILD) Fix C89_BUILD 2019-04-23 02:23:27 +02:00
twinaphex 8811a4a8f9 (menu displaylist) More cleanups 2019-04-23 02:11:34 +02:00
twinaphex 8c3c34f984 (menu_displaylist) More cleanups 2019-04-23 01:32:05 +02:00
twinaphex 70ece8435c (menu displaylist) Code cleanups 2019-04-23 01:21:51 +02:00
twinaphex a6e18f23a8 (stb font unicode) Put MSVC check in again - MSVC 2005 and up get
Unicode STB font
2019-04-23 00:35:04 +02:00
twinaphex 566abd0cfd (MSVC 2012) Start making the code in pixconv.c more backwards compatible 2019-04-23 00:08:34 +02:00
twinaphex 656283322e (Griffin) Take out these ifdefs for XMB/MaterialUI/Ozone 2019-04-22 23:54:58 +02:00
twinaphex a48dbcb52e (MSVC 2005) Add HAVE_UPDATE_ASSETS 2019-04-22 23:43:27 +02:00
twinaphex 31c7abce64 (MSVC 2003) Fonts now show up for GL 2019-04-22 23:30:24 +02:00
twinaphex c4d99586ba (MSVC 2003) Compile in STB unicode for MSVC 2003 2019-04-22 23:07:10 +02:00
twinaphex 563253f268 More work to make HAVE_OPENGL1 independent 2019-04-22 22:59:48 +02:00
twinaphex 04d062b3d4 (MSVC2003) Enable HAVE_OPENGL1; make HAVE_OPENGL1 independent from
HAVE_OPENGL
2019-04-22 22:48:23 +02:00
twinaphex 3680c264d9 (PS3) Hopefully fix PS3 build finally 2019-04-22 20:47:48 +02:00
twinaphex d08f9cb212 (menu_displaylist) menu_displaylist_parse_core_info - cut down on more
code duplication
2019-04-22 20:22:24 +02:00
twinaphex 799872e59d (menu_displaylist) Remove tons of code duplication 2019-04-22 20:11:34 +02:00
twinaphex 4133da0fcf (OSX) Add OSX 10.7 solution - not done yet - will use HAVE_GL_CORE
and HAVE_SLANG/HAVE_SPIRV_CROSS
2019-04-22 10:52:52 +02:00
Twinaphex 077a5dd685 (OSX) CXX_BUILD buildfix 2019-04-22 10:33:30 +02:00
Twinaphex 64dea335ff (OSX) Cleanups 2019-04-22 10:05:18 +02:00
twinaphex 63c8eb1a4c Simplify config_load_shader_preset 2019-04-22 09:27:59 +02:00
twinaphex 1bb293ebae (configuration.c) Cleanups 2019-04-22 08:55:52 +02:00
twinaphex a2ec579689 (configuration) Cleanups 2019-04-22 08:46:58 +02:00
twinaphex 5171d167c8 Update log messages 2019-04-22 08:29:29 +02:00
twinaphex cec7037839 (configuration.c) Cleanups 2019-04-22 08:21:57 +02:00
twinaphex 85c4a29d38 Simplify config_save_autoconf_profile 2019-04-22 08:13:26 +02:00
twinaphex b69c7ec558 Cleanup config_load_file 2019-04-22 07:38:44 +02:00
twinaphex f18407a011 config_load_shader_preset/config_load_override - use config_file_read 2019-04-22 07:21:01 +02:00
twinaphex 64ee26baae More cleanups/refactors 2019-04-22 04:41:16 +02:00
twinaphex 9bd38b7011 Small style nits/cleanups 2019-04-22 04:25:43 +02:00
twinaphex dcd5cb2602 (paths.c) Style nit 2019-04-22 04:05:58 +02:00
twinaphex def9210cdc (PS3) Buildfix 2019-04-22 04:01:20 +02:00
twinaphex 31fc95a6cf Style nits 2019-04-22 03:08:30 +02:00
twinaphex c38ed7f843 Use path_is_directory to check if directories exist instead of
filestream_exists
2019-04-22 02:43:09 +02:00
twinaphex 33e5a92867 We should be able to rely on the return value of path_mkdir
instead of doing an additional negative path_is_directory check
afterwards
2019-04-22 02:33:12 +02:00
twinaphex 146b4ccc50 Use config_file_read in more places 2019-04-22 02:20:04 +02:00
twinaphex 317a443741 Use config_file_read in more places 2019-04-22 02:10:12 +02:00
twinaphex 955a149ce9 Use config_file_read where we can assume we are reading a file 2019-04-22 01:56:24 +02:00
twinaphex 16e2db25c4 Prefer config_file_read instead of config_file_new when we are
sure the path cannot be a directory path
2019-04-22 01:23:50 +02:00
twinaphex 69168ec6bc Core info list iteration was calling path_stat two times on the same
paths - unnecessary file I/O is an issue with UWP/WinRT so let's cut
this down to only one path_stat. config_file_read function created -
acts the same as config_file_new except it doesn't check if the path
provided is actually a directory, which in turn would lead to another path_stat call
2019-04-22 01:13:19 +02:00
twinaphex b41384a0d0 (input_driver) Cleanups 2019-04-22 00:05:12 +02:00
twinaphex d281e3f889 (retroarch.c) Cleanups 2019-04-21 23:42:21 +02:00
twinaphex b998bda5a1 Fix crash that can occur with Discord netplay 2019-04-21 21:56:40 +02:00
Twinaphex 3f1a516696 Merge pull request #8616 from orbea/wayland
wayland: Fix build.
2019-04-21 18:28:42 +02:00
twinaphex 2509ee9646 (paths.c) Cleanups - string cannot be empty at this point 2019-04-21 17:57:32 +02:00
twinaphex 435c80a844 path_set_redirect - simplifications 2019-04-21 17:46:55 +02:00
orbea 1e86824e96 wayland: Fix build.
Fixes https://github.com/libretro/RetroArch/issues/8614
2019-04-21 08:11:26 -07:00
twinaphex b0b1b0b782 (input_driver) Cleanup 2019-04-21 16:57:35 +02:00
twinaphex f292524031 Cleanup 2019-04-21 16:50:25 +02:00
twinaphex 8165b43170 (input_driver) Further simplifications 2019-04-21 16:30:12 +02:00
twinaphex 7ae0c6b2c1 (input_driver.c) Simplifications 2019-04-21 16:19:48 +02:00
twinaphex 8312d67a11 (input_driver.c) Further simplifications 2019-04-21 16:13:11 +02:00
twinaphex b6fd875230 (input_driver.c) Simplifications 2019-04-21 15:48:56 +02:00
twinaphex f6fec009d2 input_config_get_prefix becomes static function 2019-04-21 07:56:20 +02:00
twinaphex a79eec8698 (input_driver.c) Cleanup 2019-04-21 07:46:52 +02:00
twinaphex af2805406d Move more functionality to input_driver.c ; make more functions static 2019-04-21 07:30:14 +02:00
twinaphex 270e95bc97 Turn a lot of input_config_parse functions static 2019-04-21 06:42:13 +02:00
twinaphex 0226820825 Simplify config_read_keybinds_conf 2019-04-21 06:32:39 +02:00
twinaphex ce31ed6a51 (configuration.c) Simplifications 2019-04-21 06:20:25 +02:00
twinaphex 7372bafb44 Remove RARCH_CTL_SET_LIBRETRO_PATH 2019-04-21 06:03:02 +02:00
twinaphex e5800cf733 Cleanups 2019-04-21 05:47:24 +02:00
twinaphex 81d22c63de (task_content) Some simplifications 2019-04-21 05:33:41 +02:00
twinaphex 5771a7a71d Simplify some code 2019-04-21 05:24:06 +02:00
twinaphex b63fa7b94b (configuration/paths) Simplify some code 2019-04-21 05:05:44 +02:00
twinaphex 0909c80138 Cleanups 2019-04-21 04:49:04 +02:00
twinaphex 565e25d2ab (menu displaylist) Cleanups 2019-04-21 04:33:22 +02:00
twinaphex 2d9f0ea7ce (menu displaylist) Cleanups 2019-04-21 04:27:27 +02:00
twinaphex 2941365741 (menu displaylist) Cleanups 2019-04-21 04:17:15 +02:00
Twinaphex 05b50c346d Merge pull request #8613 from orbea/travis
travis: Avoid more duplication.
2019-04-21 04:10:52 +02:00
twinaphex 5748de8b1f (menu_displaylist) Cleanups 2019-04-21 04:09:11 +02:00
twinaphex a150bc27ce (menu_displaylist) Cleanups 2019-04-21 04:06:37 +02:00
twinaphex e705862c07 (menu_displaylist) Cleanups 2019-04-21 03:45:35 +02:00
twinaphex c662da11c3 (QT/UI) Cleanups 2019-04-21 03:28:23 +02:00
twinaphex 254c48707d (QT/UI) Cleanups 2019-04-21 02:34:19 +02:00
twinaphex 1dc0fa83ff Cleanups 2019-04-21 02:16:24 +02:00
orbea f45a70d1e8 travis: Avoid more duplication. 2019-04-20 17:03:35 -07:00
twinaphex 91d56bf43f (PS3) Buildfix 2019-04-21 01:39:10 +02:00
twinaphex b5ba2ddc7b (CXX) CXX_BUILD fix for Cheevos 2019-04-21 01:28:57 +02:00
twinaphex 0805838050 (QT/UI) Cleanups 2019-04-21 00:54:35 +02:00
twinaphex a58297a577 (UI/QT) Create create_widget 2019-04-21 00:41:26 +02:00
twinaphex 9ba1b522c2 (menu widgets) CXX_BUILD fixes 2019-04-21 00:31:31 +02:00
Twinaphex ba3161af87 Merge pull request #8612 from orbea/c89
Fix C89_BUILD with clang.
2019-04-21 00:01:26 +02:00
orbea aac42e309c Fix C89_BUILD with clang. 2019-04-20 14:59:07 -07:00
Twinaphex d6d882f34b Merge pull request #8611 from orbea/travis
travis: Add C89_BUILD and CXX_BUILD.
2019-04-20 23:35:32 +02:00
orbea ea4415b5f4 travis: Add C89_BUILD and CXX_BUILD. 2019-04-20 13:47:29 -07:00
Twinaphex cc749c6e60 Merge pull request #8609 from orbea/travis
travis: Avoid some duplication.
2019-04-20 22:25:25 +02:00
Twinaphex 287c95ac8b Merge pull request #8610 from meleu/runtime_rcheevos_switch_c89
C89/CXX support for rcheevos
2019-04-20 22:25:11 +02:00
Jamiras 2319b2bde8 fix C89/CXX build 2019-04-20 14:04:50 -06:00
orbea 443e6a2b1d travis: Avoid some duplication. 2019-04-20 13:02:45 -07:00
twinaphex 8e638f435a (Wayland) wl_array_for_each macro fails with CXX_BUILD - have to
roll our own macro instead doing it right
2019-04-20 20:33:22 +02:00
twinaphex 499235cd40 (CXX_BUILD) Another buildfix 2019-04-20 19:55:50 +02:00
twinaphex e4873f8a46 Another CXX_BUILD buildfix 2019-04-20 19:51:08 +02:00
twinaphex 7b3be5eddf (wayland) Fix some CXX_BUILD issues; possibly not all 2019-04-20 18:42:23 +02:00
twinaphex aa03025dd1 Need to disable cheevos for C89/CXX until this is fixed 2019-04-20 17:17:36 +02:00
twinaphex 762e28e1e0 (CXX_BUILD) Silence this warning 2019-04-20 16:39:58 +02:00
Twinaphex c9cfd1cd89 Silence xcode warnings - unused variables 2019-04-20 16:36:01 +02:00
Twinaphex 26bbf46054 Merge pull request #8608 from orbea/cxxbuild
Fix some CXX_BUILD errors.
2019-04-20 16:23:46 +02:00
twinaphex 797a4bca0f (UI/QT) network.cpp - more dehardcoding 2019-04-20 16:19:47 +02:00
twinaphex 22739b4430 (UI/QT) Refactor audio.cpp 2019-04-20 16:14:37 +02:00
orbea 4bd3a54fbb Fix some CXX_BUILD errors. 2019-04-20 07:08:22 -07:00
twinaphex f1a2652024 Use C comments instead of C++ comments 2019-04-20 15:45:20 +02:00
twinaphex bb45102450 Merge branch 'master' of https://github.com/libretro/RetroArch 2019-04-20 15:24:46 +02:00
Twinaphex bca306a006 Merge pull request #8501 from meleu/runtime_rcheevos_switch
add config option to choose between cheevos implementations
2019-04-20 15:23:51 +02:00
twinaphex e35cd80a14 (MSVC 2010) Buildfix 2019-04-20 05:53:17 +02:00
meleu 9091409efa remove '#ifdef HAVE_NEW_CHEEVOS' leftovers 2019-04-19 23:11:31 -03:00
meleu c2364096f3 Merge branch 'master' into runtime_rcheevos_switch 2019-04-19 21:50:00 -03:00
twinaphex b137616746 Update Makefile.common 2019-04-20 01:15:09 +02:00
twinaphex 1d3533d847 Add rsemaphore.c 2019-04-20 01:14:38 +02:00
Twinaphex e786798527 Merge pull request #8606 from leiradel/fix_memory_access
Fix check for mmaps or meminfo
2019-04-19 22:21:53 +02:00
twinaphex 1fb1b1bdb7 Add this back 2019-04-19 19:28:25 +02:00
twinaphex d7d201cb63 (Apple Metal) Add HAVE_MENU to moc generation 2019-04-19 19:26:57 +02:00
leiradel dab941e53d Simpler code paths 2019-04-19 17:33:24 +01:00
leiradel c0bb911501 Fix check to chose between mmaps and meminfo 2019-04-19 15:12:04 +01:00
leiradel 8aa16caef5 Fix format string in log message 2019-04-19 15:01:02 +01:00
Brad Parker 51d3376f07 Update CHANGES.md 2019-04-19 09:15:47 -04:00
Twinaphex e61c331656 Merge pull request #8601 from orbea/roaraudio
qb: Check for libroar 1.0.12.
2019-04-19 04:58:24 +02:00
orbea a86848d822 qb: Check for libroar 1.0.12.
This hides a now fixed upstream libroar build error which breaks LGTM.
Unfortunately this only allows the most recent roaraudio version to be
used.
2019-04-18 13:49:56 -07:00
hizzlekizzle 46dda3b5c3 Merge pull request #8600 from orbea/filter
Also fix the video filter selection.
2019-04-18 15:30:07 -05:00
orbea b7b17ee7e5 Also fix the video filter selection. 2019-04-18 12:50:35 -07:00
bparker06 d7a7260909 also fix audio DSP plugin 2019-04-18 15:12:53 -04:00
orbea dd9bde2184 Fix font selection.
Fixes https://github.com/libretro/RetroArch/issues/8593
2019-04-18 15:12:53 -04:00
Brad Parker 572c16cb2a style cleanup with uncrustify 2019-04-18 11:47:13 -04:00
Brad Parker e7dbac7eb0 prevent null derefs found by scan-build 2019-04-18 11:46:53 -04:00
Brad Parker fa128f950d remove unused functions 2019-04-18 10:35:51 -04:00
Twinaphex 99a1d8ccc6 Merge pull request #8597 from jdgleaver/rgui-osk-build-fix
RGUI OSK - HAVE_LANGEXTRA=0 build fix
2019-04-18 12:50:40 +02:00
jdgleaver ed1480bc87 RGUI OSK - HAVE_LANGEXTRA=0 build fix 2019-04-18 10:02:05 +01:00
Brad Parker d8968d8d0b add initial Turkish translation from Ömercan Kömür (fpscan) 2019-04-17 19:08:23 -04:00
Twinaphex a41e7aa0a7 Merge pull request #8594 from jdgleaver/rgui-osk
(RGUI) Add on-screen keyboard
2019-04-18 00:11:29 +02:00
jdgleaver 10f8077294 (RGUI) Add on-screen keyboard 2019-04-17 17:05:51 +01:00
Twinaphex d013a04bfb Merge pull request #8592 from jdgleaver/3ds-tearing
(3DS) Fix screen tearing when running 50Hz content
2019-04-17 03:15:16 +02:00
twinaphex 56d45ea0c0 (NL) Update translation 2019-04-17 03:13:37 +02:00
jdgleaver a9a5782cc0 (3DS) Fix screen tearing when running 50Hz content 2019-04-16 15:44:47 +01:00
Twinaphex be7356ec6d Merge pull request #8590 from bparker06/default_lang
Set language to OS/user default on first startup
2019-04-16 14:07:53 +02:00
Brad Parker a5e52bd3c7 android: set preferred OS language on first start 2019-04-16 02:09:38 -04:00
Brad Parker ffb07f3076 win32: set default language to OS preferred language on first start 2019-04-16 00:42:29 -04:00
Brad Parker 1ecc5fd9d1 unix: only set default language if support for multiple languages is compiled in 2019-04-16 00:41:59 -04:00
Brad Parker aa588dec35 set default language on first startup according to OS setting (initial *nix implementation) 2019-04-15 23:14:49 -04:00
Twinaphex e1573e4b39 Merge pull request #8586 from jdgleaver/3ds-update
(3DS) Sanitise/Improve display mode selection
2019-04-16 03:17:31 +02:00
Twinaphex 2fcb4b5854 Merge pull request #8589 from CozmoP/ampersand
Qt: sanitize ampersands
2019-04-16 03:17:09 +02:00
twinaphex 1baebdbd47 (UI/QT) Fix Travis OSX build hopefully 2019-04-16 00:47:13 +02:00
Twinaphex bd843857de Merge pull request #8588 from CozmoP/scrollbar
Qt: add scrollbar to settings dialog
2019-04-16 00:31:34 +02:00
CozmoP aa98a80fa6 Qt: sanitize ampersands 2019-04-15 22:45:03 +02:00
CozmoP ac6e4732f1 Qt: add scrollbar to settings dialog 2019-04-15 22:29:16 +02:00
Twinaphex f9ce822a7b Merge pull request #8587 from rzumer/fix_cheevos_oob
Check bounds of accessed memory for achievements
2019-04-15 19:40:49 +02:00
Raphaël Zumer dc37d56ac8 Check bounds of peeked memory for achievements 2019-04-15 13:34:44 -04:00
jdgleaver 54e1711f9a (3DS) Sanitise/Improve display mode selection 2019-04-15 17:05:55 +01:00
twinaphex 3d7eb19abd (UI/QT) Dehardcode User Interface -> Views -> Quick Menu 2019-04-15 08:00:24 +02:00
twinaphex d620e9ce1d (UI/QT) Dehardcode core settings 2019-04-15 07:48:34 +02:00
twinaphex 2e21a35261 (UI/QT) Dehardcode configuration settings 2019-04-15 07:40:51 +02:00
twinaphex 39c111bb92 (UI/QT) Dehardcode directory settings 2019-04-15 07:15:53 +02:00
twinaphex a680133a38 (UI/QT) Dehardcode driver settings 2019-04-15 07:01:51 +02:00
twinaphex df1fe1f1ae (menu_displaylist) slim down switch list 2019-04-15 06:55:44 +02:00
twinaphex 1f7d7d6441 (UI/QT) Dehardcode logging 2019-04-15 06:54:36 +02:00
twinaphex f33e04c747 (UI/QT) Dynamically generate settings for 'throttle' 2019-04-15 06:29:02 +02:00
twinaphex 085f25e81f (UI/QT) First attempt at dynamically generating settings instead
of manually specifying settings
2019-04-15 06:16:55 +02:00
twinaphex 1599f1f5d3 (UI/QT) Create overloaded 'add' function 2019-04-15 05:18:30 +02:00
twinaphex 29ca98c10c (UI/QT) Prevent unnecessary costly functions 2019-04-15 05:13:40 +02:00
twinaphex b38a4dcb08 (UI/QT) Make some of the add functions private 2019-04-15 04:26:19 +02:00
twinaphex d9723d2282 Make parse_settings_internal_enum a public function 2019-04-15 03:55:00 +02:00
twinaphex 52d2b6ae94 (UI/QT) Cleanups 2019-04-14 23:34:28 +02:00
twinaphex 060396e726 (UI/QT) Dehardcode more settings 2019-04-14 23:30:34 +02:00
twinaphex 756e49d2af (UI/QT) Dehardcode settings 2019-04-14 23:07:34 +02:00
twinaphex 534cfb60cf (UI/QT) ui - start dehardcoding additions 2019-04-14 19:04:46 +02:00
twinaphex 4b3ca341c2 (UI/QT) saving - dehardcode more additions 2019-04-14 18:58:51 +02:00
twinaphex 181cff34d8 (UI/QT) network.cpp - dehardcode more additions 2019-04-14 18:55:30 +02:00
twinaphex f3a7f6971b (QT/UI) Dehardcode more additions 2019-04-14 18:37:20 +02:00
twinaphex e0849df59f (UI/QT) Dehardcode two more additions 2019-04-14 18:33:15 +02:00
twinaphex 051c877c62 (QT/UI) By default, a CONFIG_FLOAT setting becomes a 'spinbox' UI type.
If a range is specified, it becomes a 'slider and spinbox' UI type.
2019-04-14 18:24:27 +02:00
twinaphex 0feb657e29 (UI/QT) More dehardcoding 2019-04-14 17:54:00 +02:00
twinaphex 9f09efe5c9 (UI/QT) Dehardcode some more additions 2019-04-14 17:45:12 +02:00
twinaphex 338ce7e678 (UI/QT) Dehardcode some more additions 2019-04-14 17:26:14 +02:00
twinaphex 82e38ca2ee (UI/QT) Dehardcode some more settings 2019-04-14 17:13:04 +02:00
twinaphex 95f77a2288 (UI/QT) Create 'add' function for SettingsGroup and LayoutForm 2019-04-14 17:10:13 +02:00
twinaphex 0cb94aef85 (Qt) Slight code formatting cleanups 2019-04-14 08:13:54 +02:00
twinaphex e840a6c95a Cut down on some code duplication 2019-04-14 07:08:35 +02:00
twinaphex 9c8c889477 rarch_setting - start implementing ui_type 2019-04-14 07:01:01 +02:00
Twinaphex 2bab38e857 Merge pull request #8306 from CozmoP/options
WIP/PoC Qt: settings PoC
2019-04-14 05:44:02 +02:00
twinaphex cee285bcd5 (playlist.c) Code style cleanups 2019-04-13 18:57:02 +02:00
twinaphex fb306a9358 (verbosity.c) Code formatting cleanups 2019-04-13 18:49:05 +02:00
twinaphex 10d66d28c0 (runtime_file.c) Code style cleanups(runtime_file.c) Code style
cleanups(runtime_file.c) Code style cleanups(runtime_file.c) Code style
cleanups(runtime_file.c) Code style cleanups(runtime_file.c) Code style
cleanups(runtime_file.c) Code style cleanups(runtime_file.c) Code style
cleanups(runtime_file.c) Code style cleanups
2019-04-13 18:47:11 +02:00
twinaphex a7abd77141 (menu_shader) Remove some unnecessary functions 2019-04-13 06:40:21 +02:00
twinaphex 70373dba9a (task_screenshot.c) Cleanups 2019-04-13 04:56:11 +02:00
Brad Parker 95145ec0d4 remove debug code 2019-04-12 21:17:04 -04:00
twinaphex 3619fae2d9 (LGTM) Silence some warnings 2019-04-13 02:15:26 +02:00
Twinaphex 5dde91040f Merge pull request #8578 from jdgleaver/rgui-idle-thumbs
(RGUI) Add optional delay when loading thumbnails
2019-04-13 01:46:15 +02:00
Brad Parker b8471aa3dc gl1: add gpu hard sync support and print osd statistics 2019-04-12 19:28:34 -04:00
Twinaphex 247d427ea4 Merge pull request #8579 from huwpascoe/silence_warnings
silence warnings
2019-04-12 23:45:39 +02:00
Twinaphex 8918d0d873 Merge pull request #8580 from bparker06/playlist_subsystem
Add subsystem support for (history) playlists, make playlist_entry struct public to simplify function parameters
2019-04-12 23:45:02 +02:00
CozmoP 0cbb89168b Merge pull request #2 from Tatsuya79/options
Move thumbnail type selection to grid footer.
2019-04-12 19:48:06 +02:00
bparker06 15c0191f08 Update task_content.c 2019-04-12 13:04:59 -04:00
Brad Parker f7b0c0947c add subsystem_name (friendly name) to history playlist, make playlist_entry struct public to simplify function parameters 2019-04-12 12:50:27 -04:00
Huw Pascoe fed06044c4 silence warnings 2019-04-12 17:32:11 +01:00
jdgleaver a446f8ad51 (RGUI) Add optional delay when loading thumbnails 2019-04-12 15:50:27 +01:00
Twinaphex 3345bed1d3 Merge pull request #8577 from hizzlekizzle/master
Silence menu_widgets max redefinition warning
2019-04-12 04:18:02 +02:00
meleu 0f92f001b0 rcheevos determine when to start/stop/submit leaderboards 2019-04-11 22:53:43 -03:00
hizzlekizzle 4f004ebebc whoops, syntax error 2019-04-11 20:51:50 -05:00
hizzlekizzle e85167072e silence redefinition warning
go ahead and protect against PI redefinition, too, since that seems very likely to crop up at some point.
2019-04-11 20:46:12 -05:00
Jamiras e35a3cb08b use rcheevos for leaderboard processing 2019-04-11 18:57:12 -06:00
bparker06 2c71ce437c Merge pull request #6 from fr500/playlist_subsystem
[subsystem] add a function to get the friendly name
2019-04-11 20:00:26 -04:00
radius d08779adf0 [subsystem] add a function to get the friendly name 2019-04-11 18:51:27 -05:00
bparker06 198bb6d047 Merge pull request #5 from fr500/playlist_subsystem
[subsystem] allow loading from history
2019-04-11 19:45:56 -04:00
bparker06 729f13cad4 Update menu_cbs_ok.c 2019-04-11 19:45:28 -04:00
radius 71bfd98012 [subsystem] allow loading from history 2019-04-11 18:18:37 -05:00
Twinaphex 1250565e9e Merge pull request #8488 from markwkidd/collections-to-playlists
internationalization -- use "Playlist" instead of "Collection"
2019-04-11 20:02:59 +02:00
Twinaphex 2f64653241 Merge pull request #8574 from jdgleaver/rgui-extended-ascii
(RGUI) Add optional extended ASCII support
2019-04-11 20:02:42 +02:00
Twinaphex da667600e1 Merge pull request #8575 from natinusala/master
menu widgets: fix screenshot, add achievement notification
2019-04-11 18:02:39 +02:00
natinusala 8287049a13 menu widgets: add badges to achievement notification 2019-04-11 17:35:13 +02:00
natinusala f941d4e625 menu widgets: add first achievement notification widget 2019-04-11 16:46:41 +02:00
natinusala 942d228e3a menu widgets: fix screenshot flash tainting the image 2019-04-11 16:46:41 +02:00
jdgleaver a870526dc9 (RGUI) Add optional extended ASCII support 2019-04-11 14:29:31 +01:00
Brad Parker 230c64ba4b add subsystem support for playlists, only missing the content load portion 2019-04-11 00:09:13 -04:00
twinaphex 702c889cd1 (D3D10/11/12) Menu widgets can now appear ingame 2019-04-11 02:22:21 +02:00
Brad Parker 2bfb073b3e fix stack-use-after-scope and a memory leak with subsystems 2019-04-10 18:58:53 -04:00
Twinaphex a7049b0020 Merge pull request #8573 from jdgleaver/rgui-menu-widgets
(RGUI) Fix menu widget display issues
2019-04-10 23:13:26 +02:00
jdgleaver 7e80f5520a (RGUI) Fix menu widget display issues 2019-04-10 13:50:03 +01:00
Brad Parker 7648da1413 d3d9/10/11/12: fix scissor parameters 2019-04-10 00:23:00 -04:00
Brad Parker e0b59f13e2 no analog/sensitivity correction for analog buttons 2019-04-09 23:17:11 -04:00
twinaphex dc80e49509 (menu_display_gl) Small cleanup 2019-04-10 01:50:55 +02:00
twinaphex 002ac5a344 (menu display) pointer cleanups 2019-04-10 01:46:25 +02:00
Twinaphex 145e09a629 Merge pull request #8566 from jdgleaver/stb-space-fix
Fix text display issues when using Japanese text with stb_unicode
2019-04-09 17:02:43 +02:00
jdgleaver 136762f6a2 Fix text display issues when using Japanese (and other unicode-dependent language) text with stb_unicode 2019-04-09 15:51:33 +01:00
Twinaphex f718b3558f Merge pull request #8565 from markwkidd/patch-1
SET_ROTATION: not only for accelerated video drivers
2019-04-09 16:08:11 +02:00
Twinaphex 076a0d2f56 (OSX) Code analysis cleanups 2019-04-08 23:13:39 +02:00
twinaphex b25c571b23 Comment out asserts that can be triggered when launching MaterialUI
in fullscreen mode
2019-04-08 22:25:35 +02:00
Twinaphex 3346cd23c0 Merge pull request #8564 from Themaister/master
glcore: Fix GLES build.
2019-04-08 21:22:28 +02:00
Themaister f82601c4a8 glcore: Fix GLES build. 2019-04-08 21:17:13 +02:00
twinaphex 3199edcde2 (MSVC 2005) Buildfix 2019-04-08 20:48:47 +02:00
twinaphex e206230a89 (Linux) Use STB unicode font renderer for Linux 2019-04-08 20:12:22 +02:00
Twinaphex d6dfa240c8 Some cleanups 2019-04-08 19:36:44 +02:00
Twinaphex 8d7a0117bc (Metal RA) Exclude OpenGL from Metal build 2019-04-08 19:17:51 +02:00
twinaphex 0af7167586 (GL1) Add menu widgets support 2019-04-08 18:58:26 +02:00
Twinaphex 4d429ea4d8 Merge pull request #8562 from jdgleaver/stb-fonts
Fix text alignment when using stb_unicode
2019-04-08 18:43:59 +02:00
twinaphex c12e8dea07 (D3D10/11) All struct members are already being set 2019-04-08 18:42:52 +02:00
jdgleaver 38d2febba5 Fix text alignment when using stb_unicode 2019-04-08 17:37:23 +01:00
Twinaphex 8aaef0e95c Merge pull request #8561 from natinusala/master
Reimplement missing menu widgets
2019-04-08 17:46:05 +02:00
natinusala 55d0701ac1 menu widgets: remove qb notice 2019-04-08 17:06:05 +02:00
natinusala fba6f69d74 menu widgets: reimplement volume widget 2019-04-08 17:06:05 +02:00
natinusala f036ce442e menu widgets: reimplement slowmotion 2019-04-08 17:06:05 +02:00
natinusala 7a7f444e55 menu widgets: reimplement fast forward widget 2019-04-08 17:06:05 +02:00
natinusala 5667c73ebf menu widgets: reimplement rewind widget 2019-04-08 17:06:04 +02:00
natinusala b750199db4 menu widgets: reimplement pause widget 2019-04-08 17:06:04 +02:00
natinusala 3d52f2bf8f menu widgets: reimplement screenshot widget 2019-04-08 17:06:04 +02:00
natinusala e1838b4908 Add more Windows MINGW working directory stuff to gitignore 2019-04-08 17:06:04 +02:00
natinusala 7a3caf82d0 menu widgets: reimplement FPS counter 2019-04-08 17:06:04 +02:00
Twinaphex e6efc02457 Merge pull request #8560 from jdgleaver/font-alignment-2
(Menu Widgets) Fix text alignment issues for ctr, metal and vita2d drivers
2019-04-08 16:25:17 +02:00
jdgleaver 4065dbf18e (Menu Widgets) Fix text alignment issues for ctr, metal and vita2d drivers 2019-04-08 15:13:19 +01:00
twinaphex 45fa047b07 (Menu display) Pointer cleanups 2019-04-08 15:22:21 +02:00
Twinaphex 682d757cf7 Merge pull request #8559 from jdgleaver/font-alignment
(Menu Widgets) Fix text alignment issues with Vulkan and D3D video drivers
2019-04-08 14:53:00 +02:00
jdgleaver 9fff07e589 (Menu Widgets) Fix text alignment issues with Vulkan and D3D video drivers 2019-04-08 13:35:35 +01:00
markwkidd d03ff44d53 allow non-accelerated video to rotate the display 2019-04-07 22:34:01 -04:00
twinaphex b49577b65f (UWP VFS) Code formatting cleanups 2019-04-07 22:45:35 +02:00
twinaphex dd016c44c9 (UWP VFS) Code formatting cleanups 2019-04-07 21:58:10 +02:00
twinaphex 79ffb53ef2 (UWP VFS) Try to rewrite this - baby steps 2019-04-07 21:35:45 +02:00
twinaphex e0cb900abe (UWP VFS) Cleanups 2019-04-07 21:22:20 +02:00
Twinaphex ffad99d886 Merge pull request #8552 from rzumer/patch-5
Fix cheevos crash when peeking out of range
2019-04-06 21:34:01 +02:00
Raphaël Zumer e181bc6d39 Fix cheevos crash when peeking out of range
This would occur if the address being peeked at was not part of a memory region defined in the core.
2019-04-06 13:48:18 -04:00
Brad Parker 9579804c72 gl1: add overlay support 2019-04-05 23:07:59 -04:00
Brad Parker 48dc251303 gl1: add scissor reset from gl 2019-04-05 18:17:11 -04:00
Twinaphex 46455a6ff8 Merge pull request #8549 from jdgleaver/rgui-optimisation
(RGUI) Performance optimisations
2019-04-05 12:33:20 +02:00
jdgleaver b301e4d444 (RGUI) Performance optimisations 2019-04-05 09:16:29 +01:00
twinaphex 827802d883 Revert "Don't grab these two variables for every blit_line call"
This reverts commit ca56e0e91d.
2019-04-04 18:32:08 +02:00
twinaphex d7d260556b Revert "(RGUI) Move menu_display_font_framebuffer to rgui.c"
This reverts commit 1a3ec1c3be.
2019-04-04 17:51:58 +02:00
twinaphex 1a3ec1c3be (RGUI) Move menu_display_font_framebuffer to rgui.c 2019-04-03 23:06:56 +02:00
twinaphex ca56e0e91d Don't grab these two variables for every blit_line call 2019-04-03 22:48:32 +02:00
bparker06 c8b9b4ef25 Update stdstring.h 2019-04-03 12:06:31 -04:00
twinaphex a5aa4d731b Use memset instead of bzero 2019-04-03 16:56:50 +02:00
Brad Parker ae12c30285 strcmp will always be faster 2019-04-03 10:41:19 -04:00
twinaphex ab33d16da1 Small cleanup 2019-04-03 16:33:16 +02:00
twinaphex 25ba8f4ab0 (GL1) GL1.x won't have mipmapping support 2019-04-03 16:13:01 +02:00
Twinaphex be7b845b6c Silence warning 2019-04-03 14:52:20 +02:00
twinaphex e0aa224575 (CoreAudio3) some cleanups 2019-04-03 14:48:18 +02:00
Twinaphex 637414c138 (CoreAudio3) Fix issues 2019-04-03 14:37:06 +02:00
Twinaphex 052137b027 (OSX) Silence warnings 2019-04-03 13:31:45 +02:00
Twinaphex 03381da506 Merge pull request #8538 from hizzlekizzle/master
don't alphabetize shader presets
2019-04-03 00:11:20 +02:00
Twinaphex 7e9c05c442 Merge pull request #8542 from fr500/patch-1
Update record_ffmpeg.c
2019-04-02 17:39:28 +02:00
Andrés 9739b181bf Update record_ffmpeg.c
small fix in recording presets
2019-04-02 08:47:35 -05:00
Tatsuya79 e7373a9cc2 dark theme pushbutton indicator fix 2019-04-02 01:49:30 +02:00
Tatsuya79 61fa0a0807 Move thumbnail type selection to grid footer. 2019-04-01 21:31:46 +02:00
Twinaphex 737989cce4 Merge pull request #8541 from jdgleaver/rgui-drop-shadows
(RGUI) Add optional shadow effects
2019-04-01 19:55:53 +02:00
jdgleaver 3c10731fbd (RGUI) Add optional shadow effects 2019-04-01 13:54:59 +01:00
Twinaphex 797f3226a7 Merge pull request #8540 from CozmoP/drivers
fix camera and location dropdown lists
2019-04-01 09:43:46 +02:00
CozmoP 224f925b3b fix camera and location dropdown lists 2019-04-01 02:07:08 +02:00
hizzlekizzle 255dc9d932 don't alphabetize shader presets
It makes it harder to edit them later.
2019-03-31 08:53:36 -05:00
meleu 6e730cf2dd update rcheevos files 2019-03-30 15:44:03 -03:00
Brad Parker 8639018976 use proper scaled radial deadzone calculation 2019-03-29 14:07:35 -04:00
Twinaphex 306653d069 Merge pull request #8535 from natinusala/master
ozone: fix content metadata for music and movie playlists
2019-03-29 12:41:01 +01:00
twinaphex 41eab46111 (C89) Buildfixes 2019-03-29 12:39:03 +01:00
natinusala a924ac15c9 ozone: fix content metadata for music and movie playlists 2019-03-29 10:08:12 +01:00
Twinaphex 0c91f4dff5 Merge pull request #8532 from natinusala/master
ozone: fix content metadata for images playlist
2019-03-29 01:02:02 +01:00
Twinaphex 98ef566473 Merge pull request #8533 from jdgleaver/log-dir-fix
Log to file: ensure log directory is always created
2019-03-29 01:01:39 +01:00
CozmoP 3fda353fbc Merge pull request #1 from Tatsuya79/patch-2
dark theme settings update
2019-03-28 19:21:00 +01:00
Tatsuya79 022f25df0c dark theme settings update 2019-03-28 18:21:55 +01:00
jdgleaver 4086826e92 Log to file: ensure log directory is always created 2019-03-28 11:27:26 +00:00
natinusala 2148f8ca0a ozone: fix content metadata for images playlist 2019-03-28 10:39:11 +01:00
Twinaphex 190cf1be97 Merge pull request #8530 from jdgleaver/rgui-inline-thumbs
(RGUI) Add inline playlist thumbnail support
2019-03-28 00:37:12 +01:00
Mark W. Kidd 8bbdf39cbf remove un-reviewed translation updates 2019-03-27 16:31:37 -04:00
jdgleaver c2122ed1d8 (RGUI) Add inline playlist thumbnail support 2019-03-27 16:29:23 +00:00
CozmoP bd6fedc0f2 Qt: WIP settings dialog 2019-03-27 02:37:34 +01:00
Mark W. Kidd 2e125cd608 update Chinese (Simplified) per asakous 2019-03-26 08:01:01 -04:00
Twinaphex 7c13e57468 Merge pull request #8527 from bparker06/analog
add analog deadzone and sensitivity options, rename axis threshold
2019-03-26 10:39:50 +01:00
Brad Parker e7891b8c1a add analog deadzone and sensitivity options, rename axis threshold 2019-03-25 23:22:19 -04:00
Twinaphex cc07982ee0 Merge pull request #8526 from jdgleaver/log-to-file-update
More 'Log to File' Additions
2019-03-25 23:57:53 +01:00
jdgleaver 2c65068be0 More 'Log to File' Additions:
- Add optional timestamped log files

- Handle errors if log file cannot be opened

- Android: flush log file immediately

- 3DS: log to file tested and fully working

- Default log paths added for all platforms
2019-03-25 17:22:59 +00:00
Mark W. Kidd f61cacd24c update Chinese (Traditional) per asakkous 2019-03-25 09:48:25 -04:00
meleu a77327d20e preventing "always false" alerts 2019-03-24 19:11:48 -03:00
Mark W. Kidd d017163612 update Russian translation per ofry 2019-03-24 14:23:38 -04:00
twinaphex cec06a0859 C89 buildfixes 2019-03-24 18:15:26 +01:00
meleu c66b866a87 OSD msg when using new cheevos implementation 2019-03-24 12:52:12 -03:00
meleu dda6716926 more namespacing work & del rcheevos/test/* files 2019-03-24 12:51:47 -03:00
Twinaphex fcd55d871e Merge pull request #8522 from stellarporter/blargg
gfx video filters: blargg ntsc snes conflicts
2019-03-24 16:11:30 +01:00
Twinaphex 5b835614d4 Merge pull request #8524 from jdgleaver/rgui-thread-fix
(RGUI) Fix deadlock when changing menu aspect with threaded video enabled
2019-03-24 16:11:08 +01:00
jdgleaver 4d2c35f6fe (RGUI) Fix deadlock when changing menu aspect with threaded video enabled 2019-03-24 12:41:05 +00:00
stellarporter 11e4b0b6ef gfx video filters: blargg ntsc snes conflicts
emscipten: avoid global symbol multiply defined error (core compiling its own snes_ntsc.c library)
2019-03-23 20:22:21 -05:00
Mark W. Kidd 5ba97fbcb2 use more natural Playlist term in German 2019-03-23 12:44:37 -04:00
Mark W. Kidd 6abaded373 spanish fixes per alfrix 2019-03-23 12:34:37 -04:00
Twinaphex 4258836422 Merge pull request #8520 from rsn8887/master
[VITA] Bluetooth mouse and keyboard support
2019-03-23 06:59:43 +01:00
rsn8887 28ef222886 [VITA] Bluetooth mouse and keyboard support 2019-03-22 21:32:59 -05:00
Twinaphex 123cd67a6a Merge pull request #8486 from huwpascoe/rxml
Re-enable RXML and purge libxml
2019-03-23 03:25:32 +01:00
Twinaphex 586192c431 Merge pull request #8517 from barbudreadmon/patch-3
Add glsym private
2019-03-22 17:10:01 +01:00
Mark W. Kidd e8dc6b8c3e german translation fixes per m4xw 2019-03-22 12:07:39 -04:00
barbudreadmon b9b9464652 Add glsym private
Allows core developpers to add their own definitions when working with glsm. 2 things needed : 
- enable the `HAVE_GLSYM_PRIVATE` define
- create a glsym_private.h with your logic
You can find an example of usage at https://github.com/libretro/yabause/tree/yabasanshiro/yabause/src/libretro
2019-03-22 17:04:17 +01:00
Mark W. Kidd 04e87a00db update PLAYLIST_DIRECTORY & PLAYLIST_ENTRY_RENAME 2019-03-22 11:33:16 -04:00
Mark W. Kidd 9b9b1e6b9c update MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_REMOVE 2019-03-22 10:26:51 -04:00
Mark W. Kidd 961e435317 update MENU_ENUM_SUBLABEL_SCAN_XX strings 2019-03-22 08:17:33 -04:00
Mark W. Kidd dcd9860e80 update MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY 2019-03-22 08:17:32 -04:00
Mark W. Kidd 8771e5b958 use PLAYLISTS_TAB enum instead of COLLECTION_LIST 2019-03-22 08:17:31 -04:00
Twinaphex 194a675448 Merge pull request #8511 from jdgleaver/log-to-file-additions
Log to file improvements
2019-03-21 18:37:07 +01:00
jdgleaver 93506a0d18 Log to file improvements 2019-03-21 16:57:54 +00:00
Brad Parker 538576e6f9 update JP translation 2019-03-20 21:20:59 -04:00
Twinaphex b518e639b6 Merge pull request #8509 from fjtrujy/master
[PS2] Remove the parallel compilation in the distribution scripts
2019-03-20 22:37:12 +01:00
Francisco Javier Trujillo Mata 677d65bf8d Remove the parallel compilation for PS2 in the dist-scripts 2019-03-20 22:32:12 +01:00
Twinaphex 231e310ea1 Merge pull request #8508 from libretro/revert-8504-patch-3
Revert "Update french translation"
2019-03-20 22:30:51 +01:00
Twinaphex 1f9928c677 Revert "Update french translation" 2019-03-20 22:30:39 +01:00
twinaphex be9a8c0e18 Buildfix 2019-03-20 18:00:14 +01:00
Twinaphex dc46bea45a Merge pull request #8504 from bubuleur/patch-3
Update french translation
2019-03-20 17:46:40 +01:00
Twinaphex 5d3233c1d5 Merge pull request #8506 from jdgleaver/rgui-int-scale-fix
(RGUI) Overhaul 'Lock Menu Aspect Ratio' option
2019-03-20 16:25:13 +01:00
Twinaphex 9fa8730023 Merge pull request #8505 from jdgleaver/rgui-wii-buildfix
(RGUI) Wii build fix
2019-03-20 16:11:24 +01:00
jdgleaver f114e14d48 (RGUI) Overhaul 'Lock Menu Aspect Ratio' option 2019-03-20 13:41:27 +00:00
jdgleaver 9f93ec1077 (RGUI) Wii build fix 2019-03-20 09:46:18 +00:00
bubuleur c168835c5f Update msg_hash_fr.h 2019-03-20 09:56:16 +01:00
bubuleur 513273e3f2 Update french translation 2019-03-20 09:44:28 +01:00
Twinaphex 7b9fcfd280 Merge pull request #8503 from orbea/caca
Fix caca warning.
2019-03-20 05:59:57 +01:00
orbea 3fb4ed753d Fix caca warning.
One too many lines were removed in
commit f67bfa24ef.
2019-03-19 21:54:51 -07:00
Twinaphex c5d9a69ae7 Merge pull request #8500 from rsn8887/master
[LIBNX] Fix USB keyboard support for controlling Vice core and Menu
2019-03-20 02:29:23 +01:00
rsn8887 5aa0d17659 [LIBNX] Fix USB keyboard support for controlling Vice core and Menu 2019-03-19 19:49:45 -05:00
meleu d444044fde decrease log massive verbosity when leaderboard is active 2019-03-19 21:19:08 -03:00
meleu 4506a58e31 update rcheevos files 2019-03-19 21:13:10 -03:00
meleu a5acd559d6 namespace both cheevos implementations & add a runtime setting to allow debugging 2019-03-19 21:13:10 -03:00
Twinaphex 469a65b55e Merge pull request #8498 from rsn8887/master
[LIBNX] USB mouse support
2019-03-20 01:01:01 +01:00
rsn8887 208a68b528 [LIBNX] USB mouse support 2019-03-19 18:44:12 -05:00
Twinaphex 7646757faf Merge pull request #8496 from jdgleaver/rgui-widescreen
(RGUI) Add widescreen support
2019-03-19 16:13:34 +01:00
jdgleaver 8336163112 (RGUI) Ensure update is immediate when changing 'Menu Aspect Ratio' 2019-03-19 15:10:14 +00:00
Twinaphex 51af4330eb Merge pull request #8494 from rsn8887/master
[LIBNX] USB keyboard support (tested working in Dosbox core and Caprice32 core)
2019-03-19 16:09:37 +01:00
twinaphex cd75045792 Simplify video_driver_frame - simplify FPS reporting printout 2019-03-19 16:03:19 +01:00
jdgleaver b10901e6b9 Fix 'Multiplication result converted to larger type' alert 2019-03-19 14:42:52 +00:00
rsn8887 f943688dff [LIBNX] USB keyboard support 2019-03-19 08:43:46 -05:00
jdgleaver a17f0e2136 (RGUI) Allow text to be centred when selecting widescreen layouts 2019-03-19 13:11:00 +00:00
jdgleaver e72c67bf87 (RGUI) Add widescreen support 2019-03-19 11:49:53 +00:00
twinaphex 4fb95db80b Simplify video_driver_frame 2019-03-19 04:32:36 +01:00
Twinaphex 18803479ac Merge pull request #8425 from fr500/master
Log to file
2019-03-19 01:19:18 +01:00
twinaphex 46dc4508f4 Buildfix for Cg 2019-03-18 16:32:46 +01:00
twinaphex 794f9c8968 (GL) Add comments 2019-03-18 16:02:28 +01:00
twinaphex 7c93da1360 (GL2) Simplifications 2019-03-18 15:57:43 +01:00
twinaphex 819016b00c Move video_shader_driver_init to gl.c 2019-03-18 15:52:21 +01:00
twinaphex 27928081cf Cleanups 2019-03-18 15:27:37 +01:00
twinaphex f67bfa24ef Get rid of video_poke_interface set_mvp 2019-03-18 15:19:11 +01:00
Twinaphex 399cfe67f4 Merge pull request #8491 from natinusala/master
ozone: use new button icons in footer
2019-03-18 14:39:46 +01:00
natinusala e94c8a762d ozone: use new button icons in footer 2019-03-18 12:59:23 +01:00
twinaphex fe1255094f Get rid of now unused set_coords in video_driver_poke_interface 2019-03-18 05:04:23 +01:00
twinaphex 03641f2378 (GL1) Cleanups 2019-03-18 04:50:50 +01:00
twinaphex ab814efc62 (GL raster font) Don't have to call video_driver_set_coords/
video_driver_set_mvp anymore
2019-03-18 04:46:27 +01:00
twinaphex 8361253b52 (GL menu display driver) Don't go through
video_driver_set_coords/video_driver_set_mvp
2019-03-18 04:39:54 +01:00
radius 2acfe9cb6a fix 2019-03-17 14:28:18 -05:00
radius 0c2f5093b2 disable forced logging on android 2019-03-17 14:28:17 -05:00
radius 8fd0aedc56 add log to file settings 2019-03-17 14:28:17 -05:00
Brad Parker a8a06d498c gl1: fix matrix not loading when threaded video is on 2019-03-17 12:46:01 -04:00
Twinaphex cd5e844ee4 Merge pull request #8487 from fjtrujy/master
[PS2] Compiling issues for IRX files
2019-03-17 13:46:34 +01:00
Francisco Javier Trujillo Mata 69087727e9 fix issues executing makefile in a bash script 2019-03-17 13:36:40 +01:00
Huw Pascoe 45069537fb Re-enable RXML and purge libxml
Fixed rxml to work with griffin.c
2019-03-17 03:04:35 +00:00
Twinaphex 4bb7054f8c Merge pull request #8485 from fjtrujy/master
[PS2] CDFS Improvements
2019-03-16 16:00:36 +01:00
Francisco Javier Trujillo Mata b1846ee449 [PS2] CDFS Improvements 2019-03-16 15:32:11 +01:00
Twinaphex 88ea33bbd2 Update CHANGES.md 2019-03-16 03:48:48 +01:00
Twinaphex 2d838a7e76 Merge pull request #8482 from fjtrujy/feature/CDFSSupport
[PS2] CDFS Support
2019-03-15 22:19:14 +01:00
Francisco Javier Trujillo Mata 8d1adbc6ee Cleaning no needed functions and library 2019-03-15 20:19:14 +01:00
Francisco Javier Trujillo Mata adf2743464 Implement CDFS and custom file descriptor support 2019-03-15 20:19:14 +01:00
Francisco Javier Trujillo Mata da86549b8e Add libcdvd library 2019-03-15 20:19:14 +01:00
Francisco Javier Trujillo Mata 4c24a17119 Extract IRX variables 2019-03-15 20:19:14 +01:00
Francisco Javier Trujillo Mata f75f8482f8 Use bin2c for compiling IRX 2019-03-15 20:19:14 +01:00
Twinaphex 1dc0d43f68 Merge pull request #8481 from jdgleaver/ozone-thumb-fix
(Ozone) Fix thumbnail display issues
2019-03-15 18:13:52 +01:00
jdgleaver d1e457115c (Ozone) Fix thumbnail display issues 2019-03-15 17:01:26 +00:00
Twinaphex 5661c29409 Merge pull request #8480 from Themaister/master
glcore: Set frame count in shader interface.
2019-03-15 16:28:44 +01:00
Themaister e3a88e8806 glcore: Set frame count in shader interface. 2019-03-15 15:36:18 +01:00
Twinaphex 5919171181 Merge pull request #8479 from jdgleaver/strlcpy-checks
strlcpy() safety checks
2019-03-15 15:21:10 +01:00
jdgleaver 4834119963 strlcpy() safety checks 2019-03-15 14:14:06 +00:00
Twinaphex bf89c4bd3d Merge pull request #8478 from natinusala/master
ozone: prevent content metadata from lagging
2019-03-15 15:01:50 +01:00
natinusala 6807f1b9bb ozone: prevent content metadata from lagging 2019-03-15 14:45:15 +01:00
Twinaphex 35aacadd23 Merge pull request #8477 from natinusala/master
ozone: fix horizontal animation when refreshing the menu
2019-03-15 14:25:28 +01:00
natinusala 27c1dd4b7b ozone: fix horizontal animation when refreshing the menu 2019-03-15 14:21:58 +01:00
Twinaphex 3adc9fce13 Merge pull request #8473 from natinusala/master
ozone: show metadata name if content logging is disabled
2019-03-15 12:50:34 +01:00
Twinaphex 7fa513be08 Merge pull request #8475 from jdgleaver/xmb-icon-fix
(XMB) Fix display glitches when refreshing current menu
2019-03-15 12:43:58 +01:00
jdgleaver 26f7503959 (XMB) Fix display glitches when refreshing current menu 2019-03-15 11:27:49 +00:00
natinusala 1a4786a7f1 ozone: show metadata name if content logging is disabled 2019-03-15 11:16:35 +01:00
Brad Parker 145013074e android buildfix 2019-03-14 21:26:39 -04:00
twinaphex 6f284a1d43 Build fix 2019-03-15 01:08:09 +01:00
Brad Parker c9dca9cdf1 Update CHANGES.md 2019-03-14 19:34:51 -04:00
Brad Parker 15e489fd0a android: allow stylus/pen to move mouse without pressing down 2019-03-14 19:33:51 -04:00
Brad Parker 2f659e3e17 style nits 2019-03-14 19:33:02 -04:00
twinaphex c8eb85ec2e Implement gl_core_wrap_type_to_enum 2019-03-14 20:04:04 +01:00
Twinaphex b7fb66b24e Merge pull request #8470 from hhromic/libchdr
(libchdr) Use int types and format aligned to the `chd_header` typedef
2019-03-14 19:46:45 +01:00
Hugo Hromic 0cfefdd2a8 (libretro-common/libchdr) Use int types and format aligned to the chd_header typedef 2019-03-14 18:12:10 +00:00
twinaphex a68072e293 Buildfix for C89_BUILD 2019-03-14 18:14:32 +01:00
Twinaphex f2398280e0 Merge pull request #8468 from natinusala/master
ozone thumbnails improvements
2019-03-14 17:39:36 +01:00
Twinaphex d415d4eb23 Merge pull request #8469 from hhromic/various-fixes
Fix C89 build and silence warnings
2019-03-14 17:39:18 +01:00
natinusala 44db578691 ozone: fix content metadata update 2019-03-14 17:31:48 +01:00
Hugo Hromic 794f4a6b34 (libretro-common/libchdr) Silence warnings in C89 build 2019-03-14 16:22:22 +00:00
Hugo Hromic b10a318f16 (dispserv_x11.c) Silence warning 2019-03-14 16:13:09 +00:00
Hugo Hromic 1233c9d0dc (command.c) Silence warning in C89 build 2019-03-14 16:12:56 +00:00
Hugo Hromic 136c08a4bb (x11_common.c) Fix C89 build 2019-03-14 16:09:34 +00:00
natinusala 43b1768ee7 ozone: use menu_thumbnail for thumbnails 2019-03-14 16:56:07 +01:00
natinusala f50567d340 ozone: fix thumbnails position and size 2019-03-14 16:23:08 +01:00
natinusala d65068cf15 ozone: new content metadata layout 2019-03-14 16:23:08 +01:00
natinusala 53268540f8 ozone: fix crash 2019-03-14 16:23:08 +01:00
Twinaphex 35be34eb32 Merge pull request #8292 from markwkidd/patch-8
use "Playlist" rather than "Collection" in UI strings
2019-03-14 15:29:34 +01:00
twinaphex 643cd1923e CXX_BUILD / C89_BUILD buildfixes 2019-03-14 14:14:44 +01:00
Twinaphex dc8590a6e5 Merge pull request #8467 from jdgleaver/rgui-mixed-content-thumbs
(RGUI/XMB) Enable thumbnail display on mixed content playlists (history, favourites, etc.)
2019-03-14 13:51:15 +01:00
bparker06 970404dc28 ios buildfix 2019-03-14 08:37:52 -04:00
jdgleaver 28bb7c67af (RGUI/XMB) Enable thumbnail display on mixed content playlists (history, favourites, etc.)
Move thumbnail path handling code to reusable menu_thumbnail_path.h/.c file

(XMB) Bug fixes:

- Show thumbnails correctly when 'Show associated cores in playlists' is enabled

- Prevent each thumbnail from being loaded twice (!) when changing current selection
2019-03-14 11:53:16 +00:00
Brad Parker 8064672f11 gl: set shader data to null after deinit 2019-03-13 16:22:04 -04:00
Brad Parker 79d0870526 Qt: fix shader file filter 2019-03-13 16:18:24 -04:00
twinaphex d744ed4666 Reimplement video_shader_is_supported 2019-03-13 20:39:36 +01:00
twinaphex 57e11a10e7 Reimplement video_shader_get_type_from_ext 2019-03-13 20:32:19 +01:00
Twinaphex 4c29f3102f Merge pull request #8464 from orbea/cxx_linker
Add a missing NEED_CXX_LINKER for the glcore video driver.
2019-03-13 20:16:52 +01:00
twinaphex 190e6316e3 Replace more instances of get_type_from_ext 2019-03-13 20:12:32 +01:00
orbea 7e96595894 Add a missing NEED_CXX_LINKER for the glcore video driver. 2019-03-13 11:59:53 -07:00
twinaphex 456452f1b7 Reimplement shader extension filtering 2019-03-13 19:51:33 +01:00
Brad Parker 97247dbaec gl1: check for vender/renderer was in the wrong place 2019-03-13 14:44:03 -04:00
Twinaphex b68764862d Merge pull request #8463 from Themaister/master
Fix uniform override mistake in GLcore shader stack
2019-03-13 19:31:29 +01:00
Themaister beff1144f6 Fix uniform override mistake in glcore shader stack.
glGetUniformLocation returned -1 after 0, and dropped uniforms on the
floor.
2019-03-13 18:28:05 +01:00
Themaister ecc7bc0cf2 Fix compile error and flag errors on X/Wayland. 2019-03-13 18:27:44 +01:00
Brad Parker 77c8688d6a android: bump msvc project to api level 26 2019-03-13 12:28:14 -04:00
twinaphex 3691f4fabf Fix CXX_BUILD errors 2019-03-13 17:00:52 +01:00
twinaphex 83be5a1950 C89_BUILD fixes 2019-03-13 16:57:13 +01:00
bparker06 5e49a683ec Update CHANGES.md 2019-03-13 10:30:11 -04:00
Twinaphex dd5eca0f46 (OSX) Buildfix 2019-03-13 14:31:03 +01:00
twinaphex b347b26d61 Reimplement shader flags being set - GL core should have only
Slang support and no GLSL, with the GL2 driver it is dependent
on the context driver
2019-03-13 14:06:50 +01:00
Twinaphex a8a7fba2ca Merge pull request #8450 from Exvat/switch-rumble
Add rumble support for the switch
2019-03-13 12:28:05 +01:00
twinaphex cd77093588 Reimplement gl2_get_flags to no longer be reliant on shader driver's
get flags implementation
2019-03-13 12:12:02 +01:00
Twinaphex 1a8b185c5e Merge pull request #8455 from Tatsuya79/patch-1
glcore, fix rotation
2019-03-13 11:38:41 +01:00
Twinaphex b468592097 Merge pull request #8452 from natinusala/ozone-thumb-fix
Ozone thumbnails display fix + add menu widgets notice in configure
2019-03-13 11:36:06 +01:00
Twinaphex ae35484eea Merge pull request #8456 from phcoder/kbd
Fix keyboard on android
2019-03-13 11:35:27 +01:00
Twinaphex 6a31f87a85 Merge pull request #8457 from phcoder/kbdwl
wayland: fix keyboard handling.
2019-03-13 11:34:26 +01:00
Twinaphex 062a307b09 Merge pull request #8458 from phcoder/kbd102
input_keymaps: Add 102nd key
2019-03-13 11:34:16 +01:00
twinaphex de4e9b9fcc Only show 'update shaders' options based on what the video driver and
underlying shader driver/context driver supports
2019-03-13 11:27:25 +01:00
twinaphex 191d0c0309 Add get_flags to GL shader interface 2019-03-13 11:21:00 +01:00
twinaphex 365053266f Add more flags 2019-03-13 11:04:52 +01:00
natinusala 3a9a9df218 ozone: fix collapsed sidebar breaking on context reset 2019-03-13 10:29:29 +01:00
natinusala c1c71f35db ozone: fix is_playlist, fix thumbnails display 2019-03-13 10:25:36 +01:00
natinusala 76d0b4ebd5 Add a menu widgets notice in configure 2019-03-13 10:25:27 +01:00
Brad Parker 4db2bc3354 Update CHANGES.md 2019-03-13 03:33:05 -04:00
Brad Parker 44a06d69a6 android: add gamepad rumble support 2019-03-13 03:32:18 -04:00
twinaphex 2c024f400e Start hooking up extra shader capability stats - not done yet 2019-03-13 00:54:11 +01:00
Brad Parker 5e684da3d2 Update CHANGES.md 2019-03-12 19:44:10 -04:00
Vladimir Serbinenko 2d56ceedfd input_keymaps: Add 102nd key 2019-03-12 23:52:50 +01:00
Vladimir Serbinenko 2d5715b807 wayland: fix keyboard handling.
This bug interferes with my BK-0010 libretro port.
2019-03-12 23:49:46 +01:00
Vladimir Serbinenko fa1603127f Fix keyboard on Android
This bug interferes with my BK-0010 libretro port.
2019-03-12 23:45:52 +01:00
Tatsuya79 16681653b4 glcore, fix rotation 2019-03-12 22:32:47 +01:00
twinaphex 3d06b4aee2 Add comment about hack 2019-03-12 21:47:35 +01:00
Twinaphex 911a6a905b Merge pull request #8454 from cold-brewed/macosgltempfix
(macOS) Add temporary GL hack
2019-03-12 21:44:36 +01:00
Twinaphex 885b9cb9b7 Merge pull request #8453 from bparker06/device_vibrate
add device vibration option for cores that support rumble
2019-03-12 20:26:09 +01:00
Brad Parker 954c54baee add device vibration option for cores that support rumble (with initial android implementation) 2019-03-12 13:07:16 -04:00
Exvat e7bf2a345c Add rumble support for the switch 2019-03-11 19:33:02 -07:00
cold-brewed 8a6de4adfb (macOS) Add temporary GL hack 2019-03-11 19:16:59 -04:00
twinaphex 34f4d5ed0e Cleanups 2019-03-11 18:33:24 +01:00
twinaphex 03ba1153a4 Prevent more HAVE_NETWORKING handling errors 2019-03-11 18:04:06 +01:00
twinaphex 6ba6f9e3ec (D3D9) Some buildfixes for C89 2019-03-11 17:07:49 +01:00
twinaphex 3ddbb0bc4a Add HAVE_NETWORKING ifdefs 2019-03-11 16:59:17 +01:00
Twinaphex 82ce70eab8 Merge pull request #8446 from natinusala/master
ozone: more fixes
2019-03-11 16:48:52 +01:00
natinusala b193bb7fb8 ozone: add core name wrapping for content metadata 2019-03-11 16:41:07 +01:00
natinusala 51cf8b6bfe ozone: fix the no thumbnail available message position 2019-03-11 16:28:54 +01:00
natinusala 89c8239ecb ozone: fix sublabels again 2019-03-11 16:28:54 +01:00
twinaphex e961dadc94 Enable HAVE_OPENGL1 by default - will return to this in case there
are issues with it
2019-03-11 15:10:42 +01:00
Twinaphex 7d9c7ba1f7 Merge pull request #8445 from jdgleaver/runtime-log-dir
Enable configuration of runtime log directory
2019-03-11 15:03:52 +01:00
Twinaphex 3ab981f292 Merge pull request #8444 from natinusala/master
ozone: thumbnails support and various improvements
2019-03-11 15:03:13 +01:00
twinaphex 104508a29c (GL core) Fix menu widgets 2019-03-11 14:57:25 +01:00
natinusala bfe4b444af Adjust PL_LABEL_SPACER_MAXLEN following the ozone spacer removal 2019-03-11 14:48:35 +01:00
natinusala a60cc08063 ozone: adjust playtime condition 2019-03-11 14:35:46 +01:00
natinusala 75190c9226 ozone: cleanup 2019-03-11 13:58:24 +01:00
natinusala e3907f2380 ozone: add Y and X to hint bar 2019-03-11 13:58:24 +01:00
natinusala eb7797daa5 ozone: fix sublabels wrapping 2019-03-11 13:58:24 +01:00
natinusala f06d955996 ozone: rename and hide some thumbnails settings 2019-03-11 13:58:24 +01:00
natinusala 222b7e7be0 ozone: complete content metadata section 2019-03-11 13:58:24 +01:00
natinusala adb8714105 ozone: add a no thumbnail available icon 2019-03-11 13:58:24 +01:00
natinusala 57dd10b5eb ozone: first pass of thumbnails support 2019-03-11 13:58:24 +01:00
natinusala ddc21520dc ozone: fix ticker length 2019-03-11 13:58:24 +01:00
natinusala 6ec86d65c5 ozone: make the sidebar collapse only if the highlight is in the main entries 2019-03-11 13:58:24 +01:00
natinusala 409db3b1c2 ozone: add right sidebar capability 2019-03-11 13:58:24 +01:00
natinusala 279a2d58db ozone: add a setting to have the sidebar always collapsed 2019-03-11 13:58:24 +01:00
natinusala be47416f84 ozone: add collapsing sidebar in playlists 2019-03-11 13:57:58 +01:00
jdgleaver c05548e2ab Enable configuration of runtime log directory 2019-03-11 12:52:13 +00:00
Twinaphex fb6a403220 Merge pull request #8442 from bparker06/vibrate_on_keypress
android: add option to vibrate on touch
2019-03-11 13:30:02 +01:00
Brad Parker f6dc7f4f02 android: add option to vibrate on touch 2019-03-10 21:36:52 -04:00
Twinaphex 75102a435f Merge pull request #8437 from DSkywalk/master
X11 auto-repeat event fixed
2019-03-10 23:17:53 +01:00
Twinaphex 031bcf8cbc Merge pull request #8427 from Themaister/master
Add a new "glcore" driver with slang support.
2019-03-10 23:16:38 +01:00
Twinaphex 0ff2832e83 Merge pull request #8438 from bparker06/netplay_toggle
add hotkey to toggle netplay hosting
2019-03-10 23:16:21 +01:00
Brad Parker ed5bd8023e Bliss-Box: add PSX Jogcon ID 2019-03-09 18:04:03 -05:00
Brad Parker 19ced73596 add hotkey to toggle netplay hosting 2019-03-09 17:48:03 -05:00
Brad Parker 4bb81bbb1b add F10 hotkey to send debug info, fix F3 hotkey for FPS toggle when inside menu 2019-03-09 16:03:17 -05:00
David Skywalker 83e7fda272 sorry, fixed typo. 2019-03-09 21:29:21 +01:00
Themaister 1d0b3b96e6 Be a bit more pedantic about which contexts are active. 2019-03-09 20:53:29 +01:00
David Skywalker 46036894d4 fix x11 auto-repeat event 2019-03-09 19:06:01 +01:00
Brad Parker 99035dbb0a debuginfo: show firmware files that exist 2019-03-09 12:57:26 -05:00
Twinaphex c7213c81e3 Merge pull request #8434 from jdgleaver/playlist-db-name
Populate crc32 and db_name fields when adding history/favourites playlist entries
2019-03-09 15:47:47 +01:00
Twinaphex 300e67a133 Merge pull request #8431 from jdgleaver/playlist-show-core-redux
Allow core name to be hidden on history/favorites playlists
2019-03-09 15:46:37 +01:00
jdgleaver dc8ef72323 Populate crc32 and db_name fields when adding history/favourites playlist entries
playlist.c: Fix silly range check error
2019-03-09 13:58:53 +00:00
Themaister 37298876fc Clear out FBO on startup.
Some cores seem to rely on it?
2019-03-09 13:15:14 +01:00
Themaister 1ba8c626ed Minor build fixes. 2019-03-09 12:42:23 +01:00
Themaister 4bb17fd6e9 Fix wrong condition for hard sync. 2019-03-09 12:42:11 +01:00
Themaister a4e35634e0 Fixup some casts for CXX_BUILD. 2019-03-09 12:34:55 +01:00
Themaister 07bf62eaba GLcore: Actually bind depth/stencil RT to HW fbo. 2019-03-09 12:30:49 +01:00
Themaister d9b245ce66 Swap order of drivers gl2/glcore. 2019-03-09 12:30:49 +01:00
Themaister 74039617ce Use correct context flags. 2019-03-09 12:30:49 +01:00
Themaister 4adf16b5ed Fix version detection for non-HW cores. 2019-03-09 12:30:49 +01:00
Themaister eb374e6b58 Fix portability hazard in qb/. 2019-03-09 12:30:49 +01:00
Themaister 3029f96511 Add a new "glcore" driver with slang support.
This driver should sunset the old gl2 driver, but that driver will
likely live on to support really ancient and terrible GL stacks.
All the worst legacy cruft has been ripped out, and it's almost a decent
backend now.

Requirements for slang are GL 3.2+ or GLES3.
Some shaders require features which are not directly compatible with
GLES2 or legacy GL.

This driver shares a lot of concepts from the Vulkan driver.
The slang shader stack and SPIRV-Cross are used to implement the shader
spec, and the menu shaders are also shared with Vulkan.
2019-03-09 12:30:49 +01:00
jdgleaver 89220ec4b5 Allow core name to be hidden on history/favorites playlists (without enabling playlist sublabels) 2019-03-08 12:52:23 +00:00
Twinaphex f4e6aaa4d8 Merge pull request #8429 from bparker06/send_debug
add "Send Debug Info" option under Help
2019-03-08 05:17:04 +01:00
Brad Parker 9279d06f93 Merge branch 'master' into send_debug 2019-03-07 19:23:41 -05:00
Brad Parker 10df615d14 add "Send Debug Info" option under Help 2019-03-07 19:17:54 -05:00
Twinaphex 06e2ab7bb0 Merge pull request #8426 from jdgleaver/aggregate-runtime-logging
Add optional 'aggregate' runtime logging
2019-03-07 18:36:27 +01:00
Twinaphex 187f2fd6b1 Merge pull request #8428 from jdgleaver/core-display-name
Always use core 'display name' when populating playlists
2019-03-07 18:35:48 +01:00
jdgleaver 8a2cd64889 Always use core display name when populating playlists 2019-03-07 16:54:46 +00:00
jdgleaver 2c8d7bf5ed Add optional 'aggregate' runtime logging 2019-03-07 12:28:21 +00:00
twinaphex fe3be212b3 C89_BUILD buildfix 2019-03-07 06:46:39 +01:00
Twinaphex 58eed3322b Merge pull request #8424 from fjtrujy/master
[PS2] Fixed some memory leaks
2019-03-07 02:24:09 +01:00
Francisco Javier Trujillo Mata 652300f674 [PS2] Fixed memory leaks in the ps2_font 2019-03-07 00:14:59 +01:00
Francisco Javier Trujillo Mata 27ab4ac78b [PS2] Some audio improvements 2019-03-06 20:11:15 +01:00
Twinaphex 7f726fc1eb Merge pull request #8422 from Skarsnik/master
command.c, replace sprintf with snprintf
2019-03-06 18:23:36 +01:00
Twinaphex 646685f40b Merge pull request #8423 from jdgleaver/core-path-symlinks
Core Info: Use basename when searching core paths
2019-03-06 18:23:20 +01:00
jdgleaver 9bcc80320d Core Info: Use basename when searching core paths (fixes issues when core directory is on a symlinked filesystem) 2019-03-06 16:42:09 +00:00
Sylvain Colinet 064a979fbc command.c, replace sprintf with snprintf 2019-03-06 14:23:58 +01:00
Twinaphex fa5f2c61c3 Merge pull request #8420 from jdgleaver/runtime-wrong-content-fix
Runtime logging: Fix logging redirection bug when loading consecutive content
2019-03-06 13:59:22 +01:00
Twinaphex 6b742fb70e Merge pull request #8421 from Skarsnik/master
Network command interface : Refix the network command READ_CORE_RAM
2019-03-06 13:59:11 +01:00
Sylvain Colinet 587424e0ef Refix the network command READ_CORE_RAM to not crash on read supperior to 78 2019-03-06 13:40:25 +01:00
jdgleaver 7fd71c735f Runtime logging: Fix logging redirection bug when loading consecutive content 2019-03-06 12:24:35 +00:00
Twinaphex 334cc943cb Merge pull request #8412 from jdgleaver/add-to-favorites
Optimise 'Add to Favorites' option
2019-03-05 21:06:03 +01:00
Twinaphex c0a2e846a1 Merge pull request #8414 from jdgleaver/playlist-sorting-fix
Fix sorting of playlists with blank labels
2019-03-05 21:05:01 +01:00
Twinaphex 6f76e9e615 Merge pull request #8415 from fr500/master
fix streaming
2019-03-05 21:04:48 +01:00
radius eebe3ec0ec fix streaming 2019-03-05 14:34:03 -05:00
jdgleaver 822edd4487 Fix sorting of playlists with blank labels 2019-03-05 15:37:50 +00:00
jdgleaver 541cb42e5a Optimise 'Add to Favorites' option 2019-03-05 13:07:42 +00:00
Twinaphex eeaa34f024 Merge pull request #8409 from orbea/discord
Stop giant memory leak with --disable-discord and sixel.
2019-03-05 06:05:29 +01:00
orbea 8bc25472be Stop giant memory leak with --disable-discord and sixel. 2019-03-04 15:23:47 -08:00
Twinaphex 1414bffa8e Merge pull request #8399 from fjtrujy/master
[PS2] Implement Pitch support in the ps2_gfx
2019-03-04 19:46:23 +01:00
Twinaphex 26a8a7d391 Merge pull request #8406 from CozmoP/patch-1
Qt: use native separators when loading content from file browser.
2019-03-04 17:45:06 +01:00
CozmoP 02e37718e1 Qt: use native separators when loading content from file browser.
fixes #8403
2019-03-04 17:27:58 +01:00
Twinaphex bf8dcd17f3 Merge pull request #8405 from jdgleaver/runtime-log-fix
Runtime logging fixes
2019-03-04 17:20:50 +01:00
jdgleaver cfbec687e5 Make runtime independent of fast forward/slow motion 2019-03-04 15:30:12 +00:00
jdgleaver 8e74ff6122 Runtime logging fixes: ensure log is generated when runahead is enabled, and when closing cores 'internally' (RETRO_ENVIRONMENT_SHUTDOWN) 2019-03-04 11:33:19 +00:00
Twinaphex 84d6f6231d Merge pull request #8400 from fr500/master
fix discord launch arguments not working if RA was started from CWD o…
2019-03-03 19:53:27 +01:00
radius d22ce632e5 fix discord launch arguments not working if RA was started from CWD or similar scenarios 2019-03-03 13:09:21 -05:00
Francisco Javier Trujillo Mata 8316d073bc [PS2] Implement Pitch support in the ps2_gfx 2019-03-03 14:08:12 +01:00
Twinaphex 9ac7059d05 Merge pull request #8398 from mrjschulte/patch-2
fix iOS/tvOS build patch.
2019-03-03 04:57:58 +01:00
MrJs b0cc374185 fix iOS/tvOS build
if/else around retroarch/frontend/drivers/platform_darwin.m:743:4: Implicit declaration of function 'cpu_features_get_model_name' is invalid in C99
2019-03-02 18:51:36 -08:00
Twinaphex ebc8169b17 Merge pull request #8393 from jdgleaver/favorites-fix
Enable 'Add to Favorites' without loading a core
2019-03-03 02:59:10 +01:00
Twinaphex 5aecb345e5 Merge pull request #8397 from retro-wertz/fix_log
[LOG] Fix alignment
2019-03-03 02:58:54 +01:00
retro-wertz dcd76a0d2d [LOG] Fix alignment 2019-03-03 06:36:53 +08:00
Twinaphex 5cb2e9f54c Merge pull request #7883 from GregorR/netplay-share-policy
Different (more intuitive?) default netplay share policy
2019-03-02 18:54:19 +01:00
Twinaphex 58a71c0ae8 Merge pull request #8394 from fjtrujy/feature/FIOImprovements
[PS2] Files IOS improvements
2019-03-02 16:25:50 +01:00
Francisco Javier Trujillo Mata 6d2bba220f [PS2] Improvements with the device detection and different folder to save config 2019-03-02 16:06:36 +01:00
jdgleaver a8f2381155 Enable 'Add to Favorites' without loading a core 2019-03-02 14:08:48 +00:00
Twinaphex 389138197b Merge pull request #8390 from orbea/root2
Fix double root directory.
2019-03-02 05:43:26 +01:00
orbea ad7cb35d31 Fix double root directory.
Fixes https://github.com/libretro/RetroArch/issues/8385

Regression after https://github.com/libretro/RetroArch/commit/5fcedc86195c9b1b8a79c7b5f9e59f9c5c46012b
2019-03-01 13:31:56 -08:00
Twinaphex 5e5c9e4729 Merge pull request #8386 from jdgleaver/runtime-log-integration
Finalise integration of per-content runtime logs
2019-03-01 18:11:47 +01:00
Brad Parker e0b75ec3fb fix a whole bunch of memory leaks 2019-03-01 12:05:14 -05:00
Brad Parker a09e110d24 VC6 cannot cast uint64 to double, use int64 instead 2019-03-01 09:10:05 -05:00
Brad Parker 24716bc367 griffin: fix inconsistent dll linkage warning 2019-03-01 09:09:37 -05:00
jdgleaver 33c27606d3 Finalise integration of per-content runtime logs (runtime sublabels on all playlists, 'last played' timestamp added to playlist sublablels,
content_runtime.lpl retired)
2019-03-01 14:06:40 +00:00
twinaphex 5cce51ed8d Move runtime_file to RetroArch 2019-03-01 01:22:35 +01:00
Twinaphex 0b63b7b499 Merge pull request #8381 from cold-brewed/coreaudio3enable
(macOS) Enable CoreAudio v3 driver for Metal
2019-03-01 01:09:56 +01:00
twinaphex 7998e7f4dc Add comment 2019-02-28 23:34:48 +01:00
Twinaphex 5827e3b3af Merge pull request #8382 from casdevel/i8326
Fix issue #8326
2019-02-28 23:26:53 +01:00
twinaphex ea68e82b1e Add comment 2019-02-28 23:25:48 +01:00
Brad Parker c606e8893c null check 2019-02-28 16:56:41 -05:00
Twinaphex 16b30d9ae8 Merge pull request #8377 from jdgleaver/persistent-runtime-log
Add persistent content runtime logging
2019-02-28 21:59:59 +01:00
Zoran Vuckovic 2b2903cfff Fix issue #8326 2019-02-28 21:56:38 +01:00
twinaphex abdbeade7b Expand some comments 2019-02-28 21:54:46 +01:00
twinaphex cc664e4d72 This should make Metal the default video driver now for the macOS Metal
build
2019-02-28 21:38:36 +01:00
cold-brewed 49304bbee3 (OSX) Enable CoreAudio v3 driver but do not make it the default 2019-02-28 14:49:38 -05:00
jdgleaver 5ddf0b948f Runtime logging: Fix xcode build errors 2019-02-28 16:00:32 +00:00
jdgleaver 5d8ea231be Use JSON format for runtime log files 2019-02-28 15:35:24 +00:00
Francisco Javier Trujillo Mata 43ff843757 [PS2] Now Files IO works for USBs and Hosts (net) 2019-02-28 14:19:16 +01:00
jdgleaver 3ffb52121c Move runtime logs to <playlist_dir>/logs 2019-02-28 11:09:37 +00:00
Twinaphex 2ab333e00f Merge pull request #8378 from fjtrujy/feature/analogSupport
[PS2] Analog support improvement
2019-02-27 20:22:45 +01:00
Francisco Javier Trujillo Mata 48d46dcc44 [PS2] Analog support improvement 2019-02-27 19:43:59 +01:00
jdgleaver 38c54eaebe Add persistent content runtime logging 2019-02-27 16:20:59 +00:00
twinaphex ebae7ebc79 Input driver - Get rid of 'own driver' mechanism 2019-02-27 17:17:34 +01:00
twinaphex 829aedc6e2 (Video/Audio) Remove 'own driver' mechanism 2019-02-27 17:09:15 +01:00
twinaphex 712115ef9d (Wifi/Location/Camera) Get rid of 'own driver' mechanism 2019-02-27 17:02:33 +01:00
twinaphex e709fd1ac6 Merge driver.c and retroarch.c 2019-02-27 16:47:39 +01:00
Brad Parker 433cbb021f temporary crash fix 2019-02-26 23:37:08 -05:00
Brad Parker 4ec71da9a9 x11: using_global_dpy is not restricted to xrandr 2019-02-26 23:37:08 -05:00
twinaphex d1dbf6fbe1 * The menu is now able to run at higher refresh rates than 60Hz
* Also added a new environment callback that a core can use to
query the display refresh rate
2019-02-27 04:44:04 +01:00
Twinaphex d619f14839 Merge pull request #8375 from fjtrujy/feature/PS2DefaultDir
[PS2] Fix Load/Save state
2019-02-27 02:58:03 +01:00
Brad Parker 211515ece1 x11: open display ourself if global one is not available (e.g. with SDL) 2019-02-26 20:23:11 -05:00
Francisco Javier Trujillo Mata 3ec2ec2e11 Fix load state issue 2019-02-26 23:48:37 +01:00
Francisco Javier Trujillo Mata 0e7d5ed32b Improvements regarding the ps2 font driver 2019-02-26 21:02:29 +01:00
Francisco Javier Trujillo Mata 20aae8a3b7 Use CWD to get the DefaultDir 2019-02-26 18:47:20 +01:00
Twinaphex 0aa9df6acd Merge pull request #8371 from driver1998/msvc2017_arm_desktop
Add Windows ARM32 Desktop support
2019-02-26 15:40:54 +01:00
Twinaphex ce7355626f Merge pull request #8372 from swingflip/patch-2
fixed A7A7
2019-02-26 15:38:30 +01:00
Ryan 'Swingflip' Hamlin 0963b970a1 fixed A7A7 2019-02-26 14:30:35 +00:00
driver1998 33e65e10ba Add Windows MSVC2017 ARM desktop support
Only normal Debug/Release config will compile, not with QT/CG
Tested in Windows 10 on ARM and Windows RT
Cores can be compiled with platform=windows_msvc2017_desktop_arm
2019-02-26 21:29:44 +08:00
driver1998 6ea79bca36 Allow winraw and xinput to work without dinput in Windows
Necessary for Windows ARM32 Desktop (RT)
2019-02-26 21:29:43 +08:00
Twinaphex 7ddb876330 Merge pull request #8368 from natinusala/master
menu: add press quit twice setting
2019-02-25 20:51:36 +01:00
Twinaphex 37f536a915 Merge pull request #8369 from CozmoP/master
MSVC2017 Qt buildfix
2019-02-25 20:51:14 +01:00
CozmoP 20a96e2632 MSVC2017 Qt buildfix 2019-02-25 20:10:58 +01:00
natinusala 6b6f9ae678 menu: add press quit twice setting 2019-02-25 19:51:39 +01:00
twinaphex 0e66da3930 Dropdown list settings now apply immediately 2019-02-25 19:21:53 +01:00
Twinaphex 42922c9e60 Merge pull request #8367 from jdgleaver/rgui-aspect-fix
(RGUI) Fix 'Lock Menu Aspect Ratio' option when using custom viewports
2019-02-25 18:47:07 +01:00
jdgleaver 11488857ee (RGUI) Fix 'Lock Menu Aspect Ratio' option when using custom viewports 2019-02-25 16:24:16 +00:00
Twinaphex 6592325b67 Merge pull request #8364 from jdgleaver/rgui-dynamic-layout
(RGUI) Add 'full width' layout option
2019-02-25 16:43:09 +01:00
Twinaphex e3c8364f31 Merge pull request #8365 from jdgleaver/rgui-theme-fix
(RGUI) Ensure menu color theme is applied immediately
2019-02-25 16:42:30 +01:00
jdgleaver d683892b1f (RGUI) Ensure menu color theme is applied immediately 2019-02-25 13:22:44 +00:00
jdgleaver 448b780a8b (RGUI) Add 'full width' layout option 2019-02-25 12:24:59 +00:00
Twinaphex b40aa13418 Merge pull request #8349 from hhromic/fix-xrandr
(dispserv_x11.c) add missing defines and clean-up code
2019-02-24 14:48:19 +01:00
Twinaphex 77183b9e4c Merge pull request #8358 from hhromic/pr-fix
(rgui.c) fix build error due to broken PR
2019-02-24 14:32:46 +01:00
Hugo Hromic 9168f2a645 (rgui.c) fix build error due to broken PR
Fixes PR #8357
2019-02-24 13:26:07 +00:00
Twinaphex 409f9eb5b8 Merge pull request #8357 from hhromic/fixes
Couple of minor fixes
2019-02-24 14:02:57 +01:00
Hugo Hromic 147bd5e051 (rgui.c) silence warning in C89_BUILD
Fixes:

    menu/drivers/rgui.c: In function ‘rgui_render’:
    menu/drivers/rgui.c:1690:10: warning: ISO C90 forbids mixed
    declarations and code [-Wdeclaration-after-statement]
              menu_entry_t entry;
              ^~~~~~~~~~~~
2019-02-24 12:13:54 +00:00
Hugo Hromic b5368c9423 (menu_animation.c) Use semi-colon properly for TICKER_SPACER_DEFAULT
Defines should not have semi-colons. Correct the fix in 3cbae9c.
2019-02-24 12:13:54 +00:00
Brad Parker 1c9ac4e825 osx: add cpu model name 2019-02-23 17:29:08 -05:00
Brad Parker 1d0a9262ae osx buildfix 2019-02-23 16:57:11 -05:00
Brad Parker e22148fed4 show cpu model name in log, implemented for x86/64 on windows/linux so far 2019-02-23 16:50:42 -05:00
twinaphex f0d51596d1 Another buildfix 2019-02-23 22:15:03 +01:00
Hugo Hromic 8984702ba8 (dispserv_x11.c) add missing defines and clean-up code
* Removed redundant and unused variables
* Use multiples of eight for array sizes
* Styled code for consistency with the rest
* Quoted string arguments in shell commands
* Added missing `HAVE_XRANDR` define checks
2019-02-23 20:58:51 +00:00
Brad Parker 97b7512420 restore initial screen orientation on exit for x11/win32 2019-02-23 14:15:36 -05:00
Brad Parker 9493a4911e crash fix 2019-02-23 11:17:00 -05:00
twinaphex 3cbae9c767 Fix C89_BUILD errors 2019-02-23 15:04:36 +01:00
Twinaphex adc9ecf4cc Merge pull request #8335 from natinusala/master
Reintroduce menu widgets (only runloop_msg_queue for now)
2019-02-23 14:22:31 +01:00
Twinaphex 7210ec9a4b Merge pull request #8351 from hhromic/fix-warnings
(cheevos.c) silence warnings
2019-02-23 13:36:28 +01:00
Hugo Hromic 401588f3a5 (cheevos.c) silence warnings
* Enlarge arrays to acommodate all potential data
* Use co-routine field in for-loop
2019-02-23 11:36:40 +00:00
Brad Parker 76ca37aaee x11: implement screen orientation support 2019-02-22 19:13:36 -05:00
Brad Parker 4f0d61a2ac update copyright 2019-02-22 19:13:36 -05:00
Brad Parker 8e14d1dd87 whitespace 2019-02-22 19:13:36 -05:00
Brad Parker 477d46d52b update copyright 2019-02-22 19:13:36 -05:00
Twinaphex 6e971053fe Merge pull request #8346 from orbea/cmd
Silence unused function warning with --disable-networking.
2019-02-22 18:07:23 +01:00
Twinaphex 93adedccec Merge pull request #8347 from jdgleaver/playlist-display-cleanup
Standardise and improve playlist display
2019-02-22 18:07:10 +01:00
orbea 6f878fed91 Silence unused function warning with --disable-networking. 2019-02-22 07:28:17 -08:00
jdgleaver 4a26e4bc97 Standardise and improve playlist display 2019-02-22 15:23:10 +00:00
Brad Parker d2f73e3f33 Qt: fix couple memory leaks 2019-02-22 09:38:59 -05:00
twinaphex 292c5e93ad Add d3d9_menu_widgets_enabled 2019-02-22 03:13:41 +01:00
Twinaphex 0778847062 Merge pull request #8341 from fjtrujy/feature/PS2AudioImprovement
[PS2] Audio improvement
2019-02-22 01:48:43 +01:00
Francisco Javier Trujillo Mata 7ec160f860 Remove the specific audio thread 2019-02-22 00:01:36 +01:00
twinaphex 74a35d8be1 (GL2) Add GL1 fallback 2019-02-21 21:49:22 +01:00
Brad Parker 0cb6ed7b29 remove tabs 2019-02-21 15:38:18 -05:00
twinaphex eba1c474b5 Fix MSVC 2010 port 2019-02-21 21:34:22 +01:00
twinaphex a39bed3bb1 Silence warnings 2019-02-21 21:31:29 +01:00
natinusala a98cb75549 libnx: disable mesa errors to improve perf 2019-02-21 20:58:23 +01:00
natinusala 4d86030cc2 rgui: restore original ticker spacer 2019-02-21 20:58:22 +01:00
natinusala 6e20d216bd Avoid redefining the ticker spacer in each menu driver 2019-02-21 20:58:22 +01:00
natinusala 42325ea368 Reintroduce menu widgets, implement new runloop_msg_queue 2019-02-21 20:58:22 +01:00
Twinaphex 239f3febc6 Merge pull request #8339 from orbea/net
Silence implicit declaration warning.
2019-02-21 20:56:57 +01:00
orbea 95ed29fd7d Silence implicit declaration warning. 2019-02-21 11:38:00 -08:00
Brad Parker 99f4203abf win32: implement screen orientation support 2019-02-21 14:37:24 -05:00
Twinaphex 46c557f3a5 Merge pull request #8338 from fr500/master
fix [Config]: blah blah blah printing on the OSD on save configuration
2019-02-21 20:21:18 +01:00
radius 8936faf21f fix [Config]: blah blah blah printing on the OSD on save configuration
fix new configurations having two periods in the filename
2019-02-21 13:57:06 -05:00
Twinaphex 42adb37474 Merge pull request #8327 from jdgleaver/playlist-sublabels
Add optional playlist sublabels (associated core + play time, where available)
2019-02-21 18:59:28 +01:00
Twinaphex 2cd845469c Merge pull request #8333 from rlnilsen/contentscannerfalsepositives
Fix content scanner creating false positive playlist entries
2019-02-21 18:49:38 +01:00
Brad Parker d19970de5e whoops 2019-02-21 12:41:20 -05:00
Twinaphex e3a93ca96e Merge pull request #8337 from fr500/master
fix #7670 by checking threaded video
2019-02-21 18:05:49 +01:00
radius 814db2c44e fix #7670 by checking threaded video 2019-02-21 11:54:10 -05:00
twinaphex e6d5f427fc (D3D9) Add widgets function call 2019-02-21 17:09:08 +01:00
jdgleaver 1d0cee5fe5 Only parse runtime playlist when loading content history playlist (+ bugfixes to original runtime logging) 2019-02-21 15:50:48 +00:00
jdgleaver 0b04312412 Add optional playlist sublabels (associated core + play time, where available) 2019-02-21 15:50:48 +00:00
Twinaphex 44431ad227 Merge pull request #8334 from bparker06/orientation
add setting for screen orientation, with initial android implementation
2019-02-21 12:37:15 +01:00
Twinaphex 4cb102a64f Merge pull request #8332 from cold-brewed/strfix
Fix some buffer overflows in system information menu
2019-02-21 12:28:35 +01:00
Brad Parker f5f492845f add setting for screen orientation, with initial android implementation 2019-02-21 00:31:55 -05:00
cold-brewed fa8d486887 Fix buffer overflows in system information 2019-02-20 23:01:04 -05:00
rlnilsen e71b6d6d23 Fix content scanner creating false positive playlist entries that also have wrong label and crc32. 2019-02-21 04:24:07 +01:00
Brad Parker bc387a5848 convert tabs to spaces 2019-02-20 20:46:46 -05:00
Twinaphex d46a60bb2b Merge pull request #7874 from markwkidd/patch-7
unify input bind hold behavior across platforms
2019-02-21 01:50:13 +01:00
Francisco Javier Trujillo Mata cf68058e67 Fix issues with the GSFont 2019-02-21 00:38:56 +01:00
Francisco Javier Trujillo Mata 6507b86973 Fix freeze audio after restart core 2019-02-20 23:45:30 +01:00
Twinaphex 9508936ac1 Merge pull request #8315 from jdgleaver/sort-playlists
Make playlist sorting optional and consistent
2019-02-20 21:43:06 +01:00
Twinaphex 660951330c Merge pull request #8320 from jdgleaver/title-cleanup
Improve menu titles (collections, playlists, database info)
2019-02-20 21:16:40 +01:00
Twinaphex 80a21bcc9e Merge pull request #8323 from cold-brewed/encodingfix
Content downloader: Allow for spaces (and other characters) in directory names
2019-02-20 20:04:59 +01:00
bparker06 1abc0b3296 style nits 2019-02-20 13:50:49 -05:00
Twinaphex ba4d7f3ea3 Merge pull request #8328 from fjtrujy/feature/analogSupport
[PS2] Implemented analog support for ps2 controllers
2019-02-20 19:38:00 +01:00
Francisco Javier Trujillo Mata c147866562 Implemented analog support for ps2 controllers 2019-02-20 19:17:14 +01:00
cold-brewed 81cff95959 Use string_is_equal() due to unknown string size 2019-02-20 09:30:34 -05:00
cold-brewed ece17f6a61 Encode URLs to allow for spaces in directory names 2019-02-20 00:09:24 -05:00
jdgleaver e76fc2d487 Improve menu titles (collections, playlists, database info) 2019-02-19 17:08:12 +00:00
Twinaphex 59febcdb9c Merge pull request #8317 from jdgleaver/rgui-sanitise-sublabels
(RGUI) Sanitise menu sublabels
2019-02-19 17:51:45 +01:00
jdgleaver 7447434233 (RGUI) Only parse menu sublabels when changing selected entry 2019-02-19 13:33:11 +00:00
jdgleaver 834f1c1b23 (RGUI) Sanitise menu sublabels 2019-02-19 11:32:59 +00:00
Twinaphex 3cc17a63eb Merge pull request #8316 from fr500/master
C89 build fix
2019-02-19 11:15:18 +01:00
radius 964c4ec6e9 C89 build fix 2019-02-18 23:12:15 -05:00
Brad Parker 2582a802cd Makefile.griffin: add MMX where SSE is already defined 2019-02-18 15:29:11 -05:00
Twinaphex 16a5448f43 Merge pull request #8314 from jdgleaver/rgui-playlist-title
(RGUI) Improve playlist titles
2019-02-18 16:31:00 +01:00
jdgleaver e96b872693 Make playlist sorting optional and consistent 2019-02-18 15:09:19 +00:00
jdgleaver 8cca081719 (RGUI) Improve playlist titles 2019-02-18 10:38:02 +00:00
Twinaphex 905f67810c Merge pull request #8312 from bparker06/overlay
gl: draw OSD on top of overlay
2019-02-18 10:38:55 +01:00
Twinaphex e2e9739d09 Merge pull request #8313 from GregorR/netplay-3-player-stall-fix
Fix stall-out causing total disconnection with >2 players
2019-02-18 10:38:35 +01:00
Gregor Richards c0ed989738 Fix stall-out causing total disconnection with >2 players 2019-02-17 21:39:50 -05:00
Brad Parker 3a431adf02 gl: draw OSD on top of overlay 2019-02-17 18:51:19 -05:00
Twinaphex 45287628d4 Merge pull request #8311 from fjtrujy/feature/ImprovementPalette
[PS2] Improvement the use of the palette
2019-02-17 23:53:45 +01:00
Francisco Javier Trujillo Mata b8e2216dd4 Improvement the use of the palette 2019-02-17 23:29:16 +01:00
Twinaphex 998465d2fc Merge pull request #8307 from jdgleaver/rgui-playlist-core-name
(RGUI) Add option to hide associated cores in playlists
2019-02-17 18:56:21 +01:00
Twinaphex ff113534d9 Merge pull request #8308 from natinusala/master
font driver: expose line height
2019-02-17 18:55:57 +01:00
natinusala 631f9e6b8e font driver: expose line height 2019-02-17 16:54:24 +01:00
jdgleaver 2ceecd2ff1 (RGUI) Add option to hide associated cores in playlists 2019-02-17 14:39:14 +00:00
Twinaphex dfcb1efa26 Merge pull request #8305 from orbea/osx
Fix the osx travis build.
2019-02-17 13:19:00 +01:00
twinaphex 158a442036 Add further HAVE_OPENGL1 support 2019-02-17 10:42:16 +01:00
Brad Parker 542f2f4262 vc2005: fix MMX load instrinsics, add GL and ozone 2019-02-16 19:13:32 -05:00
orbea a111908f55 Fix the osx travis build. 2019-02-16 16:02:51 -08:00
Brad Parker 09d409d5cc pixconv: add MMX version of conv_rgba4444_argb8888 2019-02-16 18:43:22 -05:00
twinaphex cef04fc693 Makefile.msvc - add HAVE_OPENGL1 2019-02-16 21:39:12 +01:00
twinaphex 420f3a171b (GL1) Update - add HAVE_OPENGL1 to MSVC 2005/2008/2010/2012 2019-02-16 21:26:01 +01:00
Twinaphex 7784d240a8 Merge pull request #8302 from jdgleaver/ucn-conversion
Replace UCN identifiers with UTF-8 byte arrays
2019-02-16 20:50:50 +01:00
Brad Parker 1922d898af pixconv: add MMX version for conv_rgb565_argb8888 2019-02-16 12:51:13 -05:00
Mark W. Kidd 975b5738fb set default input bind hold time as 1 2019-02-16 11:19:10 -05:00
markwkidd 79be7b6913 use "playlist" rather than "collection" in UI 2019-02-16 10:48:03 -05:00
Twinaphex b617bb5d64 Merge pull request #8301 from CompCom/classic-makefile-fix
Fix Nintendo Classic build.
2019-02-16 14:01:51 +01:00
jdgleaver 3192bd018a Replace UCN identifiers with UTF-8 byte arrays + provide Apple fallback 2019-02-16 12:50:47 +00:00
twinaphex 691462e3d6 Change INT32 to int32_t 2019-02-16 10:52:40 +01:00
CompCom b0200a2efa Fix separators in classic a7 makefile. 2019-02-16 16:30:05 +11:00
CompCom 48e4848536 Disable alsa midi on classic(hakchi) builds. 2019-02-16 16:04:24 +11:00
CompCom 2dcc2d4df5 Merge remote-tracking branch 'swing/patch-1' into classic-makefile-fix
# Conflicts:
#	Makefile.classic_armv7_a7
2019-02-16 15:50:43 +11:00
Brad Parker f6a31b37a0 pixconv: typo in SSE2 ifdef 2019-02-15 19:58:49 -05:00
Brad Parker b451ca2121 Qt: add git version and build date to Help->About window 2019-02-15 16:41:52 -05:00
Brad Parker 5e177c75a5 add memory stats to more context drivers, use correct default variables for fps/stats/framecount/memory_show 2019-02-15 15:59:00 -05:00
Twinaphex 5bc8330548 Merge pull request #8299 from Themaister/master
Vulkan: Fix color issues with RGBA8888 swapchains in readback.
2019-02-15 20:40:34 +01:00
Themaister 3b9ad729fb Vulkan: Fix color issues with RGBA8888 swapchains in readback. 2019-02-15 20:30:08 +01:00
Twinaphex 0a8d20c9b9 Merge pull request #8298 from orbea/cxx
Fix CXX_BUILD.
2019-02-15 19:51:02 +01:00
Twinaphex 4cbaffcdc7 Merge pull request #8296 from orbea/c89
Silence C89 warnings.
2019-02-15 19:50:50 +01:00
Ryan 'Swingflip' Hamlin 1263663fae Update Makefile.classic_armv7_a7 2019-02-15 18:31:48 +00:00
orbea f4a374a209 Fix CXX_BUILD. 2019-02-15 09:36:25 -08:00
orbea 2a78745470 Silence C89 warnings. 2019-02-15 09:06:45 -08:00
Twinaphex a3c5feaa68 Merge pull request #8293 from jdgleaver/rgui-truncation-fix
(RGUI) Prevent unnecessary truncation of menu entries
2019-02-15 17:30:10 +01:00
Twinaphex f54f246247 Merge pull request #8294 from Wiimpathy/WiiOverlayFix
Wii: Don't init overlay when RAM is beyond 72MB.
2019-02-15 17:29:15 +01:00
benoa dc352fe7a0 Wii: Don't init overlay when RAM is beyond 72MB. 2019-02-15 16:50:25 +01:00
jdgleaver 35b9a2f814 (RGUI) Prevent unnecessary truncation of menu entries 2019-02-15 14:53:35 +00:00
Twinaphex 4368f6cb66 Merge pull request #8286 from jdgleaver/text-ticker-speed
Enable configuration of menu ticker text speed
2019-02-15 15:34:13 +01:00
Twinaphex 4ac4f1fe3a Merge pull request #8291 from jdgleaver/ozone-ticker-spacer
(Ozone) Use more attractive 'spacer' string for looping menu ticker text
2019-02-15 15:33:58 +01:00
jdgleaver 4ac430e488 (Ozone) Use more attractive 'spacer' string for looping menu ticker text 2019-02-15 11:23:09 +00:00
jdgleaver 43a4c3c82f Increase menu ticker text speed range 2019-02-15 10:15:33 +00:00
jdgleaver bfe0c3fb48 Enable configuration of menu ticker text speed 2019-02-15 10:08:27 +00:00
Twinaphex 9b84a0f701 Merge pull request #8287 from natinusala/master
More menu widgets changes
2019-02-15 04:25:46 +01:00
natinusala f481c594e8 menu_animation: use milliseconds as a unit 2019-02-14 19:24:31 +01:00
natinusala bfcc32b7be menu_display: don't draw text if alpha is 0 2019-02-14 19:11:36 +01:00
CompCom bf50367503 Fix classic a7 makefile. 2019-02-15 03:30:07 +11:00
Twinaphex feb6b19c78 Merge pull request #8285 from jdgleaver/text-ticker-loop
Add optional 'looping' menu text ticker
2019-02-14 16:53:32 +01:00
jdgleaver 27694b6b31 Add optional 'looping' menu text ticker 2019-02-14 15:10:07 +00:00
twinaphex 1daaf7385c 9PS2) Silence some warnings 2019-02-14 07:20:44 +01:00
twinaphex 8a1cab9b74 C89_BUILD buildfix 2019-02-14 07:13:47 +01:00
Twinaphex f6afc84885 Merge pull request #8268 from alphanu1/master
Update to dynamic width
2019-02-14 07:05:49 +01:00
Twinaphex a702e0d59d Merge pull request #8270 from alfrix/master
Use the mame thumbnail repo for all the mame playlists
2019-02-14 07:05:30 +01:00
Twinaphex d0e5eb01c0 Merge pull request #8275 from jdgleaver/rgui-scaling
(RGUI) Add optional internal upscaling
2019-02-14 06:58:04 +01:00
Twinaphex 9b8efbc712 Merge pull request #8284 from fr500/master
[fix] potential crash when username is empty and discord is disabled
2019-02-14 06:46:46 +01:00
radius 7107175b93 [fix] potential crash when username is empty and discord is disabled 2019-02-14 00:31:02 -05:00
Twinaphex 86c402016f Merge pull request #8282 from Tatsuya79/master
fix some OSD settings
2019-02-14 03:53:37 +01:00
Tatsuya79 3e85f40563 fix some OSD settings 2019-02-13 23:41:13 +01:00
Twinaphex 250f7e5b27 Merge pull request #8272 from gingerbeardman/master
Adds unique IDs to prevent 3DS cores overwriting each other
2019-02-13 22:14:52 +01:00
Twinaphex 916d99f5e1 Merge pull request #8278 from orbea/opengles
qb: Fix the HAVE_OPENGLES check.
2019-02-13 22:14:36 +01:00
Twinaphex 4c554445c6 Merge pull request #8281 from orbea/xmb
xmb: Prevent crashes when resizing to a tiny window.
2019-02-13 22:14:03 +01:00
orbea ee98a595ca xmb: Prevent crashes when resizing to a tiny window.
If the user resized their RetroArch window while using xmb it would
initiate a context_reset to scale xmb. When the window is too small
this would result in invalid pointers and a crash in the video driver.

This makes it so that when the window is too small it will skip the
context_reset and not crash. The window at this size is not really
useful to scale anyways.

Fixes https://github.com/libretro/RetroArch/issues/8260
2019-02-13 10:58:04 -08:00
orbea 2586e727e7 qb: Fix the HAVE_OPENGLES check.
Not all systems have the appropriate pkgconfig files.

Fixes https://github.com/libretro/RetroArch/issues/8274
2019-02-13 09:51:49 -08:00
alphanu1 7d07130942 Update video_crt_switch.c 2019-02-13 15:33:10 +00:00
alphanu1 987264ab1b Merge branch 'master' into master 2019-02-13 12:16:05 +00:00
Twinaphex 3b131ee2da Merge pull request #8271 from orbea/qb
qb: Use the correct compiler flags for check_lib.
2019-02-13 12:51:12 +01:00
Twinaphex ed29eb8bd7 Merge pull request #8269 from natinusala/master
Various ozone improvements
2019-02-13 12:50:45 +01:00
jdgleaver cf6e23cebd (RGUI) Add optional internal upscaling 2019-02-13 11:09:02 +00:00
natinusala 692d463994 ozone: enable and disable mouse mode on the fly 2019-02-13 10:42:43 +01:00
natinusala 492590a0ae ozone: full mouse support on entries (no sidebar yet) 2019-02-13 10:32:43 +01:00
natinusala cb9d227db5 ozone: fix another navigation jitter 2019-02-13 09:55:56 +01:00
natinusala 59398e4dd2 ozone: fix alignment 2019-02-13 09:55:56 +01:00
natinusala 68e54315c3 ozone: add rudimentary mouse support (not working) 2019-02-13 09:55:56 +01:00
natinusala 4e79f13139 ozone: use menu_display_set_alpha 2019-02-13 09:55:56 +01:00
natinusala dac31786ea ozone: add draw cursor 2019-02-13 09:55:56 +01:00
natinusala 4c130fc4fd ozone: fine tune metrics 2019-02-13 09:55:56 +01:00
twinaphex eb1dc6624f C89_BUILD buildfix 2019-02-13 02:03:12 +01:00
alphanu1 4ded3ad983 Update dispserv_x11.c 2019-02-12 22:41:46 +00:00
alphanu1 45a2b5d9b3 Update dispserv_x11.c 2019-02-12 22:06:50 +00:00
alphanu1 45dae75333 Update dispserv_x11.c
Update dispserv_x11.c

New backporch for super res

Update dispserv_x11.c

Update dispserv_x11.c

Update dispserv_x11.c

update backporch & menu naming

Update menu_setting.c

Update menu_setting.c

Update menu_setting.c

Update menu_setting.c
2019-02-12 22:03:28 +00:00
alphanu1 5cc89160e0 Merge branch 'master' into master 2019-02-12 21:24:22 +00:00
alphanu1 e11c910c39 Fix native naming after new additions
CRT dynamic width changes

Change menu detection width

Using alternative variables for CRT width and height

see output

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Add files via upload

Update video_crt_switch.c

Update video_crt_switch.c

Update video_display_server.h

Update video_display_server.c

Update dispserv_win32.c

Update dispserv_x11.c

Update menu_cbs_ok.c

X centring on the fly

X centring on the fly

Update dispserv_x11.c

X centring on the fly

Update dispserv_win32.c

Fix dispserv_win32.c

Fix dispserv_win32.c
2019-02-12 21:23:13 +00:00
Matt Sephton 5cf15c8609 Update Makefile.cores 2019-02-12 20:41:42 +00:00
Matt Sephton 4e0c592bfa Update Makefile.cores 2019-02-12 20:39:37 +00:00
Matt Sephton 211dd11336 Update Makefile.cores 2019-02-12 20:33:46 +00:00
Matt Sephton 8ebf254a75 Update Makefile.cores 2019-02-12 20:32:51 +00:00
orbea 74cd5a067f qb: Use the correct compiler flags for check_lib. 2019-02-12 11:56:24 -08:00
Alfredo Monclus 2b5a2f0b3d Use the mame thumbnail repo for all the mame playlists 2019-02-12 13:52:53 -03:00
Twinaphex 8ac4e6c72f Merge pull request #8261 from jdgleaver/rgui-glui-title-fix
(RGUI/GLUI) Ensure menu title is set correctly when displaying message boxes
2019-02-12 17:23:33 +01:00
Twinaphex d7bb9807b4 Merge pull request #8264 from alphanu1/master
Fixed missing break (#118)
2019-02-12 17:20:51 +01:00
alphanu1 305a15f056 Change menu detection width 2019-02-12 16:10:48 +00:00
alphanu1 8259bc33ac CRT dynamic width changes 2019-02-12 16:00:12 +00:00
alphanu1 bdf2526f80 Fix native naming after new additions 2019-02-12 15:59:10 +00:00
alphanu1 84a784e28b CRT resolution naming (#120) 2019-02-12 15:16:40 +00:00
alphanu1 b37c64742f Dynamic width - function completed (#119) 2019-02-12 14:38:01 +00:00
Hans-Kristian Arntzen b3e2df53d2 Avoid menu deadlocks in Pulse and ALSA. (#8265)
Buggy menu code most likely, but audio backends can be defensive about
it.
2019-02-12 09:31:09 -05:00
Twinaphex 2ccc6534ee Merge pull request #8259 from bparker06/playtime_log
Add option to track how long content has been running over time
2019-02-12 15:06:57 +01:00
alphanu1 32525d6bd3 Fixed missing break (#118) 2019-02-12 13:59:53 +00:00
Twinaphex 7b506fafcc Merge pull request #8263 from alphanu1/master
Fix missing break (#117)
2019-02-12 14:50:58 +01:00
alphanu1 aec65d0fa1 Fix missing break (#117) 2019-02-12 13:36:03 +00:00
Twinaphex c9db325bd1 Merge pull request #8262 from alphanu1/master
Implementation screen centring and dynamic super resolution
2019-02-12 14:20:49 +01:00
alphanu1 a27b4e1912 Merge pull request #116 from alphanu1/alphanu1-patch-103
change super resolution 1 to read DYNAMIC
2019-02-12 12:46:28 +00:00
alphanu1 2172dbe8ba change super resolution 1 to read DYNAMIC 2019-02-12 12:45:45 +00:00
Twinaphex 694a3b1e2c Merge pull request #8245 from CidVonHighwind/master
Updated the ozone driver to use variables instead of hardcoded values
2019-02-12 13:07:41 +01:00
alphanu1 362f58ec3b Merge pull request #114 from alphanu1/alphanu1-patch-101
turn dynamic super res off on the fly
2019-02-12 11:37:14 +00:00
alphanu1 c9c3c626e8 turn dynamic super res off on the fly 2019-02-12 11:23:53 +00:00
jdgleaver 1569785a1c (RGUI/GLUI) Ensure menu title is set correctly when displaying message boxes 2019-02-12 11:07:58 +00:00
alphanu1 31ad524556 Merge pull request #113 from alphanu1/alphanu1-patch-100
Added text to replace 0 for CRT superres
2019-02-12 10:54:42 +00:00
alphanu1 b1c5d9a594 Added text to replace 0 for CRT superres
MSG_DYNAMIC
2019-02-12 10:53:36 +00:00
alphanu1 17fe39a3ee Merge pull request #112 from alphanu1/alphanu1-patch-99
Added MSG_DYNAMIC
2019-02-12 10:52:35 +00:00
alphanu1 acbb014b2d Added MSG_DYNAMIC 2019-02-12 10:51:06 +00:00
alphanu1 55f3edb5ad Merge pull request #111 from alphanu1/alphanu1-patch-98
Fix build warnings and cleanup
2019-02-12 10:27:29 +00:00
alphanu1 924fcc2834 Fix build warnings and cleanup 2019-02-12 10:26:17 +00:00
alphanu1 238a56978d Merge pull request #110 from alphanu1/alphanu1-patch-97
added static function and Clean up
2019-02-12 10:25:08 +00:00
alphanu1 7aabf7f5e1 added static function and Clean up 2019-02-12 10:16:04 +00:00
alphanu1 e0d84cd64c Merge pull request #109 from alphanu1/alphanu1-patch-96
Removed CRT setting video driver build info
2019-02-12 10:15:14 +00:00
alphanu1 a76c1f4c51 Removed CRT setting video driver build info 2019-02-12 10:10:35 +00:00
alphanu1 f5fd6e046b Merge pull request #108 from alphanu1/alphanu1-patch-95
fix for dynamic super resolutions
2019-02-12 10:08:39 +00:00
alphanu1 f7d2fbd212 fix for dynamic super resolutions 2019-02-12 10:04:41 +00:00
alphanu1 9d9be36521 Merge pull request #107 from alphanu1/alphanu1-patch-94
Added dynamic option in menu
2019-02-12 09:49:34 +00:00
alphanu1 1282a02212 Added dynamic option in menu 2019-02-12 09:48:35 +00:00
alphanu1 88be0e2b56 Merge pull request #106 from alphanu1/alphanu1-patch-93
incorporated centre adjust for Linux
2019-02-12 09:46:58 +00:00
alphanu1 4dc6cf2fb4 incorporated center adjust for Linux 2019-02-12 09:46:22 +00:00
alphanu1 7a6a4998c7 Merge pull request #105 from alphanu1/alphanu1-patch-92
incorporation of dynamic super res
2019-02-12 09:45:25 +00:00
alphanu1 14b80cc3e1 incorporation of dynamic super res
Closer to native look super resolution. Used to prevent artefacts
2019-02-12 09:44:06 +00:00
alphanu1 49011e9df9 Merge pull request #104 from libretro/master
Update
2019-02-12 08:29:52 +00:00
Patrick Scheurenbrand 5d7a30d806 added my name to the headers 2019-02-12 08:19:07 +01:00
Brad Parker 44c4be1863 add option to track how long content has been running over time 2019-02-12 00:32:01 -05:00
twinaphex 49bade15ae (video_driver.c) Cleanups 2019-02-12 06:22:50 +01:00
twinaphex d70d9d35f8 (record_driver.c) Simplifications 2019-02-12 06:04:52 +01:00
twinaphex a51acb8377 Buildfix 2019-02-12 04:03:10 +01:00
twinaphex 660d0c8de9 Remove mutexes - should hopefully fix dolphin/reicast threaded
again
2019-02-12 03:55:08 +01:00
Twinaphex 4505f0ef51 Merge pull request #8258 from orbea/qb
qb: Minor clean up.
2019-02-12 03:26:47 +01:00
orbea f41e70ba11 qb: Minor clean up. 2019-02-11 17:52:34 -08:00
Twinaphex 97ab1ec6e8 Merge pull request #8257 from orbea/python3
Silence warning with --enable-python and 32-bit linux.
2019-02-12 02:45:20 +01:00
Twinaphex 2e5d144e6d Merge pull request #8256 from orbea/pkgconf
qb: Allow checking for multiple pkgconfig files.
2019-02-12 02:45:14 +01:00
orbea 0eff833334 Silence warning with --enable-python and 32-bit linux.
Thanks hhromic!
2019-02-11 17:08:07 -08:00
orbea f6d8f2911d qb: Allow checking for multiple pkgconfig files. 2019-02-11 16:51:08 -08:00
Brad Parker 0c790d89dc gl1: use built-in pixel conversion routines 2019-02-11 19:02:36 -05:00
Twinaphex 1caa28dea9 Merge pull request #8255 from orbea/printf
qb: Rework configure output.
2019-02-12 00:29:26 +01:00
Brad Parker 42098e09ad C89/vc2005 fix 2019-02-11 17:17:36 -05:00
twinaphex d1a831e6ec (UWP) Buildfix 2019-02-11 23:15:11 +01:00
orbea 769612c274 qb: Rework configure output. 2019-02-11 14:14:36 -08:00
Patrick Scheurenbrand a82cc31a1f updated entries to use values that can be scaled 2019-02-11 21:22:52 +01:00
Twinaphex 7f88822853 Merge pull request #8252 from jdgleaver/rgui-sublabels
(RGUI) Add menu sublabel support
2019-02-11 20:04:29 +01:00
Twinaphex ac1a0457dc Merge pull request #8254 from orbea/rcheevos
Remove duplicate lua include.
2019-02-11 20:04:01 +01:00
Patrick Scheurenbrand a542cd049a added sidebar icon dimensions 2019-02-11 18:30:31 +01:00
orbea f71b508356 Remove duplicate lua include. 2019-02-11 09:16:11 -08:00
Brad Parker 5a3a58c8a6 gl1: fix order of non-rgui menu drawing, add proper texture support 2019-02-11 12:05:31 -05:00
jdgleaver 930bb5d71f (RGUI) Add menu sublabel support 2019-02-11 14:38:10 +00:00
Twinaphex 17f90a3624 Merge pull request #8250 from orbea/protocols
qb: Allow falling back to a bundled wayland-protocols when not found.
2019-02-11 00:48:37 +01:00
orbea d3dcc548b2 qb: Allow falling back to a bundled wayland-protocols when not found. 2019-02-10 15:34:50 -08:00
orbea 57ec26f269 Add needed protocols to deps/wayland-protocols.
These are included from wayland-protocols-1.17.
2019-02-10 13:43:15 -08:00
Patrick Scheurenbrand 8435fc5542 added variable for the horizontal padding of sidebar entries 2019-02-10 21:56:05 +01:00
Patrick Scheurenbrand bf43b61070 removed todo 2019-02-10 21:30:35 +01:00
Patrick Scheurenbrand 2030f7faf8 added dimensions variable to use for scaling; added sidebar entry dimension variables 2019-02-10 21:15:16 +01:00
Twinaphex 07208c9f49 Merge pull request #8247 from orbea/qb
qb: Test for user set variables.
2019-02-10 19:46:00 +01:00
orbea b5e7992579 qb: Test for user set variables.
This fixes issues where if both check_header and check_lib are used
it would set HAVE_FOO=yes and then result in a configure failure
when check_lib failed. This was also implemented for the other functions
to avoid similar issues.
2019-02-10 10:16:09 -08:00
Patrick Scheurenbrand b259be8a38 fixed typo; removed test line 2019-02-10 16:55:48 +01:00
Patrick Scheurenbrand 5d9356f2ff updated ozone to use macros instead of hardcoded values 2019-02-10 16:22:45 +01:00
Brad Parker d319e6a93d gong: savestate support 2019-02-09 22:24:48 -05:00
Brad Parker 3fec3c89fc gong: add Makefile 2019-02-09 22:24:48 -05:00
twinaphex 83497d5029 (iOS) Buildfix 2019-02-10 02:28:12 +01:00
Twinaphex 737c567cdc Merge pull request #8242 from meleu/cancel_lboards_on_reset
cheevos: cancel lboards on reset
2019-02-10 02:24:27 +01:00
twinaphex b9db1c1702 Add function prototype to cocoa_common.h 2019-02-10 02:13:57 +01:00
meleu 846ca5fd3b cheevos: cancel lboards on reset 2019-02-09 23:12:06 -02:00
twinaphex 5733ed9a29 Move these defines to cocoa_common.h 2019-02-10 02:11:22 +01:00
twinaphex 293eac3019 Update 2019-02-10 02:03:50 +01:00
twinaphex 62cef96118 Update cocoa_gl_ctx.m 2019-02-10 02:02:17 +01:00
twinaphex 794ab4ef68 Update cocoagl_set_mode 2019-02-10 01:59:08 +01:00
twinaphex 2c9b7c84df Updates 2019-02-10 01:54:39 +01:00
twinaphex a49d0a50b9 Move more functionaliy to cocoa_gl_shared.h 2019-02-10 01:44:46 +01:00
twinaphex 35ce4dcadc Updates 2019-02-10 01:30:12 +01:00
twinaphex 74bddae86e (CocoaGL) Move shared code to gl_shared file 2019-02-10 01:29:04 +01:00
twinaphex b1c4bdf6f7 (Cocoa) Cleanups 2019-02-10 01:25:07 +01:00
Twinaphex ed458cd89b (OSX) Buildfix 2019-02-10 01:21:45 +01:00
twinaphex 20a94a5f37 (CocoaGL) Cleanups 2019-02-10 01:16:35 +01:00
twinaphex d0e26c10aa Move more code to cocoa_gl_shared.h 2019-02-10 01:11:07 +01:00
twinaphex c363eb4397 Move more common functions over to cocoa_gl_shared.h 2019-02-10 00:58:05 +01:00
twinaphex 6f43b7974b Add cocoa_gl_shared.h 2019-02-10 00:31:27 +01:00
Twinaphex 8a033bbf35 Merge pull request #8241 from natinusala/master
cheevos_new: build fix
2019-02-10 00:23:31 +01:00
natinusala afbf896c9a cheevos_new: build fix 2019-02-10 00:13:36 +01:00
Twinaphex 864f2deb28 Merge pull request #8238 from cold-brewed/cflags
macOS: Update CFLAGS
2019-02-09 22:58:32 +01:00
Twinaphex fa4e074552 Revert "(Cocoa) Have only one Cocoa GL context driver from now on"
This reverts commit 08bd58e0c4.
2019-02-09 22:57:41 +01:00
Twinaphex d85385ca8a Revert "(OSX) Buildfix"
This reverts commit 13b8d63bc5.
2019-02-09 22:57:28 +01:00
Twinaphex 13b8d63bc5 (OSX) Buildfix 2019-02-09 22:56:49 +01:00
twinaphex 08bd58e0c4 (Cocoa) Have only one Cocoa GL context driver from now on 2019-02-09 22:52:43 +01:00
Brad Parker ce70d8db4c gong: move serialization data into state struct 2019-02-09 16:25:00 -05:00
twinaphex a97fffccb8 Cleanup macro 2019-02-09 21:13:37 +01:00
twinaphex 35ee386274 (Metal/OSX) Merge cocoa_common.m and cocoa_common_metal.m - more or less the same
code
2019-02-09 21:10:28 +01:00
twinaphex 58855c7b28 (CocoaTouch) Get rid of ui_cocoatouch_metal.m - was identical to ui_cocoatouch 2019-02-09 20:59:34 +01:00
cold-brewed 264c93585c macOS: Update CFLAGS 2019-02-09 14:39:53 -05:00
twinaphex b229e9d803 (Android) Update 2019-02-09 19:27:50 +01:00
Twinaphex fc74aee750 Merge pull request #8237 from natinusala/master
rgui: fix search box refresh
2019-02-09 19:05:21 +01:00
natinusala 5c8a835cda rgui: fix search box refresh 2019-02-09 18:34:01 +01:00
twinaphex 157494cab7 (gong) Add more refresh rates 2019-02-09 18:10:27 +01:00
Twinaphex 3b66ef528d Merge pull request #8236 from natinusala/master
menu_animation: fix menu_animation_is_active
2019-02-09 18:06:53 +01:00
natinusala b62d4e394b menu_animation: fix menu_animation_is_active 2019-02-09 17:38:28 +01:00
Brad Parker b508135218 fix warnings 2019-02-09 10:01:38 -05:00
Brad Parker bf04d658e6 fix warning 2019-02-09 09:59:08 -05:00
Brad Parker c36ddf973c gong: two player support 2019-02-09 09:54:26 -05:00
twinaphex bc8b348a04 (Cocoa) Cut down on some ifdefs 2019-02-09 04:45:37 +01:00
Twinaphex 47ed8d3627 (iOS) Buildfix 2019-02-09 04:43:15 +01:00
twinaphex 1a8ad73c3f (Cocoa) Unify both headers 2019-02-09 04:40:38 +01:00
twinaphex f64f598987 (Apple) Header buildfixes 2019-02-09 04:28:28 +01:00
Twinaphex b90a9ad4af Merge pull request #8234 from orbea/qb
qb: Minor config.libs.sh fixes.
2019-02-09 04:24:47 +01:00
twinaphex ef8d1ad406 (Cocoa) Create common shared header file 2019-02-09 04:21:01 +01:00
twinaphex acf71fc46c Header guards should not be identical to cocoa_common_metal.h 2019-02-09 04:13:53 +01:00
orbea 58eb7f3bf3 qb: Minor config.libs.sh fixes. 2019-02-08 19:13:07 -08:00
twinaphex 0dc533d976 (dispserv_x11.c) Get rid of unused variable 2019-02-09 04:11:14 +01:00
twinaphex eee2445c45 (GL) Buildfix for GL_DEBUG 2019-02-09 04:07:12 +01:00
Twinaphex aac14a00a4 Merge pull request #8233 from orbea/sixel
Fix warnings with --enable-sixel.
2019-02-09 00:27:11 +01:00
twinaphex ab182cbe20 Create optimized function - menu_animation_get_time 2019-02-09 00:18:27 +01:00
Twinaphex 8292a41ccd Merge pull request #8232 from natinusala/menu-animations-menu-independent
menu_animations: make animations menu independent
2019-02-09 00:02:41 +01:00
orbea 78dbe1cef1 Fix warnings with --enable-sixel. 2019-02-08 14:13:02 -08:00
Twinaphex 6b8f18676c Merge pull request #8231 from bparker06/gl1_squash_merge
OpenGL 1.1 video driver (gl1)
2019-02-08 22:48:18 +01:00
Brad Parker 8d8feec318 gl1: screenshot support 2019-02-08 16:31:34 -05:00
Twinaphex 1b3acfd15b Merge pull request #8206 from jdgleaver/rgui-collections
(RGUI) Add optional 'Collections' entry to main menu
2019-02-08 22:21:51 +01:00
Brad Parker d64933b30d gl1: put behind HAVE_OPENGL1, off by default for now 2019-02-08 16:04:23 -05:00
Twinaphex 89e91bdf8b Merge pull request #8230 from orbea/qb
qb: Init some variables.
2019-02-08 22:02:12 +01:00
Brad Parker c83611e526 gl1: allow extra padding in pitch 2019-02-08 15:46:00 -05:00
orbea fe28192438 qb: Init some variables. 2019-02-08 12:43:58 -08:00
Brad Parker cbbb81f46f gl1: add BFI and menu/content linear filtering 2019-02-08 15:37:38 -05:00
Twinaphex 8936972ba2 Merge pull request #8229 from orbea/qb
qb: Check number of arguments for while loops.
2019-02-08 21:20:42 +01:00
orbea 7cd6c9cf60 qb: Check number of arguments for while loops.
This is less fragile and doesn't rely on unset variables.
2019-02-08 12:15:47 -08:00
natinusala f3ff7f2a89 menu_animations: make animations menu independent 2019-02-08 20:02:45 +01:00
Brad Parker 333c630469 gl1: blend menu with video 2019-02-08 13:47:43 -05:00
Twinaphex 3b19fa9bad Merge pull request #8226 from Sunderland93/master
[Wayland] Fix zxdg_shell_v6 detection
2019-02-08 19:35:47 +01:00
Twinaphex e724b9101b Merge pull request #8227 from orbea/cxx_build
Fix warning with CXX_BUILD.
2019-02-08 19:35:36 +01:00
orbea 0731c8f26f Fix warning with CXX_BUILD.
Thanks hhromic!
2019-02-08 09:57:26 -08:00
Aleksey Samoilov b609eaf83f [Wayland] Fix zxdg_shell_v6 detection 2019-02-08 21:45:40 +04:00
Brad Parker 9a292226cf merge fix 2019-02-08 12:18:25 -05:00
Brad Parker 74fd184097 initial GL1 video driver, only rgui is working currently 2019-02-08 12:14:55 -05:00
Twinaphex f40a6438dd Merge pull request #8224 from jdgleaver/glui-subsystem
(GLUI) Add Subsystem support
2019-02-08 17:13:13 +01:00
jdgleaver 840e132408 (GLUI) Add Subsystem support 2019-02-08 15:20:16 +00:00
Twinaphex 1938f00c76 Merge pull request #8223 from jdgleaver/snprintf-warn-fix
Silence gcc snprintf() warnings in menu_driver.cw
2019-02-08 15:58:16 +01:00
jdgleaver 64e6d073d3 Silence gcc snprintf() warnings in menu_driver.c 2019-02-08 11:37:53 +00:00
twinaphex 59ded50d59 (Menu) Add back get_load_content_animation_data 2019-02-08 08:24:33 +01:00
twinaphex 386657a366 (menu widgets backport) Re-commit task queue changes 2019-02-08 08:00:32 +01:00
twinaphex 894f3b7aef Change function signature back 2019-02-08 07:29:50 +01:00
twinaphex 7022786f34 Revert parts of menu_widgets that were causing breakage, but leave
all the hooks in so we can add them back piece by piece again
2019-02-08 07:26:43 +01:00
twinaphex a22540310c Try to prevent namespace collisions with variables 2019-02-08 05:04:37 +01:00
twinaphex 72d58d318a Prevent crash at exit on OSX 2019-02-08 04:50:25 +01:00
Twinaphex 5542214409 Merge pull request #8222 from fr500/master
try to fix #8121 by making the interval configurable
2019-02-08 04:37:48 +01:00
radius b549f5181b try to fix #8121 by making the interval configurable 2019-02-07 22:34:18 -05:00
twinaphex d51fbbc37b Update menu_animation.c 2019-02-08 04:26:40 +01:00
Twinaphex e61f6b3fc9 Merge pull request #8219 from orbea/cxx_build
qb: Add support for CXX_BUILD to config.params.sh.
2019-02-08 03:18:29 +01:00
Twinaphex 179976e6b3 Merge pull request #8220 from orbea/v4
Fix --enable-v4l2 with CXX_BUILD=1.
2019-02-08 03:18:05 +01:00
orbea 25f41809f5 Fix --enable-v4l2 with CXX_BUILD=1. 2019-02-07 16:01:01 -08:00
orbea 9d6b1c3ea7 qb: Add support for CXX_BUILD to config.params.sh. 2019-02-07 15:46:27 -08:00
Twinaphex 6587fee6b1 Merge pull request #8218 from hhromic/fix-prisizet
libretro-common: fix PRI_SIZET not being set in PS2
2019-02-08 00:43:43 +01:00
Hugo Hromic 7cde32a2b3 libretro-common: fix PRI_SIZET not being set in PS2
* use `lu` for PS2 builds
2019-02-07 23:23:31 +00:00
Twinaphex 1b7362838e Merge pull request #8217 from fr500/master
[discord] ask-to-join fixes
2019-02-08 00:12:51 +01:00
radius 03107c5b73 [discord] update log messages 2019-02-07 17:58:21 -05:00
twinaphex 6d54ebfcec (GL2) Some cleanups 2019-02-07 23:54:33 +01:00
radius 701ac1dd72 there is no need for these to be so big 2019-02-07 17:53:03 -05:00
radius f60923c4a9 [discord] rewrite secret, party_id
[discord] rewrite secret, party_id

[discord] rewrite secret, party_id

[discord] rewrite secret, party_id
2019-02-07 17:52:39 -05:00
twinaphex c1415d70f8 (GL2) Fix warnings with CXX_BUILD 2019-02-07 23:16:50 +01:00
Twinaphex 9e5a9baa66 Merge pull request #8216 from orbea/32
Better warning fix for 32-bit linux.
2019-02-07 23:16:07 +01:00
orbea cb1b7a8006 Better warning fix for 32-bit linux.
Thanks hhromic!
2019-02-07 13:51:57 -08:00
Twinaphex b1dcef379b Merge pull request #8214 from cold-brewed/cfbundlefix
macOS: Add missing PRODUCT_BUNDLE_IDENTIFIER
2019-02-07 22:45:47 +01:00
Twinaphex 15bac439ca Merge pull request #8215 from orbea/32
Silence warnings with 32-bit linux.
2019-02-07 22:43:07 +01:00
orbea c0296179ac Silence warnings with 32-bit linux. 2019-02-07 13:27:42 -08:00
Twinaphex d03b472f73 Merge pull request #8211 from jdgleaver/rgui-lock-aspect
(RGUI) Add 'Lock Menu Aspect Ratio' option
2019-02-07 20:18:15 +01:00
Twinaphex aa442db22b Merge pull request #8208 from hhromic/fix-prisizet
libretro-common: improve PRI_SIZET for non-windows platforms
2019-02-07 20:18:03 +01:00
Twinaphex b8ac8e92e3 Merge pull request #8210 from hhromic/fix-warnings
menu_setting: add forgotten ifdefs for building without XMB menu
2019-02-07 20:17:35 +01:00
cold-brewed cc39a5d926 (OSX) Add missing PRODUCT_BUNDLE_IDENTIFIER 2019-02-07 13:46:41 -05:00
Hugo Hromic 58a32ab4b3 menu_setting: add forgotten ifdefs for building without XMB menu
Silences these warnings when compiling without XMB:

    menu/menu_setting.c:882:13: warning: ‘setting_get_string_representation_uint_xmb_layout’
    defined but not used [-Wunused-function]
     static void setting_get_string_representation_uint_xmb_layout(
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    menu/menu_setting.c:822:13: warning: ‘setting_get_string_representation_uint_xmb_icon_theme’
    defined but not used [-Wunused-function]
     static void setting_get_string_representation_uint_xmb_icon_theme(
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    menu/menu_setting.c:1074:13: warning: ‘setting_get_string_representation_uint_xmb_shader_pipeline’
    defined but not used [-Wunused-function]
     static void setting_get_string_representation_uint_xmb_shader_pipeline(
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-02-07 18:15:32 +00:00
Twinaphex f62e44c3e8 Merge pull request #7971 from Wiimpathy/WiiSkipCrc
Wii: Skip CRC. Avoid an unnecessary delay.
2019-02-07 18:42:13 +01:00
jdgleaver e3c383bb41 (RGUI) Add 'Lock Menu Aspect Ratio' option 2019-02-07 17:15:06 +00:00
Hugo Hromic e2b620ae05 libretro-common: improve PRI_SIZET for non-windows platforms
In non-windows platfoms, the `size_t` type may not necessarily use
the `%lu` format specification. For example in 32 bits platforms
instead it needs to be `%u`. Therefore, for non-windows platforms,
it is better to define PRI_SIZET more precisely.

Silences these types of warnings in 32 bits non-windows platforms:

    libretro-common/file/config_file.c: In function ‘config_get_size_t’:
    libretro-common/file/config_file.c:694:32: warning: format ‘%lu’ expects
    argument of type ‘long unsigned int *’, but argument 3 has type
    ‘size_t * {aka unsigned int *}’ [-Wformat=]
           if (sscanf(entry->value, "%" PRI_SIZET, &val) == 1)
                                    ^~~

Discussed in #8191
2019-02-07 16:25:48 +00:00
Twinaphex 4ce93b11ee Merge pull request #8194 from jdgleaver/rgui-subsystem
(RGUI) Add Subsystem support
2019-02-07 14:50:31 +01:00
Twinaphex ede83831aa Merge pull request #8205 from jdgleaver/rgui-ticker-fix
(RGUI) Fix ticker text
2019-02-07 14:49:38 +01:00
Twinaphex 294901db5a Merge pull request #8204 from natinusala/master
ui_companion: fix status message
2019-02-07 14:49:12 +01:00
jdgleaver b34aa0eeca (RGUI) Add optional 'Collections' entry to main menu 2019-02-07 11:54:21 +00:00
jdgleaver b27c23f0eb (RGUI) Fix ticker text 2019-02-07 11:09:21 +00:00
natinusala 8f3c77f719 ui_companion: fix status message 2019-02-07 11:49:07 +01:00
jdgleaver 76f53535bd (RGUI) Re-enable 'Load Core' option when content is loaded 2019-02-07 09:34:59 +00:00
twinaphex c808c80e4a (menu widgets) Some more cleanups 2019-02-07 08:23:34 +01:00
twinaphex affd507151 Warning fix 2019-02-07 08:05:43 +01:00
twinaphex 11e138fe6e (discord) Warning fix 2019-02-07 07:59:49 +01:00
twinaphex 0af4b6a0d6 (menu_widgets.c) Buildfixes 2019-02-07 07:59:07 +01:00
Twinaphex 4df6a5ad25 (OSX) Buildfix 2019-02-07 06:37:41 +01:00
twinaphex 89a6992d0c (Cocoa) Last change for today - combine ui_cocoa.m and ui_cocoa_metal.m 2019-02-07 06:32:49 +01:00
twinaphex bd19958658 (libretro-common) Don't use RARCH_LOG inside libretro-common files 2019-02-07 05:45:25 +01:00
twinaphex e612773645 (Xbox OG) Buildfixes 2019-02-07 05:42:23 +01:00
twinaphex 54a9a3bd1d C89_BUILD fixes 2019-02-07 05:38:46 +01:00
Twinaphex 2cad3e09d2 (OSX) Buildfix 2019-02-07 05:08:55 +01:00
Twinaphex fa4494ff8b Merge pull request #8203 from fr500/master
[discord] party & ask to join refinements
2019-02-07 05:06:30 +01:00
twinaphex cb829d8552 (Cocoa/OSX) Start unifying Cocoa Metal/Cocoa codepaths - was mostly the
same code
2019-02-07 05:05:53 +01:00
twinaphex 0a6c7acbd4 (MEtal) Get rid of specialized version of ui_cocoa_window_metal.m 2019-02-07 04:47:24 +01:00
radius 671e90a415 [discord] party & ask to join refinements 2019-02-06 22:45:05 -05:00
twinaphex 2599172831 Get rid of ui_cocoa_metal.h 2019-02-07 04:37:05 +01:00
Twinaphex ce05185cdf (Xcode) Remove CoreVideo 2019-02-07 04:12:35 +01:00
Twinaphex 25157942a3 Remove CoreVideo from Metal xcodeproj 2019-02-07 04:10:59 +01:00
Twinaphex 136193ab8d Buildfix 2019-02-07 04:09:08 +01:00
twinaphex f705503531 (Apple) Get rid of HAVE_CORELOCATION/HAVE_AVFOUNDATION - was mostly dormant
code and makes the Apple code needlessly complex right now. We can
always reintroduce this later on when the time is right
2019-02-07 04:03:52 +01:00
twinaphex d1edfabddb Revert "Move code to cocoa_common.m"
This reverts commit d3da2e2616.
2019-02-07 03:25:01 +01:00
twinaphex d3da2e2616 Move code to cocoa_common.m 2019-02-07 03:20:33 +01:00
twinaphex 715ddf1924 (WiiU/GX2) Add widget support (untested) 2019-02-07 02:03:48 +01:00
twinaphex f49b6e26a0 (Metal) Add menu widget support 2019-02-07 02:00:23 +01:00
twinaphex 4b2fdfad48 (D3D10/12) Add menu widgets support - text offset is wrong 2019-02-07 01:40:15 +01:00
twinaphex b0dcbdc15e (menu_display_gl.c) Simplifications 2019-02-07 01:25:25 +01:00
twinaphex dd21cfd825 (D3D11) Implement menu widgets - offset is wrong 2019-02-07 00:43:36 +01:00
twinaphex fb121ac75e (Vulkan) Hook up menu widgets 2019-02-07 00:15:32 +01:00
twinaphex 45b1ed33b2 (MSVC) Silence warning 2019-02-06 23:42:13 +01:00
twinaphex 0ab79550c9 (Qt) Push buildfixes 2019-02-06 23:40:36 +01:00
twinaphex cbfe33c579 Ifdef this 2019-02-06 23:38:54 +01:00
twinaphex 12368d6cbd Push this for Qt 2019-02-06 23:35:06 +01:00
Twinaphex 74cbbb06b0 Merge pull request #8201 from Zlika/fix_uninitialized_read
Fix uninitialised read of "override" field
2019-02-06 23:29:02 +01:00
Twinaphex 477170884b Some warning fixes 2019-02-06 23:25:41 +01:00
twinaphex 7c7d733d26 Buildfix 2019-02-06 23:17:43 +01:00
Twinaphex 49f7f457cd Merge pull request #8199 from natinusala/menu-widgets
First version of menu widgets (gl only)
2019-02-06 22:43:43 +01:00
Wiimpathy 79b5a05aeb Merge branch 'master' into WiiSkipCrc 2019-02-06 21:51:27 +01:00
Zlika 81320adf28 Fix uninitialised read of override field 2019-02-06 21:25:22 +01:00
natinusala c20ab3864d First version of menu widgets (gl only) 2019-02-06 20:48:24 +01:00
Twinaphex 0bef880609 Merge pull request #8200 from orbea/c89
Fix comment.
2019-02-06 20:18:48 +01:00
orbea b9cbc9881a Fix comment. 2019-02-06 11:13:39 -08:00
Twinaphex a1150800f8 Merge pull request #8197 from orbea/c89
Fix c89 build with 32-bit linux.
2019-02-06 20:08:14 +01:00
twinaphex c48febc4f9 (GL2) Cleanups 2019-02-06 19:49:45 +01:00
twinaphex 1e394091d8 Namespace GL2 driver 2019-02-06 19:43:31 +01:00
orbea cf6c49b9a1 Fix c89 build with 32-bit linux. 2019-02-06 10:21:28 -08:00
twinaphex b7c1fda56f (Windows) Fix C89_BUILD 2019-02-06 19:08:56 +01:00
twinaphex 5d1c45e8f9 (orbis) 'else ifdef' not necessary 2019-02-06 19:03:07 +01:00
Twinaphex 8bc4a66d49 Merge pull request #8196 from orbea/c89
Fix C89_BUILD=1.
2019-02-06 18:19:55 +01:00
orbea 8ff0b14281 Fix C89_BUILD=1. 2019-02-06 09:16:26 -08:00
Twinaphex ceb439ca2a Merge pull request #8188 from cold-brewed/master
macOS: Fix travis metal build
2019-02-06 18:05:10 +01:00
Twinaphex 0caa88a375 Merge pull request #8195 from Tatsuya79/patch-5
Gong video refresh core option
2019-02-06 18:04:54 +01:00
Tatsuya79 9c32d0df8a Gong video refresh core option 2019-02-06 17:37:15 +01:00
jdgleaver 6b3e5fa7a0 (RGUI) Add Subsystem support (+ fix memory leak in environ_cb_get_system_info()) 2019-02-06 14:25:25 +00:00
Twinaphex 69d89bc991 Merge pull request #8189 from fr500/master
[discord] set partyId properly
2019-02-06 07:03:04 +01:00
radius 97b32b890e [discord] set partyId properly 2019-02-06 00:58:52 -05:00
Twinaphex 6f5dfeb20e Merge pull request #8184 from orbea/warnings
Fix travis warnings.
2019-02-06 06:39:06 +01:00
Twinaphex c582b40525 Merge pull request #8185 from Themaister/master
Sinc: memset the resampler buffer.
2019-02-06 06:38:46 +01:00
twinaphex 5855391ac4 (Android) Bump up target SDK to 26 2019-02-06 06:03:25 +01:00
cold-brewed 6875ad8ae0 travis: Copy the app bundle from $TRAVIS_BUILD_DIR
The build no longer uses libretro-super.
2019-02-05 23:47:17 -05:00
Twinaphex 11b02125dc Merge pull request #8186 from natinusala/master
menu_display_gl: fix scissoring implementation for gl enabled cores
2019-02-06 02:53:06 +01:00
natinusala 475f3c3cc0 menu_display_gl: fix scissoring implementation for gl enabled cores 2019-02-06 00:54:26 +01:00
natinusala 6e841e20c5 Add core info to gitignore 2019-02-06 00:54:01 +01:00
Themaister 5e7513ad60 Sinc: memset the resampler buffer.
No idea how this survived asan and valgrind over these years ...
2019-02-05 23:35:39 +01:00
orbea c9b0ba1123 Fix travis warnings. 2019-02-05 11:27:01 -08:00
Twinaphex f5343c83eb Merge pull request #8181 from yoshisuga/ios-mfi-detect-fix
iOS: Fix mFi controller connecting
2019-02-05 19:15:03 +01:00
Yoshi Sugawara b06d75ec99 iOS: check if mfi controller already added to the internal list when connecting 2019-02-05 06:43:14 -10:00
alphanu1 061b3464c2 Merge pull request #103 from libretro/master
Update
2019-02-05 08:49:52 +00:00
twinaphex 55b449d743 (MSVC UWP) Add HAVE_OZONE 2019-02-05 02:52:38 +01:00
twinaphex 0a04a1c80a (GL) Cleanups 2019-02-05 02:27:08 +01:00
twinaphex 1b79f08715 (GL) Use set_coords function directly 2019-02-05 02:24:13 +01:00
twinaphex ba9de324bf Simplify gl.c 2019-02-05 02:19:16 +01:00
twinaphex 9877e1ce3e (GL) Cleanups 2019-02-05 02:12:42 +01:00
twinaphex 5102eff399 (GL) Move GL-only shader code to gl.c 2019-02-05 01:13:39 +01:00
Twinaphex 7fedabee4b Merge pull request #8163 from orbea/cleanup
Cleanup
2019-02-04 23:19:05 +01:00
Twinaphex b0be198084 Merge pull request #8169 from DEX357/patch-28
Update msg_hash_pl.h
2019-02-04 23:18:44 +01:00
Twinaphex 12594e51fd Merge pull request #8170 from orbea/menu
Fix --disable-menu (Again).
2019-02-04 23:18:23 +01:00
twinaphex 845b30131f Cleanups 2019-02-04 23:17:39 +01:00
twinaphex ebce936557 Fix UWP builds 2019-02-04 23:14:20 +01:00
orbea 762151758d Fix --disable-menu (Again). 2019-02-04 09:01:37 -08:00
DEX357 4562d36b39 Update msg_hash_pl.h 2019-02-04 13:28:27 +01:00
Twinaphex 12c6fe1dc0 Merge pull request #8165 from yoshisuga/ios-fix-codesign
tvos: fix code sign script to use the shared iOS modules dir
2019-02-04 06:41:09 +01:00
Yoshi Sugawara 4461b55375 tvos: fix code sign script to use the shared iOS modules dir 2019-02-03 18:48:29 -10:00
Mark W. Kidd 512e280c68 Merge remote-tracking branch 'upstream/master' into patch-7 2019-02-03 19:38:43 -05:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea 4c56167446 Convert to linux line endings. 2019-02-03 15:43:42 -08:00
Mark W. Kidd 8542ecd79c Merge remote-tracking branch 'upstream/master' into patch-7 2019-01-19 12:36:33 -05:00
benoa 9fec6d4a18 Wii: Skip CRC. Avoid an unnecessary delay. 2019-01-10 20:16:36 +01:00
Gregor Richards b9a07a759b Different (more intuitive?) default netplay share policy
The previous default policy in netplay for sharing was to always share.
This appears to be causing more confusion than anything else, mainly
because the UI is terrible. The UI is a different problem, but for now,
I've changed the share policy: If you netplay with only one input
configured, it will share; if you netplay with multiple inputs, and
don't explicitly ask to share one, each device will get one client.
2019-01-03 16:53:30 -05:00
Mark W. Kidd 79264c7278 refactor and restore non-android bind hold behavior 2019-01-02 21:24:33 -05:00
markwkidd 96ea874850 unify input bind hold behavior across platforms 2019-01-02 18:47:40 -05:00
1339 changed files with 132112 additions and 86823 deletions

No files matched your search

+29 -29
View File
@@ -2,34 +2,34 @@
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
- This is not a forum or a help section, this is strictly developer oriented
## Description
[Description of the bug]
### Expected behavior
[What you expected to happen]
### Actual behavior
[What is actually happening]
### Steps to reproduce the bug
1. [First step]
2. [Second step]
3. [and so on...]
### Bisect Results
## Description
[Description of the bug]
### Expected behavior
[What you expected to happen]
### Actual behavior
[What is actually happening]
### Steps to reproduce the bug
1. [First step]
2. [Second step]
3. [and so on...]
### Bisect Results
[Try to bisect and tell us when this started happening]
### Version/Commit
You can find this information under Information/System Information
- RetroArch: [version/commit]
### Environment information
[Try to bisect and tell us when this started happening]
### Version/Commit
You can find this information under Information/System Information
- RetroArch: [version/commit]
### Environment information
- OS: [The operating system you're running]
- Compiler: [In case you are running local builds]
- Compiler: [In case you are running local builds]
-1
View File
@@ -4,7 +4,6 @@
2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
## Description
[Description of the pull request, detail any issues you are fixing or any features you are implementing]
+9 -2
View File
@@ -62,7 +62,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
/freetype2/
/ft2build.h
/iconv.h
/libxml2/
/phoenix/
/python/
/rsound.h
@@ -76,6 +75,11 @@ run.sh
convert_rumble.awk
*~
assets
info
content_image_history.lpl
saves
screenshots
# Wii U
*.depend
@@ -87,7 +91,6 @@ wiiu/wut/elf2rpl/elf2rpl
/pkg/wiiu/rpx
/wiiu-devel.properties
# 3ds
/.lst
*.3dsx
@@ -165,6 +168,10 @@ retroarch_switch.nacp
retroarch_switch.nro
retroarch_switch.nso
# PS2
ps2/irx/*.c
ps2/libcdvd/lib/
# Wayland
gfx/common/wayland/idle-inhibit-unstable-v1.c
gfx/common/wayland/idle-inhibit-unstable-v1.h
+59 -25
View File
@@ -4,36 +4,37 @@ language: generic
matrix:
include:
- compiler: mingw-x86
addons:
apt:
packages:
- g++-mingw-w64-i686
- mingw-w64-i686-dev
script:
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
- make
addons: true
env: CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x86
addons: true
env: C89_BUILD=1 CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x86
addons: true
env: CXX_BUILD=1 CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x64
addons:
apt:
packages:
- g++-mingw-w64-x86-64
- mingw-w64-x86-64-dev
script:
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
- make
addons: true
env: CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x64
addons: true
env: C89_BUILD=1 CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x64
addons: true
env: CXX_BUILD=1 CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: gcc
# Install a more recent gcc than the default
before_install:
- sudo apt-get install -y g++-8
env: CC=gcc-8 CXX=g++-8
- compiler: gcc
env: C89_BUILD=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
- compiler: clang
# Install a more recent clang than the default
before_install:
- sudo apt-get install -y libstdc++-7-dev
- sudo apt-get install -y clang-6.0
env: CC=clang-6.0 CXX=clang++-6.0
- compiler: clang
env: C89_BUILD=1 CC=clang-6.0 CXX=clang++-6.0
- compiler: clang
env: CXX_BUILD=1 CC=clang-6.0 CXX=clang++-6.0
- os: osx
osx_image: xcode8
script:
@@ -50,12 +51,45 @@ matrix:
on:
branch: master
before_install:
- |
if [ "$CC" = gcc-8 ]; then
# Install a more recent gcc than the default
sudo apt-get install -y g++-8
elif [ "$CC" = clang-6.0 ]; then
# Install a more recent clang than the default
sudo apt-get install -y libstdc++-7-dev
sudo apt-get install -y clang-6.0
elif [ "$CROSS_COMPILE" = i686-w64-mingw32- ]; then
sudo apt-get install -y g++-mingw-w64-i686
sudo apt-get install -y mingw-w64-i686-dev
elif [ "$CROSS_COMPILE" = x86_64-w64-mingw32- ]; then
sudo apt-get install -y g++-mingw-w64-x86-64
sudo apt-get install -y mingw-w64-x86-64-dev
fi
script:
- ./configure
- make
- |
if [ -n "$CROSS_COMPILE" ]; then
ARGS="$ARGS --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib"
fi
- |
if [ -n "$DISABLE_MENU" ]; then
ARGS="$ARGS --disable-menu"
fi
- ./configure $ARGS
- |
if [ -n "$C89_BUILD" ]; then
make C89_BUILD=1
elif [ -n "$CXX_BUILD" ]; then
make CXX_BUILD=1
else
make
fi
env:
global:
- ARGS=""
- MAKEFLAGS="-j2"
- secure: "qc91ReC3OlzSh2gFaSH6TYzC2qIQvgA2AZff6J13eaH8xijAhuMzttZ0rMQJ0DWCIhPeUb0kIzVyaGoe4MwPALzpw1C1AznIWiZJ53HN+hWCOcS/af7YVPk6HPySnwqrS+Wv3AIIvIKFV2mxv21F/JbT/N+pArlRrp904Xj+KPo="
addons:
+148 -124
View File
@@ -1,131 +1,155 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/libretro-common/include"
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/libretro-common/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
]
},
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include",
"${workspaceRoot}/libretro-common/include"
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
]
},
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include",
"${workspaceRoot}/libretro-common/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include"
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
"${workspaceRoot}",
"${workspaceFolder}/libretro-common/include"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
},
{
"name": "msys2-mingw32",
"includePath": [
"C:/msys64/mingw32/include",
"C:/msys64/mingw32/i686-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/msys64/mingw32/include",
"C:/msys64/mingw32/i686-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
},
{
"name": "msys2-mingw32",
"includePath": [
"C:/msys64/mingw32/include",
"C:/msys64/mingw32/i686-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "msys2-mingw64",
"includePath": [
"C:/msys64/mingw64/include",
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/msys64/mingw64/include",
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/msys64/mingw32/include",
"C:/msys64/mingw32/i686-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "msys2-mingw64",
"includePath": [
"C:/msys64/mingw64/include",
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/msys64/mingw64/include",
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
"${workspaceRoot}/libretro-common/include",
"${workspaceRoot}/include",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "Switch",
"includePath": [
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
"/opt/devkitpro/libnx/include",
"/opt/devkitpro/portlibs/switch/include",
"/opt/devkitpro/portlibs/switch/include/freetype2",
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"__aarch64__",
"__SWITCH__",
"HAVE_LIBNX"
],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++11",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
+1 -1
View File
@@ -24,7 +24,7 @@
}
]
},
{
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
+28 -2
View File
@@ -40,9 +40,35 @@
"ozone_theme.h": "c",
"ozone_texture.h": "c",
"string_list.h": "c",
"core_info.h": "c"
"core_info.h": "c",
"thread": "c",
"xlocale": "c"
"xlocale": "c",
"menu_widgets.h": "c",
"message_queue.h": "c",
"task_queue.h": "c",
"fifo_queue.h": "c",
"file_list.h": "c",
"strl.h": "c",
"configuration.h": "c",
"ozone_display.h": "c",
"verbosity.h": "c",
"retroarch.h": "c",
"menu_animation.h": "c",
"audio_driver.h": "c",
"netplay.h": "c",
"scaler.h": "c",
"deque": "c",
"vector": "c",
"xhash": "c",
"xiosbase": "c",
"xstring": "c",
"xtree": "c",
"xutility": "c",
"menu_input_dialog.h": "c",
"menu_filebrowser.h": "c",
"ozone_sidebar.h": "c",
"menu_thumbnail_path.h": "c",
"badges.h": "c"
},
"C_Cpp.dimInactiveRegions": false,
}
+1 -1
View File
@@ -45,7 +45,7 @@
"group": {
"kind": "build",
"isDefault": true
"isDefault": true
},
"command": "./configure; make -j2",
+1 -1
View File
@@ -48,7 +48,7 @@ index b90a8e40c3..e57c4df194 100644
+#endif
+
#endif
#if defined(HAVE_OPENGL)
@@ -313,6 +354,43 @@ static void create_gl_context(HWND hwnd, bool *quit)
RARCH_LOG("[WGL]: Adaptive VSync supported.\n");
+136 -1
View File
@@ -1,4 +1,139 @@
# 1.7.7 (future)
# 1.7.8 (future)
# 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.
- 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.
- 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.
- 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.
- 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.
# 1.7.6
- ANDROID: Fix Xperia Play input binding.
+57 -57
View File
@@ -1,58 +1,58 @@
# Contributing to RetroArch
If you are a developer and want to contribute to the development of RetroArch, please read this.
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
# Submitting a bug report
When submitting a bug report, make sure that the bug is local to RetroArch.
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
In console, make sure to run with verbose (-v) flag.
# Pull Requests
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
note that it's possible to continue pushing up commits to your branch.
If you want to develop a larger feature,
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
## libretro API
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
to libretro API will affect other projects as well, and we highly value API/ABI stability.
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
Features will not be added on basis of hypothetical libretro implementations.
# Coding style
Having a consistent code style throughout the code base is highly valued.
Please look through the code to get a feel for the coding style.
A pull request may be asked to fix the coding style before submission.
In other cases, a pull request may be followed up with a "style nit commit".
## Non-obvious things:
- Code should be both ISO C99 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
- Using deprecated APIs is discouraged.
# Copyright Headers and AUTHORS
If you have contributed to a part of a source file (a chunk of code that's written by you),
you should add yourself to the copyright header in that file.
If you have contributed significantly
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
We'd like your full name and email, and which features you have been part of.
# IRC
Active development happens on IRC. (#retroarch @ irc.freenode.org)
We value discussing things in "real-time".
# Commit Access
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
# Contributing to RetroArch
If you are a developer and want to contribute to the development of RetroArch, please read this.
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
# Submitting a bug report
When submitting a bug report, make sure that the bug is local to RetroArch.
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
In console, make sure to run with verbose (-v) flag.
# Pull Requests
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
note that it's possible to continue pushing up commits to your branch.
If you want to develop a larger feature,
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
## libretro API
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
to libretro API will affect other projects as well, and we highly value API/ABI stability.
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
Features will not be added on basis of hypothetical libretro implementations.
# Coding style
Having a consistent code style throughout the code base is highly valued.
Please look through the code to get a feel for the coding style.
A pull request may be asked to fix the coding style before submission.
In other cases, a pull request may be followed up with a "style nit commit".
## Non-obvious things:
- Code should be both ISO C99 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
- Using deprecated APIs is discouraged.
# Copyright Headers and AUTHORS
If you have contributed to a part of a source file (a chunk of code that's written by you),
you should add yourself to the copyright header in that file.
If you have contributed significantly
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
We'd like your full name and email, and which features you have been part of.
# IRC
Active development happens on IRC. (#retroarch @ irc.freenode.org)
We value discussing things in "real-time".
# Commit Access
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
This typically happens when the "overhead" of looking through pull requests over time becomes a burden.
+2 -2
View File
@@ -19,6 +19,6 @@ $(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
generate: $(MOC_SRC)
@echo $(MOC_SRC)
print-%:
@echo '$*=$($*)'
@echo '$*=$($*)'
+8 -28
View File
@@ -1,23 +1,20 @@
# This build was put together and is maintained by ModMyClassic.com for Libretro.
# The purpose is to give Libretro a proper "official" build platform for classic consoles.
# If you need any help in building for the classics or have any questions then please visit
# https://modmyclassic.com/comp and we will help in any way possible!
# https://modmyclassic.com/comp and we will help in any way possible!
# Building Prerequisites ##############
# arm-linux-gnueabihf-gcc-8
# arm-linux-gnueabihf-g++-8
# arm-linux-gnueabihf-as
# arm-linux-gnueabihf-strip
# patchelf
# bc
include version.all
# Classic Readme Variables ############
# Classic Readme Variables ############
CLASSIC_ALT_VER := $(shell echo $(RARCH_VERSION) | tr . _)
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)c_COptimised
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION)c \(Official Classic Optimised\)
CLASSIC_VERSION := $(RARCH_VERSION)c \(Classic+\)
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION) (Official Optimised)
CLASSIC_VERSION := $(RARCH_VERSION)
MOD_CREATOR := Libretro + ModMyClassic
MOD_CATEGORY := RetroArch
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
@@ -28,10 +25,6 @@ HAKCHI_GIT := https://github.com/Classicmods/RA_Platform-Hakchi
# General Shared Variables ############
TARGET := retroarch
CC_V = arm-linux-gnueabihf-gcc-8
CXX_V = arm-linux-gnueabihf-g++-8
AS_V = arm-linux-gnueabihf-as
CC_AS_V = arm-linux-gnueabihf-gcc-8
# Libretro Defines ####################
#HAVE_CLASSIC = Classic Hook, disable some features
@@ -41,15 +34,10 @@ CC_AS_V = arm-linux-gnueabihf-gcc-8
all: $(TARGET)
retroarch:
#Backup vanilla version files + ammend version
cp version.all version_BACKUP.all && cp version.dtd version_BACKUP.dtd
sed -i -e 's/RARCH_VERSION="[^"]*"/RARCH_VERSION="$(CLASSIC_VERSION)"/g' version.all
sed -i -e 's/PACKAGE_VERSION "[^"]*"/PACKAGE_VERSION "$(CLASSIC_VERSION)"/g' version.all
sed -i -e 's/ENTITY version "[^"]*"/ENTITY version "$(CLASSIC_VERSION)"/g' version.dtd
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
arm-linux-gnueabihf-strip -v retroarch
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
@@ -78,11 +66,6 @@ retroarch:
@echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **"
rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp
#COMMODORE 64 MINI BUILD (WIP)
#Clean down dirty files
rm -f version.all version.dtd
mv version_BACKUP.all version.all && mv version_BACKUP.dtd version.dtd
@echo "*********************************************************************"
@echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***"
@echo "****************** Winner, Winner, Chicken Dinner! ******************"
@@ -107,7 +90,4 @@ clean:
rm -f $(PNDDIR)/readme.html
rm -f retroarch
rm -f $(CLASSIC_MODS_VER).hmod
rm -f version.all version.dtd
mv -f version_BACKUP.all version.all || echo "Backup Doesn't Exist - Ignoring..."
mv -f version_BACKUP.dtd version.dtd || echo "Backup Doesn't Exist - Ignoring..."
rm -f *_BACKUP*
+182 -137
View File
@@ -8,18 +8,26 @@ ifeq ($(HAVE_STACK_USAGE), 1)
endif
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT=0
HAVE_GL_CONTEXT = 0
HAVE_GL_MODERN = 0
ifeq ($(HAVE_OPENGL), 1)
HAVE_GL_CONTEXT=1
HAVE_GL_CONTEXT = 1
HAVE_GL_MODERN = 1
endif
ifeq ($(HAVE_OPENGL1), 1)
HAVE_GL_CONTEXT = 1
endif
ifeq ($(HAVE_OPENGLES), 1)
HAVE_GL_CONTEXT=1
HAVE_GL_CONTEXT = 1
HAVE_GL_MODERN = 1
endif
ifeq ($(HAVE_OPENGLES3), 1)
HAVE_GL_CONTEXT=1
HAVE_GL_CONTEXT = 1
HAVE_GL_MODERN = 1
endif
endif
@@ -94,9 +102,9 @@ ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
endif
ifeq ($(HAVE_NETLOGGER), 1)
DEF_FLAGS += -DHAVE_LOGGER
DEFINES += -DHAVE_LOGGER
OBJ += network/net_logger.o
DEF_FLAGS += -DHAVE_LOGGER
DEFINES += -DHAVE_LOGGER
OBJ += network/net_logger.o
endif
# System
@@ -185,7 +193,6 @@ OBJ += frontend/frontend.o \
$(LIBRETRO_COMM_DIR)/lists/string_list.o \
$(LIBRETRO_COMM_DIR)/string/stdstring.o \
$(LIBRETRO_COMM_DIR)/memmap/memalign.o \
setting_list.o \
list_special.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \
@@ -211,13 +218,11 @@ OBJ += frontend/frontend.o \
camera/camera_driver.o \
wifi/wifi_driver.o \
location/location_driver.o \
driver.o \
configuration.o \
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
dynamic.o \
cores/dynamic_dummy.o \
$(LIBRETRO_COMM_DIR)/queues/message_queue.o \
managers/core_manager.o \
managers/state_manager.o \
gfx/drivers_font_renderer/bitmapfont.o \
tasks/task_autodetect.o \
@@ -232,10 +237,10 @@ OBJ += frontend/frontend.o \
core_info.o \
$(LIBRETRO_COMM_DIR)/file/config_file.o \
$(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \
runtime_file.o \
tasks/task_screenshot.o \
tasks/task_powerstate.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
gfx/drivers_shader/shader_null.o \
gfx/video_shader_parse.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
@@ -302,7 +307,8 @@ ifeq ($(HAVE_LANGEXTRA), 1)
intl/msg_hash_chs.o \
intl/msg_hash_cht.o \
intl/msg_hash_ar.o \
intl/msg_hash_el.o
intl/msg_hash_el.o \
intl/msg_hash_tr.o
endif
ifneq ($(HAVE_GETOPT_LONG), 1)
@@ -350,6 +356,27 @@ ifeq ($(HAVE_QT), 1)
ui/drivers/qt/thumbnaildownload.o \
ui/drivers/qt/thumbnailpackdownload.o \
ui/drivers/qt/playlistthumbnaildownload.o
ifeq ($(HAVE_MENU), 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/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 \
ui/drivers/qt/options/recording.o \
ui/drivers/qt/options/saving.o \
ui/drivers/qt/options/throttle.o \
ui/drivers/qt/options/ui.o \
ui/drivers/qt/options/user.o \
ui/drivers/qt/options/video.o
endif
MOC_HEADERS += ui/drivers/ui_qt.h \
ui/drivers/qt/ui_qt_load_core_window.h \
@@ -360,6 +387,10 @@ ifeq ($(HAVE_QT), 1)
ui/drivers/qt/coreinfodialog.h \
ui/drivers/qt/playlistentrydialog.h \
ui/drivers/qt/viewoptionsdialog.h
ifeq ($(HAVE_MENU), 1)
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
ui/drivers/qt/options/options.h
endif
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
#DEFINES += $(QT5WEBENGINE_CFLAGS)
@@ -510,19 +541,18 @@ endif
# Audio
ifeq ($(HAVE_COREAUDIO), 1)
OBJ += audio/drivers/coreaudio.o
HAVE_COREAUDIO_LIBS = 1
HAVE_COREAUDIO_LIBS = 1
endif
ifeq ($(HAVE_COREAUDIO3), 1)
OBJ += audio/drivers/coreaudio3.o
HAVE_COREAUDIO_LIBS = 1
HAVE_COREAUDIO_LIBS = 1
endif
ifeq ($(HAVE_COREAUDIO_LIBS), 1)
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
endif
ifeq ($(HAVE_CORETEXT), 1)
@@ -554,7 +584,10 @@ endif
ifeq ($(HAVE_ALSA), 1)
OBJ += audio/drivers/alsa.o
OBJ += midi/drivers/alsa_midi.o
ifneq ($(HAVE_HAKCHI), 1)
OBJ += midi/drivers/alsa_midi.o
endif
ifeq ($(HAVE_THREADS), 1)
OBJ += audio/drivers/alsathread.o
@@ -681,7 +714,7 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
ifeq ($(HAVE_XMB),)
HAVE_XMB = 1
endif
ifeq ($(HAVE_STRIPES),)
HAVE_STRIPES = 0
endif
@@ -701,6 +734,10 @@ ifeq ($(HAVE_MENU), 1)
DEFINES += -DHAVE_MENU
HAVE_MENU_COMMON = 1
ifeq ($(HAVE_MENU_WIDGETS), 1)
DEFINES += -DHAVE_MENU_WIDGETS
endif
ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/rgui.o
DEFINES += -DHAVE_RGUI
@@ -756,7 +793,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/widgets/menu_dialog.o \
menu/widgets/menu_input_dialog.o \
menu/widgets/menu_input_bind_dialog.o \
menu/widgets/menu_entry.o \
menu/widgets/menu_osk.o \
menu/menu_cbs.o \
menu/cbs/menu_cbs_ok.o \
@@ -779,18 +815,23 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/menu_displaylist.o \
menu/menu_animation.o \
menu/drivers/menu_generic.o \
menu/drivers/null.o
menu/drivers/null.o \
menu/menu_thumbnail_path.o
ifeq ($(HAVE_MENU_COMMON),1)
OBJ += menu/drivers_display/menu_display_null.o
endif
OBJ += menu/drivers_display/menu_display_null.o
endif
ifeq ($(HAVE_MENU_WIDGETS), 1)
OBJ += menu/widgets/menu_widgets.o
endif
endif
ifeq ($(HAVE_OVERLAY), 1)
DEFINES += -DHAVE_OVERLAY
OBJ += tasks/task_overlay.o \
input/input_overlay.o \
led/drivers/led_overlay.o
input/input_overlay.o \
led/drivers/led_overlay.o
endif
ifeq ($(HAVE_STB_FONT), 1)
@@ -807,6 +848,7 @@ endif
ifeq ($(HAVE_THREADS), 1)
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
$(LIBRETRO_COMM_DIR)/rthreads/rsemaphore.o \
gfx/video_thread_wrapper.o \
audio/audio_thread_wrapper.o
DEFINES += -DHAVE_THREADS
@@ -857,9 +899,6 @@ ifeq ($(TARGET), retroarch_switch)
ifeq ($(HAVE_OPENGL), 1)
OBJ += gfx/drivers_context/switch_ctx.o
endif
ifeq ($(HAVE_THREADS), 1)
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/switch_pthread.o
endif
else
OBJ += gfx/drivers/switch_gfx.o
endif
@@ -877,11 +916,11 @@ endif
ifeq ($(HAVE_WAYLAND), 1)
OBJ += gfx/drivers_context/wayland_ctx.o \
input/drivers/wayland_input.o \
gfx/common/wayland/xdg-shell.o \
gfx/common/wayland/xdg-shell-unstable-v6.o \
gfx/common/wayland/idle-inhibit-unstable-v1.o \
gfx/common/wayland/xdg-decoration-unstable-v1.o
input/drivers/wayland_input.o \
gfx/common/wayland/xdg-shell.o \
gfx/common/wayland/xdg-shell-unstable-v6.o \
gfx/common/wayland/idle-inhibit-unstable-v1.o \
gfx/common/wayland/xdg-decoration-unstable-v1.o
ifeq ($(HAVE_EGL), 1)
LIBS += $(EGL_LIBS)
endif
@@ -974,11 +1013,6 @@ ifeq ($(HAVE_IOHIDMANAGER), 1)
endif
endif
ifeq ($(HAVE_CORELOCATION), 1)
DEFINES += -DHAVE_CORELOCATION
LIBS += -framework CoreLocation
endif
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_HID
OBJ += input/drivers_joypad/hid_joypad.o \
@@ -1053,14 +1087,29 @@ ifeq ($(HAVE_PLAIN_DRM), 1)
endif
ifeq ($(HAVE_GL_CONTEXT), 1)
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
OBJ += gfx/drivers/gl.o \
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
gfx/drivers_font/gl_raster_font.o \
$(LIBRETRO_COMM_DIR)/glsym/rglgen.o
ifeq ($(HAVE_GL_MODERN), 1)
DEFINES += -DHAVE_OPENGL
OBJ += gfx/drivers/gl.o \
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
gfx/drivers_font/gl_raster_font.o
endif
OBJ += $(LIBRETRO_COMM_DIR)/glsym/rglgen.o
ifeq ($(HAVE_OPENGL1), 1)
DEFINES += -DHAVE_OPENGL1
OBJ += gfx/drivers/gl1.o \
gfx/drivers_font/gl1_raster_font.o
endif
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_gl.o
ifeq ($(HAVE_GL_MODERN), 1)
OBJ += menu/drivers_display/menu_display_gl.o
endif
ifeq ($(HAVE_OPENGL1), 1)
OBJ += menu/drivers_display/menu_display_gl1.o
endif
endif
ifeq ($(HAVE_VIDEOCORE), 1)
@@ -1094,7 +1143,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
endif
ifeq ($(HAVE_OSMESA), 1)
OBJ += gfx/drivers_context/osmesa_ctx.o
OBJ += gfx/drivers_context/osmesa_ctx.o
LIBS += -lOSMesa
endif
@@ -1146,12 +1195,15 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
OBJ += gfx/drivers_context/cgl_ctx.o
else ifneq ($(findstring Win32,$(OS)),)
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
WANT_WGL=1
WANT_WGL=1
endif
LIBS += $(GL_LIBS)
endif
OBJ += gfx/drivers_shader/shader_glsl.o
ifeq ($(HAVE_GL_MODERN), 1)
DEFINES += -DHAVE_GLSL
OBJ += gfx/drivers_shader/shader_glsl.o
endif
endif
ifeq ($(HAVE_EGL), 1)
@@ -1218,6 +1270,21 @@ ifeq ($(HAVE_VULKAN), 1)
HAVE_SPIRV_CROSS = 1
endif
ifeq ($(HAVE_OPENGL_CORE), 1)
OBJ += gfx/drivers/gl_core.o \
gfx/drivers_font/gl_core_raster_font.o \
gfx/drivers_shader/shader_gl_core.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_gl_core.o
endif
DEFINES += -DHAVE_OPENGL_CORE
HAVE_SLANG = 1
HAVE_GLSLANG = 1
HAVE_SPIRV_CROSS = 1
NEED_CXX_LINKER = 1
endif
ifeq ($(HAVE_OMAP), 1)
OBJ += gfx/drivers/omap_gfx.o
endif
@@ -1301,8 +1368,8 @@ ifeq ($(HAVE_D3D11), 1)
gfx/common/d3d11_common.o \
gfx/drivers_font/d3d11_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d11.o
endif
OBJ += menu/drivers_display/menu_display_d3d11.o
endif
DEFINES += -DHAVE_D3D11
HAVE_SLANG = 1
HAVE_GLSLANG = 1
@@ -1428,13 +1495,6 @@ ifeq ($(WANT_WGL), 1)
LIBS += -lcomctl32
endif
#ifeq ($(HAVE_LIBXML2), 1)
#LIBS += $(LIBXML2_LIBS)
#DEFINES += $(LIBXML2_CFLAGS)
#else
#OBJ += $(LIBRETRO_COMM_DIR)/formats/xml/rxml.o
#endif
# Compression/Archive
OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
@@ -1535,8 +1595,6 @@ ifeq ($(HAVE_CHD), 1)
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_chd.o \
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_huffman.o \
$(LIBRETRO_COMM_DIR)/streams/chd_stream.o
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_zlib.o
ifeq ($(HAVE_FLAC),1)
@@ -1573,6 +1631,7 @@ endif
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax.o \
$(LIBRETRO_COMM_DIR)/formats/json/jsonsax_full.o \
$(LIBRETRO_COMM_DIR)/formats/xml/rxml.o \
$(LIBRETRO_COMM_DIR)/formats/image_transfer.o
ifdef HAVE_COMPRESSION
@@ -1631,8 +1690,8 @@ ifeq ($(HAVE_NETWORKING), 1)
endif
# Netplay
DEFINES += -DHAVE_NETWORK_CMD
OBJ += network/netplay/netplay_delta.o \
DEFINES += -DHAVE_NETWORK_CMD
OBJ += network/netplay/netplay_delta.o \
network/netplay/netplay_frontend.o \
network/netplay/netplay_handshake.o \
network/netplay/netplay_init.o \
@@ -1645,77 +1704,72 @@ ifeq ($(HAVE_NETWORKING), 1)
# RetroAchievements
ifeq ($(HAVE_CHEEVOS), 1)
DEFINES += -DHAVE_CHEEVOS
DEFINES += -DHAVE_CHEEVOS \
-Ideps/rcheevos/include
ifeq ($(HAVE_NEW_CHEEVOS), 1)
DEFINES += -DHAVE_NEW_CHEEVOS \
-Ideps/rcheevos/include \
-Ideps/lua/src
OBJ += cheevos-new/cheevos.o \
cheevos-new/badges.o \
cheevos-new/fixup.o \
cheevos-new/parser.o \
cheevos-new/hash.o \
deps/rcheevos/src/rcheevos/trigger.o \
deps/rcheevos/src/rcheevos/condset.o \
deps/rcheevos/src/rcheevos/condition.o \
deps/rcheevos/src/rcheevos/operand.o \
deps/rcheevos/src/rcheevos/term.o \
deps/rcheevos/src/rcheevos/expression.o \
deps/rcheevos/src/rcheevos/value.o \
deps/rcheevos/src/rcheevos/lboard.o \
deps/rcheevos/src/rcheevos/alloc.o \
deps/rcheevos/src/rcheevos/format.o \
deps/rcheevos/src/rurl/url.o
OBJ += cheevos/cheevos.o \
cheevos/badges.o \
cheevos/var.o \
cheevos/cond.o \
cheevos-new/cheevos.o \
cheevos-new/fixup.o \
cheevos-new/parser.o \
cheevos-new/hash.o \
deps/rcheevos/src/rcheevos/trigger.o \
deps/rcheevos/src/rcheevos/condset.o \
deps/rcheevos/src/rcheevos/condition.o \
deps/rcheevos/src/rcheevos/operand.o \
deps/rcheevos/src/rcheevos/term.o \
deps/rcheevos/src/rcheevos/expression.o \
deps/rcheevos/src/rcheevos/value.o \
deps/rcheevos/src/rcheevos/lboard.o \
deps/rcheevos/src/rcheevos/alloc.o \
deps/rcheevos/src/rcheevos/format.o \
deps/rcheevos/src/rcheevos/memref.o \
deps/rcheevos/src/rcheevos/richpresence.o \
deps/rcheevos/src/rurl/url.o
ifeq ($(HAVE_LUA), 1)
DEFINES += -DHAVE_LUA \
-DLUA_32BITS \
-Ideps/lua/src
OBJ += deps/lua/src/lapi.o \
deps/lua/src/lcode.o \
deps/lua/src/lctype.o \
deps/lua/src/ldebug.o \
deps/lua/src/ldo.o \
deps/lua/src/ldump.o \
deps/lua/src/lfunc.o \
deps/lua/src/lgc.o \
deps/lua/src/llex.o \
deps/lua/src/lmem.o \
deps/lua/src/lobject.o \
deps/lua/src/lopcodes.o \
deps/lua/src/lparser.o \
deps/lua/src/lstate.o \
deps/lua/src/lstring.o \
deps/lua/src/ltable.o \
deps/lua/src/ltm.o \
deps/lua/src/lundump.o \
deps/lua/src/lvm.o \
deps/lua/src/lzio.o \
deps/lua/src/lauxlib.o \
deps/lua/src/lbaselib.o \
deps/lua/src/lbitlib.o \
deps/lua/src/lcorolib.o \
deps/lua/src/ldblib.o \
deps/lua/src/liolib.o \
deps/lua/src/lmathlib.o \
deps/lua/src/loslib.o \
deps/lua/src/lstrlib.o \
deps/lua/src/ltablib.o \
deps/lua/src/lutf8lib.o \
deps/lua/src/loadlib.o \
deps/lua/src/linit.o
else
DEFINES += -DRC_DISABLE_LUA
endif
# if not HAVE_NEW_CHEEVOS
ifeq ($(HAVE_LUA), 1)
DEFINES += -DHAVE_LUA \
-DLUA_32BITS \
-Ideps/lua/src
OBJ += deps/lua/src/lapi.o \
deps/lua/src/lcode.o \
deps/lua/src/lctype.o \
deps/lua/src/ldebug.o \
deps/lua/src/ldo.o \
deps/lua/src/ldump.o \
deps/lua/src/lfunc.o \
deps/lua/src/lgc.o \
deps/lua/src/llex.o \
deps/lua/src/lmem.o \
deps/lua/src/lobject.o \
deps/lua/src/lopcodes.o \
deps/lua/src/lparser.o \
deps/lua/src/lstate.o \
deps/lua/src/lstring.o \
deps/lua/src/ltable.o \
deps/lua/src/ltm.o \
deps/lua/src/lundump.o \
deps/lua/src/lvm.o \
deps/lua/src/lzio.o \
deps/lua/src/lauxlib.o \
deps/lua/src/lbaselib.o \
deps/lua/src/lbitlib.o \
deps/lua/src/lcorolib.o \
deps/lua/src/ldblib.o \
deps/lua/src/liolib.o \
deps/lua/src/lmathlib.o \
deps/lua/src/loslib.o \
deps/lua/src/lstrlib.o \
deps/lua/src/ltablib.o \
deps/lua/src/lutf8lib.o \
deps/lua/src/loadlib.o \
deps/lua/src/linit.o
else
OBJ += cheevos/cheevos.o \
cheevos/badges.o \
cheevos/var.o \
cheevos/cond.o
DEFINES += -DRC_DISABLE_LUA
endif
endif
ifeq ($(HAVE_DISCORD), 1)
@@ -1785,18 +1839,9 @@ ifneq ($(findstring Win32,$(OS)),)
gfx/display_servers/dispserv_win32.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_gdi.o
endif
LIBS += -lmsimg32 -lhid -lsetupapi
endif
ifeq ($(HAVE_AVFOUNDATION), 1)
ifeq ($(HAVE_COCOA), 1)
DEFINES += -DHAVE_AVFOUNDATION
LIBS += -framework AVFoundation
LIBS += -framework CoreVideo
LIBS += -framework CoreMedia
OBJ += menu/drivers_display/menu_display_gdi.o
endif
LIBS += -lmsimg32 -lhid -lsetupapi
endif
# Record
+1 -1
View File
@@ -40,7 +40,7 @@ OBJ := ctr/ctr_system.o \
libretro-common/hash/rhash.o \
file_path_str.o \
verbosity.o
OBJ += ctr/exec-3dsx/exec_cia.o \
ctr/exec-3dsx/exec_3dsx.o \
ctr/exec-3dsx/mini-hb-menu/launch.o \
+1
View File
@@ -17,6 +17,7 @@ HAVE_RJPEG = 0
HAVE_RPNG = 1
HAVE_EMSCRIPTEN = 1
HAVE_MENU = 1
HAVE_MENU_WIDGETS = 1
HAVE_RGUI = 1
HAVE_SDL = 0
HAVE_SDL2 = 0
+14 -12
View File
@@ -89,6 +89,8 @@ else ifeq ($(platform), wii)
libogc_platform := 1
endif
HAVE_MENU_WIDGETS := 1
# PS3
ifeq ($(platform), ps3)
#TODO
@@ -112,7 +114,7 @@ else ifeq ($(libogc_platform), 1)
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/libz -Iwii/libogc/include
ifeq ($(EXTERNAL_LIBOGC), 1)
CFLAGS += -DEXTERNAL_LIBOGC
CXXFLAGS += -DEXTERNAL_LIBOGC
@@ -271,7 +273,7 @@ else ifeq ($(platform), vita)
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
-lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc
@@ -384,7 +386,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../IDE")
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS71COMNTOOLS)../../Vc7/include")
@@ -430,9 +432,9 @@ else ifeq ($(platform), windows_msvc2005_x86)
CXX = cl.exe
LD = link.exe
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/include")
@@ -479,7 +481,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
@@ -550,7 +552,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
@@ -625,7 +627,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
@@ -700,7 +702,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
@@ -766,7 +768,7 @@ else
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
INCLUDE += -I./libretro-common/include \
-Ideps \
-Ideps/stb
-Ideps/stb
endif
OBJ = griffin/griffin.o $(PLATOBJS)
@@ -973,8 +975,8 @@ ifneq (,$(findstring msvc,$(platform)))
LINKOUT = -out:
LINK = link.exe
else
OBJOUT = -o
LINKOUT = -o
OBJOUT = -o
LINKOUT = -o
LINK = $(CXX)
endif
+4 -10
View File
@@ -17,12 +17,9 @@ DEBUG ?= 0
WHOLE_ARCHIVE_LINK = 0
GRIFFIN_BUILD = 0
OBJ :=
OBJ :=
# For threading we need to overwrite some vars with global defines because devkitPro's includes
# make it hard for us. This works for the pthread wrapper
DEFINES_THREAD := -Dpthread_t=Thread -Dpthread_mutex_t=Mutex -Dpthread_mutexattr_t='void*' -Dpthread_attr_t=int -Dpthread_cond_t=CondVar -Dpthread_condattr_t='int' -D_SYS__PTHREADTYPES_H_
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD) -DHAVE_STB_VORBIS
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' -DHAVE_STB_VORBIS
HAVE_CC_RESAMPLER = 1
HAVE_MENU_COMMON = 1
@@ -52,6 +49,7 @@ HAVE_SWITCH = 1
HAVE_LIBNX = 1
HAVE_OPENGL = 1
HAVE_LANGEXTRA = 1
HAVE_MENU_WIDGETS = 1
ifeq ($(HAVE_OPENGL), 1)
HAVE_EGL = 1
@@ -121,16 +119,12 @@ ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
CFLAGS += -DHAVE_STATIC_DUMMY=1
endif
# The following line works around an issue in newlib that produces a compilation
# error in glm. It will be removed as soon as this issue is resolved.
CFLAGS += -D_GLIBCXX_USE_C99_MATH_TR1 -D_LDBL_EQ_DBL
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
LIBS := -lstdc++ -lbz2 -lpng -lz -lnx -lm
LIBS := -lswresample -lavformat -lavcodec -lavutil -lswscale -lstdc++ -lbz2 -lpng -lz -lnx -lm
ifeq ($(HAVE_OPENGL), 1)
LIBS := -lEGL -lglapi -ldrm_nouveau $(LIBS)
+2 -2
View File
@@ -29,7 +29,7 @@ ifneq (,$(findstring Darwin,$(UNAME_S)))
endif
#---------------------------------------------------------------------------------
# path to tools
# path to tools
#---------------------------------------------------------------------------------
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc
export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
@@ -56,7 +56,7 @@ ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSION
#---------------------------------------------------------------------------------
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
#---------------------------------------------------------------------------------
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
+2
View File
@@ -19,6 +19,8 @@ HAVE_D3D11 := 1
HAVE_D3D12 := 1
HAVE_CG := 1
HAVE_OPENGL := 1
HAVE_OPENGL1 := 1
HAVE_MENU_WIDGETS := 1
HAVE_VULKAN := 1
HAVE_XAUDIO := 1
HAVE_XINPUT := 1
+5 -4
View File
@@ -33,6 +33,7 @@ else
HAVE_OVERLAY := 1
HAVE_7ZIP := 1
HAVE_EGL := 1
HAVE_MENU_WIDGETS := 1
HAVE_OPENGLES := 1
HAVE_NETWORKING := 0
HAVE_SOCKET_LEGACY := 0
@@ -117,12 +118,12 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
WHOLE_START := -Wl,--whole-archive
WHOLE_END := -Wl,--no-whole-archive
endif
CXXFLAGS := $(CFLAGS)
CXXFLAGS := $(CFLAGS)
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
TARGETS := $(TARGET).elf
@@ -157,10 +158,10 @@ $(TARGET).elf: $(OBJ) libretro_orbis.a
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
clean:
rm -f $(OBJ) $(TARGET).elf
rm -f $(OBJ) $(TARGET).elf
rm -f $(OBJ:.o=.depend)
.PHONY: clean all
.PHONY: clean all
.PRECIOUS: %.depend
-include $(OBJ:.o=.depend)
+1 -1
View File
@@ -36,7 +36,7 @@ retroarch.pnd: install
pnd_make -c -p retroarch.pnd -d $(PNDDIR)/ -x $(PNDDIR)/PXML.xml -i $(PNDDIR)/icon.png
clean:
rm -f *.o
rm -f *.o
rm -f audio/*.o
rm -f conf/*.o
rm -f gfx/*.o
+27 -21
View File
@@ -5,16 +5,19 @@ HAVE_LOGGER = 0
HAVE_FILE_LOGGER = 0
HAVE_THREADS = 0
BIG_STACK = 0
MUTE_WARNINGS = 0
MUTE_WARNINGS = 1
PS2_IP = 192.168.1.150
#Configuration for IRX
EE_BIN2O = bin2o
IRX_DIR = $(PS2SDK)/iop/irx
TARGET = retroarchps2.elf
TARGET_RELEASE = retroarchps2-release.elf
# Lib CDVD
CDVD_DIR = ps2/libcdvd
# Compile the IRXs first
IRX_DIR = ps2/irx
IRX_FILES = $(wildcard ps2/irx/*.c)
ifeq ($(DEBUG), 1)
OPTIMIZE_LV := -O0 -g
RARCH_DEFINES += -DDEBUG
@@ -27,7 +30,7 @@ ifeq ($(MUTE_WARNINGS), 1)
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
endif
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
GPVAL = -G0
@@ -38,14 +41,10 @@ RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHA
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
LIBDIR =
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CDVD_DIR)/lib -L.
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio
LIBS += -lcdvdfs -lpatches -lpoweroff
#IRX modules
# IRX modules - modules have to be in IRX_DIR
IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
IRX_OBJ = $(IRX:.irx=.o)
EE_OBJS += $(IRX_OBJ)
ifeq ($(HAVE_THREADS), 1)
RARCH_DEFINES += -DHAVE_THREADS
@@ -65,8 +64,15 @@ endif
CFLAGS += $(RARCH_DEFINES)
# All the IRX objects
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
EE_OBJS += $(IRX_DIR)/cdvd_irx.o
# Missing objecst on the PS2SDK
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
EE_OBJS += ps2/compat_files/fileXio_cdvd.o ps2/compat_files/ps2_descriptor.o
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
EE_OBJS += griffin/griffin.o
@@ -77,14 +83,18 @@ EE_LDFLAGS = $(LDFLAGS)
EE_LIBS = $(LIBS)
EE_ASFLAGS = $(ASFLAGS)
EE_INCS = $(INCDIR)
EE_IRX_OBJ = $(IRX_OBJ)
EE_BIN = $(TARGET)
EE_GPVAL = $(GPVAL)
all: $(EE_IRX_OBJ) $(EE_BIN)
all: irxdir $(EE_BIN)
irxdir:
$(MAKE) -C $(IRX_DIR)
clean:
rm -f $(EE_BIN) $(EE_OBJS)
$(MAKE) -C $(IRX_DIR) clean
prepare:
ps2client -h $(PS2_IP) reset
@@ -100,12 +110,8 @@ package:
release: clean all package
#Specific file name and output per IRX Module
$(EE_IRX_OBJ):
$(EE_BIN2O) $(EE_GPVAL) $(IRX_DIR)/$(@:.o=.irx) $@ $(@:.o=_irx)
#Include preferences
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
#Linking with C++
+9 -3
View File
@@ -33,7 +33,13 @@ EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
INCDIRS = -I. -Idefines -Ideps/libz -Ilibretro-common/include -Ideps -Ideps/stb
INCDIRS = -I. \
-Idefines \
-Ideps \
-Ideps/libz \
-Ideps/stb \
-Ideps/rcheevos/include \
-Ilibretro-common/include
# system platform
system_platform = unix
@@ -63,7 +69,7 @@ endif
PPU_SRCS = griffin/griffin.c
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
DEFINES += -DHAVE_MENU -DHAVE_MENU_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
ifeq ($(DEX_BUILD), 1)
DEFINES += -DDEX_BUILD
@@ -159,7 +165,7 @@ create-core:
create-npdrm-salamander:
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
create-salamander:
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
+1 -1
View File
@@ -155,7 +155,7 @@ create-core:
create-npdrm-salamander:
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
create-salamander:
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
+91 -91
View File
@@ -1,91 +1,91 @@
CELL_BUILD_TOOLS = GCC
CELL_SDK ?= /usr/local/cell
HAVE_LOGGER = 0
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
include $(CELL_MK_DIR)/sdk.makedef.mk
# system platform
system_platform = unix
ifeq ($(shell uname -a),)
EXE_EXT = .exe
system_platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
ifeq ($(DEBUG), 1)
PPU_OPTIMIZE_LV := -O0 -g
else
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
endif
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
ifeq ($(DEX_BUILD), 1)
DEFINES += -DDEX_BUILD
endif
ifeq ($(CEX_BUILD), 1)
DEFINES += -DCEX_BUILD
endif
ifeq ($(ODE_BUILD), 1)
DEFINES += -DODE_BUILD
endif
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
PPU_SRCS = frontend/frontend_salamander.c \
frontend/frontend_driver.c \
frontend/drivers/platform_ps3.c \
frontend/drivers/platform_null.c \
libretro-common/file/file_path.c \
libretro-common/lists/dir_list.c \
libretro-common/lists/string_list.c \
libretro-common/file/retro_dirent.c \
libretro-common/hash/rhash.c \
libretro-common/string/stdstring.c \
libretro-common/encodings/encoding_utf.c \
libretro-common/compat/compat_strl.c \
libretro-common/compat/compat_strcasestr.c \
libretro-common/compat/fopen_utf8.c \
libretro-common/streams/file_stream.c \
libretro-common/vfs/vfs_implementation.c \
libretro-common/file/config_file.c \
file_path_str.c \
verbosity.c
ifeq ($(HAVE_LOGGER), 1)
PPU_CFLAGS += -DHAVE_LOGGER
PPU_SRCS += network/net_logger.c \
libretro-common/net/net_compat.c \
libretro-common/net/net_socket.c
endif
PPU_TARGET = retroarch-salamander_ps3.elf
ifeq ($(CELL_BUILD_TOOLS),SNC)
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
else
PPU_CFLAGS += -std=gnu99
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
endif
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
include $(CELL_MK_DIR)/sdk.target.mk
CELL_BUILD_TOOLS = GCC
CELL_SDK ?= /usr/local/cell
HAVE_LOGGER = 0
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
include $(CELL_MK_DIR)/sdk.makedef.mk
# system platform
system_platform = unix
ifeq ($(shell uname -a),)
EXE_EXT = .exe
system_platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
ifeq ($(DEBUG), 1)
PPU_OPTIMIZE_LV := -O0 -g
else
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
endif
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
ifeq ($(DEX_BUILD), 1)
DEFINES += -DDEX_BUILD
endif
ifeq ($(CEX_BUILD), 1)
DEFINES += -DCEX_BUILD
endif
ifeq ($(ODE_BUILD), 1)
DEFINES += -DODE_BUILD
endif
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
PPU_SRCS = frontend/frontend_salamander.c \
frontend/frontend_driver.c \
frontend/drivers/platform_ps3.c \
frontend/drivers/platform_null.c \
libretro-common/file/file_path.c \
libretro-common/lists/dir_list.c \
libretro-common/lists/string_list.c \
libretro-common/file/retro_dirent.c \
libretro-common/hash/rhash.c \
libretro-common/string/stdstring.c \
libretro-common/encodings/encoding_utf.c \
libretro-common/compat/compat_strl.c \
libretro-common/compat/compat_strcasestr.c \
libretro-common/compat/fopen_utf8.c \
libretro-common/streams/file_stream.c \
libretro-common/vfs/vfs_implementation.c \
libretro-common/file/config_file.c \
file_path_str.c \
verbosity.c
ifeq ($(HAVE_LOGGER), 1)
PPU_CFLAGS += -DHAVE_LOGGER
PPU_SRCS += network/net_logger.c \
libretro-common/net/net_compat.c \
libretro-common/net/net_socket.c
endif
PPU_TARGET = retroarch-salamander_ps3.elf
ifeq ($(CELL_BUILD_TOOLS),SNC)
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
else
PPU_CFLAGS += -std=gnu99
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
endif
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
include $(CELL_MK_DIR)/sdk.target.mk
+1 -1
View File
@@ -96,7 +96,7 @@ CXXFLAGS += $(SHARED_FLAGS)
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
else
CFLAGS += -O3 -g
CFLAGS += -O3 -g
CXXFLAGS += -03 -g
endif
+2 -2
View File
@@ -25,7 +25,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
CFLAGS += $(RARCH_DEFINES)
CFLAGS += $(RARCH_DEFINES)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = RetroArch
@@ -51,7 +51,7 @@ OBJS = frontend/frontend_salamander.o \
libretro-common/hash/rhash.o \
file_path_str.o \
verbosity.o \
bootstrap/psp1/kernel_functions.o
bootstrap/psp1/kernel_functions.o
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
+2 -2
View File
@@ -17,7 +17,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
OBJ += griffin/griffin.o
DEFINES += -DHAVE_GRIFFIN=1
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER -DHAVE_UPDATE_ASSETS
ifeq ($(DEBUG), 1)
DEFINES += -DHAVE_NETLOGGER
endif
@@ -116,7 +116,7 @@ endif
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
+1 -1
View File
@@ -22,7 +22,7 @@ RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE
LIBDIR =
LDFLAGS =
LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lSceFiber_stub\
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceAudio_stub -lSceFiber_stub\
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
-lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc
+2 -2
View File
@@ -32,10 +32,10 @@ ELF_TARGET := retroarch-salamander_wii.elf
INCLUDE := -I. -Ilibretro-common/include -Ideps/libz
ifeq ($(EXTERNAL_LIBOGC), 1)
INCLUDE += -I$(DEVKITPRO)/libogc/include
INCLUDE += -I$(DEVKITPRO)/libogc/include
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
else
INCLUDE += -Iwii/libogc/include
INCLUDE += -Iwii/libogc/include
LIBDIRS := -Lwii/libogc/libs/wii -L.
endif
-6
View File
@@ -32,7 +32,6 @@ HAVE_FREETYPE := 1
HAVE_FFMPEG := 0
HAVE_CG := 1
HAVE_LIBXML2 := 0
HAVE_ZLIB := 1
WANT_ZLIB := 1
HAVE_CC_RESAMPLER := 1
@@ -46,11 +45,6 @@ FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2
FREETYPE_LIBS := -lfreetype
endif
ifeq ($(HAVE_LIBXML2), 1)
LIBXML2_CFLAGS := -Ilibxml2 -DHAVE_LIBXML2 -DHAVE_GLSL
LIBXML2_LIBS := -lxml2 -liconv
endif
ifeq ($(HAVE_SDL), 1)
SDL_LIBS := -lSDL
SDL_CFLAGS := -ISDL -DHAVE_SDL
+9 -9
View File
@@ -1,7 +1,7 @@
USAGE NOTES
===========
This driver is meant for devices with Allwinner SoCs with Mali400 3D block and a
This driver is meant for devices with Allwinner SoCs with Mali400 3D block and a
good fbdev implementation. It is derived from the old Android GLES driver.
It was meant to be used on Cubieboard/Cubieboard2/Cubietruck, but it should not
@@ -19,7 +19,7 @@ First we will clone and build the kernel:
git clone https://github.com/mireq/linux-sunxi.git -b sunxi-3.4 --depth 1
Now we edit drivers/video/sunxi/disp/dev_fb.c, and uncomment the line 1074:
// Fb_wait_for_vsync(info);
// Fb_wait_for_vsync(info);
It is assumed you have a cross-compiler installed, so we configure and build the kernel and modules:
@@ -50,7 +50,7 @@ Now we need the headers. We can get them from here:
http://malideveloper.arm.com/develop-for-mali/sdks/opengl-es-sdk-for-linux/#opengl-es-sdk-for-linux-download
Download whatever version you want. We just get the headers from here, not machine-dependant compiled code.
Download whatever version you want. We just get the headers from here, not machine-dependant compiled code.
Extract the files and copy the directories inside inc to /usr/include .
@@ -60,27 +60,27 @@ In the end you should have this on your system:
/usr/include/EGL/
eglext.h
egl.h
eglplatform.h
egl.h
eglplatform.h
fbdev_window.h
/usr/include/GLES/
glext.h
gl.h
gl.h
glplatform.h
/usr/include/GLES2
gl2ext.h
gl2.h
gl2.h
gl2platform.h
/usr/include/GLES3
gl3ext.h
gl3.h
gl3.h
gl3platform.h
To enable mali_fbdev you must configure RetroArch with --enable-gles and --enable-mali_fbdev.
This is an example of what you would use on a CubieBoard2 for a lightweight RetroArch:
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip --disable-libxml2
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
NOTE: A TTY hack is used to auto-clean the console on exit, and the fbdev ioctls are used to retrieve
current video mode. Both things work good, but they are not exactly ideal solutions.
+2 -3
View File
@@ -31,7 +31,7 @@ Latest binaries are currently hosted on the [buildbot](http://buildbot.libretro.
## Support
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), chat on [Discord](https://discord.gg/C4amCeV), or visit our IRC channel: #retroarch @ irc.freenode.org.
To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), chat on [discord](https://discord.gg/C4amCeV), or visit our IRC channel: #retroarch @ irc.freenode.org.
## Documentation
@@ -105,7 +105,6 @@ OSX port of RetroArch requires latest versions of XCode to build.
RetroArch can utilize these libraries if enabled:
- nvidia-cg-toolkit
- libxml2 (GLSL XML shaders)
- libfreetype2 (TTF font rendering on screen)
RetroArch needs at least one of these audio driver libraries:
@@ -148,7 +147,7 @@ Instructions for compiling and installing RetroArch can be found in the [Libretr
## CRT 15Khz Resolution Switching
CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.
CRT SwitchRes will turn on, on the fly. However, you will need to restart RetroArch to disable it. With CRT SwitchRes enable RetroArch will start in 2560 x 480 @ 60.
If you are running Windows, before enabling the CRT SwitchRes options please make sure you have installed CRTEmudriver and installed some modelines. The minimum modelines for all games to switch correctly are:
+17 -103
View File
@@ -49,10 +49,6 @@
#include "../file_path_special.h"
#include "../content.h"
#ifdef HAVE_THREADS
#include <rthreads/rthreads.h>
#endif
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
#define MENU_SOUND_FORMATS "ogg|mod|xm|s3m|mp3|flac"
@@ -175,7 +171,6 @@ static bool audio_driver_mixer_mute_enable = false;
static bool audio_driver_mute_enable = false;
static bool audio_driver_use_float = false;
static bool audio_driver_active = false;
static bool audio_driver_data_own = false;
static bool audio_mixer_active = false;
static float audio_driver_rate_control_delta = 0.0f;
@@ -202,10 +197,6 @@ static void *audio_driver_context_audio_data = NULL;
static bool audio_suspended = false;
static bool audio_is_threaded = false;
#ifdef HAVE_THREADS
static slock_t* s_audio_driver_lock = NULL;
#endif
static void audio_mixer_play_stop_sequential_cb(
audio_mixer_sound_t *sound, unsigned reason);
static void audio_mixer_play_stop_cb(
@@ -213,22 +204,6 @@ static void audio_mixer_play_stop_cb(
static void audio_mixer_menu_stop_cb(
audio_mixer_sound_t *sound, unsigned reason);
#ifdef HAVE_THREADS
#define audio_driver_lock() \
if (s_audio_driver_lock) \
slock_lock(s_audio_driver_lock)
#else
#define audio_driver_lock()
#endif
#ifdef HAVE_THREADS
#define audio_driver_unlock() \
if (s_audio_driver_lock) \
slock_unlock(s_audio_driver_lock)
#else
#define audio_driver_unlock()
#endif
static enum resampler_quality audio_driver_get_resampler_quality(void)
{
settings_t *settings = config_get_ptr();
@@ -278,12 +253,12 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
stats->samples = (unsigned)audio_driver_free_samples_count;
#ifdef WARPUP
/* uint64 to double not implemented, fair chance
/* uint64 to double not implemented, fair chance
* signed int64 to double doesn't exist either */
/* https://forums.libretro.com/t/unsupported-platform-help/13903/ */
(void)stddev;
#elif defined(_MSC_VER) && _MSC_VER <= 1200
/* FIXME: error C2520: conversion from unsigned __int64
/* FIXME: error C2520: conversion from unsigned __int64
* to double not implemented, use signed __int64 */
(void)stddev;
#else
@@ -301,9 +276,9 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
stddev = (unsigned)
sqrt((double)accum_var / (samples - 2));
stats->average_buffer_saturation = (1.0f - (float)avg
stats->average_buffer_saturation = (1.0f - (float)avg
/ audio_driver_buffer_size) * 100.0;
stats->std_deviation_percentage = ((float)stddev
stats->std_deviation_percentage = ((float)stddev
/ audio_driver_buffer_size) * 100.0;
#endif
@@ -547,15 +522,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
audio_source_ratio_original = audio_source_ratio_current =
(double)settings->uints.audio_out_rate / audio_driver_input;
#ifdef HAVE_THREADS
if (s_audio_driver_lock)
slock_free(s_audio_driver_lock);
s_audio_driver_lock = slock_new();
#endif
audio_resampler_lock_init();
audio_resampler_lock();
if (!retro_resampler_realloc(
&audio_driver_resampler_data,
&audio_driver_resampler,
@@ -568,8 +534,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
audio_driver_active = false;
}
audio_resampler_unlock();
aud_inp_data = (float*)malloc(max_bufsamples * sizeof(float));
retro_assert(aud_inp_data != NULL);
@@ -640,13 +604,9 @@ void audio_driver_set_nonblocking_state(bool enable)
audio_driver_context_audio_data,
settings->bools.audio_sync ? enable : true);
audio_driver_lock();
audio_driver_chunk_size = enable ?
audio_driver_chunk_nonblock_size :
audio_driver_chunk_block_size;
audio_driver_unlock();
}
/**
@@ -673,13 +633,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
src_data.data_out = NULL;
src_data.output_frames = 0;
recording_driver_lock();
if (recording_data)
recording_push_audio(data, samples);
recording_driver_unlock();
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
&is_perfcnt_enable);
@@ -689,13 +645,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
!audio_driver_output_samples_buf)
return;
audio_driver_lock();
convert_s16_to_float(audio_driver_input_data, data, samples,
audio_volume_gain);
audio_driver_unlock();
src_data.data_in = audio_driver_input_data;
src_data.input_frames = samples >> 1;
@@ -759,11 +711,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
src_data.ratio *= settings->floats.slowmotion_ratio;
}
audio_driver_lock();
audio_resampler_lock();
audio_driver_resampler->process(audio_driver_resampler_data, &src_data);
audio_resampler_unlock();
is_active = audio_mixer_active;
@@ -777,8 +725,6 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
src_data.output_frames, mixer_gain, override);
}
audio_driver_unlock();
output_data = audio_driver_output_samples_buf;
output_frames = (unsigned)src_data.output_frames;
@@ -793,13 +739,9 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
output_frames *= sizeof(int16_t);
}
audio_driver_lock();
if (current_audio->write(audio_driver_context_audio_data,
output_data, output_frames * 2) < 0)
audio_driver_active = false;
audio_driver_unlock();
}
/**
@@ -811,24 +753,14 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
**/
void audio_driver_sample(int16_t left, int16_t right)
{
audio_driver_lock();
if (audio_suspended)
{
audio_driver_unlock();
return;
}
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = left;
audio_driver_output_samples_conv_buf[audio_driver_data_ptr++] = right;
if (audio_driver_data_ptr < audio_driver_chunk_size)
{
audio_driver_unlock();
return;
}
audio_driver_unlock();
audio_driver_flush(audio_driver_output_samples_conv_buf,
audio_driver_data_ptr);
@@ -975,7 +907,7 @@ void audio_driver_monitor_adjust_system_rates(void)
float video_refresh_rate = settings->floats.video_refresh_rate;
float max_timing_skew = settings->floats.audio_max_timing_skew;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
const struct retro_system_timing *info =
const struct retro_system_timing *info =
(const struct retro_system_timing*)&av_info->timing;
if (info->sample_rate <= 0.0)
@@ -1051,13 +983,10 @@ bool audio_driver_find_driver(void)
void audio_driver_deinit_resampler(void)
{
audio_resampler_lock();
if (audio_driver_resampler && audio_driver_resampler_data)
audio_driver_resampler->free(audio_driver_resampler_data);
audio_driver_resampler = NULL;
audio_driver_resampler_data = NULL;
audio_resampler_unlock();
audio_resampler_lock_free();
}
bool audio_driver_free_devices_list(void)
@@ -1281,7 +1210,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
if (params->stream_type == AUDIO_STREAM_TYPE_NONE)
return false;
switch (params->slot_selection_type)
{
case AUDIO_MIXER_SLOT_SELECTION_MANUAL:
@@ -1353,8 +1282,6 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
break;
}
audio_driver_lock();
audio_mixer_active = true;
audio_mixer_streams[free_slot].name = !string_is_empty(params->basename) ? strdup(params->basename) : NULL;
@@ -1367,8 +1294,6 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
audio_mixer_streams[free_slot].volume = params->volume;
audio_mixer_streams[free_slot].stop_cb = stop_cb;
audio_driver_unlock();
return true;
}
@@ -1406,7 +1331,8 @@ static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type)
audio_mixer_streams[i].state = (enum audio_mixer_state)type;
}
static void audio_driver_load_menu_bgm_callback(void *task_data, void *user_data, const char *error)
static void audio_driver_load_menu_bgm_callback(retro_task_t *task,
void *task_data, void *user_data, const char *error)
{
bool contentless = false;
bool is_inited = false;
@@ -1428,7 +1354,7 @@ void audio_driver_load_menu_sounds(void)
const char *path_bgm = NULL;
struct string_list *list = NULL;
struct string_list *list_fallback = NULL;
int i = 0;
unsigned i = 0;
sounds_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
sounds_fallback_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
@@ -1652,10 +1578,6 @@ bool audio_driver_deinit(void)
{
audio_driver_mixer_deinit();
audio_driver_free_devices_list();
#ifdef HAVE_THREADS
slock_free(s_audio_driver_lock);
s_audio_driver_lock = NULL;
#endif
if (!audio_driver_deinit_internal())
return false;
@@ -1787,21 +1709,6 @@ void audio_driver_destroy_data(void)
audio_driver_context_audio_data = NULL;
}
void audio_driver_set_own_driver(void)
{
audio_driver_data_own = true;
}
void audio_driver_unset_own_driver(void)
{
audio_driver_data_own = false;
}
bool audio_driver_owns_driver(void)
{
return audio_driver_data_own;
}
void audio_driver_suspend(void)
{
audio_suspended = true;
@@ -1830,7 +1737,6 @@ bool audio_driver_is_active(void)
void audio_driver_destroy(void)
{
audio_driver_active = false;
audio_driver_data_own = false;
current_audio = NULL;
}
@@ -1895,3 +1801,11 @@ bool *audio_get_bool_ptr(enum audio_action action)
return NULL;
}
const char* audio_driver_get_ident(void)
{
if (!current_audio)
return NULL;
return current_audio->ident;
}
+2 -6
View File
@@ -142,10 +142,6 @@ typedef struct audio_driver
void audio_driver_destroy_data(void);
void audio_driver_set_own_driver(void);
void audio_driver_unset_own_driver(void);
void audio_driver_suspend(void);
bool audio_driver_is_suspended(void);
@@ -236,8 +232,6 @@ bool audio_driver_start(bool is_shutdown);
bool audio_driver_stop(void);
bool audio_driver_owns_driver(void);
void audio_driver_unset_callback(void);
void audio_driver_frame_is_reverse(void);
@@ -288,6 +282,8 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats);
void audio_driver_load_menu_sounds(void);
const char* audio_driver_get_ident(void);
extern audio_driver_t audio_rsound;
extern audio_driver_t audio_audioio;
extern audio_driver_t audio_oss;
+11
View File
@@ -180,6 +180,7 @@ error:
#define BYTES_TO_FRAMES(bytes, frame_bits) ((bytes) * 8 / frame_bits)
#define FRAMES_TO_BYTES(frames, frame_bits) ((frames) * frame_bits / 8)
static bool alsa_start(void *data, bool is_shutdown);
static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
{
alsa_t *alsa = (alsa_t*)data;
@@ -188,6 +189,12 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
snd_pcm_sframes_t size = BYTES_TO_FRAMES(size_, alsa->frame_bits);
size_t frames_size = alsa->has_float ? sizeof(float) : sizeof(int16_t);
/* Workaround buggy menu code.
* If a write happens while we're paused, we might never progress. */
if (alsa->is_paused)
if (!alsa_start(alsa, false))
return -1;
if (alsa->nonblock)
{
while (size)
@@ -269,6 +276,8 @@ static bool alsa_alive(void *data)
static bool alsa_stop(void *data)
{
alsa_t *alsa = (alsa_t*)data;
if (alsa->is_paused)
return true;
if (alsa->can_pause
&& !alsa->is_paused)
@@ -293,6 +302,8 @@ static void alsa_set_nonblock_state(void *data, bool state)
static bool alsa_start(void *data, bool is_shutdown)
{
alsa_t *alsa = (alsa_t*)data;
if (!alsa->is_paused)
return true;
if (alsa->can_pause
&& alsa->is_paused)
+392 -382
View File
@@ -1,382 +1,392 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2019 - Stuart Carnie
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
#include <stdio.h>
#include <stdatomic.h>
#include <stdlib.h>
#include <memory.h>
#include "../audio_driver.h"
#pragma mark - ringbuffer
typedef struct ringbuffer
{
float *buffer;
size_t cap;
atomic_int len;
size_t writePtr;
size_t readPtr;
} ringbuffer_t;
typedef ringbuffer_t * ringbuffer_h;
static inline size_t rb_len(ringbuffer_h r)
{
return atomic_load_explicit(&r->len, memory_order_relaxed);
}
static inline size_t rb_cap(ringbuffer_h r)
{
return (r->readPtr + r->cap - r->writePtr) % r->cap;
}
static inline size_t rb_avail(ringbuffer_h r)
{
return r->cap - rb_len(r);
}
static inline void rb_advance_write(ringbuffer_h r)
{
r->writePtr = (r->writePtr + 1) % r->cap;
}
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
{
r->writePtr = (r->writePtr + n) % r->cap;
}
static inline void rb_advance_read(ringbuffer_h r)
{
r->readPtr = (r->readPtr + 1) % r->cap;
}
static inline void rb_len_add(ringbuffer_h r, int n)
{
atomic_fetch_add(&r->len, n);
}
static inline void rb_len_sub(ringbuffer_h r, int n)
{
atomic_fetch_sub(&r->len, n);
}
static void rb_init(ringbuffer_h r, size_t cap)
{
r->buffer = malloc(cap * sizeof(float));
r->cap = cap;
atomic_init(&r->len, 0);
r->writePtr = 0;
r->readPtr = 0;
}
static void rb_free(ringbuffer_h r)
{
free(r->buffer);
bzero(r, sizeof(*r));
}
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
{
size_t avail = rb_avail(r);
size_t n = MIN(len, avail);
size_t first_write = n;
size_t rest_write = 0;
if (r->writePtr + n > r->cap)
{
first_write = r->cap - r->writePtr;
rest_write = n - first_write;
}
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
rb_advance_write_n(r, n);
rb_len_add(r, (int)n);
}
static void rb_read_data(ringbuffer_h r, float *d0, float *d1, size_t len)
{
size_t need = len*2;
do {
size_t have = rb_len(r);
size_t n = MIN(have, need);
int i = 0;
for (; i < n/2; i++)
{
d0[i] = r->buffer[r->readPtr];
rb_advance_read(r);
d1[i] = r->buffer[r->readPtr];
rb_advance_read(r);
}
need -= n;
rb_len_sub(r, (int)n);
if (UNLIKELY(need > 0))
{
/* we got more data */
if (rb_len(r) > 0)
continue;
// underflow
const float quiet = 0.0f;
size_t fill = (need/2)*sizeof(float);
memset_pattern4(&d0[i], &quiet, fill);
memset_pattern4(&d1[i], &quiet, fill);
}
} while (0);
}
#pragma mark - CoreAudio3
static bool g_interrupted;
@interface CoreAudio3 : NSObject {
ringbuffer_t _rb;
dispatch_semaphore_t _sema;
AUAudioUnit *_au;
size_t _bufferSize;
BOOL _nonBlock;
}
@property (nonatomic, readwrite) BOOL nonBlock;
@property (nonatomic, readonly) BOOL paused;
@property (nonatomic, readonly) size_t writeAvailableInBytes;
@property (nonatomic, readonly) size_t bufferSizeInBytes;
- (instancetype)initWithRate:(NSUInteger)rate
latency:(NSUInteger)latency;
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples;
- (void)start;
- (void)stop;
@end
@implementation CoreAudio3
- (instancetype)initWithRate:(NSUInteger)rate
latency:(NSUInteger)latency {
if (self = [super init])
{
_sema = dispatch_semaphore_create(0);
_bufferSize = (latency * rate) / 1000;
_bufferSize *= 2; // stereo
rb_init(&_rb, _bufferSize);
AudioComponentDescription desc = {
.componentType = kAudioUnitType_Output,
.componentSubType = kAudioUnitSubType_DefaultOutput,
.componentManufacturer = kAudioUnitManufacturer_Apple,
};
NSError *err;
AUAudioUnit *au = [[AUAudioUnit alloc] initWithComponentDescription:desc error:&err];
if (err != nil)
return nil;
AVAudioFormat *format = au.outputBusses[0].format;
if (format.channelCount != 2)
return nil;
AVAudioFormat *renderFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:rate channels:2];
[au.inputBusses[0] setFormat:renderFormat error:&err];
if (err != nil)
return nil;
ringbuffer_h rb = &_rb;
__block dispatch_semaphore_t sema = _sema;
au.outputProvider = ^AUAudioUnitStatus(AudioUnitRenderActionFlags * actionFlags, const AudioTimeStamp * timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber, AudioBufferList * inputData) {
rb_read_data(rb, inputData->mBuffers[0].mData, inputData->mBuffers[1].mData, frameCount);
dispatch_semaphore_signal(sema);
return 0;
};
[au allocateRenderResourcesAndReturnError:&err];
if (err != nil)
return nil;
_au = au;
RARCH_LOG("[CoreAudio3]: Using buffer size of %u bytes: (latency = %u ms)\n", (unsigned)self.bufferSizeInBytes, latency);
[self start];
}
return self;
}
- (void)dealloc {
rb_free(&_rb);
}
- (BOOL)paused {
return !_au.running;
}
- (size_t)bufferSizeInBytes {
return _bufferSize * sizeof(float);
}
- (size_t)writeAvailableInBytes {
return rb_avail(&_rb) * sizeof(float);
}
- (void)start {
NSError *err;
[_au startHardwareAndReturnError:&err];
}
- (void)stop {
[_au stopHardware];
}
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples {
size_t written = 0;
while (!g_interrupted && samples > 0)
{
size_t write_avail = rb_avail(&_rb);
if (write_avail > samples)
write_avail = samples;
rb_write_data(&_rb, data, write_avail);
data += write_avail;
written += write_avail;
samples -= write_avail;
if (_nonBlock)
break;
if (write_avail == 0)
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
}
return written;
}
@end
static void coreaudio3_free(void *data)
{
CoreAudio3 *dev = (__bridge_transfer CoreAudio3 *)data;
if (dev == nil)
return;
[dev stop];
dev = nil;
}
static void *coreaudio3_init(const char *device,
unsigned rate, unsigned latency,
unsigned block_frames,
unsigned *new_rate)
{
CoreAudio3 *dev = [[CoreAudio3 alloc] initWithRate:rate
latency:latency];
*new_rate = rate;
return (__bridge_retained void *)dev;
}
static ssize_t coreaudio3_write(void *data, const void *buf_, size_t size)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
return [dev writeFloat:(const float *)buf_ samples:size/sizeof(float)] * sizeof(float);
}
static void coreaudio3_set_nonblock_state(void *data, bool state)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return;
dev.nonBlock = state;
}
static bool coreaudio3_alive(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
return !dev.paused;
}
static bool coreaudio3_stop(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
[dev stop];
return dev.paused;
}
static bool coreaudio3_start(void *data, bool is_shutdown)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
[dev start];
return !dev.paused;
}
static bool coreaudio3_use_float(void *data)
{
return YES;
}
static size_t coreaudio3_write_avail(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return 0;
return dev.writeAvailableInBytes;
}
static size_t coreaudio3_buffer_size(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return 0;
return dev.bufferSizeInBytes;
}
audio_driver_t audio_coreaudio3 = {
coreaudio3_init,
coreaudio3_write,
coreaudio3_stop,
coreaudio3_start,
coreaudio3_alive,
coreaudio3_set_nonblock_state,
coreaudio3_free,
coreaudio3_use_float,
"coreaudio3",
coreaudio3_write_avail,
coreaudio3_buffer_size,
};
/* RetroArch - A frontend for libretro.
* Copyright (C) 2019 - Stuart Carnie
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
#include <stdio.h>
#include <stdatomic.h>
#include <stdlib.h>
#include <memory.h>
#include "../audio_driver.h"
#pragma mark - ringbuffer
typedef struct ringbuffer
{
float *buffer;
size_t cap;
atomic_int len;
size_t writePtr;
size_t readPtr;
} ringbuffer_t;
typedef ringbuffer_t * ringbuffer_h;
static inline size_t rb_len(ringbuffer_h r)
{
return atomic_load_explicit(&r->len, memory_order_relaxed);
}
static inline size_t rb_cap(ringbuffer_h r)
{
return (r->readPtr + r->cap - r->writePtr) % r->cap;
}
static inline size_t rb_avail(ringbuffer_h r)
{
return r->cap - rb_len(r);
}
static inline void rb_advance_write(ringbuffer_h r)
{
r->writePtr = (r->writePtr + 1) % r->cap;
}
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
{
r->writePtr = (r->writePtr + n) % r->cap;
}
static inline void rb_advance_read(ringbuffer_h r)
{
r->readPtr = (r->readPtr + 1) % r->cap;
}
static inline void rb_len_add(ringbuffer_h r, int n)
{
atomic_fetch_add(&r->len, n);
}
static inline void rb_len_sub(ringbuffer_h r, int n)
{
atomic_fetch_sub(&r->len, n);
}
static void rb_init(ringbuffer_h r, size_t cap)
{
r->buffer = malloc(cap * sizeof(float));
r->cap = cap;
atomic_init(&r->len, 0);
r->writePtr = 0;
r->readPtr = 0;
}
static void rb_free(ringbuffer_h r)
{
free(r->buffer);
memset(r, 0, sizeof(*r));
}
#define UNLIKELY(x) __builtin_expect((x), 0)
#define LIKELY(x) __builtin_expect((x), 1)
static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
{
size_t avail = rb_avail(r);
size_t n = MIN(len, avail);
size_t first_write = n;
size_t rest_write = 0;
if (r->writePtr + n > r->cap)
{
first_write = r->cap - r->writePtr;
rest_write = n - first_write;
}
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
rb_advance_write_n(r, n);
rb_len_add(r, (int)n);
}
static void rb_read_data(ringbuffer_h r,
float *d0, float *d1, size_t len)
{
size_t need = len * 2;
do {
size_t have = rb_len(r);
size_t n = MIN(have, need);
int i = 0;
for (; i < n/2; i++)
{
d0[i] = r->buffer[r->readPtr];
rb_advance_read(r);
d1[i] = r->buffer[r->readPtr];
rb_advance_read(r);
}
need -= n;
rb_len_sub(r, (int)n);
if (UNLIKELY(need > 0))
{
const float quiet = 0.0f;
size_t fill;
/* we got more data */
if (rb_len(r) > 0)
continue;
/* underflow */
fill = (need/2)*sizeof(float);
memset_pattern4(&d0[i], &quiet, fill);
memset_pattern4(&d1[i], &quiet, fill);
}
} while (0);
}
#pragma mark - CoreAudio3
static bool g_interrupted;
@interface CoreAudio3 : NSObject {
ringbuffer_t _rb;
dispatch_semaphore_t _sema;
AUAudioUnit *_au;
size_t _bufferSize;
BOOL _nonBlock;
}
@property (nonatomic, readwrite) BOOL nonBlock;
@property (nonatomic, readonly) BOOL paused;
@property (nonatomic, readonly) size_t writeAvailableInBytes;
@property (nonatomic, readonly) size_t bufferSizeInBytes;
- (instancetype)initWithRate:(NSUInteger)rate
latency:(NSUInteger)latency;
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples;
- (void)start;
- (void)stop;
@end
@implementation CoreAudio3
- (instancetype)initWithRate:(NSUInteger)rate
latency:(NSUInteger)latency {
if (self = [super init])
{
NSError *err;
AUAudioUnit *au;
AudioComponentDescription desc;
AVAudioFormat *format, *renderFormat;
_sema = dispatch_semaphore_create(0);
_bufferSize = (latency * rate) / 1000;
_bufferSize *= 2; /* stereo */
rb_init(&_rb, _bufferSize);
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
au = [[AUAudioUnit alloc] initWithComponentDescription:desc error:&err];
if (err != nil)
return nil;
format = au.outputBusses[0].format;
if (format.channelCount != 2)
return nil;
renderFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:rate channels:2];
[au.inputBusses[0] setFormat:renderFormat error:&err];
if (err != nil)
return nil;
ringbuffer_h rb = &_rb;
__block dispatch_semaphore_t sema = _sema;
au.outputProvider = ^AUAudioUnitStatus(AudioUnitRenderActionFlags * actionFlags, const AudioTimeStamp * timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber, AudioBufferList * inputData)
{
rb_read_data(rb, inputData->mBuffers[0].mData, inputData->mBuffers[1].mData, frameCount);
dispatch_semaphore_signal(sema);
return 0;
};
[au allocateRenderResourcesAndReturnError:&err];
if (err != nil)
return nil;
_au = au;
RARCH_LOG("[CoreAudio3]: Using buffer size of %u bytes: (latency = %u ms)\n", (unsigned)self.bufferSizeInBytes, latency);
[self start];
}
return self;
}
- (void)dealloc {
rb_free(&_rb);
}
- (BOOL)paused {
return !_au.running;
}
- (size_t)bufferSizeInBytes {
return _bufferSize * sizeof(float);
}
- (size_t)writeAvailableInBytes {
return rb_avail(&_rb) * sizeof(float);
}
- (void)start {
NSError *err;
[_au startHardwareAndReturnError:&err];
}
- (void)stop {
[_au stopHardware];
}
- (ssize_t)writeFloat:(const float *)data samples:(size_t)samples {
size_t written = 0;
while (!g_interrupted && samples > 0)
{
size_t write_avail = rb_avail(&_rb);
if (write_avail > samples)
write_avail = samples;
rb_write_data(&_rb, data, write_avail);
data += write_avail;
written += write_avail;
samples -= write_avail;
if (_nonBlock)
break;
if (write_avail == 0)
dispatch_semaphore_wait(_sema, DISPATCH_TIME_FOREVER);
}
return written;
}
@end
static void coreaudio3_free(void *data)
{
CoreAudio3 *dev = (__bridge_transfer CoreAudio3 *)data;
if (dev == nil)
return;
[dev stop];
dev = nil;
}
static void *coreaudio3_init(const char *device,
unsigned rate, unsigned latency,
unsigned block_frames,
unsigned *new_rate)
{
CoreAudio3 *dev = [[CoreAudio3 alloc] initWithRate:rate
latency:latency];
*new_rate = rate;
return (__bridge_retained void *)dev;
}
static ssize_t coreaudio3_write(void *data,
const void *buf_, size_t size)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
return [dev writeFloat:(const float *)
buf_ samples:size/sizeof(float)] * sizeof(float);
}
static void coreaudio3_set_nonblock_state(void *data, bool state)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return;
dev.nonBlock = state;
}
static bool coreaudio3_alive(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
return !dev.paused;
}
static bool coreaudio3_stop(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
[dev stop];
return dev.paused;
}
static bool coreaudio3_start(void *data, bool is_shutdown)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return NO;
[dev start];
return !dev.paused;
}
static bool coreaudio3_use_float(void *data)
{
return YES;
}
static size_t coreaudio3_write_avail(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return 0;
return dev.writeAvailableInBytes;
}
static size_t coreaudio3_buffer_size(void *data)
{
CoreAudio3 *dev = (__bridge CoreAudio3 *)data;
if (dev == nil)
return 0;
return dev.bufferSizeInBytes;
}
audio_driver_t audio_coreaudio3 = {
coreaudio3_init,
coreaudio3_write,
coreaudio3_stop,
coreaudio3_start,
coreaudio3_alive,
coreaudio3_set_nonblock_state,
coreaudio3_free,
coreaudio3_use_float,
"coreaudio3",
NULL, /* device_list_new */
NULL, /* device_list_free */
coreaudio3_write_avail,
coreaudio3_buffer_size,
};
+13 -128
View File
@@ -23,83 +23,16 @@
#include "../audio_driver.h"
typedef struct ps2_audio
{
fifo_buffer_t* buffer;
bool nonblocking;
volatile bool running;
int worker_thread;
int lock;
int cond_lock;
} ps2_audio_t;
static ps2_audio_t *backup_ps2;
static u8 audioThreadStack[4 * 1024] __attribute__ ((aligned(16)));
#define AUDIO_OUT_BUFFER 2 * 1024
#define AUDIO_BUFFER 64 * 1024
#define AUDIO_BUFFER 128 * 1024
#define AUDIO_CHANNELS 2
#define AUDIO_BITS 16
#define AUDIO_PRIORITY 0x7F /* LOWER VALUE GRATHER PRIORITY*/
static void audioMainLoop(void *data)
typedef struct ps2_audio
{
char out_tmp[AUDIO_OUT_BUFFER];
ps2_audio_t* ps2 = backup_ps2;
bool nonblocking;
bool running;
while (ps2->running)
{
size_t size;
WaitSema(ps2->lock);
size = MIN(fifo_read_avail(ps2->buffer), sizeof(out_tmp));
fifo_read(ps2->buffer, out_tmp, size);
iSignalSema(ps2->lock);
iSignalSema(ps2->cond_lock);
audsrv_wait_audio(size);
audsrv_play_audio(out_tmp, size);
}
audsrv_stop_audio();
ExitDeleteThread();
}
static void audioCreateThread(ps2_audio_t *ps2)
{
int ret;
ee_thread_t thread;
thread.func=&audioMainLoop;
thread.stack=audioThreadStack;
thread.stack_size=sizeof(audioThreadStack);
thread.gp_reg=&_gp;
thread.initial_priority=AUDIO_PRIORITY;
thread.attr=thread.option=0;
/*Backup the PS2 content to be used in the thread */
backup_ps2 = ps2;
ps2->running = true;
ps2->worker_thread = CreateThread(&thread);
if (ps2->worker_thread >= 0)
{
ret = StartThread(ps2->worker_thread, NULL);
if (ret < 0)
printf("sound_init: StartThread returned %d\n", ret);
}
else
printf("CreateThread failed: %d\n", ps2->worker_thread);
}
static void audioStopNDeleteThread(ps2_audio_t *ps2)
{
ps2->running = false;
if (ps2->worker_thread)
ps2->worker_thread = 0;
}
} ps2_audio_t;
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
{
@@ -120,23 +53,6 @@ static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
audsrv_set_volume(MAX_VOLUME);
}
static void audioCreateSemas(ps2_audio_t *ps2)
{
ee_sema_t lock_info;
ee_sema_t cond_lock_info;
lock_info.max_count = 1;
lock_info.init_count = 1;
lock_info.option = 0;
ps2->lock = CreateSema(&lock_info);
cond_lock_info.init_count = 1;
cond_lock_info.max_count = 1;
cond_lock_info.option = 0;
ps2->cond_lock = CreateSema(&cond_lock_info);
}
static void *ps2_audio_init(const char *device,
unsigned rate, unsigned latency,
unsigned block_frames,
@@ -147,10 +63,7 @@ static void *ps2_audio_init(const char *device,
if (!ps2)
return NULL;
ps2->buffer = fifo_new(AUDIO_BUFFER);
audioConfigure(ps2, rate);
audioCreateSemas(ps2);
audioCreateThread(ps2);
return ps2;
}
@@ -161,45 +74,22 @@ static void ps2_audio_free(void *data)
if(!ps2)
return;
if(ps2->running){
audioStopNDeleteThread(ps2);
if (ps2->lock){
iDeleteSema(ps2->lock);
ps2->lock = 0;
}
if (ps2->cond_lock){
iDeleteSema(ps2->cond_lock);
ps2->cond_lock = 0;
}
}
fifo_free(ps2->buffer);
ps2->running = false;
audsrv_stop_audio();
free(ps2);
}
static ssize_t ps2_audio_write(void *data, const void *buf, size_t size)
{
int bytes_sent;
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (!ps2->running)
return -1;
if (ps2->nonblocking)
{
if (fifo_write_avail(ps2->buffer) < size)
return 0;
}
bytes_sent = audsrv_play_audio(buf, size);
while (fifo_write_avail(ps2->buffer) < size)
WaitSema(ps2->cond_lock);
WaitSema(ps2->lock);
fifo_write(ps2->buffer, buf, size);
iSignalSema(ps2->lock);
return size;
return bytes_sent;
}
static bool ps2_audio_alive(void *data)
@@ -220,8 +110,8 @@ static bool ps2_audio_stop(void *data)
if (ps2)
{
audioStopNDeleteThread(ps2);
audsrv_stop_audio();
ps2->running = false;
}
return stop;
@@ -234,8 +124,7 @@ static bool ps2_audio_start(void *data, bool is_shutdown)
if (ps2)
{
if (!ps2->running && !ps2->worker_thread)
audioCreateThread(ps2);
ps2->running = true;
}
return start;
@@ -260,11 +149,7 @@ static size_t ps2_audio_write_avail(void *data)
if (ps2 && ps2->running)
{
size_t size;
WaitSema(ps2->lock);
size = AUDIO_BUFFER - fifo_read_avail(ps2->buffer);
iSignalSema(ps2->lock);
return size;
return AUDIO_BUFFER;
}
return 0;
+2 -3
View File
@@ -186,7 +186,7 @@ static void psp_audio_free(void *data)
psp->running = false;
sthread_join(psp->worker_thread);
}
if (psp->cond)
scond_free(psp->cond);
if (psp->fifo_lock)
@@ -205,7 +205,7 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
psp_audio_t* psp = (psp_audio_t*)data;
uint16_t write_pos = psp->write_pos;
uint16_t sampleCount = size / sizeof(uint32_t);
if (!psp->running)
return -1;
@@ -241,7 +241,6 @@ static ssize_t psp_audio_write(void *data, const void *buf, size_t size)
slock_unlock(psp->fifo_lock);
return size;
}
static bool psp_audio_alive(void *data)
+11
View File
@@ -237,12 +237,19 @@ error:
return NULL;
}
static bool pulse_start(void *data, bool is_shutdown);
static ssize_t pulse_write(void *data, const void *buf_, size_t size)
{
pa_t *pa = (pa_t*)data;
const uint8_t *buf = (const uint8_t*)buf_;
size_t written = 0;
/* Workaround buggy menu code.
* If a write happens while we're paused, we might never progress. */
if (pa->is_paused)
if (!pulse_start(pa, false))
return -1;
pa_threaded_mainloop_lock(pa->mainloop);
while (size)
{
@@ -270,6 +277,8 @@ static bool pulse_stop(void *data)
{
bool ret;
pa_t *pa = (pa_t*)data;
if (pa->is_paused)
return true;
RARCH_LOG("[PulseAudio]: Pausing.\n");
@@ -296,6 +305,8 @@ static bool pulse_start(void *data, bool is_shutdown)
{
bool ret;
pa_t *pa = (pa_t*)data;
if (!pa->is_paused)
return true;
RARCH_LOG("[PulseAudio]: Unpausing.\n");
+3 -3
View File
@@ -120,7 +120,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
if (to_write > switch_audio_buffer_size(NULL) - swa->current_buffer->data_size)
to_write = switch_audio_buffer_size(NULL) - swa->current_buffer->data_size;
#ifndef HAVE_LIBNX
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
#else
@@ -137,7 +137,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
}
swa->last_append = svcGetSystemTick();
return to_write;
}
@@ -328,7 +328,7 @@ static void *switch_audio_init(const char *device,
swa->is_paused = true;
RARCH_LOG("[Audio]: Audio initialized\n");
return swa;
fail_audio_output:
+1 -1
View File
@@ -237,7 +237,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
if (switch_audio_ipc_output_append_buffer(swa, &swa->buffers[i]) != 0)
goto fail_audio_output;
}
compat_mutex_create(&swa->fifoLock);
swa->fifo = fifo_new(swa->fifoSize);
+1 -2
View File
@@ -2169,10 +2169,9 @@ static void * tinyalsa_init(const char *devicestr, unsigned rate,
unsigned int device = 0;
unsigned int frames_per_ms = 0;
unsigned int orig_rate = rate;
unsigned int max_rate, min_rate;
unsigned int max_rate, min_rate, buffer_size;
float initial_latency;
snd_pcm_uframes_t buffer_size;
struct pcm_config config;
tinyalsa_t *tinyalsa = (tinyalsa_t*)calloc(1, sizeof(tinyalsa_t));
+2 -2
View File
@@ -219,7 +219,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
goto error;
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL, AudioCategory_GameEffects)))
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, (LPCWSTR)(uintptr_t)device, NULL, AudioCategory_GameEffects)))
goto error;
#else
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL)))
@@ -315,7 +315,7 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency,
bufsize = latency * rate / 1000;
RARCH_LOG("XAudio2: Requesting %u ms latency, using %d ms latency.\n",
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
latency, (int)bufsize * 1000 / rate);
xa->bufsize = bufsize * 2 * sizeof(float);
+1285 -1301
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -149,7 +149,7 @@ done:
}
static void *resampler_CC_init(const struct resampler_config *config,
double bandwidth_mod,
double bandwidth_mod,
enum resampler_quality quality,
resampler_simd_mask_t mask)
{
@@ -488,7 +488,7 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
}
static void *resampler_CC_init(const struct resampler_config *config,
double bandwidth_mod,
double bandwidth_mod,
enum resampler_quality quality,
resampler_simd_mask_t mask)
{
@@ -78,7 +78,6 @@
# d23: (temp) # d31: buffer[6]
# (temp) # buffer[7]
resampler_CC_downsample_neon:
_resampler_CC_downsample_neon:
@@ -89,7 +88,6 @@ push {r4}
mov r4, r0
veor q0, q0, q0
vmov.f32 s1, #1.0
vmov.f32 s2, #2.0
@@ -102,18 +100,15 @@ vmov.f32 q5, #1.0
vmov.f32 q6, #3.0
vmov.f32 q7, #0.25
vldr s5, [r2, #32]
vdiv.f32 s6, s20, s4
vadd.f32 s7, s6, s8
vdup.f32 q4, d2[0]
vmin.f32 q4, q4, q5
lsl r3, #3
add r3, r3, r1
cmp r3, r1
beq 3f
1:
@@ -199,7 +194,6 @@ vpop {q4,q5,q6,q7}
bx lr
.align 4
.globl resampler_CC_upsample_neon
#ifndef __MACH__
@@ -256,7 +250,6 @@ bx lr
# d23: (temp) # d31: buffer[6]
# (temp) # buffer[7]
resampler_CC_upsample_neon:
_resampler_CC_upsample_neon:
@@ -267,7 +260,6 @@ push {r4}
mov r4, r0
veor q0, q0, q0
vmov.f32 s0, #1.0
vmov.f32 s2, #-1.0
@@ -280,18 +272,15 @@ vmov.f32 q5, #1.0
vmov.f32 q6, #3.0
vmov.f32 q7, #0.25
vldr s5, [r2, #32]
vdiv.f32 s6, s20, s4
vadd.f32 s7, s6, s8
vdup.f32 q4, d2[0]
vmin.f32 q4, q4, q5
lsl r3, #3
add r3, r3, r1
cmp r3, r1
beq 4f
1:
@@ -356,7 +345,6 @@ vst1.f32 d20, [r4, :64]!
vadd.f32 s5, s5, s6
vcmpe.f32 s5, s20
vmrs APSR_nzcv, fpscr
blt 2b
@@ -368,7 +356,6 @@ vsub.f32 s5, s5, s20
cmp r3, r1
bne 1b
4:
vst1.f32 {q14-q15}, [r2, :256]
vstr s5, [r2, #32]
+2 -3
View File
@@ -86,7 +86,7 @@ SECTIONS
KEEP (*(.fini))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
@@ -167,7 +167,6 @@ SECTIONS
.jcr : { KEEP (*(.jcr)) }
.got : { *(.got.plt) *(.got) }
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
@@ -182,7 +181,7 @@ SECTIONS
_edata = .;
PROVIDE (edata = .);
.sbss :
{
__sbss_start = .;
+2 -3
View File
@@ -97,7 +97,7 @@ SECTIONS
KEEP (*(.fini))
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
} = 0
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
@@ -178,7 +178,6 @@ SECTIONS
.jcr : { KEEP (*(.jcr)) }
.got : { *(.got.plt) *(.got) }
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
@@ -193,7 +192,7 @@ SECTIONS
_edata = .;
PROVIDE (edata = .);
.sbss :
{
__sbss_start = .;
+1 -1
View File
@@ -56,7 +56,7 @@ void exitspawn_kernel(const char *fileName, SceSize args, void *argp)
game_param.unk5 = 0x10000;
int k1 = pspSdkSetK1(0);
//sceKernelSuspendAllUserThreads();
//sceKernelSuspendAllUserThreads();
int ret = sceKernelLoadExecVSHMs2(fileName, &game_param);
pspSdkSetK1(k1);
}
+2 -16
View File
@@ -37,11 +37,6 @@ static const camera_driver_t *camera_drivers[] = {
#endif
#ifdef ANDROID
&camera_android,
#endif
#if defined(HAVE_AVFOUNDATION)
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
&camera_avfoundation,
#endif
#endif
&camera_null,
NULL,
@@ -51,7 +46,6 @@ static struct retro_camera_callback camera_cb;
static const camera_driver_t *camera_driver = NULL;
static void *camera_data = NULL;
static bool camera_driver_active = false;
static bool camera_driver_data_own = false;
/**
* camera_driver_find_handle:
@@ -126,18 +120,9 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
{
case RARCH_CAMERA_CTL_DESTROY:
camera_driver_active = false;
camera_driver_data_own = false;
camera_driver = NULL;
camera_data = NULL;
break;
case RARCH_CAMERA_CTL_SET_OWN_DRIVER:
camera_driver_data_own = true;
break;
case RARCH_CAMERA_CTL_UNSET_OWN_DRIVER:
camera_driver_data_own = false;
break;
case RARCH_CAMERA_CTL_OWNS_DRIVER:
return camera_driver_data_own;
case RARCH_CAMERA_CTL_SET_ACTIVE:
camera_driver_active = true;
break;
@@ -206,7 +191,8 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
return camera_driver->start(camera_data);
runloop_msg_queue_push(
"Camera is explicitly disabled.\n", 1, 180, false);
"Camera is explicitly disabled.\n", 1, 180, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case RARCH_CAMERA_CTL_SET_CB:
-3
View File
@@ -30,9 +30,6 @@ enum rarch_camera_ctl_state
RARCH_CAMERA_CTL_NONE = 0,
RARCH_CAMERA_CTL_DESTROY,
RARCH_CAMERA_CTL_DEINIT,
RARCH_CAMERA_CTL_SET_OWN_DRIVER,
RARCH_CAMERA_CTL_UNSET_OWN_DRIVER,
RARCH_CAMERA_CTL_OWNS_DRIVER,
RARCH_CAMERA_CTL_SET_ACTIVE,
RARCH_CAMERA_CTL_UNSET_ACTIVE,
RARCH_CAMERA_CTL_IS_ACTIVE,
+1 -1
View File
@@ -34,7 +34,7 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
#ifdef HAVE_MENU
menu_display_reset_textures_list(badge_file, fullpath,
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
#endif
}
+2 -2
View File
@@ -16,10 +16,10 @@
#ifndef __RARCH_CHEEVOS_BADGE_H
#define __RARCH_CHEEVOS_BADGE_H
#include "../menu/menu_driver.h"
#include <retro_common_api.h>
#include "../menu/menu_driver.h"
RETRO_BEGIN_DECLS
#define CHEEVOS_BADGE_LIMIT 256
+452 -419
View File
File diff suppressed because it is too large. Load diff
+22 -22
View File
@@ -27,49 +27,49 @@
RETRO_BEGIN_DECLS
typedef struct cheevos_ctx_desc
typedef struct rcheevos_ctx_desc
{
unsigned idx;
char *s;
size_t len;
} cheevos_ctx_desc_t;
} rcheevos_ctx_desc_t;
enum
{
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
RCHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
RCHEEVOS_ACTIVE_HARDCORE = 1 << 1
};
bool cheevos_load(const void *data);
bool rcheevos_load(const void *data);
void cheevos_reset_game(void);
void rcheevos_reset_game(void);
void cheevos_populate_menu(void *data);
void rcheevos_populate_menu(void *data);
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
bool rcheevos_get_description(rcheevos_ctx_desc_t *desc);
bool cheevos_apply_cheats(bool *data_bool);
bool rcheevos_apply_cheats(bool *data_bool);
bool cheevos_unload(void);
bool rcheevos_unload(void);
bool cheevos_toggle_hardcore_mode(void);
bool rcheevos_toggle_hardcore_mode(void);
void cheevos_test(void);
void rcheevos_test(void);
bool cheevos_set_cheats(void);
bool rcheevos_set_cheats(void);
void cheevos_set_support_cheevos(bool state);
void rcheevos_set_support_cheevos(bool state);
bool cheevos_get_support_cheevos(void);
bool rcheevos_get_support_cheevos(void);
int cheevos_get_console(void);
int rcheevos_get_console(void);
extern bool cheevos_loaded;
extern bool cheevos_hardcore_active;
extern bool cheevos_hardcore_paused;
extern bool cheevos_state_loaded_flag;
extern int cheats_are_enabled;
extern int cheats_were_enabled;
extern bool rcheevos_loaded;
extern bool rcheevos_hardcore_active;
extern bool rcheevos_hardcore_paused;
extern bool rcheevos_state_loaded_flag;
extern int rcheevos_cheats_are_enabled;
extern int rcheevos_cheats_were_enabled;
RETRO_END_DECLS
+2 -2
View File
@@ -5,7 +5,7 @@
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
*/
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
/* Use at the beginning of the coroutine, you must have declared a variable rcheevos_coro_t* coro */
#define CORO_ENTER() \
{ \
CORO_again: ; \
@@ -67,7 +67,7 @@ Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
return 0; \
} while ( 0 )
/* Add this macro to your coro_t structure containing the variables for the coroutine */
/* Add this macro to your rcheevos_coro_t structure containing the variables for the coroutine */
#define CORO_FIELDS \
int step, sp; \
int stack[ 8 ];
+29 -29
View File
@@ -20,12 +20,12 @@
#include "../retroarch.h"
#include "../core.h"
#include <rcheevos.h>
#include "../deps/rcheevos/include/rcheevos.h"
static int cheevos_cmpaddr(const void* e1, const void* e2)
static int rcheevos_cmpaddr(const void* e1, const void* e2)
{
const cheevos_fixup_t* f1 = (const cheevos_fixup_t*)e1;
const cheevos_fixup_t* f2 = (const cheevos_fixup_t*)e2;
const rcheevos_fixup_t* f1 = (const rcheevos_fixup_t*)e1;
const rcheevos_fixup_t* f2 = (const rcheevos_fixup_t*)e2;
if (f1->address < f2->address)
{
@@ -41,7 +41,7 @@ static int cheevos_cmpaddr(const void* e1, const void* e2)
}
}
static size_t cheevos_var_reduce(size_t addr, size_t mask)
static size_t rcheevos_var_reduce(size_t addr, size_t mask)
{
while (mask)
{
@@ -53,7 +53,7 @@ static size_t cheevos_var_reduce(size_t addr, size_t mask)
return addr;
}
static size_t cheevos_var_highest_bit(size_t n)
static size_t rcheevos_var_highest_bit(size_t n)
{
n |= n >> 1;
n |= n >> 2;
@@ -64,33 +64,33 @@ static size_t cheevos_var_highest_bit(size_t n)
return n ^ (n >> 1);
}
void cheevos_fixup_init(cheevos_fixups_t* fixups)
void rcheevos_fixup_init(rcheevos_fixups_t* fixups)
{
fixups->elements = NULL;
fixups->capacity = fixups->count = 0;
fixups->dirty = false;
}
void cheevos_fixup_destroy(cheevos_fixups_t* fixups)
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups)
{
CHEEVOS_FREE(fixups->elements);
cheevos_fixup_init(fixups);
rcheevos_fixup_init(fixups);
}
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console)
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console)
{
cheevos_fixup_t key;
cheevos_fixup_t* found;
rcheevos_fixup_t key;
rcheevos_fixup_t* found;
const uint8_t* location;
if (fixups->dirty)
{
qsort(fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
qsort(fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
fixups->dirty = false;
}
key.address = address;
found = (cheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(cheevos_fixup_t), cheevos_cmpaddr);
found = (rcheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
if (found != NULL)
{
@@ -100,8 +100,8 @@ const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, in
if (fixups->count == fixups->capacity)
{
unsigned new_capacity = fixups->capacity == 0 ? 16 : fixups->capacity * 2;
cheevos_fixup_t* new_elements = (cheevos_fixup_t*)
realloc(fixups->elements, new_capacity * sizeof(cheevos_fixup_t));
rcheevos_fixup_t* new_elements = (rcheevos_fixup_t*)
realloc(fixups->elements, new_capacity * sizeof(rcheevos_fixup_t));
if (new_elements == NULL)
{
@@ -114,13 +114,13 @@ const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, in
fixups->elements[fixups->count].address = address;
fixups->elements[fixups->count++].location = location =
cheevos_patch_address(address, console);
rcheevos_patch_address(address, console);
fixups->dirty = true;
return location;
}
const uint8_t* cheevos_patch_address(unsigned address, int console)
const uint8_t* rcheevos_patch_address(unsigned address, int console)
{
rarch_system_info_t* system = runloop_get_system_info();
const void* pointer = NULL;
@@ -130,7 +130,7 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
if (address >= 0x0800 && address < 0x2000)
{
/* Address in the mirrorred RAM, adjust to real RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", address, address & 0x07ff);
CHEEVOS_LOG(RCHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", address, address & 0x07ff);
address &= 0x07ff;
}
}
@@ -139,7 +139,7 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
if (address >= 0xe000 && address <= 0xfdff)
{
/* Address in the echo RAM, adjust to real RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", address, address - 0x2000);
CHEEVOS_LOG(RCHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", address, address - 0x2000);
address -= 0x2000;
}
}
@@ -156,20 +156,20 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
if (address < 0x8000)
{
/* Internal RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x3000000);
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x3000000);
address += 0x3000000;
}
else
{
/* Work RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x2000000 - 0x8000);
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x2000000 - 0x8000);
address += 0x2000000 - 0x8000;
}
}
else if (console == RC_CONSOLE_PC_ENGINE)
{
/* RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1f0000);
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1f0000);
address += 0x1f0000;
}
else if (console == RC_CONSOLE_SUPER_NINTENDO)
@@ -177,13 +177,13 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
if (address < 0x020000)
{
/* Work RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x7e0000);
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x7e0000);
address += 0x7e0000;
}
else
{
/* Save RAM. */
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x006000 - 0x020000);
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x006000 - 0x020000);
address += 0x006000 - 0x020000;
}
}
@@ -197,17 +197,17 @@ const uint8_t* cheevos_patch_address(unsigned address, int console)
{
unsigned addr = address;
pointer = desc->core.ptr;
address = (unsigned)cheevos_var_reduce(
address = (unsigned)rcheevos_var_reduce(
(addr - desc->core.start) & desc->disconnect_mask,
desc->core.disconnect);
if (address >= desc->core.len)
address -= cheevos_var_highest_bit(address);
address -= rcheevos_var_highest_bit(address);
address += desc->core.offset;
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, (int)((desc - system->mmaps.descriptors) + 1), address);
CHEEVOS_LOG(RCHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, (int)((desc - system->mmaps.descriptors) + 1), address);
break;
}
}
+7 -7
View File
@@ -27,21 +27,21 @@ typedef struct
{
unsigned address;
const uint8_t* location;
} cheevos_fixup_t;
} rcheevos_fixup_t;
typedef struct
{
cheevos_fixup_t* elements;
rcheevos_fixup_t* elements;
unsigned capacity, count;
bool dirty;
} cheevos_fixups_t;
} rcheevos_fixups_t;
void cheevos_fixup_init(cheevos_fixups_t* fixups);
void cheevos_fixup_destroy(cheevos_fixups_t* fixups);
void rcheevos_fixup_init(rcheevos_fixups_t* fixups);
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups);
const uint8_t* cheevos_fixup_find(cheevos_fixups_t* fixups, unsigned address, int console);
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console);
const uint8_t* cheevos_patch_address(unsigned address, int console);
const uint8_t* rcheevos_patch_address(unsigned address, int console);
RETRO_END_DECLS
+1 -1
View File
@@ -1,6 +1,6 @@
#include "hash.h"
uint32_t cheevos_djb2(const char* str, size_t length)
uint32_t rcheevos_djb2(const char* str, size_t length)
{
const unsigned char* aux = (const unsigned char*)str;
uint32_t hash = 5381;
+1 -1
View File
@@ -23,7 +23,7 @@
RETRO_BEGIN_DECLS
uint32_t cheevos_djb2(const char* str, size_t length);
uint32_t rcheevos_djb2(const char* str, size_t length);
RETRO_END_DECLS
+95 -95
View File
@@ -38,21 +38,21 @@ typedef struct
int is_key;
const char* value;
size_t length;
} cheevos_getvalueud_t;
} rcheevos_getvalueud_t;
static int cheevos_getvalue_key(void* userdata,
static int rcheevos_getvalue_key(void* userdata,
const char* name, size_t length)
{
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
ud->is_key = cheevos_djb2(name, length) == ud->key_hash;
ud->is_key = rcheevos_djb2(name, length) == ud->key_hash;
return 0;
}
static int cheevos_getvalue_string(void* userdata,
static int rcheevos_getvalue_string(void* userdata,
const char* string, size_t length)
{
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
if (ud->is_key)
{
@@ -64,9 +64,9 @@ static int cheevos_getvalue_string(void* userdata,
return 0;
}
static int cheevos_getvalue_boolean(void* userdata, int istrue)
static int rcheevos_getvalue_boolean(void* userdata, int istrue)
{
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
if (ud->is_key)
{
@@ -87,9 +87,9 @@ static int cheevos_getvalue_boolean(void* userdata, int istrue)
return 0;
}
static int cheevos_getvalue_null(void* userdata)
static int rcheevos_getvalue_null(void* userdata)
{
cheevos_getvalueud_t* ud = (cheevos_getvalueud_t*)userdata;
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
if (ud->is_key )
{
@@ -101,7 +101,7 @@ static int cheevos_getvalue_null(void* userdata)
return 0;
}
static int cheevos_get_value(const char* json, unsigned key_hash,
static int rcheevos_get_value(const char* json, unsigned key_hash,
char* value, size_t length)
{
static const jsonsax_handlers_t handlers =
@@ -112,15 +112,15 @@ static int cheevos_get_value(const char* json, unsigned key_hash,
NULL,
NULL,
NULL,
cheevos_getvalue_key,
rcheevos_getvalue_key,
NULL,
cheevos_getvalue_string,
cheevos_getvalue_string, /* number */
cheevos_getvalue_boolean,
cheevos_getvalue_null
rcheevos_getvalue_string,
rcheevos_getvalue_string, /* number */
rcheevos_getvalue_boolean,
rcheevos_getvalue_null
};
cheevos_getvalueud_t ud;
rcheevos_getvalueud_t ud;
ud.key_hash = key_hash;
ud.is_key = 0;
@@ -142,14 +142,14 @@ static int cheevos_get_value(const char* json, unsigned key_hash,
Returns the token of the error message
*****************************************************************************/
int cheevos_get_token(const char* json, char* token, size_t length)
int rcheevos_get_token(const char* json, char* token, size_t length)
{
cheevos_get_value(json, CHEEVOS_JSON_KEY_ERROR, token, length);
rcheevos_get_value(json, CHEEVOS_JSON_KEY_ERROR, token, length);
if (!string_is_empty(token))
return -1;
return cheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length);
return rcheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length);
}
/*****************************************************************************
@@ -164,23 +164,23 @@ typedef struct
unsigned core_count;
unsigned unofficial_count;
unsigned lboard_count;
} cheevos_countud_t;
} rcheevos_countud_t;
static int cheevos_count_end_array(void* userdata)
static int rcheevos_count_end_array(void* userdata)
{
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
ud->in_cheevos = 0;
ud->in_lboards = 0;
return 0;
}
static int cheevos_count_key(void* userdata,
static int rcheevos_count_key(void* userdata,
const char* name, size_t length)
{
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
ud->field_hash = cheevos_djb2(name, length);
ud->field_hash = rcheevos_djb2(name, length);
if (ud->field_hash == CHEEVOS_JSON_KEY_ACHIEVEMENTS)
ud->in_cheevos = 1;
@@ -190,10 +190,10 @@ static int cheevos_count_key(void* userdata,
return 0;
}
static int cheevos_count_number(void* userdata,
static int rcheevos_count_number(void* userdata,
const char* number, size_t length)
{
cheevos_countud_t* ud = (cheevos_countud_t*)userdata;
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
if (ud->in_cheevos && ud->field_hash == CHEEVOS_JSON_KEY_FLAGS)
{
@@ -210,7 +210,7 @@ static int cheevos_count_number(void* userdata,
return 0;
}
static int cheevos_count_cheevos(const char* json,
static int rcheevos_count_cheevos(const char* json,
unsigned* core_count, unsigned* unofficial_count,
unsigned* lboard_count)
{
@@ -221,17 +221,17 @@ static int cheevos_count_cheevos(const char* json,
NULL,
NULL,
NULL,
cheevos_count_end_array,
cheevos_count_key,
rcheevos_count_end_array,
rcheevos_count_key,
NULL,
NULL,
cheevos_count_number,
rcheevos_count_number,
NULL,
NULL
};
int res;
cheevos_countud_t ud;
rcheevos_countud_t ud;
ud.in_cheevos = 0;
ud.in_lboards = 0;
ud.core_count = 0;
@@ -255,7 +255,7 @@ typedef struct
{
const char* string;
size_t length;
} cheevos_field_t;
} rcheevos_field_t;
typedef struct
{
@@ -266,14 +266,14 @@ typedef struct
unsigned unofficial_count;
unsigned lboard_count;
cheevos_field_t* field;
cheevos_field_t id, memaddr, title, desc, points, author;
cheevos_field_t modified, created, badge, flags, format;
rcheevos_field_t* field;
rcheevos_field_t id, memaddr, title, desc, points, author;
rcheevos_field_t modified, created, badge, flags, format;
cheevos_rapatchdata_t* patchdata;
} cheevos_readud_t;
rcheevos_rapatchdata_t* patchdata;
} rcheevos_readud_t;
static const char* cheevos_dupstr(const cheevos_field_t* field)
static const char* rcheevos_dupstr(const rcheevos_field_t* field)
{
char* string = (char*)malloc(field->length + 1);
@@ -285,9 +285,9 @@ static const char* cheevos_dupstr(const cheevos_field_t* field)
return string;
}
static int cheevos_new_cheevo(cheevos_readud_t* ud)
static int rcheevos_new_cheevo(rcheevos_readud_t* ud)
{
cheevos_racheevo_t* cheevo = NULL;
rcheevos_racheevo_t* cheevo = NULL;
unsigned flags = (unsigned)strtol(ud->flags.string, NULL, 10);
if (flags == 3)
@@ -297,10 +297,10 @@ static int cheevos_new_cheevo(cheevos_readud_t* ud)
else
return 0;
cheevo->title = cheevos_dupstr(&ud->title);
cheevo->description = cheevos_dupstr(&ud->desc);
cheevo->badge = cheevos_dupstr(&ud->badge);
cheevo->memaddr = cheevos_dupstr(&ud->memaddr);
cheevo->title = rcheevos_dupstr(&ud->title);
cheevo->description = rcheevos_dupstr(&ud->desc);
cheevo->badge = rcheevos_dupstr(&ud->badge);
cheevo->memaddr = rcheevos_dupstr(&ud->memaddr);
cheevo->points = (unsigned)strtol(ud->points.string, NULL, 10);
cheevo->id = (unsigned)strtol(ud->id.string, NULL, 10);
@@ -319,14 +319,14 @@ static int cheevos_new_cheevo(cheevos_readud_t* ud)
return 0;
}
static int cheevos_new_lboard(cheevos_readud_t* ud)
static int rcheevos_new_lboard(rcheevos_readud_t* ud)
{
cheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
rcheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
lboard->title = cheevos_dupstr(&ud->title);
lboard->description = cheevos_dupstr(&ud->desc);
lboard->format = cheevos_dupstr(&ud->format);
lboard->mem = cheevos_dupstr(&ud->memaddr);
lboard->title = rcheevos_dupstr(&ud->title);
lboard->description = rcheevos_dupstr(&ud->desc);
lboard->format = rcheevos_dupstr(&ud->format);
lboard->mem = rcheevos_dupstr(&ud->memaddr);
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
if ( !lboard->title
@@ -344,35 +344,35 @@ static int cheevos_new_lboard(cheevos_readud_t* ud)
return 0;
}
static int cheevos_read_end_object(void* userdata)
static int rcheevos_read_end_object(void* userdata)
{
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
if (ud->in_cheevos)
return cheevos_new_cheevo(ud);
return rcheevos_new_cheevo(ud);
if (ud->in_lboards)
return cheevos_new_lboard(ud);
return rcheevos_new_lboard(ud);
return 0;
}
static int cheevos_read_end_array(void* userdata)
static int rcheevos_read_end_array(void* userdata)
{
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
ud->in_cheevos = 0;
ud->in_lboards = 0;
return 0;
}
static int cheevos_read_key(void* userdata,
static int rcheevos_read_key(void* userdata,
const char* name, size_t length)
{
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
int common = ud->in_cheevos || ud->in_lboards;
uint32_t hash = cheevos_djb2(name, length);
uint32_t hash = rcheevos_djb2(name, length);
ud->field = NULL;
switch (hash)
@@ -441,10 +441,10 @@ static int cheevos_read_key(void* userdata,
return 0;
}
static int cheevos_read_string(void* userdata,
static int rcheevos_read_string(void* userdata,
const char* string, size_t length)
{
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
if (ud->field)
{
@@ -455,10 +455,10 @@ static int cheevos_read_string(void* userdata,
return 0;
}
static int cheevos_read_number(void* userdata,
static int rcheevos_read_number(void* userdata,
const char* number, size_t length)
{
cheevos_readud_t* ud = (cheevos_readud_t*)userdata;
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
if (ud->field)
{
@@ -474,29 +474,29 @@ static int cheevos_read_number(void* userdata,
return 0;
}
int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata)
{
static const jsonsax_handlers_t handlers =
{
NULL,
NULL,
NULL,
cheevos_read_end_object,
rcheevos_read_end_object,
NULL,
cheevos_read_end_array,
cheevos_read_key,
rcheevos_read_end_array,
rcheevos_read_key,
NULL,
cheevos_read_string,
cheevos_read_number,
rcheevos_read_string,
rcheevos_read_number,
NULL,
NULL
};
cheevos_readud_t ud;
rcheevos_readud_t ud;
int res;
/* Count the number of achievements in the JSON file. */
res = cheevos_count_cheevos(json, &patchdata->core_count,
res = rcheevos_count_cheevos(json, &patchdata->core_count,
&patchdata->unofficial_count, &patchdata->lboard_count);
if (res != JSONSAX_OK)
@@ -504,14 +504,14 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
/* Allocate the achievements. */
patchdata->core = (cheevos_racheevo_t*)
calloc(patchdata->core_count, sizeof(cheevos_racheevo_t));
patchdata->core = (rcheevos_racheevo_t*)
calloc(patchdata->core_count, sizeof(rcheevos_racheevo_t));
patchdata->unofficial = (cheevos_racheevo_t*)
calloc(patchdata->unofficial_count, sizeof(cheevos_racheevo_t));
patchdata->unofficial = (rcheevos_racheevo_t*)
calloc(patchdata->unofficial_count, sizeof(rcheevos_racheevo_t));
patchdata->lboards = (cheevos_ralboard_t*)
calloc(patchdata->lboard_count, sizeof(cheevos_ralboard_t));
patchdata->lboards = (rcheevos_ralboard_t*)
calloc(patchdata->lboard_count, sizeof(rcheevos_ralboard_t));
if (!patchdata->core ||
!patchdata->unofficial ||
@@ -536,7 +536,7 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
if (jsonsax_parse(json, &handlers, (void*)&ud) != JSONSAX_OK)
{
cheevos_free_patchdata(patchdata);
rcheevos_free_patchdata(patchdata);
return -1;
}
@@ -547,11 +547,11 @@ int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata)
Frees the patchdata
*****************************************************************************/
void cheevos_free_patchdata(cheevos_rapatchdata_t* patchdata)
void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata)
{
unsigned i = 0, count = 0;
const cheevos_racheevo_t* cheevo = NULL;
const cheevos_ralboard_t* lboard = NULL;
const rcheevos_racheevo_t* cheevo = NULL;
const rcheevos_ralboard_t* lboard = NULL;
cheevo = patchdata->core;
@@ -603,22 +603,22 @@ Deactivates unlocked cheevos
typedef struct
{
int is_element;
cheevos_unlock_cb_t unlock_cb;
rcheevos_unlock_cb_t unlock_cb;
void* userdata;
} cheevos_deactivate_t;
} rcheevos_deactivate_t;
static int cheevos_deactivate_index(void* userdata, unsigned int index)
static int rcheevos_deactivate_index(void* userdata, unsigned int index)
{
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
ud->is_element = 1;
return 0;
}
static int cheevos_deactivate_number(void* userdata,
static int rcheevos_deactivate_number(void* userdata,
const char* number, size_t length)
{
cheevos_deactivate_t* ud = (cheevos_deactivate_t*)userdata;
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
unsigned id = 0;
if (ud->is_element)
@@ -632,7 +632,7 @@ static int cheevos_deactivate_number(void* userdata,
return 0;
}
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata)
void rcheevos_deactivate_unlocks(const char* json, rcheevos_unlock_cb_t unlock_cb, void* userdata)
{
static const jsonsax_handlers_t handlers =
{
@@ -643,14 +643,14 @@ void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb,
NULL,
NULL,
NULL,
cheevos_deactivate_index,
rcheevos_deactivate_index,
NULL,
cheevos_deactivate_number,
rcheevos_deactivate_number,
NULL,
NULL
};
cheevos_deactivate_t ud;
rcheevos_deactivate_t ud;
ud.is_element = 0;
ud.unlock_cb = unlock_cb;
@@ -667,7 +667,7 @@ unsigned chevos_get_gameid(const char* json)
{
char gameid[32];
if (cheevos_get_value(json, CHEEVOS_JSON_KEY_GAMEID, gameid, sizeof(gameid)) != 0)
if (rcheevos_get_value(json, CHEEVOS_JSON_KEY_GAMEID, gameid, sizeof(gameid)) != 0)
return 0;
return (unsigned)strtol(gameid, NULL, 10);
+11 -11
View File
@@ -31,7 +31,7 @@ typedef struct {
const char* memaddr;
unsigned points;
unsigned id;
} cheevos_racheevo_t;
} rcheevos_racheevo_t;
typedef struct {
const char* title;
@@ -39,28 +39,28 @@ typedef struct {
const char* format;
const char* mem;
unsigned id;
} cheevos_ralboard_t;
} rcheevos_ralboard_t;
typedef struct {
unsigned console_id;
cheevos_racheevo_t* core;
cheevos_racheevo_t* unofficial;
cheevos_ralboard_t* lboards;
rcheevos_racheevo_t* core;
rcheevos_racheevo_t* unofficial;
rcheevos_ralboard_t* lboards;
unsigned core_count;
unsigned unofficial_count;
unsigned lboard_count;
} cheevos_rapatchdata_t;
} rcheevos_rapatchdata_t;
typedef void (*cheevos_unlock_cb_t)(unsigned id, void* userdata);
typedef void (*rcheevos_unlock_cb_t)(unsigned id, void* userdata);
int cheevos_get_token(const char* json, char* token, size_t length);
int rcheevos_get_token(const char* json, char* token, size_t length);
int cheevos_get_patchdata(const char* json, cheevos_rapatchdata_t* patchdata);
void cheevos_free_patchdata(cheevos_rapatchdata_t* patchdata);
int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata);
void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata);
void cheevos_deactivate_unlocks(const char* json, cheevos_unlock_cb_t unlock_cb, void* userdata);
void rcheevos_deactivate_unlocks(const char* json, rcheevos_unlock_cb_t unlock_cb, void* userdata);
unsigned chevos_get_gameid(const char* json);
+4 -4
View File
@@ -25,13 +25,13 @@ Setup - mainly for debugging
*****************************************************************************/
/* Define this macro to get extra-verbose log for cheevos. */
#undef CHEEVOS_VERBOSE
#define CHEEVOS_VERBOSE
/*****************************************************************************
End of setup
*****************************************************************************/
#define CHEEVOS_TAG "[CHEEVOS]: "
#define RCHEEVOS_TAG "[RCHEEVOS]: "
#define CHEEVOS_FREE(p) do { void* q = (void*)p; if (q != NULL) free(q); } while (0)
#ifdef CHEEVOS_VERBOSE
@@ -41,10 +41,10 @@ End of setup
#else
#define CHEEVOS_LOG cheevos_log
#define CHEEVOS_LOG rcheevos_log
#define CHEEVOS_ERR RARCH_ERR
void cheevos_log(const char *fmt, ...);
void rcheevos_log(const char *fmt, ...);
#endif
+2 -2
View File
@@ -47,9 +47,9 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
PATH_MAX_LENGTH * sizeof(char),
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
#ifdef HAVE_MENU
#if defined(HAVE_MENU) || defined(HAVE_MENU_WIDGETS)
menu_display_reset_textures_list(badge_file, fullpath,
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
#endif
}
-6
View File
@@ -16,10 +16,6 @@
#ifndef __RARCH_CHEEVOS_OLD_BADGE_H
#define __RARCH_CHEEVOS_OLD_BADGE_H
#ifdef HAVE_NEW_CHEEVOS
#include "../cheevos-new/badges.h"
#else
#include "../menu/menu_driver.h"
#include <retro_common_api.h>
@@ -46,5 +42,3 @@ static badges_ctx_t new_badges_ctx;
RETRO_END_DECLS
#endif
#endif
+59 -39
View File
@@ -36,6 +36,9 @@
#ifdef HAVE_MENU
#include "../menu/menu_driver.h"
#include "../menu/menu_entries.h"
#ifdef HAVE_MENU_WIDGETS
#include "../menu/widgets/menu_widgets.h"
#endif
#endif
#ifdef HAVE_THREADS
@@ -1589,7 +1592,8 @@ static void cheevos_make_unlock_url(const cheevo_t *cheevo,
#endif
}
static void cheevos_unlocked(void *task_data, void *user_data,
static void cheevos_unlocked(retro_task_t *task,
void *task_data, void *user_data,
const char *error)
{
cheevo_t *cheevo = (cheevo_t *)user_data;
@@ -1642,9 +1646,8 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
}
else if (valid)
{
char msg[256];
char url[256];
msg[0] = url[0] = '\0';
url[0] = '\0';
cheevo->active &= ~mode;
@@ -1654,11 +1657,18 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
CHEEVOS_LOG("[CHEEVOS]: awarding cheevo %u: %s (%s).\n",
cheevo->id, cheevo->title, cheevo->description);
snprintf(msg, sizeof(msg), "Achievement Unlocked: %s",
cheevo->title);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 2 * 60, false);
runloop_msg_queue_push(cheevo->description, 0, 3 * 60, false);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_push_achievement(cheevo->title, cheevo->badge))
#endif
{
char msg[256];
msg[0] = '\0';
snprintf(msg, sizeof(msg), "Achievement Unlocked: %s",
cheevo->title);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
runloop_msg_queue_push(cheevo->description, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
cheevos_make_unlock_url(cheevo, url, sizeof(url));
task_push_http_transfer(url, true, NULL,
@@ -1818,7 +1828,8 @@ static void cheevos_make_lboard_url(const cheevos_leaderboard_t *lboard,
#endif
}
static void cheevos_lboard_submit(void *task_data, void *user_data,
static void cheevos_lboard_submit(retro_task_t *task,
void *task_data, void *user_data,
const char *error)
{
cheevos_leaderboard_t *lboard = (cheevos_leaderboard_t *)user_data;
@@ -1851,8 +1862,6 @@ static void cheevos_test_leaderboards(void)
if (value != lboard->last_value)
{
CHEEVOS_LOG("[CHEEVOS]: value lboard %s %u\n",
lboard->title, value);
lboard->last_value = value;
}
@@ -1866,7 +1875,8 @@ static void cheevos_test_leaderboards(void)
CHEEVOS_LOG("[CHEEVOS]: error: lboard %s tried to submit 0\n",
lboard->title);
runloop_msg_queue_push("Leaderboard attempt cancelled!",
0, 2 * 60, false);
0, 2 * 60, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
else
{
@@ -1884,7 +1894,7 @@ static void cheevos_test_leaderboards(void)
snprintf(msg, sizeof(msg), "Submitted %s for %s",
formatted_value, lboard->title);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 2 * 60, false);
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
@@ -1893,7 +1903,8 @@ static void cheevos_test_leaderboards(void)
CHEEVOS_LOG("[CHEEVOS]: cancel lboard %s\n", lboard->title);
lboard->active = 0;
runloop_msg_queue_push("Leaderboard attempt cancelled!",
0, 2 * 60, false);
0, 2 * 60, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
else
@@ -1909,8 +1920,8 @@ static void cheevos_test_leaderboards(void)
snprintf(msg, sizeof(msg),
"Leaderboard Active: %s", lboard->title);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 2 * 60, false);
runloop_msg_queue_push(lboard->description, 0, 3*60, false);
runloop_msg_queue_push(msg, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
runloop_msg_queue_push(lboard->description, 0, 3*60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
}
@@ -2052,22 +2063,21 @@ static int cheevos_deactivate_unlocks(const char* json, unsigned mode)
void cheevos_reset_game(void)
{
cheevo_t *end = NULL;
cheevo_t *cheevo = cheevos_locals.core.cheevos;
cheevo_t *cheevo;
cheevos_leaderboard_t *lboard;
unsigned i;
if (!cheevo)
return;
end = cheevo + cheevos_locals.core.count;
for (; cheevo < end; cheevo++)
cheevo = cheevos_locals.core.cheevos;
for (i = 0; i < cheevos_locals.core.count; i++, cheevo++)
cheevo->last = 1;
cheevo = cheevos_locals.unofficial.cheevos;
end = cheevo + cheevos_locals.unofficial.count;
for (; cheevo < end; cheevo++)
cheevo = cheevos_locals.unofficial.cheevos;
for (i = 0; i < cheevos_locals.unofficial.count; i++, cheevo++)
cheevo->last = 1;
lboard = cheevos_locals.leaderboards;
for (i = 0; i < cheevos_locals.lboard_count; i++, lboard++)
lboard->active = 0;
}
void cheevos_populate_menu(void *data)
@@ -2279,7 +2289,7 @@ bool cheevos_toggle_hardcore_mode(void)
command_event(CMD_EVENT_REWIND_DEINIT, NULL);
CHEEVOS_LOG("%s\n", msg);
runloop_msg_queue_push(msg, 0, 3 * 60, true);
runloop_msg_queue_push(msg, 0, 3 * 60, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
else
{
@@ -2810,7 +2820,7 @@ found:
if (!coro->json)
{
runloop_msg_queue_push("Error loading achievements.", 0, 5 * 60, false);
runloop_msg_queue_push("Error loading achievements.", 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
CHEEVOS_ERR("[CHEEVOS]: error loading achievements.\n");
CORO_STOP();
}
@@ -2839,7 +2849,8 @@ found:
{
runloop_msg_queue_push(
"This game has no achievements.",
0, 5 * 60, false);
0, 5 * 60, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
cheevos_free_cheevo_set(&cheevos_locals.core);
cheevos_free_cheevo_set(&cheevos_locals.unofficial);
@@ -2876,6 +2887,10 @@ found:
const cheevo_t* end = cheevo + cheevos_locals.core.count;
int number_of_unlocked = cheevos_locals.core.count;
snprintf(msg, sizeof(msg), "cheevos: using the old implementation.");
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (coro->settings->bools.cheevos_hardcore_mode_enable && !cheevos_hardcore_paused)
mode = CHEEVOS_ACTIVE_HARDCORE;
@@ -2887,7 +2902,7 @@ found:
"You have %d of %d achievements unlocked.",
number_of_unlocked, cheevos_locals.core.count);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 6 * 60, false);
runloop_msg_queue_push(msg, 0, 6 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
CORO_GOSUB(GET_BADGES);
@@ -2959,7 +2974,7 @@ found:
/* Checks for the existence of a headered Lynx file.
Unheadered files fall back to GENERIC_MD5. */
if (coro->len <= lynx_header_len ||
if (coro->len <= (unsigned)lynx_header_len ||
memcmp("LYNX", (void *)coro->data, 5) != 0)
{
coro->gameid = 0;
@@ -3191,6 +3206,9 @@ found:
badges_ctx = new_badges_ctx;
#ifdef HAVE_MENU_WIDGETS
if (false) /* we always want badges if menu widgets are enabled */
#endif
{
settings_t *settings = config_get_ptr();
if (!(
@@ -3292,10 +3310,12 @@ found:
{
runloop_msg_queue_push(
"Missing RetroAchievements account information.",
0, 5 * 60, false);
0, 5 * 60, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
runloop_msg_queue_push(
"Please fill in your account information in Settings.",
0, 5 * 60, false);
0, 5 * 60, false,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
CHEEVOS_ERR("[CHEEVOS]: login info not informed.\n");
CORO_STOP();
}
@@ -3352,7 +3372,7 @@ found:
"RetroAchievements: Logged in as \"%s\".",
coro->settings->arrays.cheevos_username);
msg[sizeof(msg) - 1] = 0;
runloop_msg_queue_push(msg, 0, 3 * 60, false);
runloop_msg_queue_push(msg, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
/* Save token to config and clear pass on success */
@@ -3373,13 +3393,13 @@ found:
"RetroAchievements: %s",
error_response);
error_message[sizeof(error_message) - 1] = 0;
runloop_msg_queue_push(error_message, 0, 5 * 60, false);
runloop_msg_queue_push(error_message, 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
*coro->settings->arrays.cheevos_token = '\0';
CORO_STOP();
}
runloop_msg_queue_push("RetroAchievements: Error contacting server.", 0, 5 * 60, false);
runloop_msg_queue_push("RetroAchievements: Error contacting server.", 0, 5 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
CHEEVOS_ERR("[CHEEVOS]: error getting user token.\n");
CORO_STOP();
@@ -3636,7 +3656,7 @@ bool cheevos_load(const void *data)
if (!coro)
return false;
task = (retro_task_t*)calloc(1, sizeof(*task));
task = task_init();
if (!task)
{
+165 -171
View File
@@ -1,171 +1,165 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2018 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_OLD_H
#define __RARCH_CHEEVOS_OLD_H
#ifdef HAVE_NEW_CHEEVOS
#include "../cheevos-new/cheevos.h"
#else
#include <stdint.h>
#include <stdlib.h>
#include <boolean.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
/*****************************************************************************
Setup - mainly for debugging
*****************************************************************************/
/* Define this macro to get extra-verbose log for cheevos. */
#undef CHEEVOS_VERBOSE
/*****************************************************************************
End of setup
*****************************************************************************/
#define CHEEVOS_TAG "[CHEEVOS]: "
#ifdef CHEEVOS_VERBOSE
#define CHEEVOS_LOG RARCH_LOG
#define CHEEVOS_ERR RARCH_ERR
#else
void cheevos_log(const char *fmt, ...);
#define CHEEVOS_LOG cheevos_log
#define CHEEVOS_ERR cheevos_log
#endif
typedef struct cheevos_ctx_desc
{
unsigned idx;
char *s;
size_t len;
} cheevos_ctx_desc_t;
typedef enum
{
CHEEVOS_CONSOLE_NONE = 0,
/* Don't change those, the values match the console IDs
* at retroachievements.org. */
CHEEVOS_CONSOLE_MEGA_DRIVE = 1,
CHEEVOS_CONSOLE_NINTENDO_64 = 2,
CHEEVOS_CONSOLE_SUPER_NINTENDO = 3,
CHEEVOS_CONSOLE_GAMEBOY = 4,
CHEEVOS_CONSOLE_GAMEBOY_ADVANCE = 5,
CHEEVOS_CONSOLE_GAMEBOY_COLOR = 6,
CHEEVOS_CONSOLE_NINTENDO = 7,
CHEEVOS_CONSOLE_PC_ENGINE = 8,
CHEEVOS_CONSOLE_SEGA_CD = 9,
CHEEVOS_CONSOLE_SEGA_32X = 10,
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
CHEEVOS_CONSOLE_PLAYSTATION = 12,
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
CHEEVOS_CONSOLE_GAME_GEAR = 15,
CHEEVOS_CONSOLE_GAMECUBE = 16,
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
CHEEVOS_CONSOLE_NINTENDO_DS = 18,
CHEEVOS_CONSOLE_WII = 19,
CHEEVOS_CONSOLE_WII_U = 20,
CHEEVOS_CONSOLE_PLAYSTATION_2 = 21,
CHEEVOS_CONSOLE_XBOX = 22,
CHEEVOS_CONSOLE_SKYNET = 23,
CHEEVOS_CONSOLE_XBOX_ONE = 24,
CHEEVOS_CONSOLE_ATARI_2600 = 25,
CHEEVOS_CONSOLE_MS_DOS = 26,
CHEEVOS_CONSOLE_ARCADE = 27,
CHEEVOS_CONSOLE_VIRTUAL_BOY = 28,
CHEEVOS_CONSOLE_MSX = 29,
CHEEVOS_CONSOLE_COMMODORE_64 = 30,
CHEEVOS_CONSOLE_ZX81 = 31,
CHEEVOS_CONSOLE_ATARI_7800 = 51
} cheevos_console_t;
enum
{
CHEEVOS_DIRTY_TITLE = 1 << 0,
CHEEVOS_DIRTY_DESC = 1 << 1,
CHEEVOS_DIRTY_POINTS = 1 << 2,
CHEEVOS_DIRTY_AUTHOR = 1 << 3,
CHEEVOS_DIRTY_ID = 1 << 4,
CHEEVOS_DIRTY_BADGE = 1 << 5,
CHEEVOS_DIRTY_CONDITIONS = 1 << 6,
CHEEVOS_DIRTY_VOTES = 1 << 7,
CHEEVOS_DIRTY_DESCRIPTION = 1 << 8,
CHEEVOS_DIRTY_ALL = (1 << 9) - 1
};
enum
{
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
};
enum
{
CHEEVOS_FORMAT_FRAMES = 0,
CHEEVOS_FORMAT_SECS,
CHEEVOS_FORMAT_MILLIS,
CHEEVOS_FORMAT_SCORE,
CHEEVOS_FORMAT_VALUE,
CHEEVOS_FORMAT_OTHER
};
bool cheevos_load(const void *data);
void cheevos_reset_game(void);
void cheevos_populate_menu(void *data);
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
bool cheevos_apply_cheats(bool *data_bool);
bool cheevos_unload(void);
bool cheevos_toggle_hardcore_mode(void);
void cheevos_test(void);
bool cheevos_set_cheats(void);
void cheevos_set_support_cheevos(bool state);
bool cheevos_get_support_cheevos(void);
cheevos_console_t cheevos_get_console(void);
extern bool cheevos_loaded;
extern bool cheevos_hardcore_active;
extern bool cheevos_hardcore_paused;
extern bool cheevos_state_loaded_flag;
extern int cheats_are_enabled;
extern int cheats_were_enabled;
RETRO_END_DECLS
#endif
#endif /* __RARCH_CHEEVOS_H */
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2018 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_OLD_H
#define __RARCH_CHEEVOS_OLD_H
#include <stdint.h>
#include <stdlib.h>
#include <boolean.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
/*****************************************************************************
Setup - mainly for debugging
*****************************************************************************/
/* Define this macro to get extra-verbose log for cheevos. */
#define CHEEVOS_VERBOSE
/*****************************************************************************
End of setup
*****************************************************************************/
#define CHEEVOS_TAG "[CHEEVOS]: "
#ifdef CHEEVOS_VERBOSE
#define CHEEVOS_LOG RARCH_LOG
#define CHEEVOS_ERR RARCH_ERR
#else
void cheevos_log(const char *fmt, ...);
#define CHEEVOS_LOG cheevos_log
#define CHEEVOS_ERR cheevos_log
#endif
typedef struct cheevos_ctx_desc
{
unsigned idx;
char *s;
size_t len;
} cheevos_ctx_desc_t;
typedef enum
{
CHEEVOS_CONSOLE_NONE = 0,
/* Don't change those, the values match the console IDs
* at retroachievements.org. */
CHEEVOS_CONSOLE_MEGA_DRIVE = 1,
CHEEVOS_CONSOLE_NINTENDO_64 = 2,
CHEEVOS_CONSOLE_SUPER_NINTENDO = 3,
CHEEVOS_CONSOLE_GAMEBOY = 4,
CHEEVOS_CONSOLE_GAMEBOY_ADVANCE = 5,
CHEEVOS_CONSOLE_GAMEBOY_COLOR = 6,
CHEEVOS_CONSOLE_NINTENDO = 7,
CHEEVOS_CONSOLE_PC_ENGINE = 8,
CHEEVOS_CONSOLE_SEGA_CD = 9,
CHEEVOS_CONSOLE_SEGA_32X = 10,
CHEEVOS_CONSOLE_MASTER_SYSTEM = 11,
CHEEVOS_CONSOLE_PLAYSTATION = 12,
CHEEVOS_CONSOLE_ATARI_LYNX = 13,
CHEEVOS_CONSOLE_NEOGEO_POCKET = 14,
CHEEVOS_CONSOLE_GAME_GEAR = 15,
CHEEVOS_CONSOLE_GAMECUBE = 16,
CHEEVOS_CONSOLE_ATARI_JAGUAR = 17,
CHEEVOS_CONSOLE_NINTENDO_DS = 18,
CHEEVOS_CONSOLE_WII = 19,
CHEEVOS_CONSOLE_WII_U = 20,
CHEEVOS_CONSOLE_PLAYSTATION_2 = 21,
CHEEVOS_CONSOLE_XBOX = 22,
CHEEVOS_CONSOLE_SKYNET = 23,
CHEEVOS_CONSOLE_XBOX_ONE = 24,
CHEEVOS_CONSOLE_ATARI_2600 = 25,
CHEEVOS_CONSOLE_MS_DOS = 26,
CHEEVOS_CONSOLE_ARCADE = 27,
CHEEVOS_CONSOLE_VIRTUAL_BOY = 28,
CHEEVOS_CONSOLE_MSX = 29,
CHEEVOS_CONSOLE_COMMODORE_64 = 30,
CHEEVOS_CONSOLE_ZX81 = 31,
CHEEVOS_CONSOLE_ATARI_7800 = 51
} cheevos_console_t;
enum
{
CHEEVOS_DIRTY_TITLE = 1 << 0,
CHEEVOS_DIRTY_DESC = 1 << 1,
CHEEVOS_DIRTY_POINTS = 1 << 2,
CHEEVOS_DIRTY_AUTHOR = 1 << 3,
CHEEVOS_DIRTY_ID = 1 << 4,
CHEEVOS_DIRTY_BADGE = 1 << 5,
CHEEVOS_DIRTY_CONDITIONS = 1 << 6,
CHEEVOS_DIRTY_VOTES = 1 << 7,
CHEEVOS_DIRTY_DESCRIPTION = 1 << 8,
CHEEVOS_DIRTY_ALL = (1 << 9) - 1
};
enum
{
CHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
CHEEVOS_ACTIVE_HARDCORE = 1 << 1
};
enum
{
CHEEVOS_FORMAT_FRAMES = 0,
CHEEVOS_FORMAT_SECS,
CHEEVOS_FORMAT_MILLIS,
CHEEVOS_FORMAT_SCORE,
CHEEVOS_FORMAT_VALUE,
CHEEVOS_FORMAT_OTHER
};
bool cheevos_load(const void *data);
void cheevos_reset_game(void);
void cheevos_populate_menu(void *data);
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
bool cheevos_apply_cheats(bool *data_bool);
bool cheevos_unload(void);
bool cheevos_toggle_hardcore_mode(void);
void cheevos_test(void);
bool cheevos_set_cheats(void);
void cheevos_set_support_cheevos(bool state);
bool cheevos_get_support_cheevos(void);
cheevos_console_t cheevos_get_console(void);
extern bool cheevos_loaded;
extern bool cheevos_hardcore_active;
extern bool cheevos_hardcore_paused;
extern bool cheevos_state_loaded_flag;
extern int cheats_are_enabled;
extern int cheats_were_enabled;
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_H */
+189 -189
View File
@@ -1,189 +1,189 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "cond.h"
#include "var.h"
#include "../retroarch.h"
#include "../verbosity.h"
/*****************************************************************************
Parsing
*****************************************************************************/
static cheevos_cond_op_t cheevos_cond_parse_operator(const char** memaddr)
{
const char *str = *memaddr;
cheevos_cond_op_t op;
if (*str == '=' && str[1] == '=')
{
op = CHEEVOS_COND_OP_EQUALS;
str += 2;
}
else if (*str == '=')
{
op = CHEEVOS_COND_OP_EQUALS;
str++;
}
else if (*str == '!' && str[1] == '=')
{
op = CHEEVOS_COND_OP_NOT_EQUAL_TO;
str += 2;
}
else if (*str == '<' && str[1] == '=')
{
op = CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL;
str += 2;
}
else if (*str == '<')
{
op = CHEEVOS_COND_OP_LESS_THAN;
str++;
}
else if (*str == '>' && str[1] == '=')
{
op = CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL;
str += 2;
}
else if (*str == '>')
{
op = CHEEVOS_COND_OP_GREATER_THAN;
str++;
}
else
{
CHEEVOS_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
op = CHEEVOS_COND_OP_EQUALS;
}
*memaddr = str;
return op;
}
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr)
{
const char* str = *memaddr;
cond->type = CHEEVOS_COND_TYPE_STANDARD;
if (*str != 0 && str[1] == ':')
{
int skip = 2;
switch (*str)
{
case 'R':
cond->type = CHEEVOS_COND_TYPE_RESET_IF;
break;
case 'P':
cond->type = CHEEVOS_COND_TYPE_PAUSE_IF;
break;
case 'A':
cond->type = CHEEVOS_COND_TYPE_ADD_SOURCE;
break;
case 'B':
cond->type = CHEEVOS_COND_TYPE_SUB_SOURCE;
break;
case 'C':
cond->type = CHEEVOS_COND_TYPE_ADD_HITS;
break;
default:
skip = 0;
break;
}
str += skip;
}
cheevos_var_parse(&cond->source, &str);
cond->op = cheevos_cond_parse_operator(&str);
cheevos_var_parse(&cond->target, &str);
cond->curr_hits = 0;
if (*str == '(' || *str == '.')
{
char* end;
cond->req_hits = (unsigned)strtol(str + 1, &end, 10);
str = end + (*end == ')' || *end == '.');
}
else
cond->req_hits = 0;
*memaddr = str;
}
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which)
{
cheevos_cond_t dummy;
unsigned index = 0;
unsigned count = 0;
for (;;)
{
for (;;)
{
cheevos_cond_parse(&dummy, &memaddr);
if (index == which)
count++;
if (*memaddr != '_')
break;
memaddr++;
}
index++;
if (*memaddr != 'S')
break;
memaddr++;
}
return count;
}
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which)
{
cheevos_cond_t dummy;
unsigned index = 0;
for (;;)
{
for (;;)
{
if (index == which)
{
cheevos_cond_parse(cond, &memaddr);
cond++;
}
else
cheevos_cond_parse(&dummy, &memaddr);
if (*memaddr != '_')
break;
memaddr++;
}
index++;
if (*memaddr != 'S')
break;
memaddr++;
}
}
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "cond.h"
#include "var.h"
#include "../retroarch.h"
#include "../verbosity.h"
/*****************************************************************************
Parsing
*****************************************************************************/
static cheevos_cond_op_t cheevos_cond_parse_operator(const char** memaddr)
{
const char *str = *memaddr;
cheevos_cond_op_t op;
if (*str == '=' && str[1] == '=')
{
op = CHEEVOS_COND_OP_EQUALS;
str += 2;
}
else if (*str == '=')
{
op = CHEEVOS_COND_OP_EQUALS;
str++;
}
else if (*str == '!' && str[1] == '=')
{
op = CHEEVOS_COND_OP_NOT_EQUAL_TO;
str += 2;
}
else if (*str == '<' && str[1] == '=')
{
op = CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL;
str += 2;
}
else if (*str == '<')
{
op = CHEEVOS_COND_OP_LESS_THAN;
str++;
}
else if (*str == '>' && str[1] == '=')
{
op = CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL;
str += 2;
}
else if (*str == '>')
{
op = CHEEVOS_COND_OP_GREATER_THAN;
str++;
}
else
{
CHEEVOS_ERR(CHEEVOS_TAG "unknown operator %c\n.", *str);
op = CHEEVOS_COND_OP_EQUALS;
}
*memaddr = str;
return op;
}
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr)
{
const char* str = *memaddr;
cond->type = CHEEVOS_COND_TYPE_STANDARD;
if (*str != 0 && str[1] == ':')
{
int skip = 2;
switch (*str)
{
case 'R':
cond->type = CHEEVOS_COND_TYPE_RESET_IF;
break;
case 'P':
cond->type = CHEEVOS_COND_TYPE_PAUSE_IF;
break;
case 'A':
cond->type = CHEEVOS_COND_TYPE_ADD_SOURCE;
break;
case 'B':
cond->type = CHEEVOS_COND_TYPE_SUB_SOURCE;
break;
case 'C':
cond->type = CHEEVOS_COND_TYPE_ADD_HITS;
break;
default:
skip = 0;
break;
}
str += skip;
}
cheevos_var_parse(&cond->source, &str);
cond->op = cheevos_cond_parse_operator(&str);
cheevos_var_parse(&cond->target, &str);
cond->curr_hits = 0;
if (*str == '(' || *str == '.')
{
char* end;
cond->req_hits = (unsigned)strtol(str + 1, &end, 10);
str = end + (*end == ')' || *end == '.');
}
else
cond->req_hits = 0;
*memaddr = str;
}
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which)
{
cheevos_cond_t dummy;
unsigned index = 0;
unsigned count = 0;
for (;;)
{
for (;;)
{
cheevos_cond_parse(&dummy, &memaddr);
if (index == which)
count++;
if (*memaddr != '_')
break;
memaddr++;
}
index++;
if (*memaddr != 'S')
break;
memaddr++;
}
return count;
}
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which)
{
cheevos_cond_t dummy;
unsigned index = 0;
for (;;)
{
for (;;)
{
if (index == which)
{
cheevos_cond_parse(cond, &memaddr);
cond++;
}
else
cheevos_cond_parse(&dummy, &memaddr);
if (*memaddr != '_')
break;
memaddr++;
}
index++;
if (*memaddr != 'S')
break;
memaddr++;
}
}
+63 -63
View File
@@ -1,63 +1,63 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_COND_H
#define __RARCH_CHEEVOS_COND_H
#include "var.h"
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef enum
{
CHEEVOS_COND_TYPE_STANDARD,
CHEEVOS_COND_TYPE_PAUSE_IF,
CHEEVOS_COND_TYPE_RESET_IF,
CHEEVOS_COND_TYPE_ADD_SOURCE,
CHEEVOS_COND_TYPE_SUB_SOURCE,
CHEEVOS_COND_TYPE_ADD_HITS
} cheevos_cond_type_t;
typedef enum
{
CHEEVOS_COND_OP_EQUALS,
CHEEVOS_COND_OP_LESS_THAN,
CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL,
CHEEVOS_COND_OP_GREATER_THAN,
CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL,
CHEEVOS_COND_OP_NOT_EQUAL_TO
} cheevos_cond_op_t;
typedef struct
{
cheevos_cond_type_t type;
unsigned req_hits;
unsigned curr_hits;
char pause;
cheevos_var_t source;
cheevos_cond_op_t op;
cheevos_var_t target;
} cheevos_cond_t;
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr);
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which);
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which);
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_COND_H */
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_COND_H
#define __RARCH_CHEEVOS_COND_H
#include "var.h"
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef enum
{
CHEEVOS_COND_TYPE_STANDARD,
CHEEVOS_COND_TYPE_PAUSE_IF,
CHEEVOS_COND_TYPE_RESET_IF,
CHEEVOS_COND_TYPE_ADD_SOURCE,
CHEEVOS_COND_TYPE_SUB_SOURCE,
CHEEVOS_COND_TYPE_ADD_HITS
} cheevos_cond_type_t;
typedef enum
{
CHEEVOS_COND_OP_EQUALS,
CHEEVOS_COND_OP_LESS_THAN,
CHEEVOS_COND_OP_LESS_THAN_OR_EQUAL,
CHEEVOS_COND_OP_GREATER_THAN,
CHEEVOS_COND_OP_GREATER_THAN_OR_EQUAL,
CHEEVOS_COND_OP_NOT_EQUAL_TO
} cheevos_cond_op_t;
typedef struct
{
cheevos_cond_type_t type;
unsigned req_hits;
unsigned curr_hits;
char pause;
cheevos_var_t source;
cheevos_cond_op_t op;
cheevos_var_t target;
} cheevos_cond_t;
void cheevos_cond_parse(cheevos_cond_t* cond, const char** memaddr);
unsigned cheevos_cond_count_in_set(const char* memaddr, unsigned which);
void cheevos_cond_parse_in_set(cheevos_cond_t* cond, const char* memaddr, unsigned which);
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_COND_H */
+75 -75
View File
@@ -1,75 +1,75 @@
#ifndef CORO_H
#define CORO_H
/*
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
*/
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
#define CORO_ENTER() \
{ \
CORO_again: ; \
switch ( coro->step ) { \
case CORO_BEGIN: ;
/* Use to define labels which are targets to GOTO and GOSUB */
#define CORO_SUB( x ) \
case x: ;
/* Use at the end of the coroutine */
#define CORO_LEAVE() \
} } \
do { return 0; } while ( 0 )
/* Go to the x label */
#define CORO_GOTO( x ) \
do { \
coro->step = ( x ); \
goto CORO_again; \
} while ( 0 )
/* Go to a subroutine, execution continues until the subroutine returns via RET */
#define CORO_GOSUB( x ) \
do { \
coro->stack[ coro->sp++ ] = __LINE__; \
coro->step = ( x ); \
goto CORO_again; \
case __LINE__: ; \
} while ( 0 )
/* Returns from a subroutine */
#define CORO_RET() \
do { \
coro->step = coro->stack[ --coro->sp ]; \
goto CORO_again; \
} while ( 0 )
/* Yields to the caller, execution continues from this point when the coroutine is resumed */
#define CORO_YIELD() \
do { \
coro->step = __LINE__; \
return 1; \
case __LINE__: ; \
} while ( 0 )
/* The coroutine entry point, never use 0 as a label */
#define CORO_BEGIN 0
/* Sets up the coroutine */
#define CORO_SETUP() \
do { \
coro->step = CORO_BEGIN; \
coro->sp = 0; \
} while ( 0 )
#define CORO_STOP() \
do { \
return 0; \
} while ( 0 )
/* Add this macro to your coro_t structure containing the variables for the coroutine */
#define CORO_FIELDS \
int step, sp; \
int stack[ 8 ];
#endif /* CORO_H */
#ifndef CORO_H
#define CORO_H
/*
Released under the CC0: https://creativecommons.org/publicdomain/zero/1.0/
*/
/* Use at the beginning of the coroutine, you must have declared a variable coro_t* coro */
#define CORO_ENTER() \
{ \
CORO_again: ; \
switch ( coro->step ) { \
case CORO_BEGIN: ;
/* Use to define labels which are targets to GOTO and GOSUB */
#define CORO_SUB( x ) \
case x: ;
/* Use at the end of the coroutine */
#define CORO_LEAVE() \
} } \
do { return 0; } while ( 0 )
/* Go to the x label */
#define CORO_GOTO( x ) \
do { \
coro->step = ( x ); \
goto CORO_again; \
} while ( 0 )
/* Go to a subroutine, execution continues until the subroutine returns via RET */
#define CORO_GOSUB( x ) \
do { \
coro->stack[ coro->sp++ ] = __LINE__; \
coro->step = ( x ); \
goto CORO_again; \
case __LINE__: ; \
} while ( 0 )
/* Returns from a subroutine */
#define CORO_RET() \
do { \
coro->step = coro->stack[ --coro->sp ]; \
goto CORO_again; \
} while ( 0 )
/* Yields to the caller, execution continues from this point when the coroutine is resumed */
#define CORO_YIELD() \
do { \
coro->step = __LINE__; \
return 1; \
case __LINE__: ; \
} while ( 0 )
/* The coroutine entry point, never use 0 as a label */
#define CORO_BEGIN 0
/* Sets up the coroutine */
#define CORO_SETUP() \
do { \
coro->step = CORO_BEGIN; \
coro->sp = 0; \
} while ( 0 )
#define CORO_STOP() \
do { \
return 0; \
} while ( 0 )
/* Add this macro to your coro_t structure containing the variables for the coroutine */
#define CORO_FIELDS \
int step, sp; \
int stack[ 8 ];
#endif /* CORO_H */
+422 -415
View File
@@ -1,415 +1,422 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include <stdint.h>
#include <libretro.h>
#include "var.h"
#include "../retroarch.h"
#include "../core.h"
#include "../verbosity.h"
/*****************************************************************************
Parsing
*****************************************************************************/
static cheevos_var_size_t cheevos_var_parse_prefix(const char** memaddr)
{
/* Careful not to use ABCDEF here, this denotes part of an actual variable! */
const char* str = *memaddr;
cheevos_var_size_t size;
switch (toupper((unsigned char)*str++))
{
case 'M':
size = CHEEVOS_VAR_SIZE_BIT_0;
break;
case 'N':
size = CHEEVOS_VAR_SIZE_BIT_1;
break;
case 'O':
size = CHEEVOS_VAR_SIZE_BIT_2;
break;
case 'P':
size = CHEEVOS_VAR_SIZE_BIT_3;
break;
case 'Q':
size = CHEEVOS_VAR_SIZE_BIT_4;
break;
case 'R':
size = CHEEVOS_VAR_SIZE_BIT_5;
break;
case 'S':
size = CHEEVOS_VAR_SIZE_BIT_6;
break;
case 'T':
size = CHEEVOS_VAR_SIZE_BIT_7;
break;
case 'L':
size = CHEEVOS_VAR_SIZE_NIBBLE_LOWER;
break;
case 'U':
size = CHEEVOS_VAR_SIZE_NIBBLE_UPPER;
break;
case 'H':
size = CHEEVOS_VAR_SIZE_EIGHT_BITS;
break;
case 'X':
size = CHEEVOS_VAR_SIZE_THIRTYTWO_BITS;
break;
default:
str--;
/* fall through */
case ' ':
size = CHEEVOS_VAR_SIZE_SIXTEEN_BITS;
break;
}
*memaddr = str;
return size;
}
static size_t cheevos_var_reduce(size_t addr, size_t mask)
{
while (mask)
{
size_t tmp = (mask - 1) & ~mask;
addr = (addr & tmp) | ((addr >> 1) & ~tmp);
mask = (mask & (mask - 1)) >> 1;
}
return addr;
}
static size_t cheevos_var_highest_bit(size_t n)
{
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return n ^ (n >> 1);
}
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr)
{
char *end = NULL;
const char *str = *memaddr;
unsigned base = 16;
var->is_bcd = false;
if (toupper((unsigned char)*str) == 'D' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
{
/* d0x + 4 hex digits */
str += 3;
var->type = CHEEVOS_VAR_TYPE_DELTA_MEM;
}
else if (toupper((unsigned char)*str) == 'B' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
{
/* b0x (binary-coded decimal) */
str += 3;
var->is_bcd = true;
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
}
else if (*str == '0' && toupper((unsigned char)str[1]) == 'X')
{
/* 0x + 4 hex digits */
str += 2;
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
}
else
{
var->type = CHEEVOS_VAR_TYPE_VALUE_COMP;
if (toupper((unsigned char)*str) == 'H')
str++;
else
{
if (toupper((unsigned char)*str) == 'V')
str++;
base = 10;
}
}
if (var->type != CHEEVOS_VAR_TYPE_VALUE_COMP)
{
var->size = cheevos_var_parse_prefix(&str);
}
var->value = (unsigned)strtol(str, &end, base);
*memaddr = end;
}
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
{
rarch_system_info_t *system = runloop_get_system_info();
var->bank_id = -1;
if (console == CHEEVOS_CONSOLE_NINTENDO)
{
if (var->value >= 0x0800 && var->value < 0x2000)
{
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", var->value, var->value & 0x07ff);
var->value &= 0x07ff;
}
}
else if (console == CHEEVOS_CONSOLE_GAMEBOY_COLOR)
{
if (var->value >= 0xe000 && var->value <= 0xfdff)
{
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", var->value, var->value - 0x2000);
var->value -= 0x2000;
}
}
if (system->mmaps.num_descriptors != 0)
{
const rarch_memory_descriptor_t *desc = NULL;
const rarch_memory_descriptor_t *end = NULL;
/* Patch the address to correctly map it to the mmaps */
if (console == CHEEVOS_CONSOLE_GAMEBOY_ADVANCE)
{
if (var->value < 0x8000) /* Internal RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x3000000);
var->value += 0x3000000;
}
else /* Work RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x2000000 - 0x8000);
var->value += 0x2000000 - 0x8000;
}
}
else if (console == CHEEVOS_CONSOLE_PC_ENGINE)
{
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", var->value, var->value + 0x1f0000);
var->value += 0x1f0000;
}
else if (console == CHEEVOS_CONSOLE_SUPER_NINTENDO)
{
if (var->value < 0x020000) /* Work RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x7e0000);
var->value += 0x7e0000;
}
else /* Save RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x006000 - 0x020000);
var->value += 0x006000 - 0x020000;
}
}
desc = system->mmaps.descriptors;
end = desc + system->mmaps.num_descriptors;
for (; desc < end; desc++)
{
if (((desc->core.start ^ var->value) & desc->core.select) == 0)
{
unsigned addr = var->value;
var->bank_id = (int)(desc - system->mmaps.descriptors);
var->value = (unsigned)cheevos_var_reduce(
(addr - desc->core.start) & desc->disconnect_mask,
desc->core.disconnect);
if (var->value >= desc->core.len)
var->value -= cheevos_var_highest_bit(var->value);
var->value += desc->core.offset;
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, var->bank_id + 1, var->value);
break;
}
}
}
else
{
unsigned i;
for (i = 0; i < 4; i++)
{
retro_ctx_memory_info_t meminfo;
switch (i)
{
case 0:
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
break;
case 1:
meminfo.id = RETRO_MEMORY_SAVE_RAM;
break;
case 2:
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
break;
case 3:
meminfo.id = RETRO_MEMORY_RTC;
break;
}
core_get_memory(&meminfo);
if (var->value < meminfo.size)
{
var->bank_id = i;
break;
}
/* HACK subtract the correct amount of bytes to reach the save RAM */
if (i == 0 && console == CHEEVOS_CONSOLE_NINTENDO)
var->value -= 0x6000;
else
var->value -= meminfo.size;
}
}
}
/*****************************************************************************
Testing
*****************************************************************************/
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var)
{
uint8_t* memory = NULL;
if (var->bank_id >= 0)
{
rarch_system_info_t* system = runloop_get_system_info();
if (system->mmaps.num_descriptors != 0)
memory = (uint8_t*)system->mmaps.descriptors[var->bank_id].core.ptr;
else
{
retro_ctx_memory_info_t meminfo = {NULL, 0, 0};
switch (var->bank_id)
{
case 0:
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
break;
case 1:
meminfo.id = RETRO_MEMORY_SAVE_RAM;
break;
case 2:
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
break;
case 3:
meminfo.id = RETRO_MEMORY_RTC;
break;
default:
CHEEVOS_ERR(CHEEVOS_TAG "invalid bank id: %s\n", var->bank_id);
break;
}
core_get_memory(&meminfo);
memory = (uint8_t*)meminfo.data;
}
if (memory)
memory += var->value;
}
return memory;
}
unsigned cheevos_var_get_value(cheevos_var_t* var)
{
const uint8_t* memory = NULL;
unsigned value = 0;
switch (var->type)
{
case CHEEVOS_VAR_TYPE_VALUE_COMP:
value = var->value;
break;
case CHEEVOS_VAR_TYPE_ADDRESS:
case CHEEVOS_VAR_TYPE_DELTA_MEM:
memory = cheevos_var_get_memory(var);
if (memory)
{
value = memory[0];
switch (var->size)
{
case CHEEVOS_VAR_SIZE_BIT_0:
value &= 1;
break;
case CHEEVOS_VAR_SIZE_BIT_1:
value = (value >> 1) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_2:
value = (value >> 2) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_3:
value = (value >> 3) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_4:
value = (value >> 4) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_5:
value = (value >> 5) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_6:
value = (value >> 6) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_7:
value = (value >> 7) & 1;
break;
case CHEEVOS_VAR_SIZE_NIBBLE_LOWER:
value &= 0x0f;
break;
case CHEEVOS_VAR_SIZE_NIBBLE_UPPER:
value = (value >> 4) & 0x0f;
break;
case CHEEVOS_VAR_SIZE_EIGHT_BITS:
break;
case CHEEVOS_VAR_SIZE_SIXTEEN_BITS:
value |= memory[1] << 8;
break;
case CHEEVOS_VAR_SIZE_THIRTYTWO_BITS:
value |= memory[1] << 8;
value |= memory[2] << 16;
value |= memory[3] << 24;
break;
}
}
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
{
unsigned previous = var->previous;
var->previous = value;
value = previous;
}
break;
case CHEEVOS_VAR_TYPE_DYNAMIC_VAR:
/* We shouldn't get here... */
break;
}
if(var->is_bcd)
return (((value >> 4) & 0xf) * 10) + (value & 0xf);
return value;
}
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2017 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <ctype.h>
#include <stdint.h>
#include <libretro.h>
#include "var.h"
#include "../retroarch.h"
#include "../core.h"
#include "../verbosity.h"
/*****************************************************************************
Parsing
*****************************************************************************/
static cheevos_var_size_t cheevos_var_parse_prefix(const char** memaddr)
{
/* Careful not to use ABCDEF here, this denotes part of an actual variable! */
const char* str = *memaddr;
cheevos_var_size_t size;
switch (toupper((unsigned char)*str++))
{
case 'M':
size = CHEEVOS_VAR_SIZE_BIT_0;
break;
case 'N':
size = CHEEVOS_VAR_SIZE_BIT_1;
break;
case 'O':
size = CHEEVOS_VAR_SIZE_BIT_2;
break;
case 'P':
size = CHEEVOS_VAR_SIZE_BIT_3;
break;
case 'Q':
size = CHEEVOS_VAR_SIZE_BIT_4;
break;
case 'R':
size = CHEEVOS_VAR_SIZE_BIT_5;
break;
case 'S':
size = CHEEVOS_VAR_SIZE_BIT_6;
break;
case 'T':
size = CHEEVOS_VAR_SIZE_BIT_7;
break;
case 'L':
size = CHEEVOS_VAR_SIZE_NIBBLE_LOWER;
break;
case 'U':
size = CHEEVOS_VAR_SIZE_NIBBLE_UPPER;
break;
case 'H':
size = CHEEVOS_VAR_SIZE_EIGHT_BITS;
break;
case 'X':
size = CHEEVOS_VAR_SIZE_THIRTYTWO_BITS;
break;
default:
str--;
/* fall through */
case ' ':
size = CHEEVOS_VAR_SIZE_SIXTEEN_BITS;
break;
}
*memaddr = str;
return size;
}
static size_t cheevos_var_reduce(size_t addr, size_t mask)
{
while (mask)
{
size_t tmp = (mask - 1) & ~mask;
addr = (addr & tmp) | ((addr >> 1) & ~tmp);
mask = (mask & (mask - 1)) >> 1;
}
return addr;
}
static size_t cheevos_var_highest_bit(size_t n)
{
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
return n ^ (n >> 1);
}
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr)
{
char *end = NULL;
const char *str = *memaddr;
unsigned base = 16;
var->is_bcd = false;
if (toupper((unsigned char)*str) == 'D' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
{
/* d0x + 4 hex digits */
str += 3;
var->type = CHEEVOS_VAR_TYPE_DELTA_MEM;
}
else if (toupper((unsigned char)*str) == 'B' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
{
/* b0x (binary-coded decimal) */
str += 3;
var->is_bcd = true;
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
}
else if (*str == '0' && toupper((unsigned char)str[1]) == 'X')
{
/* 0x + 4 hex digits */
str += 2;
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
}
else
{
var->type = CHEEVOS_VAR_TYPE_VALUE_COMP;
if (toupper((unsigned char)*str) == 'H')
str++;
else
{
if (toupper((unsigned char)*str) == 'V')
str++;
base = 10;
}
}
if (var->type != CHEEVOS_VAR_TYPE_VALUE_COMP)
{
var->size = cheevos_var_parse_prefix(&str);
}
var->value = (unsigned)strtol(str, &end, base);
*memaddr = end;
}
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console)
{
rarch_system_info_t *system = runloop_get_system_info();
var->bank_id = -1;
if (console == CHEEVOS_CONSOLE_NINTENDO)
{
if (var->value >= 0x0800 && var->value < 0x2000)
{
CHEEVOS_LOG(CHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", var->value, var->value & 0x07ff);
var->value &= 0x07ff;
}
}
else if (console == CHEEVOS_CONSOLE_GAMEBOY_COLOR)
{
if (var->value >= 0xe000 && var->value <= 0xfdff)
{
CHEEVOS_LOG(CHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", var->value, var->value - 0x2000);
var->value -= 0x2000;
}
}
if (system->mmaps.num_descriptors != 0)
{
const rarch_memory_descriptor_t *desc = NULL;
const rarch_memory_descriptor_t *end = NULL;
/* Patch the address to correctly map it to the mmaps */
if (console == CHEEVOS_CONSOLE_GAMEBOY_ADVANCE)
{
if (var->value < 0x8000) /* Internal RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x3000000);
var->value += 0x3000000;
}
else /* Work RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "GBA memory address %X adjusted to %X\n", var->value, var->value + 0x2000000 - 0x8000);
var->value += 0x2000000 - 0x8000;
}
}
else if (console == CHEEVOS_CONSOLE_PC_ENGINE)
{
CHEEVOS_LOG(CHEEVOS_TAG "PCE memory address %X adjusted to %X\n", var->value, var->value + 0x1f0000);
var->value += 0x1f0000;
}
else if (console == CHEEVOS_CONSOLE_SUPER_NINTENDO)
{
if (var->value < 0x020000) /* Work RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x7e0000);
var->value += 0x7e0000;
}
else /* Save RAM */
{
CHEEVOS_LOG(CHEEVOS_TAG "SNES memory address %X adjusted to %X\n", var->value, var->value + 0x006000 - 0x020000);
var->value += 0x006000 - 0x020000;
}
}
desc = system->mmaps.descriptors;
end = desc + system->mmaps.num_descriptors;
for (; desc < end; desc++)
{
if (((desc->core.start ^ var->value) & desc->core.select) == 0)
{
unsigned addr = var->value;
var->bank_id = (int)(desc - system->mmaps.descriptors);
var->value = (unsigned)cheevos_var_reduce(
(addr - desc->core.start) & desc->disconnect_mask,
desc->core.disconnect);
if (var->value >= desc->core.len)
var->value -= cheevos_var_highest_bit(var->value);
var->value += desc->core.offset;
CHEEVOS_LOG(CHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", addr, var->bank_id + 1, var->value);
break;
}
}
}
else
{
unsigned i;
for (i = 0; i < 4; i++)
{
retro_ctx_memory_info_t meminfo;
switch (i)
{
case 0:
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
break;
case 1:
meminfo.id = RETRO_MEMORY_SAVE_RAM;
break;
case 2:
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
break;
case 3:
meminfo.id = RETRO_MEMORY_RTC;
break;
}
core_get_memory(&meminfo);
if (var->value < meminfo.size)
{
var->bank_id = i;
break;
}
/* HACK subtract the correct amount of bytes to reach the save RAM */
if (i == 0 && console == CHEEVOS_CONSOLE_NINTENDO)
var->value -= 0x6000;
else
var->value -= meminfo.size;
}
}
}
/*****************************************************************************
Testing
*****************************************************************************/
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var)
{
rarch_system_info_t *system = NULL;
uint8_t *memory = NULL;
size_t length = 0;
if (var->bank_id < 0)
return NULL;
system = runloop_get_system_info();
if (system->mmaps.num_descriptors != 0)
{
memory = (uint8_t*)system->mmaps.descriptors[var->bank_id].core.ptr;
length = system->mmaps.descriptors[var->bank_id].core.len;
}
else
{
retro_ctx_memory_info_t meminfo = {NULL, 0, 0};
switch (var->bank_id)
{
case 0:
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
break;
case 1:
meminfo.id = RETRO_MEMORY_SAVE_RAM;
break;
case 2:
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
break;
case 3:
meminfo.id = RETRO_MEMORY_RTC;
break;
default:
CHEEVOS_ERR(CHEEVOS_TAG "invalid bank id: %d\n", var->bank_id);
break;
}
core_get_memory(&meminfo);
memory = (uint8_t*)meminfo.data;
length = meminfo.size;
}
if (memory == NULL || var->value >= length)
return NULL;
return memory + var->value;
}
unsigned cheevos_var_get_value(cheevos_var_t* var)
{
const uint8_t* memory = NULL;
unsigned value = 0;
switch (var->type)
{
case CHEEVOS_VAR_TYPE_VALUE_COMP:
value = var->value;
break;
case CHEEVOS_VAR_TYPE_ADDRESS:
case CHEEVOS_VAR_TYPE_DELTA_MEM:
memory = cheevos_var_get_memory(var);
if (memory)
{
value = memory[0];
switch (var->size)
{
case CHEEVOS_VAR_SIZE_BIT_0:
value &= 1;
break;
case CHEEVOS_VAR_SIZE_BIT_1:
value = (value >> 1) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_2:
value = (value >> 2) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_3:
value = (value >> 3) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_4:
value = (value >> 4) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_5:
value = (value >> 5) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_6:
value = (value >> 6) & 1;
break;
case CHEEVOS_VAR_SIZE_BIT_7:
value = (value >> 7) & 1;
break;
case CHEEVOS_VAR_SIZE_NIBBLE_LOWER:
value &= 0x0f;
break;
case CHEEVOS_VAR_SIZE_NIBBLE_UPPER:
value = (value >> 4) & 0x0f;
break;
case CHEEVOS_VAR_SIZE_EIGHT_BITS:
break;
case CHEEVOS_VAR_SIZE_SIXTEEN_BITS:
value |= memory[1] << 8;
break;
case CHEEVOS_VAR_SIZE_THIRTYTWO_BITS:
value |= memory[1] << 8;
value |= memory[2] << 16;
value |= memory[3] << 24;
break;
}
}
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
{
unsigned previous = var->previous;
var->previous = value;
value = previous;
}
break;
case CHEEVOS_VAR_TYPE_DYNAMIC_VAR:
/* We shouldn't get here... */
break;
}
if(var->is_bcd)
return (((value >> 4) & 0xf) * 10) + (value & 0xf);
return value;
}
+78 -78
View File
@@ -1,78 +1,78 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2018 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_VAR_H
#define __RARCH_CHEEVOS_VAR_H
#include <stdint.h>
#include "cheevos.h"
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef enum
{
CHEEVOS_VAR_SIZE_BIT_0 = 0,
CHEEVOS_VAR_SIZE_BIT_1,
CHEEVOS_VAR_SIZE_BIT_2,
CHEEVOS_VAR_SIZE_BIT_3,
CHEEVOS_VAR_SIZE_BIT_4,
CHEEVOS_VAR_SIZE_BIT_5,
CHEEVOS_VAR_SIZE_BIT_6,
CHEEVOS_VAR_SIZE_BIT_7,
CHEEVOS_VAR_SIZE_NIBBLE_LOWER,
CHEEVOS_VAR_SIZE_NIBBLE_UPPER,
/* Byte, */
CHEEVOS_VAR_SIZE_EIGHT_BITS, /* =Byte, */
CHEEVOS_VAR_SIZE_SIXTEEN_BITS,
CHEEVOS_VAR_SIZE_THIRTYTWO_BITS
} cheevos_var_size_t;
typedef enum
{
/* compare to the value of a live address in RAM */
CHEEVOS_VAR_TYPE_ADDRESS = 0,
/* a number. assume 32 bit */
CHEEVOS_VAR_TYPE_VALUE_COMP,
/* the value last known at this address. */
CHEEVOS_VAR_TYPE_DELTA_MEM,
/* a custom user-set variable */
CHEEVOS_VAR_TYPE_DYNAMIC_VAR
} cheevos_var_type_t;
typedef struct
{
cheevos_var_size_t size;
cheevos_var_type_t type;
int bank_id;
bool is_bcd;
unsigned value;
unsigned previous;
} cheevos_var_t;
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr);
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console);
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var);
unsigned cheevos_var_get_value(cheevos_var_t* var);
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_VAR_H */
/* RetroArch - A frontend for libretro.
* Copyright (C) 2015-2018 - Andre Leiradella
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CHEEVOS_VAR_H
#define __RARCH_CHEEVOS_VAR_H
#include <stdint.h>
#include "cheevos.h"
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef enum
{
CHEEVOS_VAR_SIZE_BIT_0 = 0,
CHEEVOS_VAR_SIZE_BIT_1,
CHEEVOS_VAR_SIZE_BIT_2,
CHEEVOS_VAR_SIZE_BIT_3,
CHEEVOS_VAR_SIZE_BIT_4,
CHEEVOS_VAR_SIZE_BIT_5,
CHEEVOS_VAR_SIZE_BIT_6,
CHEEVOS_VAR_SIZE_BIT_7,
CHEEVOS_VAR_SIZE_NIBBLE_LOWER,
CHEEVOS_VAR_SIZE_NIBBLE_UPPER,
/* Byte, */
CHEEVOS_VAR_SIZE_EIGHT_BITS, /* =Byte, */
CHEEVOS_VAR_SIZE_SIXTEEN_BITS,
CHEEVOS_VAR_SIZE_THIRTYTWO_BITS
} cheevos_var_size_t;
typedef enum
{
/* compare to the value of a live address in RAM */
CHEEVOS_VAR_TYPE_ADDRESS = 0,
/* a number. assume 32 bit */
CHEEVOS_VAR_TYPE_VALUE_COMP,
/* the value last known at this address. */
CHEEVOS_VAR_TYPE_DELTA_MEM,
/* a custom user-set variable */
CHEEVOS_VAR_TYPE_DYNAMIC_VAR
} cheevos_var_type_t;
typedef struct
{
cheevos_var_size_t size;
cheevos_var_type_t type;
int bank_id;
bool is_bcd;
unsigned value;
unsigned previous;
} cheevos_var_t;
void cheevos_var_parse(cheevos_var_t* var, const char** memaddr);
void cheevos_var_patch_addr(cheevos_var_t* var, cheevos_console_t console);
uint8_t* cheevos_var_get_memory(const cheevos_var_t* var);
unsigned cheevos_var_get_value(cheevos_var_t* var);
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_VAR_H */
Regular → Executable
+283 -161
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2015-2017 - Andres Suarez
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -41,11 +41,9 @@
#ifdef HAVE_CHEEVOS
#include "cheevos/cheevos.h"
#ifdef HAVE_NEW_CHEEVOS
#include "cheevos-new/fixup.h"
#else
#include "cheevos/var.h"
#endif
#include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove lines */
#include "cheevos-new/fixup.h"
#endif
#ifdef HAVE_DISCORD
@@ -59,6 +57,9 @@
#include "menu/menu_content.h"
#include "menu/menu_shader.h"
#include "menu/widgets/menu_dialog.h"
#ifdef HAVE_MENU_WIDGETS
#include "menu/widgets/menu_widgets.h"
#endif
#endif
#ifdef HAVE_NETWORKING
@@ -91,6 +92,7 @@
#include "ui/ui_companion_driver.h"
#include "tasks/task_content.h"
#include "tasks/tasks_internal.h"
#include "gfx/video_driver.h"
#include "list_special.h"
#include "core.h"
@@ -222,6 +224,8 @@ static const struct cmd_map map[] = {
{ "MUTE", RARCH_MUTE },
{ "OSK", RARCH_OSK },
{ "FPS_TOGGLE", RARCH_FPS_TOGGLE },
{ "SEND_DEBUG_INFO", RARCH_SEND_DEBUG_INFO },
{ "NETPLAY_HOST_TOGGLE", RARCH_NETPLAY_HOST_TOGGLE },
{ "NETPLAY_GAME_WATCH", RARCH_NETPLAY_GAME_WATCH },
{ "VOLUME_UP", RARCH_VOLUME_UP },
{ "VOLUME_DOWN", RARCH_VOLUME_DOWN },
@@ -249,112 +253,110 @@ bool command_set_shader(const char *arg)
{
char msg[256];
bool is_preset = false;
settings_t *settings = NULL;
enum rarch_shader_type type = video_shader_get_type_from_ext(
path_get_extension(arg), &is_preset);
#ifdef HAVE_MENU
struct video_shader *shader = menu_shader_get();
#endif
if (type == RARCH_SHADER_NONE)
return false;
snprintf(msg, sizeof(msg), "Shader: \"%s\"", arg);
runloop_msg_queue_push(msg, 1, 120, true);
snprintf(msg, sizeof(msg),
"Shader: \"%s\"", arg ? path_basename(arg) : "null");
#ifdef HAVE_MENU_WIDGETS
if (!menu_widgets_set_message(msg))
#endif
runloop_msg_queue_push(msg, 1, 120, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
RARCH_LOG("%s \"%s\".\n",
msg_hash_to_str(MSG_APPLYING_SHADER),
arg);
retroarch_set_shader_preset(arg);
#ifdef HAVE_MENU
return menu_shader_manager_set_preset(shader, type, arg);
#else
return true;
if (!menu_shader_manager_set_preset(menu_shader_get(), type, arg))
return false;
#endif
settings = config_get_ptr();
if (settings && !settings->bools.video_shader_enable)
settings->bools.video_shader_enable = true;
return true;
}
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
#define SMY_CMD_STR "READ_CORE_RAM"
static bool command_read_ram(const char *arg)
{
#if defined(HAVE_NEW_CHEEVOS)
/* RCHEEVOS TODO: remove settings init and test */
settings_t *settings = config_get_ptr();
cheevos_var_t var;
unsigned i;
char *reply = NULL;
const uint8_t * data = NULL;
char *reply = NULL;
const uint8_t *data = NULL;
char *reply_at = NULL;
unsigned int nbytes = 0;
unsigned int alloc_size = 0;
unsigned int addr = -1;
unsigned int addr = -1;
if (sscanf(arg, "%x %d", &addr, &nbytes) != 2)
if (sscanf(arg, "%x %u", &addr, &nbytes) != 2)
return true;
alloc_size = 40 + nbytes * 3; /* We alloc more than needed, saving 20 bytes is not really relevant */
reply = (char*) malloc(alloc_size);
reply[0] = '\0';
reply_at = reply + snprintf(reply, alloc_size - 1, SMY_CMD_STR " %x", addr);
data = cheevos_patch_address(addr, cheevos_get_console());
/* RCHEEVOS TODO: remove if condition below */
if (!settings->bools.cheevos_old_enable)
data = rcheevos_patch_address(addr, rcheevos_get_console());
/* RCHEEVOS TODO: remove whole else block below */
else
{
var.value = addr;
cheevos_var_patch_addr(&var, cheevos_get_console());
data = cheevos_var_get_memory(&var);
}
if (data)
{
for (i = 0; i < nbytes; i++)
sprintf(reply_at+3*i, " %.2X", data[i]);
reply_at[3*nbytes] = '\n';
command_reply(reply, reply_at+3*nbytes+1 - reply);
snprintf(reply_at + 3 * i, 4, " %.2X", data[i]);
reply_at[3 * nbytes] = '\n';
command_reply(reply, reply_at + 3 * nbytes + 1 - reply);
}
else
{
strlcpy(reply_at, " -1\n", sizeof(reply)-strlen(reply));
command_reply(reply, reply_at+strlen(" -1\n") - reply);
strlcpy(reply_at, " -1\n", sizeof(reply) - strlen(reply));
command_reply(reply, reply_at + STRLEN_CONST(" -1\n") - reply);
}
free(reply);
#else
cheevos_var_t var;
unsigned i;
char reply[256] = {0};
const uint8_t * data = NULL;
char *reply_at = NULL;
reply[0] = '\0';
strlcpy(reply, "READ_CORE_RAM ", sizeof(reply));
reply_at = reply + strlen("READ_CORE_RAM ");
strlcpy(reply_at, arg, sizeof(reply)-strlen(reply));
var.value = strtoul(reply_at, (char**)&reply_at, 16);
cheevos_var_patch_addr(&var, cheevos_get_console());
data = cheevos_var_get_memory(&var);
if (data)
{
unsigned nbytes = strtol(reply_at, NULL, 10);
for (i = 0; i < nbytes; i++)
sprintf(reply_at+3*i, " %.2X", data[i]);
reply_at[3*nbytes] = '\n';
command_reply(reply, reply_at+3*nbytes+1 - reply);
}
else
{
strlcpy(reply_at, " -1\n", sizeof(reply)-strlen(reply));
command_reply(reply, reply_at+strlen(" -1\n") - reply);
}
#endif
return true;
}
#undef SMY_CMD_STR
static bool command_write_ram(const char *arg)
{
unsigned nbytes = 0;
#if defined(HAVE_NEW_CHEEVOS)
unsigned int addr = strtoul(arg, (char**)&arg, 16);
uint8_t *data = (uint8_t *)cheevos_patch_address(addr, cheevos_get_console());
#else
cheevos_var_t var;
uint8_t *data = NULL;
unsigned nbytes = 0;
uint8_t *data = NULL;
unsigned int addr = 0;
var.value = strtoul(arg, (char**)&arg, 16);
cheevos_var_patch_addr(&var, cheevos_get_console());
/* RCHEEVOS TODO: remove settings init and test */
settings_t *settings = config_get_ptr();
data = cheevos_var_get_memory(&var);
#endif
if (!settings->bools.cheevos_old_enable)
{
addr = strtoul(arg, (char**)&arg, 16);
data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
}
/* RCHEEVOS TODO: remove the whole else block below */
else
{
cheevos_var_t var;
var.value = strtoul(arg, (char**)&arg, 16);
cheevos_var_patch_addr(&var, cheevos_get_console());
data = cheevos_var_get_memory(&var);
}
if (data)
{
@@ -370,7 +372,7 @@ static bool command_write_ram(const char *arg)
}
#endif
#ifdef HAVE_COMMAND
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
static bool command_get_arg(const char *tok,
const char **arg, unsigned *index)
{
@@ -411,9 +413,7 @@ static bool command_get_arg(const char *tok,
return false;
}
#endif
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
static bool command_network_init(command_t *handle, uint16_t port)
{
struct addrinfo *res = NULL;
@@ -466,7 +466,6 @@ static bool command_verify(const char *cmd)
return false;
}
#ifdef HAVE_COMMAND
static void command_parse_sub_msg(command_t *handle, const char *tok)
{
const char *arg = NULL;
@@ -544,7 +543,6 @@ static void command_network_poll(command_t *handle)
}
}
#endif
#endif
bool command_network_send(const char *cmd_)
{
@@ -787,7 +785,7 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)
/* Only noise in menu. */
if (print_log)
runloop_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
@@ -845,7 +843,7 @@ static void command_event_disk_control_set_index(unsigned idx)
RARCH_ERR("%s\n", msg);
else
RARCH_LOG("%s\n", msg);
runloop_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
@@ -886,7 +884,7 @@ static bool command_event_disk_control_append_image(const char *path)
snprintf(msg, sizeof(msg), "%s: ", msg_hash_to_str(MSG_APPENDED_DISK));
strlcat(msg, path, sizeof(msg));
RARCH_LOG("%s\n", msg);
runloop_msg_queue_push(msg, 0, 180, true);
runloop_msg_queue_push(msg, 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL);
@@ -995,7 +993,12 @@ static void command_event_set_volume(float gain)
snprintf(msg, sizeof(msg), "%s: %.1f dB",
msg_hash_to_str(MSG_AUDIO_VOLUME),
new_volume);
runloop_msg_queue_push(msg, 1, 180, true);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_volume_update_and_show())
#endif
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
RARCH_LOG("%s\n", msg);
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
@@ -1022,7 +1025,7 @@ static void command_event_set_mixer_volume(float gain)
snprintf(msg, sizeof(msg), "%s: %.1f dB",
msg_hash_to_str(MSG_AUDIO_VOLUME),
new_volume);
runloop_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
RARCH_LOG("%s\n", msg);
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, new_volume);
@@ -1112,7 +1115,9 @@ static void command_event_init_controllers(void)
static void command_event_deinit_core(bool reinit)
{
#ifdef HAVE_CHEEVOS
cheevos_unload();
/* RCHEEVOS TODO: remove settings init and test */
settings_t *settings = config_get_ptr();
!settings->bools.cheevos_old_enable ? rcheevos_unload() : cheevos_unload();
#endif
RARCH_LOG("Unloading game..\n");
@@ -1167,7 +1172,8 @@ static void command_event_load_auto_state(void)
#endif
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
goto error;
#endif
@@ -1366,6 +1372,7 @@ static bool command_event_init_core(enum rarch_core_type *data)
return false;
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_INIT, NULL);
return true;
}
@@ -1417,7 +1424,8 @@ static bool command_event_save_auto_state(void)
goto error;
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
goto error;
#endif
@@ -1443,16 +1451,18 @@ static bool command_event_save_config(
const char *config_path,
char *s, size_t len)
{
char log[PATH_MAX_LENGTH];
bool path_exists = !string_is_empty(config_path);
const char *str = path_exists ? config_path :
path_get(RARCH_PATH_CONFIG);
if (path_exists && config_save_file(config_path))
{
snprintf(s, len, "[Config]: %s \"%s\".",
snprintf(s, len, "%s \"%s\".",
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
config_path);
RARCH_LOG("%s\n", s);
snprintf(log, PATH_MAX_LENGTH, "[config] %s", s);
RARCH_LOG("%s\n", log);
return true;
}
@@ -1461,7 +1471,8 @@ static bool command_event_save_config(
snprintf(s, len, "%s \"%s\".",
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
str);
RARCH_ERR("%s\n", s);
snprintf(log, PATH_MAX_LENGTH, "[config] %s", s);
RARCH_ERR("%s\n", log);
}
return false;
@@ -1501,8 +1512,8 @@ static bool command_event_save_core_config(void)
if (string_is_empty(config_dir))
{
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true);
RARCH_ERR("[Config]: %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
RARCH_ERR("[config] %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
free (config_dir);
return false;
}
@@ -1553,7 +1564,7 @@ static bool command_event_save_core_config(void)
if (!found_path)
{
/* Fallback to system time... */
RARCH_WARN("[Config]: %s\n",
RARCH_WARN("[config] %s\n",
msg_hash_to_str(MSG_CANNOT_INFER_NEW_CONFIG_PATH));
fill_dated_filename(config_name,
file_path_str(FILE_PATH_CONFIG_EXTENSION),
@@ -1574,7 +1585,7 @@ static bool command_event_save_core_config(void)
command_event_save_config(config_path, msg, sizeof(msg));
if (!string_is_empty(msg))
runloop_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (overrides_active)
rarch_ctl(RARCH_CTL_SET_OVERRIDES_ACTIVE, NULL);
@@ -1603,7 +1614,7 @@ static void command_event_save_current_config(enum override_type type)
{
case OVERRIDE_NONE:
if (path_is_empty(RARCH_PATH_CONFIG))
strlcpy(msg, "[Config]: Config directory not set, cannot save configuration.",
strlcpy(msg, "[config] Config directory not set, cannot save configuration.",
sizeof(msg));
else
command_event_save_config(path_get(RARCH_PATH_CONFIG), msg, sizeof(msg));
@@ -1614,7 +1625,7 @@ static void command_event_save_current_config(enum override_type type)
if (config_save_overrides(type))
{
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_SAVED_SUCCESSFULLY), sizeof(msg));
RARCH_LOG("[Config]: [overrides] %s\n", msg);
RARCH_LOG("[config] [overrides] %s\n", msg);
/* set overrides to active so the original config can be
restored after closing content */
@@ -1623,13 +1634,13 @@ static void command_event_save_current_config(enum override_type type)
else
{
strlcpy(msg, msg_hash_to_str(MSG_OVERRIDES_ERROR_SAVING), sizeof(msg));
RARCH_ERR("[Config]: [overrides] %s\n", msg);
RARCH_ERR("[config] [overrides] %s\n", msg);
}
break;
}
if (!string_is_empty(msg))
runloop_msg_queue_push(msg, 1, 180, true);
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
static void command_event_undo_save_state(char *s, size_t len)
@@ -1714,7 +1725,8 @@ static bool command_event_main_state(unsigned cmd)
if (content_load_state(state_path, false, false))
{
#ifdef HAVE_CHEEVOS
cheevos_state_loaded_flag = true;
/* RCHEEVOS TODO: remove duplication below */
rcheevos_state_loaded_flag = cheevos_state_loaded_flag = true;
#endif
ret = true;
#ifdef HAVE_NETWORKING
@@ -1738,7 +1750,7 @@ static bool command_event_main_state(unsigned cmd)
MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES), sizeof(msg));
if (push_msg)
runloop_msg_queue_push(msg, 2, 180, true);
runloop_msg_queue_push(msg, 2, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
RARCH_LOG("%s\n", msg);
free(state_path);
@@ -1801,7 +1813,7 @@ bool command_event(enum event_command cmd, void *data)
snprintf(msg, sizeof(msg),"%s: %dx%d",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION),
width, height);
runloop_msg_queue_push(msg, 1, 100, true);
runloop_msg_queue_push(msg, 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
#endif
@@ -1840,7 +1852,7 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_LOAD_CORE:
{
bool success = false;
bool success = false;
subsystem_current_count = 0;
content_clear_subsystem();
success = command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
@@ -1861,7 +1873,8 @@ bool command_event(enum event_command cmd, void *data)
return false;
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
return false;
#endif
if (!command_event_main_state(cmd))
@@ -1891,29 +1904,34 @@ bool command_event(enum event_command cmd, void *data)
command_event_init_controllers();
break;
case CMD_EVENT_RESET:
/* RCHEEVOS TODO: remove starting block bracket, settings init and tests */
{
#ifdef HAVE_CHEEVOS
cheevos_state_loaded_flag = false;
cheevos_hardcore_paused = false;
settings_t *settings = config_get_ptr();
rcheevos_state_loaded_flag = cheevos_state_loaded_flag = false;
rcheevos_hardcore_paused = cheevos_hardcore_paused = false;
#endif
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true);
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
#ifdef HAVE_CHEEVOS
cheevos_set_cheats();
!settings->bools.cheevos_old_enable ? rcheevos_set_cheats() : cheevos_set_cheats();
#endif
core_reset();
core_reset();
#ifdef HAVE_CHEEVOS
cheevos_reset_game();
!settings->bools.cheevos_old_enable ? rcheevos_reset_game() : cheevos_reset_game();
#endif
#if HAVE_NETWORKING
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
#endif
return false;
return false;
}
case CMD_EVENT_SAVE_STATE:
{
settings_t *settings = config_get_ptr();
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
return false;
#endif
@@ -1957,6 +1975,7 @@ bool command_event(enum event_command cmd, void *data)
content_get_status(&contentless, &is_inited);
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL);
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
command_event(CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET, NULL);
@@ -1967,18 +1986,19 @@ bool command_event(enum event_command cmd, void *data)
if (!task_push_start_dummy_core(&content_info))
return false;
}
#ifdef HAVE_DYNAMIC
path_clear(RARCH_PATH_CORE);
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
#endif
#ifdef HAVE_DISCORD
if (discord_is_inited)
{
discord_userdata_t userdata;
userdata.status = DISCORD_PRESENCE_NETPLAY_NETPLAY_STOPPED;
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
userdata.status = DISCORD_PRESENCE_MENU;
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
}
#endif
#ifdef HAVE_DYNAMIC
path_clear(RARCH_PATH_CORE);
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
#endif
if (is_inited)
{
@@ -1993,7 +2013,11 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
#ifdef HAVE_CHEEVOS
cheevos_toggle_hardcore_mode();
/* RCHEEVOS TODO: remove starting block bracket, settings init and test */
{
settings_t *settings = config_get_ptr();
!settings->bools.cheevos_old_enable ? rcheevos_toggle_hardcore_mode() : cheevos_toggle_hardcore_mode();
}
#endif
break;
/* this fallthrough is on purpose, it should do
@@ -2034,7 +2058,8 @@ bool command_event(enum event_command cmd, void *data)
break;
case CMD_EVENT_REWIND_DEINIT:
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
return false;
#endif
state_manager_event_deinit();
@@ -2043,7 +2068,8 @@ bool command_event(enum event_command cmd, void *data)
{
settings_t *settings = config_get_ptr();
#ifdef HAVE_CHEEVOS
if (cheevos_hardcore_active)
/* RCHEEVOS TODO: remove OR below */
if (cheevos_hardcore_active || rcheevos_hardcore_active)
return false;
#endif
if (settings->bools.rewind_enable)
@@ -2121,10 +2147,16 @@ TODO: Add a setting for these tweaks */
return false;
}
runloop_msg_queue_push(msg, 1, 180, true);
RARCH_LOG("%s\n", msg);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_volume_update_and_show())
#endif
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case CMD_EVENT_SEND_DEBUG_INFO:
rarch_send_debug_info();
break;
case CMD_EVENT_FPS_TOGGLE:
{
settings_t *settings = config_get_ptr();
@@ -2139,6 +2171,12 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_OVERLAY_INIT:
{
#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))
break;
#endif
settings_t *settings = config_get_ptr();
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
#ifdef HAVE_OVERLAY
@@ -2306,6 +2344,7 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_CORE_DEINIT:
{
struct retro_hw_render_callback *hwr = NULL;
rarch_ctl(RARCH_CTL_CONTENT_RUNTIME_LOG_DEINIT, NULL);
content_reset_savestate_backups();
hwr = video_driver_get_hw_context();
command_event_deinit_core(true);
@@ -2378,7 +2417,7 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_SHUTDOWN:
#if defined(__linux__) && !defined(ANDROID)
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_SHUTTING_DOWN), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -P now");
@@ -2386,7 +2425,7 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_REBOOT:
#if defined(__linux__) && !defined(ANDROID)
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_VALUE_REBOOTING), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
command_event(CMD_EVENT_QUIT, NULL);
system("shutdown -r now");
@@ -2399,44 +2438,49 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_ADD_TO_FAVORITES:
{
/* TODO/FIXME - does path_get(RARCH_PATH_CORE) depend on the system info struct? Investigate */
global_t *global = global_get_ptr();
struct retro_system_info *system = runloop_get_libretro_system_info();
const char *label = NULL;
const char *core_path = system ? path_get(RARCH_PATH_CORE) : NULL;
const char *core_name = system ? system->library_name : NULL;
struct string_list *str_list = (struct string_list*)data;
if (!string_is_empty(global->name.label))
label = global->name.label;
if (str_list)
{
if (str_list->size >= 6)
{
struct playlist_entry entry = {0};
entry.path = str_list->elems[0].data; /* content_path */
entry.label = str_list->elems[1].data; /* content_label */
entry.core_path = str_list->elems[2].data; /* core_path */
entry.core_name = str_list->elems[3].data; /* core_name */
entry.crc32 = str_list->elems[4].data; /* crc32 */
entry.db_name = str_list->elems[5].data; /* db_name */
/* Write playlist entry */
command_playlist_push_write(
g_defaults.content_favorites,
&entry
);
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
command_playlist_push_write(
g_defaults.content_favorites,
(const char*)data,
label,
core_path,
core_name
);
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true);
break;
}
case CMD_EVENT_RESET_CORE_ASSOCIATION:
{
const char *core_name = "DETECT";
const char *core_path = "DETECT";
size_t *playlist_index = (size_t*)data;
struct playlist_entry entry = {0};
/* the update function reads our entry as const, so these casts are safe */
entry.core_path = (char*)core_path;
entry.core_name = (char*)core_name;
command_playlist_update_write(
NULL,
*playlist_index,
NULL,
NULL,
core_path,
core_name,
NULL,
NULL);
&entry);
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true);
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET_CORE_ASSOCIATION), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
break;
}
@@ -2481,6 +2525,9 @@ TODO: Add a setting for these tweaks */
bool is_idle = false;
bool is_slowmotion = false;
bool is_perfcnt_enable = false;
#ifdef HAVE_DISCORD
discord_userdata_t userdata;
#endif
runloop_get_status(&is_paused, &is_idle, &is_slowmotion,
&is_perfcnt_enable);
@@ -2490,21 +2537,26 @@ TODO: Add a setting for these tweaks */
RARCH_LOG("%s\n", msg_hash_to_str(MSG_PAUSED));
command_event(CMD_EVENT_AUDIO_STOP, NULL);
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
1, true);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_set_paused(is_paused))
#endif
runloop_msg_queue_push(msg_hash_to_str(MSG_PAUSED), 1,
1, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (!is_idle)
video_driver_cached_frame();
#ifdef HAVE_DISCORD
discord_userdata_t userdata;
userdata.status = DISCORD_PRESENCE_GAME_PAUSED;
command_event(CMD_EVENT_DISCORD_UPDATE, &userdata);
#endif
}
else
{
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
menu_widgets_set_paused(is_paused);
#endif
RARCH_LOG("%s\n", msg_hash_to_str(MSG_UNPAUSED));
command_event(CMD_EVENT_AUDIO_START, NULL);
}
@@ -2600,14 +2652,17 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_NETPLAY_INIT_DIRECT:
{
/* buf is expected to be address|port */
char *buf = (char *)data;
static struct string_list *hostname = NULL;
settings_t *settings = config_get_ptr();
hostname = string_split(buf, "|");
settings_t *settings = config_get_ptr();
char *buf = (char *)data;
RARCH_LOG("[netplay] buf %s\n", buf);
hostname = string_split(buf, "|");
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
RARCH_LOG("[netplay] connecting to %s:%d\n",
RARCH_LOG("[netplay] connecting to %s:%d (direct)\n",
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
@@ -2633,15 +2688,18 @@ TODO: Add a setting for these tweaks */
/* init netplay via lobby when content is not loaded */
case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED:
{
/* buf is expected to be address|port */
char *buf = (char *)data;
static struct string_list *hostname = NULL;
settings_t *settings = config_get_ptr();
hostname = string_split(buf, "|");
/* buf is expected to be address|port */
settings_t *settings = config_get_ptr();
char *buf = (char *)data;
RARCH_LOG("[netplay] buf %s\n", buf);
hostname = string_split(buf, "|");
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
RARCH_LOG("[netplay] connecting to %s:%d\n",
RARCH_LOG("[netplay] connecting to %s:%d (deferred)\n",
hostname->elems[0].data, !string_is_empty(hostname->elems[1].data)
? atoi(hostname->elems[1].data) : settings->uints.netplay_port);
@@ -2667,6 +2725,62 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_NETPLAY_GAME_WATCH:
netplay_driver_ctl(RARCH_NETPLAY_CTL_GAME_WATCH, NULL);
break;
case CMD_EVENT_NETPLAY_ENABLE_HOST:
{
#ifdef HAVE_MENU
bool contentless = false;
bool is_inited = false;
content_get_status(&contentless, &is_inited);
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_SERVER, NULL);
/* If we haven't yet started, this will load on its own */
if (!is_inited)
{
runloop_msg_queue_push(
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED),
1, 480, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
return false;
}
/* Enable Netplay itself */
if (!command_event(CMD_EVENT_NETPLAY_INIT, NULL))
return false;
#endif
break;
}
case CMD_EVENT_NETPLAY_DISCONNECT:
{
settings_t *settings = config_get_ptr();
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISCONNECT, NULL);
netplay_driver_ctl(RARCH_NETPLAY_CTL_DISABLE, NULL);
/* Re-enable rewind if it was enabled
TODO: Add a setting for these tweaks */
if (settings->bools.rewind_enable)
command_event(CMD_EVENT_REWIND_INIT, NULL);
if (settings->uints.autosave_interval != 0)
command_event(CMD_EVENT_AUTOSAVE_INIT, NULL);
break;
}
case CMD_EVENT_NETPLAY_HOST_TOGGLE:
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) &&
netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_SERVER, NULL))
command_event(CMD_EVENT_NETPLAY_DISCONNECT, NULL);
else if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_ENABLED, NULL) &&
!netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_SERVER, NULL) &&
netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_CONNECTED, NULL))
command_event(CMD_EVENT_NETPLAY_DISCONNECT, NULL);
else
command_event(CMD_EVENT_NETPLAY_ENABLE_HOST, NULL);
break;
#else
case CMD_EVENT_NETPLAY_DEINIT:
case CMD_EVENT_NETWORK_DEINIT:
@@ -2675,6 +2789,9 @@ TODO: Add a setting for these tweaks */
case CMD_EVENT_NETPLAY_INIT_DIRECT:
case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED:
case CMD_EVENT_NETPLAY_GAME_WATCH:
case CMD_EVENT_NETPLAY_HOST_TOGGLE:
case CMD_EVENT_NETPLAY_DISCONNECT:
case CMD_EVENT_NETPLAY_ENABLE_HOST:
return false;
#endif
case CMD_EVENT_FULLSCREEN_TOGGLE:
@@ -2759,7 +2876,8 @@ TODO: Add a setting for these tweaks */
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case CMD_EVENT_DISK_NEXT:
@@ -2783,7 +2901,8 @@ TODO: Add a setting for these tweaks */
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case CMD_EVENT_DISK_PREV:
@@ -2807,7 +2926,8 @@ TODO: Add a setting for these tweaks */
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_CORE_DOES_NOT_SUPPORT_DISK_OPTIONS),
1, 120, true);
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
break;
case CMD_EVENT_RUMBLE_STOP:
@@ -2874,7 +2994,8 @@ TODO: Add a setting for these tweaks */
input_driver_keyboard_mapping_set_block(1);
if (mode != -1)
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
1, 120, true);
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
else
{
@@ -2884,7 +3005,8 @@ TODO: Add a setting for these tweaks */
input_driver_keyboard_mapping_set_block(0);
if (mode != -1)
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
1, 120, true);
1, 120, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
+9 -1
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2016 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -85,6 +85,10 @@ enum event_command
CMD_EVENT_AUDIO_MUTE_TOGGLE,
/* Toggles FPS counter. */
CMD_EVENT_FPS_TOGGLE,
/* Gathers diagnostic info about the system and RetroArch configuration, then sends it to our servers. */
CMD_EVENT_SEND_DEBUG_INFO,
/* Toggles netplay hosting. */
CMD_EVENT_NETPLAY_HOST_TOGGLE,
/* Initializes overlay. */
CMD_EVENT_OVERLAY_INIT,
/* Deinitializes overlay. */
@@ -188,6 +192,10 @@ enum event_command
CMD_EVENT_NETPLAY_DEINIT,
/* Switch between netplay gaming and watching. */
CMD_EVENT_NETPLAY_GAME_WATCH,
/* Start hosting netplay. */
CMD_EVENT_NETPLAY_ENABLE_HOST,
/* Disconnect from the netplay host. */
CMD_EVENT_NETPLAY_DISCONNECT,
/* Initializes BSV movie. */
CMD_EVENT_BSV_MOVIE_INIT,
/* Deinitializes BSV movie. */
+84 -12
View File
@@ -32,6 +32,11 @@
#include "network/netplay/netplay.h"
#endif
/* Required for 3DS display mode setting */
#if defined(_3DS)
#include "gfx/common/ctr_common.h"
#endif
#if defined(HW_RVL)
#define MAX_GAMMA_SETTING 30
#elif defined(GEKKO)
@@ -68,8 +73,8 @@ static bool bundle_assets_extract_enable = false;
static bool materialui_icons_enable = true;
#endif
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
static const int crt_switch_resolution_super = 2560;
static const unsigned crt_switch_resolution = CRT_SWITCH_NONE;
static const int crt_switch_resolution_super = 2560;
static const int crt_switch_center_adjust = 0;
static const bool def_history_list_enable = true;
@@ -272,6 +277,7 @@ static const float default_input_overlay_opacity = 0.7f;
#ifdef HAVE_MENU
#include "menu/menu_driver.h"
#include "menu/menu_animation.h"
static bool default_block_config_read = true;
@@ -281,6 +287,10 @@ static bool menu_use_preferred_system_color_theme = true;
static bool menu_use_preferred_system_color_theme = false;
#endif
#ifdef HAVE_OZONE
static bool ozone_collapse_sidebar = false;
#endif
static bool quick_menu_show_take_screenshot = true;
static bool quick_menu_show_save_load_state = true;
static bool quick_menu_show_undo_save_load_state = true;
@@ -321,6 +331,10 @@ static bool menu_show_core_updater = false;
#else
static bool menu_show_core_updater = true;
#endif
static bool menu_show_sublabels = true;
static unsigned menu_ticker_type = TICKER_TYPE_BOUNCE;
static float menu_ticker_speed = 1.0f;
static bool content_show_settings = true;
static bool content_show_favorites = true;
@@ -372,8 +386,20 @@ static unsigned menu_shader_pipeline = 1;
static unsigned menu_shader_pipeline = 2;
#endif
static bool show_advanced_settings = false;
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
static bool show_advanced_settings = false;
static unsigned rgui_color_theme = RGUI_THEME_CLASSIC_GREEN;
static bool rgui_inline_thumbnails = false;
static bool rgui_swap_thumbnails = false;
static unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT;
static unsigned rgui_thumbnail_delay = 0;
static unsigned rgui_internal_upscale_level = RGUI_UPSCALE_NONE;
static bool rgui_full_width_layout = true;
static unsigned rgui_aspect = RGUI_ASPECT_RATIO_4_3;
static unsigned rgui_aspect_lock = RGUI_ASPECT_RATIO_LOCK_NONE;
static bool rgui_shadows = false;
static unsigned rgui_particle_effect = RGUI_PARTICLE_EFFECT_NONE;
static bool rgui_extended_ascii = false;
#else
static bool default_block_config_read = false;
@@ -422,6 +448,11 @@ static bool menu_swap_ok_cancel_buttons = true;
static bool menu_swap_ok_cancel_buttons = false;
#endif
static bool quit_press_twice = false;
static bool default_log_to_file = false;
static bool log_to_file_timestamp = false;
/* Crop overscanned frames. */
static const bool crop_overscan = true;
@@ -493,9 +524,11 @@ static const float crt_refresh_rate = 60/1.001;
* Used for setups where one manually rotates the monitor. */
static const bool allow_rotate = true;
#ifdef _3DS
#if defined(_3DS)
/* Enable bottom LCD screen */
static const bool video_3ds_lcd_bottom = true;
/* Sets video display mode (3D, 2D, etc.) */
static const unsigned video_3ds_display_mode = CTR_VIDEO_MODE_3D;
#endif
/* AUDIO */
@@ -504,11 +537,17 @@ static const bool video_3ds_lcd_bottom = true;
static const bool audio_enable = true;
/* Enable menu audio sounds. */
static const bool audio_enable_menu = false;
static const bool audio_enable_menu_ok = false;
static const bool audio_enable_menu = false;
static const bool audio_enable_menu_ok = false;
static const bool audio_enable_menu_cancel = false;
static const bool audio_enable_menu_notice = false;
static const bool audio_enable_menu_bgm = false;
static const bool audio_enable_menu_bgm = false;
#ifdef HAVE_MENU_WIDGETS
static const bool menu_enable_widgets = true;
#else
static const bool menu_enable_widgets = false;
#endif
/* Output samplerate. */
#ifdef GEKKO
@@ -573,6 +612,9 @@ static const bool framecount_show = false;
/* Includes displaying the current memory usage/total with FPS/Frames. */
static const bool memory_show = false;
/* Enables displaying various timing statistics. */
static const bool statistics_show = false;
/* Enables use of rewind. This will incur some memory footprint
* depending on the save state buffer. */
static const bool rewind_enable = false;
@@ -691,9 +733,26 @@ static const uint16_t network_remote_base_port = 55400;
/* Number of entries that will be kept in content history playlist file. */
static const unsigned default_content_history_size = 100;
/* Sort all playlists (apart from histories) alphabetically */
static const bool playlist_sort_alphabetical = true;
/* File format to use when writing playlists to disk */
static const bool playlist_use_old_format = false;
#ifdef HAVE_MENU
/* Specify when to display 'core name' inline on playlist entries */
static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV;
/* Specifies which runtime record to use on playlist sublabels */
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
#endif
static const bool scan_without_core_match = false;
static const bool playlist_show_sublabels = false;
static const bool playlist_fuzzy_archive_match = false;
/* Show Menu start-up screen on boot. */
static const bool default_menu_show_start_screen = true;
@@ -722,7 +781,11 @@ static const unsigned libretro_log_level = 1;
/* Axis threshold (between 0.0 and 1.0)
* How far an axis must be tilted to result in a button press. */
static const float axis_threshold = 0.5;
static const float axis_threshold = 0.5f;
static const float analog_deadzone = 0.0f;
static const float analog_sensitivity = 1.0f;
/* Describes speed of which turbo-enabled buttons toggle. */
static const unsigned turbo_period = 6;
@@ -744,7 +807,7 @@ static const unsigned input_poll_type_behavior = 2;
static const unsigned input_bind_timeout = 5;
static const unsigned input_bind_hold = 2;
static const unsigned input_bind_hold = 1;
static const unsigned menu_thumbnails_default = 3;
@@ -754,8 +817,6 @@ static const unsigned menu_timedate_style = 5;
static const bool xmb_vertical_thumbnails = false;
static unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT;
#ifdef IOS
static const bool ui_companion_start_on_boot = false;
#else
@@ -770,6 +831,12 @@ static const bool ui_companion_toggle = false;
/* Only init the WIMP UI for this session if this is enabled */
static const bool desktop_menu_enable = true;
/* Keep track of how long each core+content has been running for over time */
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;
#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)
@@ -786,6 +853,9 @@ static const unsigned midi_volume = 100;
/* Only applies to Android 7.0 (API 24) and up */
static const bool sustained_performance_mode = false;
static const bool vibrate_on_keypress = false;
static const bool enable_device_vibration = false;
#if defined(HAKCHI)
static char buildbot_server_url[] = "http://hakchicloud.com/Libretro_Cores/";
#elif defined(ANDROID)
@@ -821,6 +891,8 @@ static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86_64/latest/";
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86/latest/";
#elif defined(__arm__) || defined(_M_ARM)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/arm/latest/";
#endif
#else
#if defined(__x86_64__) || defined(_M_X64)
+5 -1
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2016 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -88,6 +88,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
@@ -167,6 +169,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_F3, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_F10, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE },
-12
View File
@@ -260,12 +260,6 @@ static const bool _hlsl_supp = true;
static const bool _hlsl_supp = false;
#endif
#ifdef HAVE_LIBXML2
static const bool _libxml2_supp = true;
#else
static const bool _libxml2_supp = false;
#endif
#ifdef HAVE_SDL_IMAGE
static const bool _sdl_image_supp = true;
#else
@@ -356,12 +350,6 @@ static const bool _coretext_supp = true;
static const bool _coretext_supp = false;
#endif
#ifdef HAVE_AVFOUNDATION
static const bool _avfoundation_supp = true;
#else
static const bool _avfoundation_supp = false;
#endif
#if !defined(_WIN32) && !defined(GLOBAL_CONFIG_DIR)
#if defined(__HAIKU__)
#define GLOBAL_CONFIG_DIR "/system/settings"
+274 -669
View File
File diff suppressed because it is too large. Load diff
+44
View File
@@ -137,11 +137,13 @@ typedef struct settings
/* Menu */
bool filter_by_current_core;
bool menu_enable_widgets;
bool menu_show_start_screen;
bool menu_pause_libretro;
bool menu_timedate_enable;
bool menu_battery_level_enable;
bool menu_core_enable;
bool menu_show_sublabels;
bool menu_dynamic_wallpaper_enable;
bool menu_throttle;
bool menu_mouse_enable;
@@ -170,6 +172,11 @@ typedef struct settings
bool menu_rgui_background_filler_thickness_enable;
bool menu_rgui_border_filler_thickness_enable;
bool menu_rgui_border_filler_enable;
bool menu_rgui_full_width_layout;
bool menu_rgui_shadows;
bool menu_rgui_inline_thumbnails;
bool menu_rgui_swap_thumbnails;
bool menu_rgui_extended_ascii;
bool menu_xmb_shadows_enable;
bool menu_xmb_vertical_thumbnails;
bool menu_content_show_settings;
@@ -234,6 +241,7 @@ typedef struct settings
bool cheevos_badges_enable;
bool cheevos_verbose_enable;
bool cheevos_auto_screenshot;
bool cheevos_old_enable; /* RCHEEVOS TODO: remove line */
/* Camera */
bool camera_allow;
@@ -305,6 +313,23 @@ typedef struct settings
bool sustained_performance_mode;
bool playlist_use_old_format;
bool content_runtime_log;
bool content_runtime_log_aggregate;
bool playlist_sort_alphabetical;
bool playlist_show_sublabels;
bool playlist_fuzzy_archive_match;
bool quit_press_twice;
bool vibrate_on_keypress;
bool enable_device_vibration;
bool ozone_collapse_sidebar;
bool log_to_file;
bool log_to_file_timestamp;
bool scan_without_core_match;
} bools;
struct
@@ -326,6 +351,7 @@ typedef struct settings
float menu_framebuffer_opacity;
float menu_footer_opacity;
float menu_header_opacity;
float menu_ticker_speed;
float audio_max_timing_skew;
float audio_volume; /* dB scale. */
@@ -336,6 +362,8 @@ typedef struct settings
float slowmotion_ratio;
float fastforward_ratio;
float input_analog_deadzone;
float input_analog_sensitivity;
} floats;
struct
@@ -356,6 +384,8 @@ typedef struct settings
unsigned audio_block_frames;
unsigned audio_latency;
unsigned input_block_timeout;
unsigned audio_resampler_quality;
unsigned input_turbo_period;
@@ -395,6 +425,7 @@ typedef struct settings
unsigned video_viwidth;
unsigned video_aspect_ratio_idx;
unsigned video_rotation;
unsigned screen_orientation;
unsigned video_msg_bgcolor_red;
unsigned video_msg_bgcolor_green;
unsigned video_msg_bgcolor_blue;
@@ -403,11 +434,13 @@ typedef struct settings
unsigned video_stream_quality;
unsigned video_record_scale_factor;
unsigned video_stream_scale_factor;
unsigned video_3ds_display_mode;
unsigned menu_timedate_style;
unsigned menu_thumbnails;
unsigned menu_left_thumbnails;
unsigned menu_rgui_thumbnail_downscaler;
unsigned menu_rgui_thumbnail_delay;
unsigned menu_dpi_override_value;
unsigned menu_rgui_color_theme;
unsigned menu_xmb_layout;
@@ -421,6 +454,14 @@ typedef struct settings
unsigned menu_font_color_red;
unsigned menu_font_color_green;
unsigned menu_font_color_blue;
unsigned menu_rgui_internal_upscale_level;
unsigned menu_rgui_aspect_ratio;
unsigned menu_rgui_aspect_ratio_lock;
unsigned menu_rgui_particle_effect;
unsigned menu_ticker_type;
unsigned playlist_show_inline_core_name;
unsigned playlist_sublabel_runtime_type;
unsigned camera_width;
unsigned camera_height;
@@ -557,6 +598,7 @@ typedef struct settings
char directory_system[PATH_MAX_LENGTH];
char directory_cache[PATH_MAX_LENGTH];
char directory_playlist[PATH_MAX_LENGTH];
char directory_runtime_log[PATH_MAX_LENGTH];
char directory_core_assets[PATH_MAX_LENGTH];
char directory_assets[PATH_MAX_LENGTH];
char directory_dynamic_wallpapers[PATH_MAX_LENGTH];
@@ -564,6 +606,8 @@ typedef struct settings
char directory_menu_config[PATH_MAX_LENGTH];
char directory_menu_content[PATH_MAX_LENGTH];
char streaming_title[PATH_MAX_LENGTH];
char log_dir[PATH_MAX_LENGTH];
} paths;
bool modified;
+4 -1
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -112,6 +112,9 @@ char* content_get_subsystem_rom(unsigned index);
/* Sets the subsystem by name */
bool content_set_subsystem_by_name(const char* subsystem_name);
/* Get the current subsystem "friendly name" */
void content_get_subsystem_friendly_name(const char* subsystem_name, char* subsystem_friendly_name, size_t len);
RETRO_END_DECLS
#endif
+1 -1
View File
@@ -2,7 +2,7 @@
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2012-2015 - Michael Lelli
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
+73 -162
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -45,25 +45,8 @@ static void core_info_list_resolve_all_extensions(
core_info_list_t *core_info_list)
{
size_t i = 0;
size_t all_ext_len = 0;
char *all_ext = NULL;
for (i = 0; i < core_info_list->count; i++)
{
if (core_info_list->list[i].supported_extensions)
all_ext_len +=
(strlen(core_info_list->list[i].supported_extensions) + 2);
}
all_ext_len += strlen("7z|") + strlen("zip|");
if (all_ext_len)
all_ext = (char*)calloc(1, all_ext_len);
if (!all_ext)
return;
core_info_list->all_ext = all_ext;
core_info_list->all_ext[0] = '\0';
for (i = 0; i < core_info_list->count; i++)
{
@@ -71,14 +54,15 @@ static void core_info_list_resolve_all_extensions(
continue;
strlcat(core_info_list->all_ext,
core_info_list->list[i].supported_extensions, all_ext_len);
strlcat(core_info_list->all_ext, "|", all_ext_len);
core_info_list->list[i].supported_extensions,
sizeof(core_info_list->all_ext));
string_concat(core_info_list->all_ext, "|");
}
#ifdef HAVE_7ZIP
strlcat(core_info_list->all_ext, "7z|", all_ext_len);
string_concat(core_info_list->all_ext, "7z|");
#endif
#ifdef HAVE_ZLIB
strlcat(core_info_list->all_ext, "zip|", all_ext_len);
string_concat(core_info_list->all_ext, "zip|");
#endif
}
@@ -181,25 +165,21 @@ static void core_info_list_free(core_info_list_t *core_info_list)
free(info->firmware);
}
free(core_info_list->all_ext);
free(core_info_list->list);
free(core_info_list);
}
static bool core_info_list_iterate(
char *s, size_t len,
const char *path_basedir,
struct string_list *contents, size_t i)
static config_file_t *core_info_list_iterate(
const char *current_path,
const char *path_basedir)
{
size_t info_path_base_size = PATH_MAX_LENGTH * sizeof(char);
char *info_path_base = NULL;
char *substr = NULL;
const char *current_path = contents ? contents->elems[i].data : NULL;
(void)substr;
char *info_path = NULL;
config_file_t *conf = NULL;
if (!current_path)
return false;
return NULL;
info_path_base = (char*)malloc(info_path_base_size);
@@ -210,21 +190,29 @@ static bool core_info_list_iterate(
info_path_base_size);
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP) && !defined(_3DS) && !defined(VITA) && !defined(PS2) && !defined(HW_WUP))
substr = strrchr(info_path_base, '_');
if (substr)
*substr = '\0';
{
char *substr = strrchr(info_path_base, '_');
if (substr)
*substr = '\0';
}
#endif
strlcat(info_path_base,
file_path_str(FILE_PATH_CORE_INFO_EXTENSION),
info_path_base_size);
fill_pathname_join(s,
info_path = (char*)malloc(info_path_base_size);
fill_pathname_join(info_path,
path_basedir,
info_path_base, len);
info_path_base, info_path_base_size);
free(info_path_base);
return true;
info_path_base = NULL;
if (path_is_valid(info_path))
conf = config_file_new(info_path);
free(info_path);
return conf;
}
static core_info_list_t *core_info_list_new(const char *path,
@@ -245,17 +233,15 @@ static core_info_list_t *core_info_list_new(const char *path,
struct string_list *core_packages = string_list_new();
uwp_fill_installed_core_packages(core_packages);
for (i = 0; i < core_packages->size; i++)
{
dir_list_append(contents, core_packages->elems[i].data, exts,
false, dir_show_hidden_files, false, false);
}
string_list_free(core_packages);
#else
/* Keep the old 'directory not found' behavior */
if (!ok)
{
string_list_free(contents);
contents = NULL;
return NULL;
}
#endif
@@ -264,36 +250,31 @@ static core_info_list_t *core_info_list_new(const char *path,
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
if (!core_info_list)
goto error;
{
string_list_free(contents);
return NULL;
}
core_info = (core_info_t*)calloc(contents->size, sizeof(*core_info));
if (!core_info)
goto error;
{
core_info_list_free(core_info_list);
string_list_free(contents);
return NULL;
}
core_info_list->list = core_info;
core_info_list->count = contents->size;
for (i = 0; i < contents->size; i++)
{
size_t info_path_size = PATH_MAX_LENGTH * sizeof(char);
char *info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
const char *path = contents->elems[i].data;
config_file_t *conf = core_info_list_iterate(path,
path_basedir);
info_path[0] = '\0';
if (
core_info_list_iterate(info_path, info_path_size,
path_basedir, contents, i)
&& path_is_valid(info_path))
if (conf)
{
char *tmp = NULL;
bool tmp_bool = false;
unsigned count = 0;
config_file_t *conf = config_file_new(info_path);
free(info_path);
if (!conf)
continue;
if (config_get_string(conf, "display_name", &tmp)
&& !string_is_empty(tmp))
@@ -341,9 +322,11 @@ static core_info_list_t *core_info_list_new(const char *path,
tmp = NULL;
}
config_get_uint(conf, "firmware_count", &count);
core_info[i].firmware_count = count;
{
unsigned count = 0;
config_get_uint(conf, "firmware_count", &count);
core_info[i].firmware_count = count;
}
if (config_get_string(conf, "supported_extensions", &tmp)
&& !string_is_empty(tmp))
@@ -425,21 +408,22 @@ static core_info_list_t *core_info_list_new(const char *path,
free(tmp);
tmp = NULL;
if (config_get_bool(conf, "supports_no_game",
&tmp_bool))
core_info[i].supports_no_game = tmp_bool;
{
bool tmp_bool = false;
if (config_get_bool(conf, "supports_no_game",
&tmp_bool))
core_info[i].supports_no_game = tmp_bool;
if (config_get_bool(conf, "database_match_archive_member",
&tmp_bool))
core_info[i].database_match_archive_member = tmp_bool;
if (config_get_bool(conf, "database_match_archive_member",
&tmp_bool))
core_info[i].database_match_archive_member = tmp_bool;
}
core_info[i].config_data = conf;
}
else
free(info_path);
if (!string_is_empty(contents->elems[i].data))
core_info[i].path = strdup(contents->elems[i].data);
if (!string_is_empty(path))
core_info[i].path = strdup(path);
if (!core_info[i].display_name)
core_info[i].display_name =
@@ -454,12 +438,6 @@ static core_info_list_t *core_info_list_new(const char *path,
string_list_free(contents);
return core_info_list;
error:
if (contents)
string_list_free(contents);
core_info_list_free(core_info_list);
return NULL;
}
/* Shallow-copies internal state.
@@ -539,6 +517,7 @@ static core_info_t *core_info_find_internal(
const char *core)
{
size_t i;
const char *core_path_basename = path_basename(core);
for (i = 0; i < list->count; i++)
{
@@ -546,7 +525,7 @@ static core_info_t *core_info_find_internal(
if (!info || !info->path)
continue;
if (string_is_equal(info->path, core))
if (string_is_equal(path_basename(info->path), core_path_basename))
return info;
}
@@ -586,7 +565,7 @@ static bool core_info_list_update_missing_firmware_internal(
fill_pathname_join(path, systemdir,
info->firmware[i].path, path_size);
info->firmware[i].missing = !filestream_exists(path);
info->firmware[i].missing = !path_is_valid(path);
if (info->firmware[i].missing && !info->firmware[i].optional)
{
*set_missing_bios = true;
@@ -598,55 +577,6 @@ static bool core_info_list_update_missing_firmware_internal(
return true;
}
#if 0
static int core_info_firmware_cmp(const void *a_, const void *b_)
{
const core_info_firmware_t *a = (const core_info_firmware_t*)a_;
const core_info_firmware_t *b = (const core_info_firmware_t*)b_;
int order = b->missing - a->missing;
if (order)
return order;
return strcasecmp(a->path, b->path);
}
/* Non-reentrant, does not allocate. Returns pointer to internal state. */
static void core_info_list_get_missing_firmware(
core_info_list_t *core_info_list,
const char *core, const char *systemdir,
const core_info_firmware_t **firmware, size_t *num_firmware)
{
size_t i;
char path[PATH_MAX_LENGTH];
core_info_t *info = NULL;
if (!core_info_list || !core)
return;
path[0] = '\0';
*firmware = NULL;
*num_firmware = 0;
info = core_info_find_internal(core_info_list, core);
if (!info)
return;
*firmware = info->firmware;
for (i = 1; i < info->firmware_count; i++)
{
fill_pathname_join(path, systemdir,
info->firmware[i].path, sizeof(path));
info->firmware[i].missing = !filestream_exists(path);
*num_firmware += info->firmware[i].missing;
}
qsort(info->firmware, info->firmware_count, sizeof(*info->firmware),
core_info_firmware_cmp);
}
#endif
void core_info_free_current_core(void)
{
if (core_info_current)
@@ -799,47 +729,36 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
void core_info_get_name(const char *path, char *s, size_t len,
const char *path_info, const char *dir_cores,
const char *exts, bool dir_show_hidden_files)
const char *exts, bool dir_show_hidden_files,
bool get_display_name)
{
size_t i;
const char *path_basedir = !string_is_empty(path_info) ?
path_info : dir_cores;
struct string_list *contents = dir_list_new(
dir_cores, exts, false, dir_show_hidden_files, false, false);
const char *core_path_basename = path_basename(path);
if (!contents)
return;
for (i = 0; i < contents->size; i++)
{
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
char *info_path = NULL;
config_file_t *conf = NULL;
char *new_core_name = NULL;
const char *current_path = contents->elems[i].data;
if (!string_is_equal(current_path, path))
if (!string_is_equal(path_basename(current_path), core_path_basename))
continue;
info_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
info_path[0] = '\0';
if (!core_info_list_iterate(info_path,
path_size, path_basedir, contents, i)
&& path_is_valid(info_path))
{
free(info_path);
continue;
}
conf = config_file_new(info_path);
conf = core_info_list_iterate(contents->elems[i].data,
path_basedir);
if (!conf)
{
free(info_path);
continue;
}
if (config_get_string(conf, "corename",
if (config_get_string(conf, get_display_name
? "display_name" : "corename",
&new_core_name))
{
strlcpy(s, new_core_name, len);
@@ -847,12 +766,10 @@ void core_info_get_name(const char *path, char *s, size_t len,
}
config_file_free(conf);
free(info_path);
break;
}
if (contents)
dir_list_free(contents);
dir_list_free(contents);
contents = NULL;
}
@@ -981,15 +898,11 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list,
bool core_info_get_display_name(const char *path, char *s, size_t len)
{
bool ret = true;
char *tmp = NULL;
config_file_t *conf = config_file_new(path);
if (!conf)
{
ret = false;
goto error;
}
return false;
if (config_get_string(conf, "display_name", &tmp))
{
@@ -997,8 +910,6 @@ bool core_info_get_display_name(const char *path, char *s, size_t len)
free(tmp);
}
error:
config_file_free(conf);
return ret;
return true;
}
+5 -3
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -22,6 +22,7 @@
#include <lists/string_list.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
RETRO_BEGIN_DECLS
@@ -70,7 +71,7 @@ typedef struct
{
core_info_t *list;
size_t count;
char *all_ext;
char all_ext[PATH_MAX_LENGTH];
} core_info_list_t;
typedef struct core_info_ctx_firmware
@@ -101,7 +102,8 @@ bool core_info_get_display_name(const char *path, char *s, size_t len);
void core_info_get_name(const char *path, char *s, size_t len,
const char *path_info, const char *dir_cores,
const char *exts, bool show_hidden_files);
const char *exts, bool show_hidden_files,
bool get_display_name);
core_info_t *core_info_get(core_info_list_t *list, size_t i);
+58 -17
View File
@@ -21,10 +21,19 @@
#include <libretro.h>
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
#include <string/stdstring.h>
#include "../configuration.h"
#include "../menu/menu_defines.h"
#endif
#include "internal_cores.h"
static uint16_t *dummy_frame_buf;
static uint16_t frame_buf_width;
static uint16_t frame_buf_height;
#if defined(HAVE_LIBNX) && defined(HAVE_STATIC_DUMMY)
void retro_init(void) { libretro_dummy_retro_init(); }
void retro_deinit(void) { libretro_dummy_retro_deinit(); }
@@ -55,10 +64,38 @@ void retro_cheat_set(unsigned idx, bool enabled, const char *code) { libretro_du
void libretro_dummy_retro_init(void)
{
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
settings_t *settings = config_get_ptr();
#endif
unsigned i;
dummy_frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
for (i = 0; i < 320 * 240; i++)
/* Sensible defaults */
frame_buf_width = 320;
frame_buf_height = 240;
#if defined(HAVE_MENU) && defined(HAVE_RGUI)
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
{
switch (settings->uints.menu_rgui_aspect_ratio)
{
case RGUI_ASPECT_RATIO_16_9:
case RGUI_ASPECT_RATIO_16_9_CENTRE:
frame_buf_width = 426;
break;
case RGUI_ASPECT_RATIO_16_10:
case RGUI_ASPECT_RATIO_16_10_CENTRE:
frame_buf_width = 384;
break;
default:
/* 4:3 */
frame_buf_width = 320;
break;
}
}
#endif
dummy_frame_buf = (uint16_t*)calloc(frame_buf_width * frame_buf_height, sizeof(uint16_t));
for (i = 0; i < (unsigned)(frame_buf_width * frame_buf_height); i++)
dummy_frame_buf[i] = 4 << 5;
}
@@ -91,20 +128,6 @@ void libretro_dummy_retro_get_system_info(
info->valid_extensions = ""; /* Nothing. */
}
/* Doesn't really matter, but need something sane. */
void libretro_dummy_retro_get_system_av_info(
struct retro_system_av_info *info)
{
info->timing.fps = 60.0;
info->timing.sample_rate = 30000.0;
info->geometry.base_width = 320;
info->geometry.base_height = 240;
info->geometry.max_width = 320;
info->geometry.max_height = 240;
info->geometry.aspect_ratio = 4.0 / 3.0;
}
static retro_video_refresh_t dummy_video_cb;
static retro_audio_sample_t dummy_audio_cb;
static retro_audio_sample_batch_t dummy_audio_batch_cb;
@@ -112,6 +135,24 @@ static retro_environment_t dummy_environ_cb;
static retro_input_poll_t dummy_input_poll_cb;
static retro_input_state_t dummy_input_state_cb;
/* Doesn't really matter, but need something sane. */
void libretro_dummy_retro_get_system_av_info(
struct retro_system_av_info *info)
{
float refresh_rate = 0.0;
if (!dummy_environ_cb(RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &refresh_rate))
refresh_rate = 60.0;
info->timing.fps = refresh_rate;
info->timing.sample_rate = 30000.0;
info->geometry.base_width = frame_buf_width;
info->geometry.base_height = frame_buf_height;
info->geometry.max_width = frame_buf_width;
info->geometry.max_height = frame_buf_height;
info->geometry.aspect_ratio = (float)frame_buf_width / (float)frame_buf_height;
}
void libretro_dummy_retro_set_environment(retro_environment_t cb)
{
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
@@ -154,7 +195,7 @@ void libretro_dummy_retro_reset(void)
void libretro_dummy_retro_run(void)
{
dummy_input_poll_cb();
dummy_video_cb(dummy_frame_buf, 320, 240, 640);
dummy_video_cb(dummy_frame_buf, frame_buf_width, frame_buf_height, 2 * frame_buf_width);
}
/* This should never be called, it's only used as a placeholder. */
+1 -1
View File
@@ -12,7 +12,7 @@ INTERNAL_LIBLAME = 0
INTERNAL_LIBFAAC = 0
INTERNAL_LIBSPEEX = 0
INTERNAL_LIBTHEORA = 0
INTERNAL_LIBOPUS = 0
INTERNAL_LIBOPUS = 0
INTERNAL_LIBVORBIS = 0
INTERNAL_WEBP = 0
INTERNAL_ZLIB = 0
+1 -1
View File
@@ -3,7 +3,7 @@ LIBAVFORMAT_SOURCE :=
LIBAVUTIL_SOURCE :=
DEPS_SOURCE :=
DEFINES := -DHAVE_SWRESAMPLE
LIBRETRO_SOURCE :=
LIBRETRO_SOURCE :=
GL_SOURCE :=
CPUOPTS :=
+4 -4
View File
@@ -368,7 +368,7 @@ endif
ifeq ($(HAVE_NVENC),1)
DEFINES += -DCONFIG_NVENC_ENCODER=1 \
-DCONFIG_NVENC_H264_ENCODER=1 \
-DCONFIG_NVENC_HEVC_ENCODER=1
-DCONFIG_NVENC_HEVC_ENCODER=1
else
DEFINES += -DCONFIG_NVENC_ENCODER=0 \
-DCONFIG_NVENC_H264_ENCODER=0 \
@@ -424,7 +424,7 @@ endif
ifeq ($(HAVE_ZLIB),1)
DEFINES += -DCONFIG_ZLIB=1
else
DEFINES += -DCONFIG_ZLIB=0
DEFINES += -DCONFIG_ZLIB=0
endif
ifeq ($(HAVE_LIBDCADEC),1)
@@ -1205,7 +1205,7 @@ DEFINES += \
-DCONFIG_LIBZVBI_TELETEXT_DECODER=0 \
-DCONFIG_BINTEXT_DECODER=1 \
-DCONFIG_XBIN_DECODER=1 \
-DCONFIG_IDF_DECODER=1
-DCONFIG_IDF_DECODER=1
ifeq ($(HAVE_ZLIB),1)
DEFINES += -DCONFIG_ZLIB_DECODER=1
@@ -1644,7 +1644,7 @@ ifeq ($(INTERNAL_LIBAVUTIL),1)
AVCODEC_BLACKLIST += $(AVCODEC_DIR)/file_open.c
endif
#Codec HW Acceleration flags - all disabled for now - not sure if
#Codec HW Acceleration flags - all disabled for now - not sure if
# libretro will ever support this
ifeq ($(HAVE_MMAL),1)
+17
View File
@@ -0,0 +1,17 @@
gong.so: gong.c
gcc \
-std=c89 \
-pedantic \
-Wall \
-Wno-unused-variable \
-g \
gong.c \
-I../../libretro-common/include/ \
-shared \
-fPIC \
-Wl,--no-undefined \
-lm \
-o gong.so
clean:
rm -f gong.so
+414 -170
View File
@@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2018 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@@ -22,9 +22,11 @@
*/
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include <retro_math.h>
#include <retro_inline.h>
#include <retro_endianness.h>
#ifdef RARCH_INTERNAL
#include "internal_cores.h"
@@ -35,7 +37,8 @@
#define WIDTH 356
#define HEIGHT 200
#define FPS (60000.0f / 1000.0f)
#define MAX_PLAYERS 2
#define STATE_SIZE 4096 /* can be anything as long as it's large enough to hold everything */
static retro_log_printf_t GONG_CORE_PREFIX(log_cb);
static retro_video_refresh_t GONG_CORE_PREFIX(video_cb);
@@ -47,21 +50,6 @@ static retro_environment_t GONG_CORE_PREFIX(environ_cb);
static const char *GONG_CORE_PREFIX(valid_extensions) = "gong";
static float player1_py = 0.0f;
static float player1_dpy = 0.0f;
static float player2_py = 0.0f;
static float player2_dpy = 0.0f;
static float player2_speed = 0.0f;
static float ball_px = 0.0f;
static float ball_py = 0.0f;
static float ball_dpx = 0.0f;
static float ball_dpy = 0.0f;
static float ball_speed = 0.0f;
static bool is_initialized = 0;
static unsigned player1_score = 0;
static unsigned player2_score = 0;
static float current_play_points = 0.0f;
static unsigned char *video_buf = NULL;
enum
@@ -72,19 +60,56 @@ enum
B_COUNT /* This should always be in the bottom */
};
/* any changes here must be handled in serialization code too */
typedef struct
{
union { float f; unsigned u; } py;
union { float f; unsigned u; } dpy;
} Player;
/* any changes here must be handled in serialization code too */
typedef struct
{
int half_transition_count;
bool ended_down;
} Game_Button_State;
/* any changes here must be handled in serialization code too */
typedef struct
{
Game_Button_State buttons[B_COUNT];
float last_dt;
float last_dt; /* not in savestate */
} Game_Input;
static Game_Input g_input = {0};
typedef struct
{
uint16_t input;
uint16_t not_input;
uint16_t realinput;
int16_t analogYLeft;
int16_t analogYRight;
} retro_inputs;
/* any changes here must be handled in serialization code too */
typedef struct
{
unsigned version;
unsigned player1_score;
unsigned player2_score;
union { float f; unsigned u; } player2_speed;
union { float f; unsigned u; } ball_px;
union { float f; unsigned u; } ball_py;
union { float f; unsigned u; } ball_dpx;
union { float f; unsigned u; } ball_dpy;
union { float f; unsigned u; } ball_speed;
union { float f; unsigned u; } current_play_points;
float refresh; /* not in savestate */
bool is_initialized;
bool player2_human;
uint16_t previnput[MAX_PLAYERS];
Game_Input g_input[MAX_PLAYERS];
Player player[MAX_PLAYERS];
} State;
typedef struct
{
@@ -95,17 +120,23 @@ typedef struct
void *memory;
} Game_Offscreen_Buffer;
static State *g_state = NULL;
static Game_Offscreen_Buffer game_buffer = {0};
static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer);
static const struct retro_controller_description pads[] = {
static const struct retro_controller_description pads1[] = {
{ "Joypad", RETRO_DEVICE_JOYPAD },
{ NULL, 0 },
};
static const struct retro_controller_description pads2[] = {
{ "Joypad", RETRO_DEVICE_JOYPAD },
{ NULL, 0 },
};
static const struct retro_controller_info ports[] = {
{ pads, 1 },
{ pads1, 1 },
{ pads2, 1 },
{ 0 },
};
@@ -118,10 +149,206 @@ struct retro_input_descriptor desc[] = {
{ 0 },
};
static INLINE bool pressed(Game_Button_State state)
static void check_variables(void)
{
return state.half_transition_count > 1 ||
(state.half_transition_count == 1 && state.ended_down);
struct retro_variable var = {0};
var.key = "gong_refresh";
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
int i;
g_state->refresh = atoi(var.value);
for (i = 0; i < sizeof(g_state->g_input) / sizeof(g_state->g_input[0]); i++)
g_state->g_input[i].last_dt = 1.0f / g_state->refresh;
}
var.key = "gong_player2";
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strncmp(var.value, "CPU", 3))
g_state->player2_human = false;
else if (!strncmp(var.value, "Human", 5))
g_state->player2_human = true;
}
}
static void save_state(void *data, size_t size)
{
int i = 0;
int j = 0;
unsigned char *buf = (unsigned char*)data;
unsigned version = swap_if_little32(g_state->version);
unsigned player1_score = swap_if_little32(g_state->player1_score);
unsigned player2_score = swap_if_little32(g_state->player2_score);
unsigned player2_speed = swap_if_little32(g_state->player2_speed.u);
unsigned ball_px = swap_if_little32(g_state->ball_px.u);
unsigned ball_py = swap_if_little32(g_state->ball_py.u);
unsigned ball_dpx = swap_if_little32(g_state->ball_dpx.u);
unsigned ball_dpy = swap_if_little32(g_state->ball_dpy.u);
unsigned ball_speed = swap_if_little32(g_state->ball_speed.u);
unsigned current_play_points = swap_if_little32(g_state->current_play_points.u);
unsigned is_initialized = g_state->is_initialized;
unsigned player2_human = g_state->player2_human;
(void)size;
memcpy(buf, &version, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &player1_score, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &player2_score, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &player2_speed, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &ball_px, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &ball_py, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &ball_dpx, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &ball_dpy, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &ball_speed, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &current_play_points, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &is_initialized, sizeof(unsigned));
buf += sizeof(unsigned);
memcpy(buf, &player2_human, sizeof(unsigned));
buf += sizeof(unsigned);
/* previnput */
for (i = 0; i < MAX_PLAYERS; i++)
{
uint16_t previnput = swap_if_little16(g_state->previnput[i]);
memcpy(buf, &previnput, sizeof(uint16_t));
buf += sizeof(uint16_t);
}
/* g_input */
for (i = 0; i < MAX_PLAYERS; i++)
{
for (j = 0; j < B_COUNT; j++)
{
int half_transition_count = swap_if_little32(g_state->g_input[i].buttons[j].half_transition_count);
unsigned ended_down = g_state->g_input[i].buttons[j].ended_down;
memcpy(buf, &half_transition_count, sizeof(int));
buf += sizeof(int);
memcpy(buf, &ended_down, sizeof(unsigned));
buf += sizeof(unsigned);
}
}
/* player */
for (i = 0; i < MAX_PLAYERS; i++)
{
unsigned py = swap_if_little32((unsigned)g_state->player[i].py.u);
unsigned dpy = swap_if_little32((unsigned)g_state->player[i].dpy.u);
memcpy(buf, &py, sizeof(unsigned));
buf += sizeof(uint16_t);
}
}
static void load_state(const void *data, size_t size)
{
int i = 0;
int j = 0;
const unsigned char *buf = (const unsigned char*)data;
(void)size;
memset(g_state, 0, sizeof(*g_state));
g_state->version = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->player1_score = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->player2_score = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->player2_speed.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->ball_px.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->ball_py.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->ball_dpx.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->ball_dpy.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->ball_speed.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->current_play_points.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->is_initialized = (bool)swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->player2_human = (bool)swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
/* previnput */
for (i = 0; i < MAX_PLAYERS; i++)
{
uint16_t previnput = swap_if_little16(*(uint16_t*)buf);
g_state->previnput[i] = previnput;
buf += sizeof(uint16_t);
}
/* g_input */
for (i = 0; i < MAX_PLAYERS; i++)
{
for (j = 0; j < B_COUNT; j++)
{
int half_transition_count;
bool ended_down;
half_transition_count = (int)swap_if_little32(*(unsigned*)buf);
g_state->g_input[i].buttons[j].half_transition_count = half_transition_count;
buf += sizeof(int);
ended_down = (bool)swap_if_little32(*(unsigned*)buf);
g_state->g_input[i].buttons[j].ended_down = ended_down;
buf += sizeof(unsigned);
}
}
/* player */
for (i = 0; i < MAX_PLAYERS; i++)
{
g_state->player[i].py.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
g_state->player[i].dpy.u = swap_if_little32(*(unsigned*)buf);
buf += sizeof(unsigned);
}
check_variables();
}
static INLINE bool is_down(Game_Button_State state)
@@ -145,7 +372,7 @@ void GONG_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *inf
info->geometry.max_width = WIDTH;
info->geometry.max_height = HEIGHT;
info->geometry.aspect_ratio = 16.0f / 9.0f;
info->timing.fps = FPS;
info->timing.fps = g_state->refresh;
info->timing.sample_rate = 44100.0;
}
@@ -153,19 +380,19 @@ void GONG_CORE_PREFIX(retro_init)(void)
{
struct retro_log_callback log;
g_state = (State*)calloc(1, sizeof(*g_state));
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log))
GONG_CORE_PREFIX(log_cb) = log.log;
else
GONG_CORE_PREFIX(log_cb) = NULL;
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned));
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned char));
game_buffer.width = WIDTH;
game_buffer.width = WIDTH;
game_buffer.height = HEIGHT;
game_buffer.pitch = WIDTH * sizeof(unsigned);
game_buffer.pitch = WIDTH * sizeof(unsigned);
game_buffer.memory = video_buf;
g_input.last_dt = 1.0f / FPS;
}
void GONG_CORE_PREFIX(retro_deinit)(void)
@@ -175,6 +402,9 @@ void GONG_CORE_PREFIX(retro_deinit)(void)
video_buf = NULL;
game_buffer.memory = NULL;
if (g_state)
free(g_state);
}
void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
@@ -182,6 +412,8 @@ void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
bool no_content = true;
static const struct retro_variable vars[] = {
{ "gong_player2", "Player 2; CPU|Human" },
{ "gong_refresh", "Video Refresh Rate (restart); 60|70|72|75|100|119|120|140|144" },
{ NULL, NULL },
};
@@ -223,33 +455,31 @@ void GONG_CORE_PREFIX(retro_set_controller_port_device)(unsigned a, unsigned b)
void GONG_CORE_PREFIX(retro_reset)(void)
{
player1_py = 0.0f;
player1_dpy = 0.0f;
player2_py = 0.0f;
player2_dpy = 0.0f;
player2_speed = 0.0f;
player1_score = 0;
player2_score = 0;
is_initialized = 0;
memset(g_state, 0, sizeof(*g_state));
check_variables();
}
size_t GONG_CORE_PREFIX(retro_serialize_size)(void)
{
return 0;
return STATE_SIZE;
}
bool GONG_CORE_PREFIX(retro_serialize)(void *data, size_t size)
{
(void)data;
(void)size;
return false;
if (size != STATE_SIZE)
return false;
save_state(data, size);
return true;
}
bool GONG_CORE_PREFIX(retro_unserialize)(const void *data, size_t size)
{
(void)data;
(void)size;
return false;
if (size != STATE_SIZE)
return false;
load_state(data, size);
return true;
}
void GONG_CORE_PREFIX(retro_cheat_reset)(void)
@@ -264,6 +494,8 @@ bool GONG_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
{
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
check_variables();
if (!GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
{
if (GONG_CORE_PREFIX(log_cb))
@@ -317,59 +549,62 @@ static bool is_key_up_or_down(int16_t input, int16_t not_input, int key)
void GONG_CORE_PREFIX(retro_run)(void)
{
uint16_t input = 0;
uint16_t not_input = 0;
static uint16_t previnput = 0;
uint16_t realinput = 0;
int i = 0;
int16_t analogYLeft1 = 0;
int16_t analogYRight1 = 0;
int port = 0;
bool updated = false;
retro_inputs inputs[MAX_PLAYERS] = {{0}};
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated)
check_variables();
GONG_CORE_PREFIX(input_poll_cb)();
for (i = 0; i < 16; i++)
for (port = 0; port < MAX_PLAYERS; port++)
{
if (GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, i))
for (i = 0; i < 16; i++)
{
realinput |= 1 << i;
if (GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_JOYPAD, 0, i))
{
inputs[port].realinput |= 1 << i;
}
}
inputs[port].analogYLeft = GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
inputs[port].analogYRight = GONG_CORE_PREFIX(input_state_cb)(port, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
if (inputs[port].analogYLeft > 0)
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
else if (inputs[port].analogYRight > 0)
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
if (inputs[port].analogYLeft < 0)
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
else if (inputs[port].analogYRight < 0)
inputs[port].realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
inputs[port].input = inputs[port].realinput & ~g_state->previnput[port];
inputs[port].not_input = g_state->previnput[port] & ~inputs[port].realinput;
if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_UP))
process_joypad(&g_state->g_input[port].buttons[B_MOVE_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP));
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_state->g_input[port].buttons[B_MOVE_DOWN], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_state->g_input[port].buttons[B_MOVE_DOWN], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_A))
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A));
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_B))
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B));
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_X))
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X));
else if (is_key_up_or_down(inputs[port].input, inputs[port].not_input, RETRO_DEVICE_ID_JOYPAD_Y))
process_joypad(&g_state->g_input[port].buttons[B_SPEED_UP], inputs[port].realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y));
g_state->previnput[port] = inputs[port].realinput;
}
analogYLeft1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
analogYRight1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
if (analogYLeft1 > 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
else if (analogYRight1 > 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
if (analogYLeft1 < 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
else if (analogYRight1 < 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
input = realinput & ~previnput;
not_input = previnput & ~realinput;
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_UP))
process_joypad(&g_input.buttons[B_MOVE_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_A))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_B))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_X))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_Y))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y));
previnput = realinput;
game_update_and_render(&g_input, &game_buffer);
game_update_and_render(g_state->g_input, &game_buffer);
GONG_CORE_PREFIX(video_cb)(video_buf, WIDTH, HEIGHT, WIDTH * sizeof(uint32_t));
}
@@ -460,7 +695,7 @@ static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f);
break;
}
case 2:
{
draw_rect(buffer, color, at_x - 2.f, y - 2.f, .5f, 2.f);
@@ -470,7 +705,7 @@ static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
}
case 3:
{
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
@@ -550,147 +785,156 @@ static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *dra
float playing_field_y = 48.f;
float player_size_x = 2.5f;
float player_size_y = 10.f;
int i;
if (!is_initialized)
if (!g_state->is_initialized)
{
is_initialized = 1;
ball_px = 0;
ball_py = 0;
ball_dpx = initial_ball_speed;
ball_dpy = 0;
current_play_points = 10.f;
player2_speed = 80.f;
g_state->is_initialized = 1;
g_state->ball_px.f = 0;
g_state->ball_py.f = 0;
g_state->ball_dpx.f = initial_ball_speed;
g_state->ball_dpy.f = 0;
g_state->current_play_points.f = 10.f;
g_state->player2_speed.f = 80.f;
}
for (i = 0; i < MAX_PLAYERS; i++)
{
float speed = 80.f;
player1_dpy = 0.f;
if (is_down(input->buttons[B_SPEED_UP]))
if (i == 1 && !g_state->player2_human)
break;
g_state->player[i].dpy.f = 0.f;
if (is_down(input[i].buttons[B_SPEED_UP]))
speed = 150.f;
if (is_down(input->buttons[B_MOVE_UP]))
if (is_down(input[i].buttons[B_MOVE_UP]))
{
if (player1_py < playing_field_y - player_size_y)
if (g_state->player[i].py.f < playing_field_y - player_size_y)
{
player1_dpy = speed;
g_state->player[i].dpy.f = speed;
}
if (player1_py < -playing_field_y + player_size_y)
if (g_state->player[i].py.f < -playing_field_y + player_size_y)
{
player1_py = -playing_field_y + player_size_y;
player1_dpy = 0.f;
g_state->player[i].py.f = -playing_field_y + player_size_y;
g_state->player[i].dpy.f = 0.f;
}
}
if (is_down(input->buttons[B_MOVE_DOWN]))
if (is_down(input[i].buttons[B_MOVE_DOWN]))
{
if (player1_py > -playing_field_y + player_size_y)
if (g_state->player[i].py.f > -playing_field_y + player_size_y)
{
player1_dpy = -speed;
g_state->player[i].dpy.f = -speed;
}
if (player1_py < -playing_field_y + player_size_y)
if (g_state->player[i].py.f < -playing_field_y + player_size_y)
{
player1_py = -playing_field_y + player_size_y;
player1_dpy = 0.f;
g_state->player[i].py.f = -playing_field_y + player_size_y;
g_state->player[i].dpy.f = 0.f;
}
}
player1_py += player1_dpy * input->last_dt;
g_state->player[i].py.f += g_state->player[i].dpy.f * input->last_dt;
}
if (!g_state->player2_human)
{
player2_dpy = (ball_py - player2_py) * 100.f;
player2_dpy = MIN(player2_dpy, player2_speed);
player2_dpy = MAX(player2_dpy, -player2_speed);
player2_py += player2_dpy * input->last_dt;
g_state->player[1].dpy.f = (g_state->ball_py.f - g_state->player[1].py.f) * 100.f;
g_state->player[1].dpy.f = MIN(g_state->player[1].dpy.f, g_state->player2_speed.f);
g_state->player[1].dpy.f = MAX(g_state->player[1].dpy.f, -g_state->player2_speed.f);
g_state->player[1].py.f += g_state->player[1].dpy.f * input->last_dt;
if (player2_py < -playing_field_y + player_size_y)
if (g_state->player[1].py.f < -playing_field_y + player_size_y)
{
player2_py = -playing_field_y + player_size_y;
player2_dpy = 0.f;
g_state->player[1].py.f = -playing_field_y + player_size_y;
g_state->player[1].dpy.f = 0.f;
}
if (player2_py > playing_field_y - player_size_y)
if (g_state->player[1].py.f > playing_field_y - player_size_y)
{
player2_py = playing_field_y - player_size_y;
player2_dpy = 0.f;
g_state->player[1].py.f = playing_field_y - player_size_y;
g_state->player[1].dpy.f = 0.f;
}
}
ball_px += ball_dpx * input->last_dt;
g_state->ball_px.f += g_state->ball_dpx.f * input->last_dt;
if (ball_dpx > 0)
if (g_state->ball_dpx.f > 0)
{
ball_dpx += 10.f * input->last_dt;
g_state->ball_dpx.f += 10.f * input->last_dt;
}
else
{
ball_dpx -= 10.f * input->last_dt;
g_state->ball_dpx.f -= 10.f * input->last_dt;
}
ball_py += ball_dpy * input->last_dt;
g_state->ball_py.f += g_state->ball_dpy.f * input->last_dt;
if (ball_py > playing_field_y - 1.f)
if (g_state->ball_py.f > playing_field_y - 1.f)
{
ball_py = playing_field_y - 1.f;
ball_dpy *= -1.f;
g_state->ball_py.f = playing_field_y - 1.f;
g_state->ball_dpy.f *= -1.f;
}
else if (ball_py < -playing_field_y + 1)
else if (g_state->ball_py.f < -playing_field_y + 1)
{
ball_py = -playing_field_y + 1.f;
ball_dpy *= -1;
g_state->ball_py.f = -playing_field_y + 1.f;
g_state->ball_dpy.f *= -1;
}
if (ball_px > 80.f - 2.5f - 1.f) /* @Hardcoded */
if (g_state->ball_px.f > 80.f - 2.5f - 1.f) /* @Hardcoded */
{
if ((ball_py >= (player2_py - 10.f)) && (ball_py <= (player2_py + 10.f)))
if ((g_state->ball_py.f >= (g_state->player[1].py.f - 10.f)) && (g_state->ball_py.f <= (g_state->player[1].py.f + 10.f)))
{
ball_dpx *= -1.f;
ball_px = 80.f - 2.5f - 1.f; /* @Hardcoded */
ball_dpy = (ball_py - player2_py) + player2_dpy;
++current_play_points;
g_state->ball_dpx.f *= -1.f;
g_state->ball_px.f = 80.f - 2.5f - 1.f; /* @Hardcoded */
g_state->ball_dpy.f = (g_state->ball_py.f - g_state->player[1].py.f) + g_state->player[1].dpy.f;
++g_state->current_play_points.f;
}
else if (ball_px >= playing_field_x - 1)
else if (g_state->ball_px.f >= playing_field_x - 1)
{
ball_px = 0;
ball_py = 0;
ball_dpy = 0;
ball_dpx = -initial_ball_speed;
player2_score += (unsigned)current_play_points;
current_play_points = 10.f;
g_state->ball_px.f = 0;
g_state->ball_py.f = 0;
g_state->ball_dpy.f = 0;
g_state->ball_dpx.f = -initial_ball_speed;
g_state->player2_score += (unsigned)g_state->current_play_points.f;
g_state->current_play_points.f = 10.f;
}
}
else if (ball_px < -80 + 2.5f + 1.f) /* @Hardcoded */
else if (g_state->ball_px.f < -80 + 2.5f + 1.f) /* @Hardcoded */
{
if ((ball_py >= (player1_py - 10.f)) && (ball_py <= (player1_py + 10.f)))
if ((g_state->ball_py.f >= (g_state->player[0].py.f - 10.f)) && (g_state->ball_py.f <= (g_state->player[0].py.f + 10.f)))
{
ball_dpx *= -1.f;
ball_px = -80 + 2.5f + 1.f; /* @Hardcoded */
ball_dpy = (ball_py - player1_py) + player1_dpy;
++current_play_points;
g_state->ball_dpx.f *= -1.f;
g_state->ball_px.f = -80 + 2.5f + 1.f; /* @Hardcoded */
g_state->ball_dpy.f = (g_state->ball_py.f - g_state->player[0].py.f) + g_state->player[0].dpy.f;
++g_state->current_play_points.f;
}
else if (ball_px <= -playing_field_x + 1)
else if (g_state->ball_px.f <= -playing_field_x + 1)
{
ball_px = 0;
ball_py = 0;
ball_dpy = 0;
ball_dpx = initial_ball_speed;
player1_score += (unsigned)current_play_points;
current_play_points = 10.f;
player2_speed += current_play_points * 0.01f;
g_state->ball_px.f = 0;
g_state->ball_py.f = 0;
g_state->ball_dpy.f = 0;
g_state->ball_dpx.f = initial_ball_speed;
g_state->player1_score += (unsigned)g_state->current_play_points.f;
g_state->current_play_points.f = 10.f;
if (!g_state->player2_human)
g_state->player2_speed.f += g_state->current_play_points.f * 0.01f;
}
}
clear(draw_buffer, 0x021077);
draw_rect(draw_buffer, 0x000530, 0.f, 0.f, playing_field_x, playing_field_y);
draw_rect(draw_buffer, 0x00ffff, -80.f, player1_py, player_size_x, player_size_y);
draw_rect(draw_buffer, 0x00ffff, 80.f, player2_py, player_size_x, player_size_y);
draw_rect(draw_buffer, 0x00ffff, -80.f, g_state->player[0].py.f, player_size_x, player_size_y);
draw_rect(draw_buffer, 0x00ffff, 80.f, g_state->player[1].py.f, player_size_x, player_size_y);
draw_rect(draw_buffer, 0xffff00, ball_px, ball_py, 1.f, 1.f);
draw_rect(draw_buffer, 0xffff00, g_state->ball_px.f, g_state->ball_py.f, 1.f, 1.f);
draw_number(draw_buffer, (unsigned)current_play_points, 0xaaaaaa, 0.f, 38.f);
draw_number(draw_buffer, player1_score, 0xff6611, 20.f, 38.f);
draw_number(draw_buffer, player2_score, 0xff6611, -20.f, 38.f);
draw_number(draw_buffer, (unsigned)g_state->current_play_points.f, 0xaaaaaa, 0.f, 38.f);
draw_number(draw_buffer, g_state->player1_score, 0xff6611, 20.f, 38.f);
draw_number(draw_buffer, g_state->player2_score, 0xff6611, -20.f, 38.f);
}
+2 -2
View File
@@ -166,7 +166,7 @@ void IMAGE_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
IMAGE_CORE_PREFIX(environ_cb) = cb;
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
#ifndef RARCH_INTERNAL
/* I don't trust filestream_vfs_init to work inside rarch */
if (environ_cb(RETRO_ENVIRONMENT_GET_VFS_INTERFACE, &vfs_iface_info))
@@ -254,7 +254,7 @@ static bool imageviewer_load(const char *path, int image_index)
buf = malloc(len);
filestream_read(f, buf, len);
filestream_close(f);
image_buffer = (uint32_t*)stbi_load_from_memory(
buf, len,
&image_width, &image_height,
@@ -21,5 +21,4 @@ endif
LOCAL_SRC_FILES += ../libretro-test.c
LOCAL_CFLAGS += -O3 -std=gnu99 -ffast-math -funroll-loops
include $(BUILD_SHARED_LIBRARY)
+1 -1
View File
@@ -33,7 +33,7 @@ TARGET_NAME := video_processor
LIBV4L2 = -lv4l2
ifneq ($(findstring Linux,$(shell uname -a)),)
CFLAGS += -DHAVE_UDEV
CFLAGS += -DHAVE_UDEV
LIBUDEV = -ludev
CFLAGS += -DHAVE_ALSA
LIBASOUND = -lasound
-1
View File
@@ -3,7 +3,6 @@ Libretro core for V4L2 capture devices
The basic idea is this -- plug your legacy console into a capture device and use RetroArch to upscale it and apply shaders to taste.
## Raspberry Pi specific config
Add to /boot/config.txt:
@@ -33,6 +33,7 @@
#include <libretro.h>
#include <clamping.h>
#include <retro_miscellaneous.h>
#include <sys/mman.h>
#include <errno.h>
@@ -86,7 +87,7 @@ static struct v4l2_capbuf v4l2_capbuf[VIDEO_BUFFERS_MAX];
static float dummy_pos=0;
static int video_half_feed_rate=0; // for interlaced captures
static int video_half_feed_rate=0; /* for interlaced captures */
static uint32_t video_cap_width;
static uint32_t video_cap_height;
static uint32_t video_out_height;
@@ -102,7 +103,7 @@ static uint32_t *frame_prev2;
static uint32_t *frame_prev3;
static uint32_t *frame_curr;
// Frametime debug messages
/* Frametime debug messages */
struct timeval ft_prevtime = { 0 }, ft_prevtime2 = { 0 };
char *ft_info = NULL, *ft_info2 = NULL;
double ft_favg, ft_ftime;
@@ -282,17 +283,17 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_set_environment)(retro_environment_t
VIDEOPROC_CORE_PREFIX(environment_cb) = cb;
// Allows retroarch to seed the previous values
/* Allows retroarch to seed the previous values */
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_SET_VARIABLES, envvars);
// Enumerate all real devices
/* Enumerate all real devices */
enumerate_video_devices(video_devices, sizeof(video_devices));
enumerate_audio_devices(audio_devices, sizeof(audio_devices));
// Add the dummy device
/* Add the dummy device */
appendstr(video_devices, "|dummy", ENVVAR_BUFLEN);
// Registers available devices list (still respects saved device if it exists)
/* Registers available devices list (still respects saved device if it exists) */
envvars[0].key = "videoproc_videodev";
envvars[0].value = video_devices;
envvars[1].key = "videoproc_audiodev";
@@ -503,7 +504,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
if (strcmp(videodev.value, "dummy") == 0) {
info->geometry.aspect_ratio = 4.0/3.0;
info->geometry.base_width = info->geometry.max_width = video_cap_width;
info->geometry.base_height = video_cap_height; //out?
info->geometry.base_height = video_cap_height; /* out? */
info->geometry.max_height = video_out_height;
info->timing.fps = 60;
info->timing.sample_rate = AUDIO_SAMPLE_RATE;
@@ -517,16 +518,17 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
info->geometry.base_width = info->geometry.max_width = video_format.fmt.pix.width;
info->geometry.base_height = video_format.fmt.pix.height;
//TODO Only double if frames are NOT fields (interlaced, full resolution)
/* TODO Only double if frames are NOT fields (interlaced, full resolution) */
info->geometry.max_height = video_format.fmt.pix.height * 2;
//TODO Only double if frames ARE fields (progressive or deinterlaced, full framerate)
// *2 for fields
/* TODO Only double if frames ARE fields (progressive or deinterlaced, full framerate)
* *2 for fields
*/
info->timing.fps = ((double)(video_standard.frameperiod.denominator*2)) /
(double)video_standard.frameperiod.numerator;
info->timing.sample_rate = AUDIO_SAMPLE_RATE;
if (error == 0) {
//TODO Allow for fixed 4:3 and 16:9 modes
/* TODO Allow for fixed 4:3 and 16:9 modes */
info->geometry.aspect_ratio = (double)info->geometry.base_width / (double)info->geometry.max_height /\
((double)cc.pixelaspect.numerator / (double)cc.pixelaspect.denominator);
}
@@ -535,7 +537,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_syst
printf("Aspect ratio: %f\n",info->geometry.aspect_ratio);
printf("Buffer Resolution %ux%u %f fps\n", info->geometry.base_width,
info->geometry.base_height, info->timing.fps);
printf("Buffer Max Resolution %ux%u\n", info->geometry.max_width,
printf("Buffer Max Resolution %ux%u\n", info->geometry.max_width,
info->geometry.max_height);
}
@@ -549,13 +551,13 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_reset)(void)
open_devices();
}
//TODO improve this mess and make it generic enough for use with dummy mode
/* TODO improve this mess and make it generic enough for use with dummy mode */
void v4l2_frame_times(struct v4l2_buffer buf) {
if (strcmp("Off", video_frame_times) == 0)
return;
return;
if (ft_info == NULL)
ft_info = calloc(5000, sizeof(char));
ft_info = (char*)calloc(5000, sizeof(char));
if ( (buf.timestamp.tv_sec - ft_prevtime.tv_sec >= 1) && \
(buf.timestamp.tv_usec + 1000000 - ft_prevtime2.tv_usec) >= 1000000) {
@@ -565,7 +567,7 @@ void v4l2_frame_times(struct v4l2_buffer buf) {
printf("Average frame times: %.3fms\n", ft_favg/(1000*ft_fcount));
printf("Fields timestampdiffs last second:\n%s\n", ft_info);
free(ft_info);
ft_info = calloc(5000, sizeof(char));
ft_info = (char*)calloc(5000, sizeof(char));
ft_fcount = 0;
ft_favg = 0;
ft_prevtime = buf.timestamp;
@@ -593,7 +595,8 @@ void source_dummy(int width, int height) {
}
dummy_pos += step;
//dummy_pos = M_PI/4; step = 0; // no animation
/* no animation */
/* dummy_pos = M_PI/4; step = 0; */
triangpos = (sinf(dummy_pos)+1)/2*width;
if (video_buf.field == V4L2_FIELD_INTERLACED) {
if (video_half_feed_rate == 0)
@@ -609,9 +612,9 @@ void source_dummy(int width, int height) {
src[1] = 0x10 + color*0xE0;
src[2] = 0x10 + color*0xE0;
// End of a line
/* End of a line */
if ( ((i+1) % width) == 0 ) {
triangpos -= 2; //offset should be half of this?
triangpos -= 2; /* offset should be half of this? */
triangpos_t -= 1;
triangpos_b -= 1;
if (video_buf.field == V4L2_FIELD_INTERLACED) {
@@ -626,18 +629,18 @@ void source_dummy(int width, int height) {
}
}
if(video_buf.field == V4L2_FIELD_TOP)
if(video_buf.field == V4L2_FIELD_TOP)
video_buf.field = V4L2_FIELD_BOTTOM;
else if (video_buf.field == V4L2_FIELD_BOTTOM)
else if (video_buf.field == V4L2_FIELD_BOTTOM)
video_buf.field = V4L2_FIELD_TOP;
}
void source_v4l2_normal(int width, int height) {
struct v4l2_buffer bufcp;
int error;
// Wait until v4l2 dequees a buffer
/* Wait until v4l2 dequees a buffer */
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
video_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
video_buf.memory = V4L2_MEMORY_MMAP;
@@ -651,7 +654,7 @@ void source_v4l2_normal(int width, int height) {
bufcp = video_buf;
memcpy( (uint32_t*) frame_cap, (uint8_t*) v4l2_capbuf[video_buf.index].start, video_format.fmt.pix.width * video_format.fmt.pix.height * 3);
error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
if (error != 0)
printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
@@ -664,11 +667,11 @@ void source_v4l2_alternate_hack(int width, int height) {
struct v4l2_format fmt;
struct v4l2_requestbuffers reqbufs;
enum v4l2_buf_type type;
int error;
uint32_t index;
// For later, saving time
/* For later, saving time */
memset(&fmt, 0, sizeof(fmt));
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
error = v4l2_ioctl(video_device_fd, VIDIOC_G_FMT, &fmt);
@@ -677,7 +680,7 @@ void source_v4l2_alternate_hack(int width, int height) {
printf("VIDIOC_G_FMT failed: %s\n", strerror(errno));
}
// Wait until v4l2 dequees a buffer
/* Wait until v4l2 dequees a buffer */
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
video_buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
video_buf.memory = V4L2_MEMORY_MMAP;
@@ -692,7 +695,7 @@ void source_v4l2_alternate_hack(int width, int height) {
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
v4l2_ioctl(video_device_fd, VIDIOC_STREAMOFF, &type);
//Let's get the data as fast as possible!
/* Let's get the data as fast as possible! */
bufcp = video_buf;
memcpy( (uint32_t*) frame_cap, (uint8_t*) v4l2_capbuf[video_buf.index].start, video_format.fmt.pix.width * video_format.fmt.pix.height * 3);
@@ -722,7 +725,7 @@ void source_v4l2_alternate_hack(int width, int height) {
printf("VIDIOC_REQBUFS failed: %s\n", strerror(errno));
}
v4l2_ncapbuf = reqbufs.count;
//printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf);
/* printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf); */
index = 0;
memset(&video_buf, 0, sizeof(struct v4l2_buffer));
@@ -742,9 +745,11 @@ void source_v4l2_alternate_hack(int width, int height) {
v4l2_ioctl(video_device_fd, VIDIOC_QBUF,& video_buf);
//error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
//if (error != 0)
// printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
#if 0
error = v4l2_ioctl(video_device_fd, VIDIOC_QBUF, &video_buf);
if (error != 0)
printf("VIDIOC_QBUF failed: %s\n", strerror(errno));
#endif
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
error = v4l2_ioctl(video_device_fd, VIDIOC_STREAMON, &type);
@@ -758,10 +763,12 @@ void source_v4l2_alternate_hack(int width, int height) {
void processing_heal(uint8_t *src, int width, int height) {
uint32_t *fp1 = frame_prev1;
for (int i = 0; i < width * height; i+=1, src += 3, ++fp1) {
// Tries to filter a bunch of blanked out scanline sections my capture cards spits out with this crazy hack
// Since the blanked out scanlines are set to a black value bellow anything that can be captued, it's quite
//easy to select the scanlines...
int i;
for (i = 0; i < width * height; i+=1, src += 3, ++fp1) {
/* Tries to filter a bunch of blanked out scanline sections my capture cards spits out with this crazy hack
* Since the blanked out scanlines are set to a black value bellow anything that can be captued, it's quite
* easy to select the scanlines...
*/
if (src[0] <= 0 && src[1] <= 0 && src[2] <= 0 && i >= width && i <= width * height - width) {
if (*(src + 0 - width*3) >= ((*fp1>> 0&0xFF)-6) && \
*(src + 1 - width*3) >= ((*fp1>> 8&0xFF)-6) && \
@@ -786,15 +793,16 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
uint32_t pixacul=0;
uint32_t *fp1 = frame_prev1, *fp2 = frame_prev2, *fp3 = frame_prev3;
// Helps pointing to the pixel in the adjacent row
/* Helps pointing to the pixel in the adjacent row */
if (field == V4L2_FIELD_TOP)
targetrow = width;
else
targetrow = width*-1;
// Starts from the even scanline if frame contains bottom fields
//On progressive sources, should only skip the destination lines, since all lines the source are the same fields
//On interlaced sources, should skip both the source and the destination lines, since only half the lines in the source are the same fields (must also skip fields later)
/* Starts from the even scanline if frame contains bottom fields
* On progressive sources, should only skip the destination lines, since all lines the source are the same fields
* On interlaced sources, should skip both the source and the destination lines, since only half the lines in the source are the same fields (must also skip fields later)
*/
if (field == V4L2_FIELD_BOTTOM) {
dst += width;
if (skip_lines_src == 1) {
@@ -806,13 +814,14 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
}
for (i = 0; i < width * height; i+=1, src += 1, dst += 1, ++fp1, ++fp2, ++fp3) {
// Will fill the current destination line with current field
//The masking is used to prserve some information set by the
//deinterlacing process, uses the alpha channel to tell if a
//pixel needs further processing...
/* Will fill the current destination line with current field
* The masking is used to prserve some information set by the
* deinterlacing process, uses the alpha channel to tell if a
* pixel needs further processing...
*/
*(dst) = (*(src) & 0x00FFFFFF) | (*dst & 0xFF000000);
// Crappy deinterlacing
/* Crappy deinterlacing */
if (i >= width && i <= (width*height-width)) {
pixacul=((((*(dst)>> 0&0xFF) + (pixacul>> 0&0xFF))>>1<<0 |\
((*(dst)>> 8&0xFF) + (pixacul>> 8&0xFF))>>1<<8 |\
@@ -842,9 +851,10 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
}
}
// Skips a scanline if we reach the end of the current one
//On progressive sources, should only skip the destination lines,
//On interlaced sources, should skip both the source and the destination lines
/* Skips a scanline if we reach the end of the current one
* On progressive sources, should only skip the destination lines,
* On interlaced sources, should skip both the source and the destination lines
*/
if ( ((i+1) % width) == 0 ) {
dst += width;
if (skip_lines_src == 1) {
@@ -859,7 +869,8 @@ void processing_deinterlacing_crap(uint32_t *src, uint32_t *dst, int width, int
void processing_bgr_xrgb(uint8_t *src, uint32_t *dst, int width, int height) {
/* BGR24 to XRGB8888 conversion */
for (int i = 0; i < width * height; i+=1, src += 3, dst += 1) {
int i;
for (i = 0; i < width * height; i+=1, src += 3, dst += 1) {
*dst = 0xFF << 24 | src[2] << 16 | src[1] << 8 | src[0] << 0;
}
}
@@ -880,15 +891,16 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &capturemode);
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &outputmode);
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &frametimes);
// Video or Audio device(s) has(ve) been changed
//TODO We may get away without reseting devices when changing output mode...
/* Video or Audio device(s) has(ve) been changed
* TODO We may get away without reseting devices when changing output mode...
*/
if ((videodev.value && (strcmp(video_device, videodev.value) != 0)) ||\
(audiodev.value && (strcmp(audio_device, audiodev.value) != 0)) ||\
(capturemode.value && (strcmp(video_capture_mode, capturemode.value) != 0)) ||\
(outputmode.value && (strcmp(video_output_mode, outputmode.value) != 0))) {
VIDEOPROC_CORE_PREFIX(retro_unload_game)();
// This core does not cares for the retro_game_info * argument?
VIDEOPROC_CORE_PREFIX(retro_load_game)(NULL);
/* This core does not cares for the retro_game_info * argument? */
VIDEOPROC_CORE_PREFIX(retro_load_game)(NULL);
}
if (frametimes.value != NULL) {
@@ -898,12 +910,13 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
VIDEOPROC_CORE_PREFIX(input_poll_cb)();
//printf("%d %d %d %s\n", video_cap_width, video_cap_height, video_buf.field, video_output_mode);
//TODO pass frame_curr to source_* functions
//half_feed_rate allows interlaced intput to be fed at half the calls to this function
//where the same frame is then read by the deinterlacer twice, for each field
/* printf("%d %d %d %s\n", video_cap_width, video_cap_height, video_buf.field, video_output_mode);
* TODO pass frame_curr to source_* functions
* half_feed_rate allows interlaced intput to be fed at half the calls to this function
* where the same frame is then read by the deinterlacer twice, for each field
*/
if (video_half_feed_rate == 0) {
// Capture
/* Capture */
if (strcmp(video_device, "dummy") == 0) {
source_dummy(video_cap_width, video_cap_height);
} else {
@@ -915,31 +928,34 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
}
}
if (video_buf.field == V4L2_FIELD_INTERLACED)
if (video_buf.field == V4L2_FIELD_INTERLACED)
video_half_feed_rate = 1;
} else {
video_half_feed_rate = 0;
}
// Converts from bgr to xrgb, deinterlacing, final copy to the outpuit buffer (frame_out)
//Every frame except frame_cap shall be encoded in xrgb
//Every frame except frame_out shall have the same height
/* Converts from bgr to xrgb, deinterlacing, final copy to the outpuit buffer (frame_out)
* Every frame except frame_cap shall be encoded in xrgb
* Every frame except frame_out shall have the same height
*/
if (strcmp(video_output_mode, "deinterlaced") == 0) {
processing_bgr_xrgb(frame_cap, frame_curr, video_cap_width, video_cap_height);
// When deinterlacing a interlaced intput, we need to process both fields of a frame,
//one at a time (retro_run needs to be called twice, vide_half_feed_rate prevents the
//source from being read twice...
/* When deinterlacing a interlaced intput, we need to process both fields of a frame,
* one at a time (retro_run needs to be called twice, vide_half_feed_rate prevents the
* source from being read twice...
*/
if (strcmp(video_capture_mode, "interlaced") == 0) {
enum v4l2_field field_read;
if (video_half_feed_rate == 0)
field_read = V4L2_FIELD_TOP;
else
field_read = V4L2_FIELD_BOTTOM;
//video_half_feed_rate will allow us to capture the interlaced frame once and run the
//deinterlacing algo twice, extracting a given field for each run.
/* video_half_feed_rate will allow us to capture the interlaced frame once and run the
* deinterlacing algo twice, extracting a given field for each run.
*/
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height/2, field_read, 1);
} else {
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height, video_buf.field, 0);
processing_deinterlacing_crap(frame_curr, frame_out, video_cap_width, video_cap_height, (enum v4l2_field)video_buf.field, 0);
}
aux = frame_prev3;
frame_prev3 = frame_prev2;
@@ -950,7 +966,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void)
VIDEOPROC_CORE_PREFIX(video_refresh_cb)(frame_out, video_cap_width,
video_out_height, video_cap_width * sizeof(uint32_t));
} else if (strcmp(video_capture_mode, "alternate_hack") == 0) {
// Case where alternate_hack without deinterlacing would not generate previous frame for processing_heal
/* Case where alternate_hack without deinterlacing would not generate previous frame for processing_heal */
processing_bgr_xrgb(frame_cap, frame_curr, video_cap_width, video_cap_height);
aux = frame_prev3;
frame_prev3 = frame_prev2;
@@ -996,18 +1012,20 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_cheat_set)(unsigned index, bool enabl
{
}
#if 0
static void videoinput_set_control_v4l2( uint32_t id, double val )
{
//struct v4l2_queryctrl query;
struct v4l2_queryctrl query;
//query.id = id;
//if( ioctl( video_device_fd, VIDIOC_QUERYCTRL, &query ) >= 0 && !(query.flags & V4L2_CTRL_FLAG_DISABLED) ) {
// struct v4l2_control control;
// control.id = id;
// control.value = query.minimum + ((int) ((val * ((double) (query.maximum - query.minimum))) + 0.5));
// ioctl( video_device_fd, VIDIOC_S_CTRL, &control );
//}
query.id = id;
if( ioctl( video_device_fd, VIDIOC_QUERYCTRL, &query ) >= 0 && !(query.flags & V4L2_CTRL_FLAG_DISABLED) ) {
struct v4l2_control control;
control.id = id;
control.value = query.minimum + ((int) ((val * ((double) (query.maximum - query.minimum))) + 0.5));
ioctl( video_device_fd, VIDIOC_S_CTRL, &control );
}
}
#endif
RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_info *game)
{
@@ -1050,7 +1068,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
}
strncpy(video_device, videodev.value, ENVVAR_BUFLEN-1);
// Audio device is optional...
/* Audio device is optional... */
VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &audiodev);
if (audiodev.value != NULL) {
strncpy(audio_device, audiodev.value, ENVVAR_BUFLEN-1);
@@ -1106,8 +1124,8 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
fmt.fmt.pix.height = 240;
fmt.fmt.pix.field = V4L2_FIELD_TOP;
//TODO Query the size and FPS
/* TODO Query the size and FPS */
if (strcmp(video_capture_mode, "interlaced") == 0) {
v4l2_ncapbuf_target = 2;
fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
@@ -1166,7 +1184,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
}
video_format = fmt;
//TODO Check if what we got is indeed what we asked for
/* TODO Check if what we got is indeed what we asked for */
memset(&reqbufs, 0, sizeof(reqbufs));
reqbufs.count = v4l2_ncapbuf_target;
@@ -1180,7 +1198,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
return false;
}
v4l2_ncapbuf = reqbufs.count;
printf("GOT v4l2_ncapbuf=%ld\n", v4l2_ncapbuf);
printf("GOT v4l2_ncapbuf=%" PRI_SIZET "\n", v4l2_ncapbuf);
for (index = 0; index < v4l2_ncapbuf; index++)
{
@@ -1229,11 +1247,12 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
return false;
}
//videoinput_set_control_v4l2(V4L2_CID_HUE, (double) 0.4f);
/* videoinput_set_control_v4l2(V4L2_CID_HUE, (double) 0.4f); */
}
//TODO Framerates?
// Each frame should combine both fields into a full frame (if not already captured interlaced), half frame-rate
/* TODO Framerates?
* Each frame should combine both fields into a full frame (if not already captured interlaced), half frame-rate
*/
if (strcmp(video_output_mode, "interlaced") == 0) {
if (strcmp(video_capture_mode, "interlaced") == 0) {
video_out_height = video_cap_height;
@@ -1242,43 +1261,43 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
video_capture_mode, video_output_mode);
video_out_height = video_cap_height*2;
}
// Each frame has one field, full frame-rate
/* Each frame has one field, full frame-rate */
} else if (strcmp(video_output_mode, "progressive") == 0) {
video_out_height = video_cap_height;
// Each frame has one or both field to be deinterlaced into a full frame (double the lines if one field), full frame-rate
video_out_height = video_cap_height;
/* Each frame has one or both field to be deinterlaced into a full frame (double the lines if one field), full frame-rate */
} else if (strcmp(video_output_mode, "deinterlaced") == 0) {
if (strcmp(video_capture_mode, "interlaced") == 0)
video_out_height = video_cap_height;
else
video_out_height = video_cap_height*2;
} else
video_out_height = video_cap_height;
video_out_height = video_cap_height;
printf("Capture Resolution %ux%u\n", video_cap_width, video_cap_height);
printf("Output Resolution %ux%u\n", video_cap_width, video_out_height);
frame_cap = calloc(1, video_cap_width * video_cap_height * sizeof(uint8_t) * 3);
frame_out = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
//TODO: Only allocate frames if we are going to use it (for deinterlacing or other filters?)
frames[0] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[1] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[2] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[3] = calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frame_cap = (uint8_t*)calloc(1, video_cap_width * video_cap_height * sizeof(uint8_t) * 3);
frame_out = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
/* TODO: Only allocate frames if we are going to use it (for deinterlacing or other filters?) */
frames[0] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[1] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[2] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frames[3] = (uint32_t*)calloc(1, video_cap_width * video_out_height * sizeof(uint32_t));
frame_curr = frames[0];
frame_prev1 = frames[1];
frame_prev2 = frames[2];
frame_prev3 = frames[3];
//TODO: Check frames[] allocation
/* TODO: Check frames[] allocation */
if (!frame_out || !frame_cap)
{
printf("Cannot allocate buffers\n");
return false;
}
printf("Allocated %lu byte conversion buffer\n",
video_cap_width * video_cap_height * sizeof(uint32_t));
printf("Allocated %" PRI_SIZET " byte conversion buffer\n",
(size_t)(video_cap_width * video_cap_height) * sizeof(uint32_t));
pixel_format = RETRO_PIXEL_FORMAT_XRGB8888;
if (!VIDEOPROC_CORE_PREFIX(environment_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &pixel_format))
@@ -1293,6 +1312,7 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in
RETRO_API void VIDEOPROC_CORE_PREFIX(retro_unload_game)(void)
{
struct v4l2_requestbuffers reqbufs;
int i;
#ifdef HAVE_ALSA
if (audio_handle != NULL) {
@@ -1328,7 +1348,7 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_unload_game)(void)
free(frame_cap);
frame_cap = NULL;
for (int i=0; i<4; ++i) {
for (i = 0; i<4; ++i) {
if (frames[i])
free(frames[i]);
frames[i] = NULL;
+8 -8
View File
@@ -12,18 +12,18 @@ extern const loaderFuncs_s loader_Rosalina;
static void (*launch_3dsx)(const char* path, argData_s* args, executableMetadata_s* em);
static int exec_3dsx_actual(const char* path, const char** args, bool appendPath){
struct stat sBuff;
struct stat sBuff;
argData_s newProgramArgs;
unsigned int argChars = 0;
unsigned int argNum = 0;
bool fileExists;
bool inited;
if(path == NULL || path[0] == '\0'){
errno = EINVAL;
return -1;
}
fileExists = stat(path, &sBuff) == 0;
if(!fileExists){
errno = ENOENT;
@@ -41,7 +41,7 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
strcpy(newProgramArgs.dst, path);
newProgramArgs.dst += strlen(path) + 1;
newProgramArgs.buf[0]++;
}
while(args[argNum] != NULL){
strcpy(newProgramArgs.dst, args[argNum]);
@@ -49,10 +49,10 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
newProgramArgs.buf[0]++;
argNum++;
}
inited = loader_Rosalina.init();
launch_3dsx = loader_Rosalina.launchFile;
if(!inited){
inited = loader_Ninjhax2.init();
launch_3dsx = loader_Ninjhax2.launchFile;
@@ -62,13 +62,13 @@ static int exec_3dsx_actual(const char* path, const char** args, bool appendPath
inited = loader_Ninjhax1.init();
launch_3dsx = loader_Ninjhax1.launchFile;
}
if(inited){
osSetSpeedupEnable(false);
launch_3dsx(path, &newProgramArgs, NULL);
exit(0);
}
//should never be reached
errno = ENOTSUP;
return -1;
+8 -8
View File
@@ -1,9 +1,9 @@
#ifndef EXEC_3DSX_H
#define EXEC_3DSX_H
//since 3dsx programs are not guaranteed access to the OS, the 3dsx bootloader run by the exploit must run the next program
//your program must have no extra threads running when this is called, these limits do not apply to exec_cia
int exec_3dsx_no_path_in_args(const char* path, const char** args);
int exec_3dsx(const char* path, const char** args);
#ifndef EXEC_3DSX_H
#define EXEC_3DSX_H
//since 3dsx programs are not guaranteed access to the OS, the 3dsx bootloader run by the exploit must run the next program
//your program must have no extra threads running when this is called, these limits do not apply to exec_cia
int exec_3dsx_no_path_in_args(const char* path, const char** args);
int exec_3dsx(const char* path, const char** args);
#endif
+31 -32
View File
@@ -13,7 +13,6 @@ typedef struct{
char argvHmac[0x20] = {0x1d, 0x78, 0xff, 0xb9, 0xc5, 0xbc, 0x78, 0xb7, 0xac, 0x29, 0x1d, 0x3e, 0x16, 0xd0, 0xcf, 0x53, 0xef, 0x12, 0x58, 0x83, 0xb6, 0x9e, 0x2f, 0x79, 0x47, 0xf9, 0x35, 0x61, 0xeb, 0x50, 0xd7, 0x67};
static void errorAndQuit(const char* errorStr){
errorConf error;
@@ -30,37 +29,37 @@ static int isCiaInstalled(u64 titleId, u16 version){
bool titleExists = false;
AM_TitleEntry titleInfo;
Result failed;
failed = AM_GetTitleCount(MEDIATYPE_SD, &titlesToRetrieve);
if(R_FAILED(failed))
return -1;
titleIds = malloc(titlesToRetrieve * sizeof(uint64_t));
if(titleIds == NULL)
return -1;
failed = AM_GetTitleList(&titlesRetrieved, MEDIATYPE_SD, titlesToRetrieve, titleIds);
if(R_FAILED(failed))
return -1;
for(u32 titlesToCheck = 0; titlesToCheck < titlesRetrieved; titlesToCheck++){
if(titleIds[titlesToCheck] == titleId){
titleExists = true;
break;
}
}
}
free(titleIds);
if(titleExists){
failed = AM_GetTitleInfo(MEDIATYPE_SD, 1 /*titleCount*/, &titleId, &titleInfo);
if(R_FAILED(failed))
return -1;
if(titleInfo.version == version)
return 1;
}
return 0;
}
@@ -72,15 +71,15 @@ static int installCia(Handle ciaFile){
u32 bytesRead;
u32 bytesWritten;
u8 transferBuffer[FILE_CHUNK_SIZE];
failed = AM_StartCiaInstall(MEDIATYPE_SD, &outputHandle);
if(R_FAILED(failed))
return -1;
failed = FSFILE_GetSize(ciaFile, &fileSize);
if(R_FAILED(failed))
return -1;
while(fileOffset < fileSize){
u64 bytesRemaining = fileSize - fileOffset;
failed = FSFILE_Read(ciaFile, &bytesRead, fileOffset, transferBuffer, bytesRemaining < FILE_CHUNK_SIZE ? bytesRemaining : FILE_CHUNK_SIZE);
@@ -88,7 +87,7 @@ static int installCia(Handle ciaFile){
AM_CancelCIAInstall(outputHandle);
return -1;
}
failed = FSFILE_Write(outputHandle, &bytesWritten, fileOffset, transferBuffer, bytesRead, 0);
if(R_FAILED(failed)){
AM_CancelCIAInstall(outputHandle);
@@ -96,32 +95,32 @@ static int installCia(Handle ciaFile){
return 1;
return -1;
}
if(bytesWritten != bytesRead){
AM_CancelCIAInstall(outputHandle);
return -1;
}
fileOffset += bytesWritten;
}
failed = AM_FinishCiaInstall(outputHandle);
if(R_FAILED(failed))
return -1;
return 1;
}
int exec_cia(const char* path, const char** args){
struct stat sBuff;
struct stat sBuff;
bool fileExists;
bool inited;
if(path == NULL || path[0] == '\0'){
errno = EINVAL;
return -1;
}
fileExists = stat(path, &sBuff) == 0;
if(!fileExists){
errno = ENOENT;
@@ -131,7 +130,7 @@ int exec_cia(const char* path, const char** args){
errno = EINVAL;;
return -1;
}
inited = R_SUCCEEDED(amInit()) && R_SUCCEEDED(fsInit());
if(inited){
Result res;
@@ -141,20 +140,20 @@ int exec_cia(const char* path, const char** args){
int ciaInstalled;
ciaParam param;
int argsLength;
//open cia file
res = FSUSER_OpenArchive(&ciaArchive, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""));
if(R_FAILED(res))
errorAndQuit("Cant open SD FS archive.");
res = FSUSER_OpenFile(&ciaFile, ciaArchive, fsMakePath(PATH_ASCII, path + 5/*skip "sdmc:"*/), FS_OPEN_READ, 0);
if(R_FAILED(res))
errorAndQuit("Cant open CIA file.");
res = AM_GetCiaFileInfo(MEDIATYPE_SD, &ciaInfo, ciaFile);
if(R_FAILED(res))
errorAndQuit("Cant get CIA file info.");
ciaInstalled = isCiaInstalled(ciaInfo.titleID, ciaInfo.version);
if(ciaInstalled == -1){
//error
@@ -166,10 +165,10 @@ int exec_cia(const char* path, const char** args){
if(error == -1)
errorAndQuit("Cant install CIA.");
}
FSFILE_Close(ciaFile);
FSUSER_CloseArchive(ciaArchive);
param.argc = 0;
argsLength = 0;
char* argLocation = param.args;
@@ -179,19 +178,19 @@ int exec_cia(const char* path, const char** args){
argsLength += strlen(args[param.argc]) + 1;
param.argc++;
}
res = APT_PrepareToDoApplicationJump(0, ciaInfo.titleID, 0x1);
if(R_FAILED(res))
errorAndQuit("CIA cant run, cant prepare.");
res = APT_DoApplicationJump(&param, sizeof(param.argc) + argsLength, argvHmac);
if(R_FAILED(res))
errorAndQuit("CIA cant run, cant jump.");
//wait for application jump, for some reason its not instant
while(1);
}
//should never be reached
amExit();
fsExit();
+5 -5
View File
@@ -1,6 +1,6 @@
#ifndef EXEC_CIA_H
#define EXEC_CIA_H
int exec_cia(const char* path, const char** args);
#ifndef EXEC_CIA_H
#define EXEC_CIA_H
int exec_cia(const char* path, const char** args);
#endif
Loaded 100 of 1339 files, more files were not shown because too many files have changed in this diff. Show more