Compare commits

...
2192 Commits
Author SHA1 Message Date
twinaphex 53a0d6a5b7 Add separate iOS10 solution files 2016-07-15 22:24:15 +02:00
Twinaphex dc9fc004ae Merge pull request #3221 from Themaister/master
Vulkan: Update SPIRV-Cross.
2016-07-15 22:17:53 +02:00
Hans-Kristian Arntzen 1e9e1fc885 Vulkan: Update SPIRV-Cross.
Fixes reflection issues which have been fixed in recent spirv-cross.
2016-07-15 22:12:57 +02:00
twinaphex 398f0c8e17 Shouldn't push this for horizontal lists 2016-07-15 22:06:54 +02:00
twinaphex 0d2962afef Add HAVE_LIBRETRODB ifdefs around it 2016-07-15 21:51:18 +02:00
twinaphex a3c2cbda55 Change 'No items' label in playlists tab to 'No playlists 2016-07-15 21:50:01 +02:00
twinaphex aad8e3581c (MaterialUI) Add Scan Directory setting to playlist tab 2016-07-15 21:47:49 +02:00
twinaphex 6d277de62b Simplifications 2016-07-15 21:45:07 +02:00
twinaphex eab8890ecf Show message again for undid load state 2016-07-15 20:48:07 +02:00
Twinaphex f816829d99 Merge pull request #3220 from Themaister/master
Vulkan: Use manual memory management for cached/incoherent devices.
2016-07-15 19:18:41 +02:00
radius 33315d4b66 bump up version everywhere 2016-07-15 12:09:50 -05:00
Hans-Kristian Arntzen 8569028189 Vulkan: Use manual memory management for cached/incoherent devices. 2016-07-15 16:12:30 +00:00
Alcaro 6239635eba Don't block make clean if we need to reconfigure 2016-07-15 15:42:26 +02:00
Alcaro 979c6d003e C90 sets C89 and should not be used 2016-07-15 15:40:52 +02:00
Alcaro 6af35e8739 Expand those tabs 2016-07-15 15:40:06 +02:00
twinaphex 66e54f86bb Remove Menu File Browser settings - now a part of the file browser
itself
2016-07-15 02:16:05 +02:00
twinaphex 5d678a626f (Privacy screen)Only show 'no settings available' when one of the two entries
fails
2016-07-15 00:22:18 +02:00
twinaphex d38e8544b8 Localize strings 2016-07-15 00:11:16 +02:00
twinaphex 44f4ccc054 Localize some strings 2016-07-15 00:00:57 +02:00
Twinaphex 4478ff62c0 Merge pull request #3218 from Themaister/master
Vulkan: Don't query layout if we have optimal tiling.
2016-07-14 23:34:46 +02:00
twinaphex 67c0bc25f4 Hide away Retropad remote core for now 2016-07-14 23:29:15 +02:00
Hans-Kristian Arntzen f5bddd45e8 Vulkan: Don't query layout if we have optimal tiling. 2016-07-14 23:15:39 +02:00
twinaphex 0cb2bbd420 Change XMB Theme Wallpaper string to 'Plain' 2016-07-14 22:56:59 +02:00
twinaphex 16b6ff7f9b Set default icon theme to proper one here too 2016-07-14 22:53:11 +02:00
twinaphex 4df71207ff reset filebrowser to avoid stray entries being left in when we
go from one filebrowser entry to the next
2016-07-14 22:36:18 +02:00
twinaphex 194eaf3053 Use menu_displaylist_reset_filebrowser 2016-07-14 22:18:36 +02:00
twinaphex 010fe1bb1b Add Filter by Supported Extension setting entry to file browser 2016-07-14 22:10:56 +02:00
twinaphex fabf68e441 Set XMB icon theme by default to Monochrome, and fix hardcoding 2016-07-14 21:24:33 +02:00
twinaphex 1035029a89 if this returns -1, add an empty entry anyway 2016-07-14 21:18:40 +02:00
twinaphex 5c55c098f6 Privacy Settings - should push an empty entry in case nothing
was found
2016-07-14 21:14:59 +02:00
twinaphex d6ac759e97 Should add an 'go immediately to core updater' if no cores were found 2016-07-14 20:48:03 +02:00
twinaphex e8ff596177 (XMB) xmb_draw_bg - color theme gradient themes can now be selected
when shader pipeline is turned off, and will colorize the wallpaper
2016-07-14 20:28:47 +02:00
twinaphex 745bc1eb0d Dehardcode shader pipeline enums 2016-07-14 18:40:57 +02:00
twinaphex 664f90b023 Add 'Wallpaper' color theme for XMB too 2016-07-14 18:29:05 +02:00
twinaphex 401eb7bc7a One more dehardcode 2016-07-14 18:20:36 +02:00
twinaphex 14797ae18e Dehardcode enums for XMB themes 2016-07-14 18:19:59 +02:00
twinaphex 68a5cdb984 Update glsm 2016-07-14 17:29:50 +02:00
twinaphex 922eddcfb5 (MSVC) Build fix 2016-07-14 02:40:51 +02:00
twinaphex ce36860be2 DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR - Fix potential crash here 2016-07-13 04:38:29 +02:00
twinaphex 164b28a4fa Fix MENU_ENUM_LABEL_CB_CORE_CONTENT_DOWNLOADS - we need to take
only the first element and use this as the initial base path
2016-07-13 04:25:09 +02:00
twinaphex ad5db2f8cf Revert "Should fix subdir issues"
This reverts commit a9d801a5fc.
2016-07-13 02:00:16 +02:00
twinaphex a9d801a5fc Should fix subdir issues 2016-07-13 01:54:43 +02:00
twinaphex 22ad4e98b6 Subdirs in URL listings now get correctly prepended to the top
- still some minuscule display bug with XMB, but not with MaterialUI/RGUI
2016-07-13 01:23:59 +02:00
twinaphex ea175fd26f Rename menu_entries_add_enum to menu_entries_append_enum 2016-07-13 01:17:09 +02:00
twinaphex 6d870129c6 Rename menu_entries_add to menu_entries_append 2016-07-13 01:13:20 +02:00
twinaphex b03e3791b5 Merge print_buf_lines and print_buf_lines_extended into one 2016-07-13 01:03:06 +02:00
twinaphex 41651fa772 Don't suppress all download messages
:W
:Q!
;#
2016-07-12 23:33:51 +02:00
twinaphex d4b3fa30df Fix 'Cancel' for FILE_TYPE_DOWNLOAD_CORE 2016-07-12 23:24:21 +02:00
Twinaphex 91771f8b7c Merge pull request #3213 from lakkatv/master
(Menu) Prevent adding a NO_ITEM entry in the horizontal menu
2016-07-12 23:20:22 +02:00
Jean-André Santoni 16df630035 (Menu) Prevent adding a NO_ITEM entry in the horizontal menu 2016-07-12 23:19:19 +02:00
twinaphex 4c9245b7d9 (record_ffmpeg.c) Prevent 'explicit NULL dereferenced') 2016-07-12 23:17:43 +02:00
twinaphex 9bf63a7809 Prevent 'dereference after NULL check' 2016-07-12 23:14:51 +02:00
twinaphex d4051fcc27 Fix 'logically dead code' 2016-07-12 23:10:25 +02:00
twinaphex 99d450673e Try to silence coverity warnings by doing retro_assert checks
a different way
2016-07-12 23:08:00 +02:00
twinaphex d0818e6e62 Not sure if/when we will be needing this 'ancient' codepath 2016-07-12 21:10:49 +02:00
twinaphex aa9dcc2a8e (dynamic.c) Prevent null pointer dereferences 2016-07-12 21:03:24 +02:00
twinaphex e3c4388f76 Missing break in switch case 2016-07-12 21:00:06 +02:00
twinaphex 2d6f0f194b (MaterialUI) prevent unused value warnings - assinging value from 'Z' to 'header_bg_color' but that stored value is overwritten before it can be used 2016-07-12 20:57:15 +02:00
twinaphex 36a8c96e29 (menu_cbs_ok.c) Constant variable guards dead code 2016-07-12 20:54:18 +02:00
twinaphex 296c869b4c Prevent null pointer dereference 2016-07-12 20:51:45 +02:00
twinaphex 9ecf04a999 (cheevos.c) Fix 'value can never be lesser than 0' warning 2016-07-12 20:50:22 +02:00
twinaphex f5cedc6129 FIx Cancel action for subdir 2016-07-12 19:37:15 +02:00
twinaphex bc71585714 Fix title with subdir URL 2016-07-12 18:43:00 +02:00
twinaphex d903ad2b97 First working implementation of subdirs for URL lists 2016-07-12 18:29:31 +02:00
twinaphex 490af3cb3e Cleanup 2016-07-12 17:23:08 +02:00
Arzed Five a13b07551c (glui) Make the bottom icon inactive color be customizeable (currently
it's the same color as the scrollbar)
2016-07-12 17:22:45 +02:00
twinaphex cc40d68e8b Don't suppress messages 2016-07-12 05:22:24 +02:00
twinaphex f91a44cbc7 Update vulkan_symbol_wrapper.c 2016-07-11 23:40:24 +02:00
twinaphex d4fb4ba87d (libretro-test-vulkan-async-compute) Change header incldue 2016-07-11 23:38:56 +02:00
twinaphex 40e2103640 Try to fetch .index-dirs for every download entry, WIP 2016-07-11 20:38:57 +02:00
twinaphex 16727bc85a Cleanups - dehardcode some strings 2016-07-11 19:40:30 +02:00
twinaphex ca527de877 Start preparing code for fetching index dirs too 2016-07-11 19:39:26 +02:00
twinaphex 3d52f5e19c Pass userdata to cb_net_generic 2016-07-11 19:33:07 +02:00
twinaphex 60d3b22bb6 Create Menu Header Opacity setting 2016-07-11 17:41:06 +02:00
twinaphex b78fcb3e21 Change opacity of bg_footer_real 2016-07-11 17:29:06 +02:00
twinaphex b4dbc16024 Add Menu Footer Opacity setting 2016-07-11 17:27:36 +02:00
twinaphex 0a216caf66 Start preparing code for being able to change footer opacity 2016-07-11 17:17:16 +02:00
twinaphex 8fc3d36a73 Cleanups 2016-07-11 16:59:21 +02:00
twinaphex 72ad824a15 Cleanup some comments 2016-07-11 16:50:15 +02:00
twinaphex bf68611929 Opacity change to green theme 2016-07-11 16:46:39 +02:00
twinaphex 99b1ffd406 Cleanup 2016-07-11 16:43:06 +02:00
twinaphex 321e62c867 (MaterialUI) Cleanup 2016-07-11 16:37:31 +02:00
twinaphex 3f29e731e2 Set HAVE_PLAIN_DRM to no by default 2016-07-11 15:57:52 +02:00
twinaphex defe51ff69 Remove call to PENDING_QUIT 2016-07-11 15:29:11 +02:00
twinaphex f596d1f99d Get rid of duplicate entry 2016-07-11 15:04:54 +02:00
Twinaphex daee8afa19 Merge pull request #3209 from lakkatv/master
(Menu) Don't push the quick menu on playlists
2016-07-11 15:03:12 +02:00
Jean-André Santoni 94a67fe28b (Menu) Don't push the quick menu on playlists 2016-07-11 15:00:30 +02:00
twinaphex 3db30a9440 (cheevos.c) Cleanups 2016-07-11 14:56:23 +02:00
twinaphex ecb69ad938 (cheevos.c) Cosmetic cleanups 2016-07-11 14:51:47 +02:00
twinaphex 050e29140b Should fix these issues 2016-07-11 14:44:12 +02:00
twinaphex db43a86b01 (cheevos.c) Cleanups 2016-07-11 14:43:05 +02:00
Arzed Five ebeba581da Highlight the switch textures when they're on with the
active_tab_marker_color
2016-07-11 13:59:38 +02:00
Arzed Five 33c5fa6ade White and black text are now pure white/black with varying degrees of
opacity/alpha, as per the material design spec.
Corrected some font color bugs.
No longer using the 'active' icons variants.
2016-07-11 13:59:33 +02:00
twinaphex 34fd48c961 Refactor runloop_iterate_menu 2016-07-11 02:47:46 +02:00
twinaphex 38005a4b0a Create runloop_iterate_menu 2016-07-11 02:46:16 +02:00
twinaphex 486ac44b71 Better way of setting the active tab icons 2016-07-11 01:45:16 +02:00
twinaphex 5be5b98d26 Change opacity of color_nv_accent 2016-07-11 01:36:24 +02:00
twinaphex ed14b37899 (GLUI/MaterialUI) Adjust color of tab icons based on theme 2016-07-11 01:30:45 +02:00
twinaphex 70b8af4a6c Prevent some potentially costly operations being always performed
even when not needed
2016-07-11 01:01:38 +02:00
twinaphex 4381c606d8 (MaterialUI) Backport r5 nvidia shield theme 2016-07-11 00:55:07 +02:00
twinaphex 2285797ef8 Move Dark Blue below Blue Grey 2016-07-11 00:48:23 +02:00
twinaphex 9c91885301 Set default MaterialUI theme to Blue 2016-07-11 00:47:25 +02:00
twinaphex 3966979043 (MaterialUI) Yellow - set header text color to black 2016-07-10 21:40:42 +02:00
twinaphex 9a54657a77 (MaterialUI) Update 2016-07-10 21:31:19 +02:00
twinaphex c451b94bd9 (MaterialUI) Create Blue Grey theme 2016-07-10 21:23:57 +02:00
Twinaphex 0fef69a678 Merge pull request #3207 from yoshisuga/ios10_cores_in_app_bundle
iOS 10 support
2016-07-10 21:08:36 +02:00
twinaphex 346e3af66c Cleanup warnings 2016-07-10 21:06:29 +02:00
Yoshi Sugawara d0bced56c2 Merge branch 'master' into ios10_cores_in_app_bundle 2016-07-10 09:03:17 -10:00
Yoshi Sugawara 9173397f08 iOS 10 support: cores need to be in the modules directory of app bundle, added script to code sign cores in modules directory 2016-07-10 09:02:40 -10:00
twinaphex 840ff59dd0 Remove SL_FLAG_ALLOW_EMPTY_LIST 2016-07-10 19:35:01 +02:00
twinaphex 66df62938c Prevent some unused variable warnings 2016-07-10 19:29:52 +02:00
twinaphex 7d518bd4a8 Add menu_wallpaper_opacity 2016-07-10 17:13:19 +02:00
twinaphex 37aee162c9 Backport/add MaterialUI color themes by rz5 2016-07-10 17:06:43 +02:00
twinaphex de21d31352 Update 2016-07-10 16:11:03 +02:00
twinaphex acc0a6261d Move enum to menu_display.h 2016-07-10 16:08:38 +02:00
twinaphex ec7db6b4b6 (MaterialUI) Use enum 2016-07-10 16:07:22 +02:00
twinaphex c9f2ad1b5e (Achievements) Push empty entry if no achievements found 2016-07-10 15:28:54 +02:00
twinaphex db74b7cbbc (cheevos.c) Cleanups 2016-07-10 15:24:57 +02:00
twinaphex 9f4c08caee Cleanups 2016-07-10 15:20:21 +02:00
twinaphex c37e610f10 Cleanups 2016-07-10 15:04:01 +02:00
twinaphex 167c83b6e6 Dehardcode some strings 2016-07-10 14:59:59 +02:00
twinaphex fbd3b4898f Use enums for hotkey binds list 2016-07-10 14:49:41 +02:00
twinaphex 34c6b1f306 Dehardcode strings 2016-07-10 14:35:27 +02:00
twinaphex 71d25c779a Fix left/right presses 2016-07-10 13:51:40 +02:00
twinaphex eb37e95cca (menu_cbs_get_value.c) Get rid of label_hash 2016-07-10 13:47:19 +02:00
twinaphex c53bb5c7be Remove all these labels 2016-07-10 13:44:44 +02:00
twinaphex 730f02c7e9 Get rid of hash labels 2016-07-10 13:40:08 +02:00
twinaphex ad36b8ba76 Revert "menu_cbs_get_value - get rid of hashes"
This reverts commit 9d55e3dc84.
2016-07-10 04:08:11 +02:00
twinaphex 9d55e3dc84 menu_cbs_get_value - get rid of hashes 2016-07-10 04:02:13 +02:00
twinaphex 7bae0a3170 Cleanup 2016-07-10 03:52:20 +02:00
twinaphex c938f86235 Get rid of one of the last remaining hash dependencies in menu_displaylist.c 2016-07-10 03:08:18 +02:00
twinaphex 4e347d96b8 reset filebrowser settings when selecting 'Select From Collection' 2016-07-10 02:47:13 +02:00
twinaphex f95b42011f Cleanups 2016-07-10 02:33:44 +02:00
twinaphex 91a946e447 Generic action_ok_display_list - cleanups 2016-07-10 02:30:07 +02:00
twinaphex a922a14191 Cleanups 2016-07-10 02:26:20 +02:00
twinaphex 4237590bfc Cleanups 2016-07-10 02:21:26 +02:00
twinaphex 44800c1205 Cleanups 2016-07-10 00:46:47 +02:00
twinaphex 976d52e7c9 Cleanups 2016-07-10 00:45:12 +02:00
Alcaro 2dc4f87995 Fix build fail derp 2016-07-10 00:43:52 +02:00
twinaphex b9f0cb1116 Cleanups 2016-07-10 00:39:25 +02:00
twinaphex 19c93cb58e Cleanups 2016-07-10 00:38:14 +02:00
twinaphex 9d10c3ff16 Fix Overlays setting 2016-07-10 00:32:19 +02:00
twinaphex b211f8b76a Fix Database Manager 2016-07-10 00:27:52 +02:00
Twinaphex 20d7987d27 Cleanup unused variables 2016-07-10 00:08:54 +02:00
twinaphex 97fb56b334 Cleanups 2016-07-09 23:30:34 +02:00
twinaphex 06bf29ba4c Create menu_input_mouse_check_vector_inside_hitbox 2016-07-09 23:23:23 +02:00
twinaphex 0ba2bac778 Fix another bug 2016-07-09 22:15:24 +02:00
twinaphex 89db0793b4 Fix action_ok_playlist_entry_collection 2016-07-09 22:09:50 +02:00
twinaphex 519e4e038a Update core_info_find 2016-07-09 21:51:16 +02:00
Alcaro 158e4614dd Fill in this thing. 2016-07-09 20:39:38 +02:00
twinaphex 0bc4248084 Simplify this code 2016-07-09 18:12:35 +02:00
twinaphex 1fc3f2b057 Add parameter to generic_action_ok_displaylist_push 2016-07-09 18:06:50 +02:00
twinaphex 093e05c411 Stub out 'scan' case for some content files for now 2016-07-09 17:28:33 +02:00
twinaphex 01541d3108 Fix menu wallpaper setting 2016-07-09 17:23:34 +02:00
twinaphex 5e665045e4 hash_label only used for one instance now 2016-07-09 17:17:55 +02:00
twinaphex 97dfcbc4b4 Create menu_driver_ident 2016-07-09 16:45:36 +02:00
twinaphex 9cdfad3fd4 Refactor menu_driver_ctl 2016-07-09 16:42:31 +02:00
twinaphex 26f5970ffb Correct menu_display_shader_pipeline_active 2016-07-09 16:37:51 +02:00
twinaphex 5be5409431 - Create menu_display_shader_pipeline_active ; don't make menu wallpaper
opacity active when shader pipeline is activated in xMB
- reduce dependency on hash_label
2016-07-09 16:33:55 +02:00
twinaphex f8d844e150 Make sure thumbnail is always drawn with full opacity 2016-07-09 15:21:57 +02:00
twinaphex 2fce2f4045 Add menu wallpaper opacity setting 2016-07-09 15:13:06 +02:00
twinaphex f94a8743a1 (MaterialUI) Allow for more themes later on 2016-07-09 13:57:19 +02:00
twinaphex 7d73e17b6f (MaterialUI) Make grey_bg more translucent for dark theme 2016-07-09 13:56:16 +02:00
twinaphex 6c2856926c Don't need hash_label for wallpaper instance anymore 2016-07-09 13:54:07 +02:00
twinaphex df5d46594b Pass type to 'parse_generic' 2016-07-09 13:52:46 +02:00
twinaphex a8d4d3cc35 Remove unused hash_label 2016-07-09 13:51:57 +02:00
twinaphex c8415e9194 Horizontal Playlists tab now shows playlist names without '.lpl'
extension
2016-07-09 13:49:31 +02:00
twinaphex 180c0c87c1 Add MaterialUI menu color theme setting 2016-07-09 13:17:29 +02:00
twinaphex e0504bfc62 Reorganize xmb/MaterialUI settings 2016-07-09 13:05:58 +02:00
twinaphex 968dcf4d39 Rename settings 2016-07-09 12:59:56 +02:00
twinaphex 2965d89707 Rename MENU_ENUM_LABEL_XMB_GRADIENT to 'Menu Color Theme' 2016-07-09 12:57:55 +02:00
twinaphex 0d1f92bf16 (MaterialUI) Cleanups 2016-07-09 12:55:46 +02:00
twinaphex 499c531d08 Cleanups 2016-07-09 12:32:47 +02:00
twinaphex d203ec2244 (GLUI/MaterialUI) Fix horizontal playlist 2016-07-09 12:26:39 +02:00
twinaphex d0dd77ae42 Split up horizontal playlists code 2016-07-09 12:20:22 +02:00
twinaphex b580599710 (X11) Fix 'quit' button not working 2016-07-09 12:09:39 +02:00
twinaphex fffd104c0d Can now scroll left/right on playlists tab 2016-07-09 02:22:25 +02:00
Arzed Five 1b28ff59ba If a core was loaded, GLUI would get a white color. This fixes it. 2016-07-09 01:39:02 +02:00
Arzed Five dfeb46f0f2 Make the footer be the same color as the main background color. Add some
comments.
2016-07-09 01:38:41 +02:00
Arzed Five b57a203557 Preliminary dark theme. De-harcoded some colors, refactored some names
to be clearer to me,
created a new color.
2016-07-09 01:37:29 +02:00
twinaphex 2dac910964 Add DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION 2016-07-08 23:20:48 +02:00
twinaphex 6cb11da46b Move variables around 2016-07-08 23:16:03 +02:00
twinaphex 0b3f45a58a Refactor 'Load Core' code to no longer need hash 2016-07-08 23:14:22 +02:00
twinaphex 0cda65967d Use BIT32_CLEAR_ALL 2016-07-08 22:54:16 +02:00
twinaphex 60eb15bf0b Fix 'Use this directory' for directory settings 2016-07-08 22:51:47 +02:00
twinaphex 5cefbbfc57 Add DISPLAYLIST_FILE_BROWSER_SELECT_DIR/SELECT_FILE 2016-07-08 22:26:28 +02:00
twinaphex e5bde97a2d Cleanups 2016-07-08 20:47:17 +02:00
twinaphex b774fda697 Remove bind_info.menu_label_hash 2016-07-08 19:15:24 +02:00
twinaphex 97be5b164f Cleanups 2016-07-08 19:14:29 +02:00
twinaphex 7aaa39a5db Improve Achievements list 2016-07-08 18:39:34 +02:00
Twinaphex bfe472af09 Merge pull request #3202 from amspady20/patch-1
Update xegl_ctx.c
2016-07-08 18:32:07 +02:00
amspady20 9adc8e34c0 Update xegl_ctx.c
Fixed include statment for frontend_driver.h
2016-07-08 12:30:53 -04:00
twinaphex a8004dee3d (Cheevos) Add label representation 2016-07-08 18:19:10 +02:00
twinaphex f107af6b55 Add MENU_ENUM_LABEL_CHEEVOS_ENTRY 2016-07-08 18:16:51 +02:00
twinaphex 7d16016d96 (Cheevos.c) Cleanups 2016-07-08 17:19:43 +02:00
twinaphex 555c54bdb8 Should show 'rich' labels for Android filesystem choices 2016-07-08 17:11:15 +02:00
twinaphex 8430697116 Add menu_entry_get_rich_label 2016-07-08 16:55:21 +02:00
twinaphex a1e517470c Start adding new values 2016-07-08 16:42:40 +02:00
twinaphex 14a7f2b442 Need to instrument menu_entry_get_path instead 2016-07-08 16:28:49 +02:00
twinaphex efc0371a4e menu_entry_get_label - prepare for being able to show custom labels 2016-07-08 16:27:16 +02:00
twinaphex b78dbf7453 Start preparing groundwork for custom labels 2016-07-08 16:25:53 +02:00
twinaphex bcf74d9685 Start adding menu_cbs_label.c 2016-07-08 16:24:05 +02:00
twinaphex c66ada4e90 (FBDev) Cleanups 2016-07-08 14:43:13 +02:00
twinaphex e1a5379886 (FBDev) Cleanups/unifications 2016-07-08 14:29:16 +02:00
twinaphex 80e3170e93 (BSD) Add frontend/drivers/platform_bsd.c 2016-07-08 13:30:05 +02:00
Twinaphex 3f6623fa6e Avoid warning 2016-07-08 13:04:51 +02:00
Twinaphex c746f4dbbc Don't build in BSD support for OSX 2016-07-08 13:01:16 +02:00
twinaphex bddd93bcaa (EGL) Don't use g_egl_quit and egl_install_sighandler 2016-07-08 12:58:06 +02:00
twinaphex d953be6397 (Wayland) Use signal handler code from frontend driver 2016-07-08 12:52:46 +02:00
twinaphex e9dc729503 Create set_signal_handler_state 2016-07-08 12:48:01 +02:00
twinaphex 8d5f34eeb9 Move signal handler code to frontend driver interface 2016-07-08 02:43:55 +02:00
twinaphex 76cc6fd8ec Start implementing signal handler code once in frontend driver code 2016-07-08 02:38:33 +02:00
twinaphex 24bfad033f Update platform_bsd.c 2016-07-08 02:25:23 +02:00
twinaphex 05467443a2 Add destroy_signal_handler_state 2016-07-08 02:24:56 +02:00
twinaphex a735114780 Add get_signal_handler_state 2016-07-08 02:20:42 +02:00
twinaphex 260d3634f2 Add platform_bsd.c to Griffin 2016-07-08 02:13:47 +02:00
twinaphex c8b7bc9845 Add platform_bsd.c 2016-07-08 02:13:19 +02:00
twinaphex 6cdc34e891 Add install_signal_handler callback 2016-07-08 02:10:40 +02:00
Twinaphex 1a148da76a Merge pull request #3199 from Themaister/master
Move KHR_display backend behind configure flag.
2016-07-07 22:15:27 +02:00
Hans-Kristian Arntzen cd4ff2eac8 Move KHR_display backend behind configure flag.
Enabled by default since it is technically not platform specific.
2016-07-07 22:05:57 +02:00
Twinaphex 84d656ea67 Add to Griffin 2016-07-07 21:53:16 +02:00
Alcaro 4b75304d15 You missed a spot, maister 2016-07-07 21:03:30 +02:00
Twinaphex 5cf1f9ec61 Merge pull request #3198 from Themaister/master
Vulkan: Don't use sighandling on Win32 in khr_display.
2016-07-07 20:43:31 +02:00
Hans-Kristian Arntzen df7870c2ea Vulkan: Don't use sighandling on Win32 in khr_display.
Lots of the embedded backends do signal-handling like this
which is kinda awkward. This should be moved to frontend runloop or
something similar.
2016-07-07 20:34:42 +02:00
Alcaro a081cf805f Fix typos 2016-07-07 20:05:08 +02:00
Twinaphex eacd59b841 Merge pull request #3197 from Themaister/khr_display
Initial implementation of VK_KHR_display backend.
2016-07-07 19:36:58 +02:00
Hans-Kristian Arntzen c561d8c4e6 Install sighandler for khr_display backend. 2016-07-07 19:32:09 +02:00
Hans-Kristian Arntzen af52f1532f Fix Vulkan test core build with includes. 2016-07-07 19:28:32 +02:00
Hans-Kristian Arntzen d382e1069e Basic VK_KHR_display integration works! :) 2016-07-07 19:28:27 +02:00
twinaphex 07c34accf5 Use MENU_ENUM_LABEL_URL_ENTRY 2016-07-07 03:02:55 +02:00
twinaphex 76b4828105 Add MENU_ENUM_LABEL_FILEBROWSER_ENTRY 2016-07-07 02:58:57 +02:00
twinaphex 035e7889d1 Remove more instances of MSG_UNKNOWN 2016-07-07 02:51:29 +02:00
twinaphex 4511b1c09c Dehardcode more MSG_UNKNOWN instances 2016-07-07 02:21:33 +02:00
twinaphex 3113f51102 Add 'User remote Enable' settings back 2016-07-07 01:52:10 +02:00
Hans-Kristian Arntzen 471d06d133 Fix Wayland refresh rate logging. 2016-07-06 23:22:13 +02:00
Hans-Kristian Arntzen d2fafc5451 Sketch out vulkan_create_display_surface. 2016-07-06 20:27:39 +02:00
Hans-Kristian Arntzen e9046dd06f Begin implementing VK_KHR_display. 2016-07-06 19:37:47 +02:00
Twinaphex a2c435ab2c Reintroduce deinit and get rid of slock_unlock at bottom of threaded_worker function 2016-07-06 16:35:00 +02:00
twinaphex 51e2da2cbd Revert this back - reintroduce the leak but should hopefully
solve issues on newer Intel CPUs
2016-07-06 13:21:08 +02:00
Twinaphex 599385de87 Merge pull request #3194 from orbea/aliasing
glm: Use aliasing patch from opensuse to silence warnings
2016-07-06 12:57:22 +02:00
orbea 3e859da48b glm: Use aliasing patch from opensuse to silence warnings 2016-07-06 00:28:57 -07:00
twinaphex 6a9fb1186d Should hopefully fix issues 2016-07-06 00:32:41 +02:00
twinaphex c8349862e1 Lower libdrm requirements to 2.4.65 2016-07-04 21:51:06 +02:00
Twinaphex 6d667b5250 Merge pull request #3189 from loganmc10/master
Fix library dirs on Raspberry Pi
2016-07-04 21:49:33 +02:00
Logan McNaughton a9750e0232 Fix library dirs on Raspberry Pi 2016-07-04 12:25:17 -06:00
twinaphex 170f8da759 Create MENU_ENUM_LABEL_PLAYLIST_ENTRY 2016-07-04 17:35:59 +02:00
twinaphex 58c6590dca Don't use MSG_UNKNOWN for system information entries 2016-07-04 17:07:34 +02:00
twinaphex 1ecdc1e8b7 Create MENU_ENUM_LABEL_NETWORK_INFO_ENTRY 2016-07-04 16:59:29 +02:00
twinaphex 39c50094da Create MENU_ENUM_LABEL_DEBUG_INFO_ENTRY 2016-07-04 16:57:24 +02:00
twinaphex c6d4dce410 Add MENU_ENUM_LABEL_CORE_INFO_ENTRY 2016-07-04 16:50:58 +02:00
twinaphex 0346cf70d5 Seems to come from here - add license text to it -
https://sourceforge.net/p/android-x86/external_libdrm/ci/1ec3c44bdd38051d870f64d0b2cc7dbd59760386/tree/tests/util/format.c
2016-07-04 15:05:50 +02:00
twinaphex b0ea1e09ac thread_wrapp - improve this a bit 2016-07-04 11:39:20 +02:00
twinaphex b2bc4cd300 Check if data->func is NULL and if so, early return 2016-07-04 11:32:43 +02:00
twinaphex 5d70242dee Check against libdrm version 2.4.68 in order to enable/disable
plain DRM video driver
2016-07-03 22:08:56 +02:00
twinaphex cdc7c1283b Fix Onscreen Overlay settings 2016-07-03 19:41:55 +02:00
Alcaro 6c18c17703 Cleanup 2016-07-03 12:47:55 +02:00
twinaphex 27c0702919 Cleanups 2016-07-03 11:30:03 +02:00
twinaphex 26afec3b08 Cleanups/CXX_BUILD fix 2016-07-03 11:29:09 +02:00
twinaphex abebc88195 Cleanups 2016-07-03 11:27:09 +02:00
twinaphex fa2d1c25a2 FILE_TYPE_PLAIN - add enum_idx fallback 2016-07-03 10:56:41 +02:00
twinaphex 54e137d9f7 Cleanups 2016-07-03 10:47:09 +02:00
twinaphex fe1dc51889 Add missing file 2016-07-03 10:44:53 +02:00
twinaphex a8bba31429 Cleanups 2016-07-03 10:44:34 +02:00
twinaphex d53cbfbdfb Backport DRM video driver 2016-07-03 10:37:07 +02:00
twinaphex 0775687008 Cleanups 2016-07-02 21:37:22 +02:00
twinaphex 97de8a35ec Cleanups 2016-07-02 20:49:38 +02:00
twinaphex 3c81b2597d Refactor remaining setting screens 2016-07-02 20:40:27 +02:00
twinaphex abe2a14b16 Refactor 'Onscreen Display'/'Onscreen Overlay' settings 2016-07-02 13:49:05 +02:00
twinaphex 84d9a58ec8 Refactor "Frame Throttle" and "Rewind" settings lists 2016-07-02 13:17:24 +02:00
twinaphex 1b76f42b00 Fix back for settings - goes back to correct index 2016-07-02 12:22:53 +02:00
twinaphex f011c4c9d6 Refactor 'Saving settings' and 'Logging settings' lists 2016-07-02 12:03:50 +02:00
twinaphex 662497d897 Refactor Configuration Settings 2016-07-02 10:17:09 +02:00
twinaphex 951686ba59 Cleanups 2016-07-02 07:29:14 +02:00
twinaphex 40998967c3 CLeanups 2016-07-02 07:27:18 +02:00
twinaphex e4d89b4b11 Cleanups 2016-07-02 07:26:03 +02:00
twinaphex d9bf45d2e7 Cleanups 2016-07-02 07:22:06 +02:00
twinaphex 18e3843db7 Cleanups 2016-07-02 07:05:43 +02:00
twinaphex 370c4cb6a7 Cleanups 2016-07-02 06:59:49 +02:00
twinaphex 03f7bd5e7b Cleanups 2016-07-02 06:57:47 +02:00
twinaphex eadae793c6 Cleanups 2016-07-01 22:33:37 +02:00
twinaphex fe70f766f1 Cleanups 2016-07-01 20:59:51 +02:00
twinaphex 9596c7b3c4 Cleanups 2016-07-01 20:57:23 +02:00
twinaphex f513e1fac2 (menu_cbs.c) Cleanups 2016-07-01 20:23:22 +02:00
twinaphex 9d3251a54b Cleanups 2016-07-01 20:18:51 +02:00
twinaphex 9f53ad9c45 (menu_cbs.c) Remove arguments 2016-07-01 19:59:47 +02:00
twinaphex e68d2c656f (menu_cbs) Remove unneeded arguments 2016-07-01 19:58:08 +02:00
twinaphex 1cc2ae692b Cleanups 2016-07-01 19:26:27 +02:00
twinaphex f469f40381 CLeanups 2016-07-01 19:24:26 +02:00
twinaphex f7648bc95c Remove arguments 2016-07-01 19:22:07 +02:00
twinaphex 688cad2593 Get rid of arguments 2016-07-01 19:20:59 +02:00
twinaphex 550b3e5633 (menu_cbs.c) Get rid of some unneeded variable arguments 2016-07-01 19:13:25 +02:00
twinaphex 129a3463f5 Don't use MSG_UNKNOWN for this 2016-07-01 19:06:33 +02:00
twinaphex 79761446c8 Cut down on label hash dependencies 2016-07-01 19:01:25 +02:00
twinaphex 5039d7a444 action_ok_playlist - no longer dependent upon msg_hash_calculate 2016-07-01 18:28:27 +02:00
twinaphex 37f64d39a3 Use FILE_PATH_PNG_EXTENSION 2016-07-01 17:04:11 +02:00
twinaphex 947ef60a0f Cleanups 2016-07-01 16:36:57 +02:00
twinaphex 71c20c9650 Cleanup 2016-07-01 16:34:19 +02:00
twinaphex 02f8d54c31 Translatable strings 2016-07-01 16:33:43 +02:00
twinaphex a697e2507e Cleanup 2016-07-01 16:21:16 +02:00
Twinaphex 0ff36406ee unused variable fix 2016-07-01 16:15:11 +02:00
twinaphex 56ef899946 Move code to menu_content.c 2016-07-01 15:55:36 +02:00
twinaphex 14329b0656 Make function static 2016-07-01 15:46:55 +02:00
twinaphex 6f241e80a0 config.features.h - add HAVE_OPENGLES_3_1 / HAVE_OPENGLES_3_2 2016-07-01 12:43:48 +02:00
twinaphex cddb0a3b48 Hide 'Start Core' if we cannot directly start the core 2016-07-01 12:18:38 +02:00
twinaphex 0ecb2379ff config_get_default_video - add VIDEO_VULKAN 2016-07-01 12:14:06 +02:00
twinaphex 20fa4499d2 Cleanup 2016-07-01 12:12:06 +02:00
twinaphex 45e3c60d22 Cleanups 2016-07-01 12:10:59 +02:00
twinaphex 474430b043 Expand file_path_str 2016-07-01 11:16:56 +02:00
twinaphex 45c33c7acf Create fill_pathname_base_ext 2016-07-01 11:12:24 +02:00
twinaphex e36107530e deferred_push - don't use menu_setting_find 2016-07-01 10:40:31 +02:00
twinaphex dc7a225f8d Don't use menu_setting_find anymore in action_ok_file_load 2016-07-01 10:35:50 +02:00
twinaphex 5953b63b4f Cleanup 2016-07-01 10:26:31 +02:00
twinaphex 8408b753af CLeanups 2016-07-01 10:16:41 +02:00
twinaphex f4bacc7afd (menu_cbs_ok.c) Get rid of hash_label code 2016-07-01 10:15:26 +02:00
twinaphex 928eb582f6 Cleanup some strings 2016-07-01 10:01:58 +02:00
twinaphex 303897924c More translatable strings 2016-07-01 09:45:04 +02:00
twinaphex 2009c72baa config_replace - do early return if global is NULL 2016-07-01 08:54:31 +02:00
twinaphex 2520a8a5f6 Indenting nits 2016-07-01 08:53:27 +02:00
twinaphex 2f04b7035a Add more translatable strings 2016-07-01 08:35:12 +02:00
twinaphex 41459fc1d4 Rename 'Add Tab' 2016-07-01 07:47:47 +02:00
twinaphex 0eb467e04d Dehardcode more strings, can get rid of some TODOS/FIXMEs 2016-07-01 07:28:46 +02:00
twinaphex dcbd68b11b Create FILE_PATH_AUTO_EXTENSION 2016-07-01 07:07:18 +02:00
Twinaphex 1e9300be68 Prevent crash inside command_event_save_auto_state 2016-07-01 07:03:44 +02:00
twinaphex dc4275b673 Should autosave state now at exit 2016-07-01 06:55:44 +02:00
twinaphex 241670cec2 Dehardcode some more strings 2016-07-01 06:02:57 +02:00
twinaphex 86fa52a2ea Add FILE_PATH_BSV_EXTENSION 2016-07-01 05:59:36 +02:00
twinaphex 394cbbef59 Improve message 2016-07-01 05:56:41 +02:00
twinaphex 13cadc6c1d Add FILE_PATH_7Z_EXTENSION/FILE_PATH_ZIP_EXTENSION 2016-07-01 05:53:55 +02:00
twinaphex a38675a562 Style nits 2016-07-01 05:51:27 +02:00
twinaphex 94735f9034 Replace some snprintf usage 2016-07-01 05:49:18 +02:00
twinaphex b88e117d0b Replace snprintf usage with strlcpy 2016-07-01 05:46:12 +02:00
twinaphex 0ddb064314 Make strings translatable 2016-07-01 05:42:53 +02:00
twinaphex 36223d551d Cleanups 2016-07-01 05:17:04 +02:00
twinaphex 6d531f1892 Dehardcode 'DETECT' 2016-07-01 04:58:56 +02:00
Alcaro f5881c17ef Use the same format as in the autoconfigs 2016-06-30 22:06:51 +02:00
Twinaphex 10d9e2a261 Merge pull request #3179 from lakkatv/master
Forgot to add a break here
2016-06-30 19:21:36 +02:00
Jean-André Santoni 8c442985cb Forgot to add a break here 2016-06-30 19:17:06 +02:00
twinaphex bb15d50ff9 Dehardcode some constants 2016-06-30 19:09:22 +02:00
twinaphex bd8a7d030e Cleanups 2016-06-30 19:05:55 +02:00
twinaphex 4970aacc68 Remove header 2016-06-30 18:34:59 +02:00
twinaphex 3d27895adf Cleanups 2016-06-30 18:34:11 +02:00
twinaphex 31056286e8 Simplify menu_cbs_ok.c 2016-06-30 18:31:45 +02:00
twinaphex b8f40af467 Simplify generic_action_ok_file_laod 2016-06-30 18:29:27 +02:00
twinaphex 471ffc53fd Refactor menu_content_load_from_playlist 2016-06-30 18:25:19 +02:00
twinaphex 9836b97554 Dehardcode some strings 2016-06-30 17:53:54 +02:00
twinaphex 2119e4559d C89_BUILD fix 2016-06-30 17:43:36 +02:00
twinaphex 82a77279f3 Prevent more null pointer dereferences 2016-06-30 17:40:19 +02:00
twinaphex 01ab13f62c Prevent null pointer dereferences 2016-06-30 17:38:16 +02:00
Alcaro e321d34d08 That should be the last of the new Coverity issues... 2016-06-30 16:10:58 +02:00
Alcaro 10e0411b21 Thanks Coverity, but no, this one cannot be null. 2016-06-30 16:10:58 +02:00
twinaphex 22ac73ba26 Prevent null pointer dereference 2016-06-30 16:10:09 +02:00
twinaphex 9ee55cf7cc Fix performance counter representation 2016-06-30 16:05:41 +02:00
twinaphex ebb75f99fc Get rid of DONT_HAVE_STRING_LIST ifdefs 2016-06-30 07:42:01 +02:00
twinaphex 9fab75c4b5 Cleanups; 80-char width limit 2016-06-30 07:40:25 +02:00
twinaphex f51dfa1de9 Cleanups 2016-06-30 06:11:55 +02:00
twinaphex 21134eb28c Create FILE_PATH_DETECT 2016-06-30 06:07:44 +02:00
twinaphex 0547a71a52 Cleanups 2016-06-30 06:02:30 +02:00
twinaphex fbc83640b6 More translatable strings 2016-06-30 05:58:05 +02:00
twinaphex acd68519de Create MSG_FRAMES 2016-06-30 05:41:53 +02:00
twinaphex e4be1f53a3 Add more translatable strings 2016-06-30 05:35:45 +02:00
twinaphex 52db4d226a Cleanups 2016-06-30 05:28:41 +02:00
twinaphex 4ea5fe4169 Create MSG_ERROR 2016-06-30 05:23:22 +02:00
twinaphex 6756501dac Create FILE_PATH_LUTRO_PLAYLIST 2016-06-30 05:19:25 +02:00
twinaphex e61593d80c Cleanups 2016-06-30 05:16:28 +02:00
twinaphex eb4d8678e9 (XMB) Cleanups 2016-06-30 05:14:12 +02:00
twinaphex 83bafe1b19 Cleanups 2016-06-30 05:04:27 +02:00
twinaphex 543c188da6 Create fill_pathname_join_special_ext 2016-06-30 05:02:45 +02:00
twinaphex 5f71ecc1d1 Create fill_pathname_join_special_ext 2016-06-30 04:59:57 +02:00
twinaphex 5d7367e89a Create vec2_t/vec3_t typedefs 2016-06-29 19:42:41 +02:00
radius a1cf6f29f4 fix map and remove stray printf 2016-06-29 12:23:26 -05:00
radius 24ec6928dc sleep for 4ms 2016-06-29 12:23:25 -05:00
twinaphex 3f8b1d04ed Reuse code 2016-06-29 18:54:40 +02:00
twinaphex 08f26fafbd Create FILE_PATH_OPT_EXTENSION 2016-06-29 18:45:12 +02:00
twinaphex c83477cb62 Create FILE_PATH_REMAP_EXTENSION 2016-06-29 18:43:00 +02:00
twinaphex a301562149 Dehardcode .cfg extension 2016-06-29 18:40:36 +02:00
twinaphex 668b4b5d26 Remove duplicate fill_string_concat 2016-06-29 18:14:42 +02:00
twinaphex 1226c71b98 Use fill_string_concat 2016-06-29 18:14:42 +02:00
Alcaro 2bd3e94e5e Apparently Coverity doesn't like this either. 2016-06-29 18:01:34 +02:00
twinaphex a7e8707f7d Create fill_pathname_join_delim_concat 2016-06-29 17:51:25 +02:00
twinaphex c38c28a0f5 Create fill_pathname_join_concat 2016-06-29 17:46:50 +02:00
twinaphex eafce41a16 menu_setting.c - use fill_string_concat 2016-06-29 17:43:36 +02:00
twinaphex f4ef5e82c2 Create and use fill_string_concat 2016-06-29 17:41:32 +02:00
twinaphex 037633cf33 Cleanups 2016-06-29 17:07:31 +02:00
radius 298b753e41 fix button map 2016-06-29 09:58:27 -05:00
Twinaphex f53783dfe8 Merge pull request #3178 from lakkatv/master
Add .lutro scanning
2016-06-29 16:09:31 +02:00
twinaphex 4168e541c9 Bump up to 1.3.5, but don't yet tag 2016-06-29 15:10:08 +02:00
Jean-André Santoni 0f18ade02a Add .lutro scanning
When a file wih the .lutro extension is found, the ROM is added to Lutro.lpl. The name of the game is the name of the file without the extension.
2016-06-29 15:07:12 +02:00
Twinaphex 900fc57773 Merge pull request #3177 from natinusala/master
(gl_raster_font) Fixed the viewport issue
2016-06-29 14:51:20 +02:00
Nathan S d79da7fc1f (gl_raster_font) Fixed the viewport issue 2016-06-29 14:22:30 +02:00
twinaphex b8ac629fbf Get rid of dereference before null check warning 2016-06-29 12:19:23 +02:00
Twinaphex 397c8acd51 Merge pull request #3175 from lakkatv/master
Add start+select to the list of gamepad combos
2016-06-29 12:14:17 +02:00
twinaphex 3c7dc0a62e Try to silence more Coverity warnings 2016-06-29 12:13:40 +02:00
Jean-André Santoni b409ced5ad Add start+select to the list of gamepad combos 2016-06-29 10:46:07 +02:00
Twinaphex 39778066dd Merge pull request #3174 from sronsse/fixes_for_team
command: Load dummy core on close only if core has not been initialized yet
2016-06-29 09:30:55 +02:00
Sebastien Ronsse 087e26bd2d command: Load dummy core on close only if core has not been initialized yet 2016-06-29 17:24:55 +10:00
radius 88784aa702 retropad cleanups and avoid sending 0s 2016-06-29 02:06:09 -05:00
twinaphex 8d7540c449 Move some variables around 2016-06-29 07:12:54 +02:00
twinaphex 7e55d0da17 (Net retropad) Prefix core option nams 2016-06-29 06:47:42 +02:00
twinaphex 417f3afdb0 retropad_update_input returns a value instead - get rid
of static global
2016-06-29 06:34:16 +02:00
twinaphex 982dd47f01 Translate a bunch of log strings 2016-06-29 03:06:15 +02:00
twinaphex 96bb85fb41 Replace more hardcoded strings 2016-06-29 02:44:27 +02:00
twinaphex 2a9bf91e0d Use MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE 2016-06-29 02:40:05 +02:00
Twinaphex 5d89bf970f Merge pull request #3172 from libretro/revert-3169-master
Revert "(gl_raster) Added fullscreen to restore_viewport"
2016-06-29 02:30:11 +02:00
Twinaphex 08dbbe1a55 Revert "(gl_raster) Added fullscreen to restore_viewport" 2016-06-29 02:30:05 +02:00
Twinaphex d9a33dfe04 Merge pull request #3170 from leiradel/master
honor the tasks 'mute' property again
2016-06-29 02:16:00 +02:00
Andre Leiradella 50f538dc9e honor the tasks 'mute' property again 2016-06-28 17:02:01 -03:00
twinaphex 099be6ed2d Use noext versions of fill_path* functions 2016-06-28 13:13:36 +02:00
twinaphex b593e73896 Use fill_pathname_base_noext 2016-06-28 13:10:34 +02:00
twinaphex 7647c9be59 Add noext versions 2016-06-28 13:08:03 +02:00
twinaphex ca3eecf5c0 Create fill_pathname_join_noext 2016-06-28 13:05:46 +02:00
Twinaphex 51b2e920fe Merge pull request #3169 from natinusala/master
(gl_raster) Added fullscreen to restore_viewport
2016-06-28 12:56:14 +02:00
twinaphex c03e566eba Create filL_short_pathname_representation_noext 2016-06-28 12:49:37 +02:00
twinaphex 0709f2b11b (libretro-common) (file_path.c) Cleanups 2016-06-28 12:43:50 +02:00
twinaphex d94098cca1 Rename menu_file_type to msg_file_type 2016-06-28 12:19:18 +02:00
twinaphex 13dd8e4905 Add translations 2016-06-28 12:08:30 +02:00
Nathan S b0584a950d (gl_raster) Added fullscreen to restore_viewport 2016-06-28 11:56:19 +02:00
twinaphex e75a586ead Can scroll now left/right in System Information 2016-06-28 11:34:17 +02:00
twinaphex 0a0f9cdec3 Add more translatable strings 2016-06-28 11:30:17 +02:00
twinaphex e03a6284d1 Add FILE_PATH_RDB_EXTENSIOn 2016-06-28 11:22:44 +02:00
twinaphex d589dd5d8f Update string 2016-06-28 11:16:08 +02:00
twinaphex fa7eb9d8c8 Create file_path_str FILE_PATH_NUL 2016-06-28 11:10:30 +02:00
twinaphex 5ba74302b2 Cleanups 2016-06-28 11:04:59 +02:00
twinaphex 7a745c3f70 Use string_is_empty 2016-06-28 11:02:51 +02:00
twinaphex 58b95752e8 (task_content.c) Use string_is_empty 2016-06-28 10:50:00 +02:00
twinaphex e162882406 (core_info.c) Use file_path_str 2016-06-28 08:57:01 +02:00
twinaphex 481e7d2f34 (libretro-common) Move STRING_REP_UINT64 to retro_common_api.h 2016-06-28 08:50:22 +02:00
twinaphex 7aff07f6ac (verbosity.c) Cleanups 2016-06-28 08:44:49 +02:00
twinaphex 97fd53cd5f Create more file_path_str enums 2016-06-28 08:42:50 +02:00
twinaphex 342bcebc59 Set current core type almost immediately after loading new core 2016-06-28 07:51:49 +02:00
twinaphex 1661fa552f Revert "Cleanup"
This reverts commit 43426df4f6.
2016-06-28 04:58:29 +02:00
twinaphex 5045a0faff Add optional logging 2016-06-28 04:23:57 +02:00
twinaphex 43426df4f6 Cleanup 2016-06-28 04:21:13 +02:00
twinaphex d600075012 Cleanup 2016-06-28 04:08:36 +02:00
twinaphex 52a9a465df Add file_path_str for Salamander 2016-06-28 03:21:30 +02:00
twinaphex 64c85771b2 Create FILE_PATH_STR extensions 2016-06-28 01:10:58 +02:00
twinaphex 35605f43fa Remove part of comment 2016-06-28 01:02:27 +02:00
twinaphex 24ead80e8b menu_driver_toggle - always set 'flush' 2016-06-28 01:02:04 +02:00
twinaphex 218c9b4487 Add more msg enums 2016-06-28 00:51:47 +02:00
twinaphex 7eefeddea9 Fix preliminary 'Download Core' option when no cores are found 2016-06-28 00:30:20 +02:00
twinaphex 1c1c1fa32c Don't return false for this symbol lookup so that MESA Intel Ivy Bridge Vulkan drivers will still work 2016-06-27 23:57:57 +02:00
Twinaphex 0f1b18d2e5 Merge pull request #3166 from Themaister/master
Vulkan: Create command pool for correct queue family.
2016-06-27 23:44:50 +02:00
twinaphex a24d43c8fd Add GFX_CTX_FLAGS_CUSTOMIZABLE_SWAPCHAIN_IMAGES display flag 2016-06-27 23:43:57 +02:00
Hans-Kristian Arntzen d00ae6b66b Vulkan: Create command pool for correct queue family. 2016-06-27 23:43:26 +02:00
Twinaphex 4d089a7fba Merge pull request #3165 from Ezio-PS/master
Add Italian messages
2016-06-27 22:52:56 +02:00
Ezio-PS 53faa0c92d Add missing encoding checkers 2016-06-27 22:50:56 +02:00
Alcaro d431f77960 Add missing encoding checkers 2016-06-27 22:46:33 +02:00
Ezio-PS 2cc765b27c fix typo 2016-06-27 22:20:27 +02:00
Ezio-PS 7bca682549 Add Italian messages 2016-06-27 22:16:25 +02:00
twinaphex 9574a929bc Use builtin headers 2016-06-27 22:05:07 +02:00
Twinaphex 030841756b Merge pull request #3164 from Themaister/master
Revert incorrect submodule revert.
2016-06-27 21:58:44 +02:00
Hans-Kristian Arntzen 90e8bb3f52 Revert incorrect submodule revert.
Commit 996f9a59b7 randomly
decided to change submodules back.
2016-06-27 21:55:23 +02:00
Alcaro 792008d558 apparently 0 isn't O. I've been lied to for years. 2016-06-27 21:44:14 +02:00
Alcaro 996f9a59b7 Whoops, apparently this one is shared the ugly way... 2016-06-27 21:36:59 +02:00
Alcaro 18978c5f01 More Coverity cleanups 2016-06-27 21:34:21 +02:00
twinaphex b40c31384e Can scroll left/right now at FILE_TYPE_DOWNLOAD_URL settings 2016-06-27 21:29:38 +02:00
Alcaro 5b388d8c92 Fix some Coverity errors 2016-06-27 21:16:49 +02:00
Twinaphex 2a860abcfd Merge pull request #3163 from Themaister/master
Vulkan: Add async compute test core
2016-06-27 21:06:31 +02:00
Hans-Kristian Arntzen c80127d29d Vulkan: Hook up async compute test more properly.
Supports multiple queues and queues from different families.
2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 4abb0ef331 Vulkan: Cache destroy device callback. 2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 58703de05c Vulkan: Add initial async compute.
Still not really async. Need to use multiple queues.
2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 6841b5ad00 Vulkan: Keep dylib around if caching instance. 2016-06-27 20:54:53 +02:00
Hans-Kristian Arntzen 4729ec9e1b Add support for signalling semaphores from frontend.
Useful for conserving framebuffer memory.
2016-06-27 20:54:53 +02:00
twinaphex 36c235556a Fix some coverity warnings 2016-06-27 20:54:05 +02:00
twinaphex 097b02a8a1 Add compilation of vector_2/vector_3 2016-06-27 10:56:30 +02:00
twinaphex aefcca125a Fix TGA color conversion 2016-06-27 09:23:01 +02:00
Twinaphex 21bb5331f9 Merge pull request #3161 from sronsse/fixes_for_team
image transfer: Add TGA support to image_transfer_new function
2016-06-27 09:19:52 +02:00
Sebastien Ronsse 62b1c5a7af image transfer: Add TGA support to image_transfer_new function 2016-06-27 17:17:35 +10:00
twinaphex a51a259e58 Add STRING_REP_INT64 2016-06-27 08:24:28 +02:00
twinaphex 728249fa61 Add more strings 2016-06-27 08:19:39 +02:00
twinaphex f5bfbdeebe Rewrite strcpy usage 2016-06-27 08:09:34 +02:00
twinaphex 946de514dc Don't use strcpy 2016-06-27 08:07:19 +02:00
twinaphex d411bfa5de (cheevos.c) Cleanup 2016-06-27 08:05:33 +02:00
twinaphex 6e3d3d94d4 Cleanups 2016-06-27 08:04:20 +02:00
twinaphex 582bd50719 (cheevos.c) Cleanup 2016-06-27 08:00:49 +02:00
twinaphex 07ce0eabd9 Cleanup 2016-06-27 07:57:14 +02:00
twinaphex 5dd4c88011 Cleanup 2016-06-27 07:55:32 +02:00
twinaphex 5a77baf185 verbosity.c - cleanups 2016-06-27 07:52:48 +02:00
twinaphex fd5d19eaab Cleanup 2016-06-27 07:48:37 +02:00
twinaphex a6a0960f77 Cleanup 2016-06-27 07:48:22 +02:00
twinaphex 4ddeda2511 Add additions to file_path_str 2016-06-27 07:47:15 +02:00
twinaphex d6975325d9 Create more menu message string translations 2016-06-27 07:28:07 +02:00
twinaphex f017c64220 Add FILE_PATH_CORE_INFO_EXTENSION 2016-06-27 07:18:02 +02:00
twinaphex 3cd76a6849 Cleanup 2016-06-27 07:02:22 +02:00
Twinaphex a68a33c559 Remove unused variable 2016-06-27 06:43:47 +02:00
twinaphex 280ea0535f (OSX) Bake in HAVE_NETWORKGAMEPAD 2016-06-27 06:42:03 +02:00
twinaphex b990f34054 (iOS) Add network gamepad 2016-06-27 06:40:25 +02:00
twinaphex 465ac5707c Add HAVE_NETWORKGAMEPAD 2016-06-27 06:38:47 +02:00
twinaphex 05fb0a1eeb Push Quick Menu for net retropad core 2016-06-27 06:27:57 +02:00
Twinaphex 22331b5821 Merge pull request #3160 from sronsse/fixes_for_team
retroarch: Fix core type detection when cores are excplicitely set
2016-06-27 06:22:05 +02:00
Sebastien Ronsse 95ad02e742 retroarch: Fix core type detection when cores are excplicitely set 2016-06-27 14:13:09 +10:00
twinaphex eea287d156 (BTStack HID) Create HAVE_DYNAMIC ifdefs 2016-06-27 01:11:49 +02:00
twinaphex 1a60d257ee Remove menu_driver_toggle_binds 2016-06-27 00:46:05 +02:00
twinaphex 3a4a00ffe6 Comment this out for now until it works without breaking hotkey binds 2016-06-27 00:05:59 +02:00
twinaphex 7b460c14b7 Create menu_driver_toggle_binds 2016-06-26 22:50:00 +02:00
twinaphex 00ff63e0bb Add NEED_CXX_LINKER 2016-06-26 21:26:21 +02:00
Twinaphex 3b9b54ba2d Merge pull request #3156 from Themaister/master
Vulkan: Replace handcoded symbol loader
2016-06-26 18:06:39 +02:00
Hans-Kristian Arntzen 54c1759f45 Vulkan: Make a more general purpose symbol loader.
Avoids painful manual loading and wrapping function pointers everywhere
...

Reusable for cores, so move to libretro-common.
Also update built-in Vulkan headers.
2016-06-26 13:10:58 +02:00
twinaphex 7330f96946 Cleanup 2016-06-26 11:08:38 +02:00
Hans-Kristian Arntzen 1da2e2dbab Vulkan: Hook up negotiation interface device creation. 2016-06-26 10:40:07 +02:00
Twinaphex 178b479072 Prevent crash at exit due to dereference of pointer 2016-06-26 10:39:27 +02:00
twinaphex f6bbe69096 Use string_is_empty 2016-06-26 10:33:46 +02:00
twinaphex 961daf8067 Cleanup 2016-06-26 10:27:44 +02:00
twinaphex 020d7cec0a Cleanup 2016-06-26 10:20:22 +02:00
Twinaphex 88cc0ce8bb Remove unused variables 2016-06-26 10:17:25 +02:00
twinaphex 016983c9eb Add FILE_PATH_RTC_EXTENSION 2016-06-26 10:15:25 +02:00
twinaphex 2dddc3fc88 Add FILE_PATH_LPL_EXTENSION 2016-06-26 10:12:28 +02:00
Hans-Kristian Arntzen 87d36489a1 Vulkan: Update test core shader build to glslc. 2016-06-26 10:03:33 +02:00
twinaphex e9b39cc17f Cleanups 2016-06-26 09:58:10 +02:00
Hans-Kristian Arntzen 6424f8efcf Vulkan: Add get_application_info to Vulkan test core. 2016-06-26 09:57:37 +02:00
twinaphex fcc238d310 Expand file_path_str 2016-06-26 09:56:55 +02:00
twinaphex 251f9021ad (Menu) Implement page up / page down controls 2016-06-26 09:12:40 +02:00
twinaphex f9b535ea91 Create Input Bind Timeout setting 2016-06-26 08:22:40 +02:00
twinaphex 9a5b13cccf Remove menu_block_main_input 2016-06-26 08:13:22 +02:00
twinaphex 9f8b57baca Remove PENDING_ACTION code - not used 2016-06-26 08:05:42 +02:00
twinaphex e91136017e Create retro_keybinds_menu - and change settings binds to this
when we toggle the menu
2016-06-26 08:02:29 +02:00
twinaphex 0d3955196d Take out crappy hacks - if users want this they will just have to change
the default keybinds then
2016-06-26 07:50:16 +02:00
Hans-Kristian Arntzen 10a6d7a458 Vulkan: Begin hooking up negotiation interface. 2016-06-25 21:01:36 +02:00
Twinaphex 6ab368811f Merge pull request #3152 from FIX94/master
some small code corrections for the video settings
2016-06-25 17:19:24 +02:00
Twinaphex c794d89bcf Merge pull request #3151 from Themaister/master
Vulkan maintenance and bug fixes.
2016-06-25 17:18:44 +02:00
FIX94 dc127f1555 fixed a typo in the video settings setup and added back display of the driver specific video settings
(GX) removed a compiler warning
2016-06-25 17:14:31 +02:00
Hans-Kristian Arntzen b013a9c863 Vulkan: Replace prebaked shaders with glslc -mfmt=c.
Far more clean and avoids illegal punning.
2016-06-25 14:55:03 +02:00
Hans-Kristian Arntzen 596cd320c6 Vulkan: Update SPIRV-Cross and glslang. 2016-06-25 14:44:56 +02:00
Hans-Kristian Arntzen 3ee172c410 Fix memory leak with white texture. 2016-06-25 14:25:44 +02:00
Hans-Kristian Arntzen 89a5983c3c Vulkan: Fix descriptor set layout leak. 2016-06-25 14:20:41 +02:00
Hans-Kristian Arntzen 972a5db7ae Vulkan: Fix shader module leak. 2016-06-25 14:06:14 +02:00
Hans-Kristian Arntzen de36f572d1 Vulkan: Fix more validation issues. 2016-06-25 14:01:10 +02:00
Hans-Kristian Arntzen 07880e3f45 Vulkan: Begin hooking up validation layers.
Found lots of regressions due to bad reformatting.
2016-06-25 13:52:33 +02:00
Hans-Kristian Arntzen 2293bce616 Vulkan: Sketch out context negotiation interface. 2016-06-25 12:14:56 +02:00
Hans-Kristian Arntzen d043123f71 Vulkan: Add support for queue transfers in HW rendering. 2016-06-25 11:39:52 +02:00
Hans-Kristian Arntzen 82c7aa0e6f Use max swapchain image setting when creating swapchain. 2016-06-25 09:52:46 +02:00
twinaphex e0114e08ba Add type to retro_input_t 2016-06-25 09:05:56 +02:00
twinaphex 3dff698644 Turn retro_input_t into struct 2016-06-25 09:04:00 +02:00
twinaphex 5b1347a788 Add block main input mechanism 2016-06-25 08:48:39 +02:00
twinaphex b86274aa95 Cleanup 2016-06-25 07:41:10 +02:00
twinaphex 49e8baa61d Use tmp_str variable for config_get_path usage 2016-06-25 07:17:48 +02:00
twinaphex c6e835685f Be prudent with config_get_path 2016-06-25 07:12:37 +02:00
twinaphex 65ecec9391 Use sting_is_empty 2016-06-25 02:30:54 +02:00
twinaphex f0f9847647 (Android) Warning fixes 2016-06-25 00:20:24 +02:00
twinaphex 485d646e90 Revert "(Roar) Add is_paused variable"
This reverts commit 3e0184201e.
2016-06-25 00:13:23 +02:00
twinaphex 3e0184201e (Roar) Add is_paused variable 2016-06-25 00:12:52 +02:00
Alcaro 4ae6cda6b1 Fix #3147 2016-06-24 23:59:55 +02:00
Twinaphex fcb324e272 Merge pull request #3146 from FIX94/master
corrected core info removal
2016-06-24 23:34:24 +02:00
FIX94 528b2b9b00 only remove core info on close content if the current platform is either dynamic or can fork to other cores, would get stuck on no core otherwise 2016-06-24 20:10:11 +02:00
Twinaphex 3afd1c1e07 Merge pull request #3144 from FIX94/master
corrected a switch case, makes ngc build (and probably others) boot up again
2016-06-24 18:11:12 +02:00
FIX94 3f7ca00e6d corrected a switch case, makes ngc build (and probably others) boot up again 2016-06-24 18:03:51 +02:00
Twinaphex 55f2019517 Merge pull request #3142 from rz5/patch-1
Update msg_hash_us.c
2016-06-23 20:29:04 +02:00
rz5 d8d0fdd11f Update msg_hash_us.c
rafiki on IRC spotted this bug. I initially edited this string while creating the feature and never returned to it since. We have now found each other and we lived happily ever after.
2016-06-23 18:55:13 +01:00
twinaphex b434f0863a CXX_BUILD buildfix 2016-06-23 07:44:56 +02:00
twinaphex a6bfc6240f C89_BUILD fixes 2016-06-23 07:40:51 +02:00
twinaphex dee7533d65 (libretro-common) Start creating STRING_REP_ULONG 2016-06-23 07:37:02 +02:00
twinaphex f177d22007 (Cheevos) Try to prevent message issue 2016-06-23 07:26:33 +02:00
twinaphex 9d6086813b Use RARCH_LOG 2016-06-23 07:23:17 +02:00
twinaphex 197ce259f1 Remove internal_buffer 2016-06-23 03:47:10 +02:00
Twinaphex 11819e2d47 Merge pull request #3098 from rz5/master
Reworked Undo options
2016-06-23 03:45:26 +02:00
Arzed Five 1f028395d2 Merge remote-tracking branch 'upstream/master' 2016-06-22 22:40:17 +01:00
twinaphex 549bc8dc5e get_mem_used should now report more accurate values 2016-06-22 23:32:11 +02:00
Twinaphex 1e91689919 (iOS) Fix FPS reporting 2016-06-22 17:42:32 +02:00
Twinaphex 4b96bfe46e (iOS) Buildfix 2016-06-22 17:19:01 +02:00
twinaphex 02ad99048d Get rid of menu_entry_go_back 2016-06-22 06:55:11 +02:00
twinaphex ee9cb593c5 Fix mouse back button by calling into MENU_ACTION_CANCEL action 2016-06-22 06:51:46 +02:00
twinaphex f5fcd45a3f Fix touch back button code 2016-06-22 06:48:35 +02:00
twinaphex 735dc822ca Refactor some code - use menu_entry_go_back 2016-06-22 01:26:19 +02:00
twinaphex 8a8fadc5b2 Implement max swapchain images setting, implement it first for DRM/KMS context 2016-06-21 21:36:58 +02:00
Alcaro ecf88d0114 Test commit 2016-06-21 20:05:42 +02:00
twinaphex 8afdfdf7af Fix header include 2016-06-21 16:59:56 +02:00
Twinaphex e854691e87 Merge pull request #3135 from gouchi/master
libretro_vulkan.h is now in libretro-common include
2016-06-21 16:59:04 +02:00
gouchi 60669c84c9 libretro_vulkan.h is now in libretro-common include 2016-06-21 16:53:25 +02:00
twinaphex f7bd9a7843 HAVE_IMAGEVIEWER no longer has to be excluded for the C89/C90 build 2016-06-21 06:59:31 +02:00
twinaphex 80f2e11799 Imageviewer no longer uses stb_image by default 2016-06-21 06:53:25 +02:00
Twinaphex 712fb03341 Merge pull request #3133 from sronsse/fixes_for_team
image texture: Add length argument to image_transfer_process
2016-06-21 06:44:54 +02:00
Sebastien Ronsse e77599be32 image texture: Add length argument to image_transfer_process 2016-06-21 14:34:34 +10:00
Twinaphex 27070dcb57 Remove unused variables 2016-06-21 06:13:06 +02:00
twinaphex 0f813e1dea Dehardcode MENU_ENUM_LABEL_CB_CORE_CONTENT_DOWNLOAD 2016-06-21 05:21:19 +02:00
twinaphex 97b0211880 Dehardcode CB_CORE_CONTENT_LIST 2016-06-21 05:13:43 +02:00
twinaphex 982330ef86 Use new 'Download Content' option 2016-06-21 04:21:18 +02:00
twinaphex 4eaf718a6e Start preparing download URL code 2016-06-21 04:09:26 +02:00
Twinaphex f423564895 Merge pull request #3132 from sronsse/fixes_for_team
playlist: Fix memory leak due to unallocated playlist entry strings
2016-06-21 03:04:29 +02:00
Sebastien Ronsse 2b3718a86c playlist: Fix memory leak due to unallocated playlist entry strings 2016-06-21 10:53:33 +10:00
twinaphex 2cb1636ea4 Start logging cancel callback 2016-06-21 02:36:56 +02:00
twinaphex ffdf6eae8e Start preparing new 'add content' option 2016-06-21 02:24:10 +02:00
twinaphex 4b91a6b121 More preparatory work 2016-06-21 01:40:55 +02:00
twinaphex 00ec3e7846 Implement debug log warning us of not-implemented enums 2016-06-21 00:58:13 +02:00
twinaphex c14e8ba6ca More work on DOWNLOAD_CORE_CONTENT_DIRS 2016-06-21 00:54:14 +02:00
twinaphex a302d78989 Start adding CORE_CONTENT_DIRS_LIST 2016-06-21 00:46:55 +02:00
twinaphex 4e534fec6f Update GLSM 2016-06-21 00:35:57 +02:00
twinaphex 1bb8ae4a1d Add FILE_PATH_INDEX_DIRS_URL 2016-06-20 23:39:40 +02:00
twinaphex 36db065495 Reorder callbacks 2016-06-20 22:57:11 +02:00
twinaphex 974231ee72 move entries up 2016-06-20 22:51:48 +02:00
twinaphex 20e86afbf2 Cleanup 2016-06-20 22:27:44 +02:00
twinaphex 1fb2144a48 Refactor video_shader_parse_type 2016-06-20 22:17:03 +02:00
twinaphex f9d9070de8 command.c - cleanups 2016-06-20 22:04:59 +02:00
twinaphex 7ca00fafc0 Cleanup 2016-06-20 21:58:19 +02:00
twinaphex 9aa29d9fc5 runloop_check_shader_dir - cleanups 2016-06-20 21:54:06 +02:00
twinaphex c9f047edd3 Dehardcode more strings 2016-06-20 21:47:11 +02:00
twinaphex e3fa9ae5ee Update GLSM 2016-06-20 21:34:26 +02:00
twinaphex e35ecd5eb7 Correct title 2016-06-20 21:32:01 +02:00
twinaphex 10157c302b Dehardcode more strings 2016-06-20 21:29:27 +02:00
twinaphex d9651023c4 Fix action_get_title_input_binds_list 2016-06-20 21:17:28 +02:00
twinaphex 1bdf3d395d (menu_cbs_title.c) Dehardcode strings 2016-06-20 21:13:24 +02:00
twinaphex 6024eda7f9 Add more constant strings 2016-06-20 21:03:54 +02:00
Twinaphex 9bcf3fef44 Cleanup 2016-06-20 19:56:41 +02:00
twinaphex e7821f34ee Use generic_action_ok_file_load 2016-06-20 19:55:59 +02:00
twinaphex 67d98dbbea Use generic_action_ok_file_load 2016-06-20 19:54:04 +02:00
twinaphex 7e067aa000 Cleanups 2016-06-20 18:53:55 +02:00
twinaphex 8a7b73761d Cleanups 2016-06-20 18:48:30 +02:00
twinaphex 35ea096db7 Move hash around 2016-06-20 18:30:45 +02:00
twinaphex e892bf6e8b Add file_path_str.c to PSP Salamander 2016-06-20 18:14:13 +02:00
twinaphex c3eda56561 Move hashes over to msg_hash.c 2016-06-20 17:55:34 +02:00
twinaphex 003f1ba913 (PSP) Buildfix 2016-06-20 17:49:20 +02:00
twinaphex 68bf755fe7 Remove two unused hashes 2016-06-20 16:19:30 +02:00
twinaphex 07c218ad51 Remove two hashes 2016-06-20 16:18:04 +02:00
twinaphex d2c9c280fe No longer use CB_ hashes 2016-06-20 16:14:59 +02:00
twinaphex c2c59e8e16 Buildfix for consoles 2016-06-20 16:02:06 +02:00
twinaphex 9fafac8b60 Move hashes to C file 2016-06-20 15:53:57 +02:00
twinaphex a585017208 Rename MENU_FILE_ to FILE_TYPE_ 2016-06-20 15:50:37 +02:00
twinaphex f22755f31b Move enums around 2016-06-20 15:42:05 +02:00
twinaphex 450e1f4746 Rename menu_hash_to_file_type 2016-06-20 15:33:22 +02:00
twinaphex e59fb6c0d9 Bugfix 2016-06-20 15:22:31 +02:00
twinaphex 7d3780e09f Refactor some code in task_push_decompress 2016-06-20 15:21:42 +02:00
twinaphex 7d93f63e6a Move menu_hash_to_file_type to msg_hash 2016-06-20 06:44:05 +02:00
twinaphex 2ebd6e6f49 Header cleanups 2016-06-20 06:34:30 +02:00
twinaphex 4622d46ad3 Should silence Clang warning 2016-06-20 06:25:08 +02:00
twinaphex fa08613637 Indenting nits 2016-06-20 06:21:12 +02:00
twinaphex 390a7d76c6 (task_queue/RetroArch) Add ugly kludge so that we print progress 2016-06-20 06:16:46 +02:00
twinaphex 560f8dda60 Remove tasks_internal.c - no longer needed 2016-06-20 06:02:50 +02:00
twinaphex d2eeb6fab0 Create FILE_PATH_CORE_OPTIONS_CONFIG 2016-06-20 05:29:53 +02:00
twinaphex 35b078857d Create file_path_str.c 2016-06-20 05:20:14 +02:00
twinaphex b3188195a8 Create file_path_str 2016-06-20 05:11:01 +02:00
twinaphex c448beafa8 indent nits 2016-06-20 05:03:41 +02:00
twinaphex f764980eb8 Indenting nits 2016-06-20 04:51:36 +02:00
twinaphex ef4753dc05 Indenting nits 2016-06-20 04:41:43 +02:00
twinaphex 32c4f74f7d More translatable strings 2016-06-20 04:23:00 +02:00
twinaphex 59b8b3b9ed Add more translatable strings 2016-06-20 04:17:03 +02:00
twinaphex 3bf5a89901 Add more translatable strings 2016-06-20 04:07:49 +02:00
twinaphex cfd7b9c6c1 Add more translatable strings 2016-06-20 04:01:58 +02:00
twinaphex 46cdea48c2 Add more translatable strings 2016-06-20 03:54:42 +02:00
twinaphex e064207a59 Add missing files 2016-06-20 03:36:25 +02:00
twinaphex 284f8cfd23 Remove menu_hash_ files 2016-06-20 03:35:09 +02:00
twinaphex 69c82da160 (menu_hash) Prevent dereferences when settings is NULL 2016-06-20 03:10:26 +02:00
twinaphex 75b9a1312d (ui_win32.c) Buildfix 2016-06-20 02:46:25 +02:00
twinaphex 114cc081aa Avoid warning 'variable may be used uninitialized' 2016-06-20 02:45:07 +02:00
twinaphex 1fa36689d8 Remove hashes 2016-06-20 02:07:56 +02:00
twinaphex dce009ae78 Remove more hashes 2016-06-20 02:01:03 +02:00
twinaphex f442d8235f Remove more hashes 2016-06-20 01:54:54 +02:00
twinaphex f69f57c566 Get rid of more hashes 2016-06-20 01:49:22 +02:00
Twinaphex ed75a83e6a Remove unused variable 2016-06-20 01:30:12 +02:00
twinaphex 5075712cac Get rid of menu_hash_calculate - use msg_hash_calculate instead 2016-06-20 00:37:38 +02:00
twinaphex 65dff0a03a menu_hash_to_str_enum has now become msg_hash_to_str 2016-06-20 00:31:13 +02:00
twinaphex a741dadf20 Prevent dereference before null check 2016-06-19 23:09:19 +02:00
Alcaro 77d0745f38 Kill some warnings 2016-06-19 22:43:52 +02:00
twinaphex 43c25383e3 Take out CXX_BUILD for now - prevents compilation 2016-06-19 22:39:35 +02:00
twinaphex 462dda944c (menu_cbs_ok.c) Try to fix second memory leak 2016-06-19 22:30:57 +02:00
twinaphex 8644e8e26b (menu/cbs/menu_cbs_ok.c) Try to fix memory leak 2016-06-19 22:28:55 +02:00
twinaphex 096ca1851b Silence unitialized scalar variable 2016-06-19 22:24:16 +02:00
Alcaro 90dd86a66a Fix #3129 again 2016-06-19 22:09:52 +02:00
Alcaro 6949cfde68 C++ use means we use the C++ linker. Fixes #3129 2016-06-19 21:41:00 +02:00
twinaphex 31c1f31299 Improve MENU_NAVIGATION_CTL_ASCEND_ALPHABET - can no longer
get out of bounds, will now properly scroll down to end of
list if it can not jump alphabetically to the next letter and
there is still space to go to the end of the list
2016-06-19 00:25:52 +02:00
twinaphex b82f4daae9 Reimplement frontend_linux_get_mem_used 2016-06-19 00:15:04 +02:00
twinaphex 0d9b345ae0 Simplify frontend_linux_get_mem_total - get_mem_used still
wrong
2016-06-19 00:08:16 +02:00
twinaphex df57b3062a Correct frontend_linux_get_mem_total 2016-06-18 23:45:43 +02:00
Twinaphex 6c045ab24e Merge pull request #3127 from libretro/revert-3126-fix-snprintf-overlap
Revert "Fix overlap of source and destination buffers in snprintf call"
2016-06-18 23:14:28 +02:00
Twinaphex a52e55e909 Revert "Fix overlap of source and destination buffers in snprintf call" 2016-06-18 23:14:22 +02:00
Twinaphex d0697236f0 Merge pull request #3126 from nikola-kocic/fix-snprintf-overlap
Fix overlap of source and destination buffers in snprintf call
2016-06-18 23:14:07 +02:00
Nikola Kocić ebfb7652b0 Fix overlap of source and destination buffers in snprintf call 2016-06-18 22:53:49 +02:00
twinaphex b510b2fe26 Add menu_setting_get_enum_idx 2016-06-18 22:45:32 +02:00
twinaphex 442ebf2acf Create separate 'Core settings' 2016-06-18 22:17:50 +02:00
Twinaphex f4772f07f3 Buildfix to features_cpu.h 2016-06-18 19:42:04 +02:00
twinaphex 761ddc6f9c Cleanup 2016-06-18 19:31:25 +02:00
twinaphex 3a031c3b48 Cleanup 2016-06-18 19:07:51 +02:00
twinaphex 01f5d854e3 Cleanups 2016-06-18 19:02:51 +02:00
twinaphex cb848b9711 Remove unused variable 2016-06-18 18:46:43 +02:00
twinaphex b55c17e7c5 Cleanups 2016-06-18 18:45:11 +02:00
twinaphex 3b0983cf97 Create MENU_ENUM_LABEL_CB_MENU_WALLPAPER 2016-06-18 18:41:18 +02:00
twinaphex 3573050d28 Cleanups 2016-06-18 18:38:46 +02:00
twinaphex de8d2f2417 Remove a ton of callback string hashes 2016-06-18 18:30:50 +02:00
twinaphex 94cbeb754e Rewrite online updater code to no longer use hashes 2016-06-18 18:29:55 +02:00
twinaphex 94325f9466 Refactor action_ok_download_generic 2016-06-18 18:23:09 +02:00
twinaphex 7841427848 Add cb enums 2016-06-18 17:37:52 +02:00
twinaphex 7ef67f5a0f move hashes to menu_hash.h 2016-06-18 17:29:36 +02:00
twinaphex 177d1852b8 Add labels 2016-06-18 17:27:34 +02:00
twinaphex db7258d682 Move enums around 2016-06-18 17:24:15 +02:00
twinaphex 89b0b62429 Cleanups 2016-06-18 17:19:30 +02:00
twinaphex f207b1be2b Cleanups 2016-06-18 17:16:14 +02:00
twinaphex 2de1857ca6 Cleanups 2016-06-18 17:14:01 +02:00
twinaphex a77a8e0200 Remove hashes 2016-06-18 17:05:53 +02:00
twinaphex ab57f4b400 Cleanups 2016-06-18 17:03:52 +02:00
twinaphex 86b54d66ac Remove hashes 2016-06-18 16:59:42 +02:00
twinaphex 1c2548062f Remove more hashes 2016-06-18 16:55:02 +02:00
twinaphex b9b4c09212 Remove hashes 2016-06-18 16:54:06 +02:00
twinaphex 381ff665cd Remove hashes 2016-06-18 16:52:11 +02:00
twinaphex 40a73b3265 Cleanups 2016-06-18 16:50:03 +02:00
twinaphex 3c755d7cff Remove hash 2016-06-18 16:45:48 +02:00
twinaphex bcaebd2b76 Backport lollo78 Italian translation updates 2016-06-18 16:43:18 +02:00
twinaphex 05b64b8081 Move enums around 2016-06-18 16:05:46 +02:00
twinaphex 5429d3874c Cleanups 2016-06-18 15:56:26 +02:00
twinaphex c6f1fdb552 Reorganize enums 2016-06-18 15:53:50 +02:00
twinaphex 10bdcbff17 Order enums and hashes around 2016-06-18 15:44:53 +02:00
twinaphex 66ed9f46f0 Move hashes around 2016-06-18 15:17:46 +02:00
twinaphex 2a01112406 Remove hashes 2016-06-18 15:13:02 +02:00
twinaphex 02f8ba9393 Remove hashes 2016-06-18 15:11:47 +02:00
twinaphex 8556a4c5f0 Remove hashes 2016-06-18 15:04:22 +02:00
twinaphex 0845852806 remove hash 2016-06-18 15:00:51 +02:00
twinaphex a6ececc063 Remove hashes 2016-06-18 14:59:27 +02:00
twinaphex 57fd346492 Get rid of hash #2 2016-06-18 14:57:51 +02:00
twinaphex 6d79f1bab9 Get rid of hash 2016-06-18 14:57:27 +02:00
twinaphex 40476efc59 Cleanups 2016-06-18 14:47:23 +02:00
twinaphex ab5b90d3cd Cleanups 2016-06-18 14:46:32 +02:00
twinaphex c82387c747 Cleanups 2016-06-18 14:45:47 +02:00
Twinaphex bfd30161de Merge pull request #3124 from lakkatv/master
(Menu) Better key binding for the arcade joypad typing
2016-06-18 14:43:43 +02:00
Jean-André Santoni 49c4f45dc4 (Menu) Better key binding for the arcade joypad typing 2016-06-18 14:30:34 +02:00
Twinaphex c025f7a8c8 Merge pull request #3123 from lakkatv/master
(Menu) arcade like joypad typing
2016-06-18 12:30:16 +02:00
Jean-André Santoni 204f5cddfc (Menu) Update french translation 2016-06-18 11:55:43 +02:00
Jean-André Santoni f0ec4ea7de (Menu) arcade like joypad typing 2016-06-18 11:11:55 +02:00
twinaphex cb2d93b8fb Cleanup 2016-06-18 04:41:13 +02:00
twinaphex b5c63869ee CLeanups 2016-06-18 04:39:33 +02:00
twinaphex 8a06bd4104 Cleanups 2016-06-18 04:37:01 +02:00
twinaphex f28f364ec3 Cleanups 2016-06-18 04:35:31 +02:00
twinaphex 8ac995197a Cleanups 2016-06-18 04:33:44 +02:00
twinaphex 9c085512eb Remove dead hash 2016-06-18 04:23:26 +02:00
twinaphex ba94acc631 Cleanups 2016-06-18 04:22:03 +02:00
twinaphex 9feffb4f89 Remove dead hashes 2016-06-18 04:20:59 +02:00
twinaphex 1be6453450 Cleanups 2016-06-18 04:19:33 +02:00
twinaphex 766ad7fe3e Remove more dead code 2016-06-18 04:18:30 +02:00
twinaphex 1186cf645e Remove hashes 2016-06-18 04:17:30 +02:00
twinaphex 433186c2b0 Remove hashes 2016-06-18 04:15:21 +02:00
twinaphex 4b8ca83567 Remove hash 2016-06-18 04:15:01 +02:00
twinaphex 51356fb293 Cleanups 2016-06-18 04:12:56 +02:00
twinaphex 5b849a82b0 Remove hash 2016-06-18 04:11:08 +02:00
twinaphex 28538b95a7 Use MENU_ENUM_LABEL_CONTENT_ACTIONS 2016-06-18 04:09:07 +02:00
twinaphex 054781c3f3 Cleanups 2016-06-18 04:06:32 +02:00
twinaphex 7e675b4f8a Cleanups 2016-06-18 03:51:54 +02:00
twinaphex 3ee6a64b8c Remove hash 2016-06-18 03:28:26 +02:00
twinaphex 66c09aa7e8 Cleanup labels 2016-06-18 03:26:22 +02:00
twinaphex 87b9e1310d Remove MENU_LABEL_VALUE_* 2016-06-18 03:13:23 +02:00
twinaphex 04d46957cc Fix core updater list 2016-06-18 03:12:32 +02:00
twinaphex 63a4bea997 Remove hash 2016-06-18 03:06:53 +02:00
twinaphex 8e0ad1b1fd Add translatable strings 2016-06-18 03:05:44 +02:00
Twinaphex 69c148f9a3 Merge pull request #3119 from fr500/master
android platform driver improvements
2016-06-18 02:45:43 +02:00
twinaphex 6831b51649 Remove hashes 2016-06-18 02:40:02 +02:00
twinaphex 3328d88c68 Remove hashes 2016-06-18 02:30:12 +02:00
twinaphex 8c75bc7618 Cleanups 2016-06-18 02:20:13 +02:00
twinaphex 9456f05991 Move menu hashes to menu_hash.h 2016-06-18 02:13:28 +02:00
twinaphex 7297ced92a Set menu_displaylist_info_t's enum_idx 2016-06-17 23:47:23 +02:00
twinaphex f76e7549ce Move more code over to menu_hash_to_file_type 2016-06-17 23:27:17 +02:00
twinaphex 14b0b75fe9 Move more code over to menu_hash_to_file_type 2016-06-17 23:24:15 +02:00
twinaphex 99f1d6123e Create menu_hash_to_file_type 2016-06-17 23:16:59 +02:00
twinaphex e122fd95dd Fix savestate options 2016-06-17 22:36:13 +02:00
twinaphex c25eca9d10 Add another debug log for menu_cbs 2016-06-17 22:23:55 +02:00
twinaphex ff36aa94e5 (Android) Buildfixes 2016-06-17 22:12:06 +02:00
twinaphex 643557d9d6 (menu_cbs_start.c) Remove #if 0 2016-06-17 21:07:02 +02:00
twinaphex ca2c2feda5 Start using entry.enum_idx 2016-06-17 21:05:28 +02:00
twinaphex 60cfc95c1c menu_entry_get - add enum_idx to member struct 2016-06-17 21:03:00 +02:00
twinaphex 4700ff55a1 Start getting rid of MENU_LABEL_ dependencies 2016-06-17 20:58:38 +02:00
twinaphex b3d7a2cb6f Add enum_idx to menu_displaylist_info 2016-06-17 20:53:59 +02:00
twinaphex 79bd87e12a Reduce further dependence on MENU_VALUE_ 2016-06-17 20:50:36 +02:00
twinaphex 41c7d76017 Reduce dependence on MENU_VALUE_ 2016-06-17 20:43:42 +02:00
twinaphex 84e3a8c717 Kill dependence on MENU_VALUE_* values 2016-06-17 20:31:53 +02:00
twinaphex fd40636f76 Don't rely on MAIN_VALUE 2016-06-17 20:27:52 +02:00
twinaphex 7358b598ed Get rid of some dead code 2016-06-17 20:18:46 +02:00
twinaphex bc5194fe6f Remove obsolete code 2016-06-17 20:17:18 +02:00
twinaphex b606d47622 Don't rely on 'value' setting 2016-06-17 20:15:35 +02:00
twinaphex f7f56edffd Make 'Add tab' translatable 2016-06-17 20:11:47 +02:00
twinaphex c480e940ef Add ability to translate Playlists tab 2016-06-17 20:07:00 +02:00
twinaphex 4ef5b42cab Can now translate 'Settings tab' 2016-06-17 20:01:48 +02:00
twinaphex 1acc59b598 We can translate the History Tab label now 2016-06-17 19:57:48 +02:00
twinaphex e3954eda54 Fix titles when Settings / History tab are selected 2016-06-17 19:00:43 +02:00
Alcaro a2947da8ec Fix command_read_ram if core doesn't use the mem map envs. 2016-06-17 18:50:59 +02:00
twinaphex 07b655f03d Add new enum values 2016-06-17 18:26:13 +02:00
twinaphex 0eb847e9b1 We can translate 'Main Menu' now 2016-06-17 18:11:52 +02:00
twinaphex f190d2ebbc Start using MENU_ENUM_LABEL_VALUE_SETTINGS 2016-06-17 18:02:30 +02:00
twinaphex bc8cf99ddd Start using MENU_ENUM_LABEL_MAIN_MENU 2016-06-17 17:59:12 +02:00
twinaphex 8e9adba956 Start not using LABEL_VALUE_ for querying settings groups 2016-06-17 17:55:25 +02:00
twinaphex ee90fa3015 Remove entry 2016-06-17 17:45:42 +02:00
twinaphex a94b2a47f1 Remove #if 0 ifdefs 2016-06-17 17:43:53 +02:00
twinaphex ac26746106 Cleanup 2016-06-17 17:30:10 +02:00
radius 929f26742f respect 80 character limit 2016-06-17 09:43:51 -05:00
radius eb0ea9d738 logger is not available at this stage, use android logging here instead 2016-06-17 09:31:44 -05:00
radius b0932af025 fix internal storage messages 2016-06-17 09:27:39 -05:00
twinaphex 796c06e01e Cleanup 2016-06-17 16:19:48 +02:00
twinaphex 3b3e822d78 Expand menu_entries_get_last_stack so we can grab enum_idx 2016-06-17 16:08:47 +02:00
twinaphex 03b93b224c Fix setting directories/paths 2016-06-17 15:54:31 +02:00
twinaphex e94873727e generic_action_ok - cleanup 2016-06-17 15:36:06 +02:00
Twinaphex a48ea15497 Buildfix #1 2016-06-17 15:33:42 +02:00
twinaphex 13bbf9d18f Cleanups 2016-06-17 15:17:20 +02:00
twinaphex 8357467937 (menu_cbs.c) Turn off debug log 2016-06-17 15:13:50 +02:00
twinaphex 1000c08a7f Get rid of menu_entry_pathdir_set_value 2016-06-17 15:10:49 +02:00
twinaphex 4ec1a9e337 Update menu_entries_prepend 2016-06-17 14:54:29 +02:00
twinaphex b872260bf3 Update menu_entry_pathdir_set_value 2016-06-17 14:34:28 +02:00
twinaphex 96073cf057 Revert "playlist: Fix memory leak due to unallocated playlist entry strings"
This reverts commit 0adee8b775.
2016-06-17 14:24:35 +02:00
Twinaphex eee57a77ad Merge pull request #3117 from sronsse/fixes_for_team
playlist: Fix memory leak due to unallocated playlist entry strings
2016-06-17 13:31:38 +02:00
Sebastien Ronsse 0adee8b775 playlist: Fix memory leak due to unallocated playlist entry strings 2016-06-17 13:37:46 +10:00
twinaphex 3d784d41d3 Turn back to 0 2016-06-17 04:40:19 +02:00
Twinaphex c3e2052ac3 (OSX) Silence warnings 2016-06-17 04:07:00 +02:00
twinaphex 0305770f4b Create separate video / audio menu code 2016-06-17 04:02:26 +02:00
twinaphex cd35bfaecb Cleanups 2016-06-17 02:52:08 +02:00
twinaphex e01668701f Add enum_idx for main menu 2016-06-17 02:46:17 +02:00
twinaphex 6f405da27d Use menu_hash_to_str_enum for code 2016-06-17 02:37:22 +02:00
twinaphex 59fd4b30d9 Cleanup 2016-06-17 02:34:22 +02:00
twinaphex 7e822f8126 Update 2016-06-17 02:25:27 +02:00
twinaphex 39742dae1f Update GLSM 2016-06-17 02:18:17 +02:00
twinaphex 4676d16f8d CXX_BUILD linker fixes 2016-06-17 01:20:14 +02:00
twinaphex 6131dde4d8 Cleanup 2016-06-17 01:07:52 +02:00
twinaphex 795bdd351b Cleanups 2016-06-17 01:04:54 +02:00
twinaphex d88b6c9921 Cleanup 2016-06-17 00:57:35 +02:00
twinaphex 313e2f12b9 Cleanups 2016-06-17 00:55:39 +02:00
twinaphex 5a9daac855 Cleanups 2016-06-17 00:48:51 +02:00
twinaphex 9d1f35e901 Cleanup 2016-06-17 00:17:14 +02:00
twinaphex 7a1705c4e0 Cleanups 2016-06-17 00:11:16 +02:00
twinaphex 9222aa3cd2 Add more strings 2016-06-16 23:21:51 +02:00
twinaphex b3858c5173 Add extra labels 2016-06-16 22:49:41 +02:00
twinaphex b436200887 It should be possible now to select input settings when user
language is not English
2016-06-16 22:43:45 +02:00
twinaphex 8545a58c41 Refactor input user binds settings 2016-06-16 22:32:27 +02:00
twinaphex f80adc7eba Unroll lists 2016-06-16 22:20:26 +02:00
twinaphex a12ebdaf5b Add PARSE_ONLY_STRING 2016-06-16 22:14:31 +02:00
twinaphex ae2be8b53b Replace most menu_entries_add function calls 2016-06-16 22:03:12 +02:00
twinaphex 844656255c Use menu_entries_add_enum 2016-06-16 21:55:40 +02:00
twinaphex a9ccc00216 Use menu_entries_add_enum 2016-06-16 21:45:11 +02:00
twinaphex a7ced34810 Create title for separate driver settings list 2016-06-16 21:42:31 +02:00
twinaphex fef0d968cd Create DEFERRED_DRIVER_SETTINGS_LIST 2016-06-16 21:40:13 +02:00
twinaphex 8fb7285577 Change to parse_settings_enum 2016-06-16 21:11:38 +02:00
twinaphex 0f37ee5fef Start using enum function 2016-06-16 21:08:49 +02:00
twinaphex 18b5ab2265 Create menu_displaylist_parse_settings_internal_enum 2016-06-16 21:01:55 +02:00
twinaphex 395c601159 Change more menu_entries_add calls into menu_entries_add_enum 2016-06-16 20:43:02 +02:00
twinaphex 697a753ecc Convert more to menu_entries_add_enum 2016-06-16 20:29:44 +02:00
twinaphex 0ab069d9fd Use menu_entries_add_enum 2016-06-16 20:22:53 +02:00
twinaphex bba9610199 Add alternatives for label checking 2016-06-16 20:14:15 +02:00
twinaphex 269faab4ab Update menu_cbs_deferred_push.c 2016-06-16 17:54:06 +02:00
twinaphex 3ecb515307 Update menu_cbs_get_value.c 2016-06-16 17:52:32 +02:00
twinaphex d8e5d9cf42 Start creating code in menu_cbs_ok.c so we will bind action
callbacks depending on enum
2016-06-16 17:50:53 +02:00
twinaphex 2e6b7cf413 Set enum_idx to MENU_ENUM_LABEL_UNKNOWN when using menu_entries_add 2016-06-16 17:41:57 +02:00
twinaphex f56ab959b7 Move fragment_program_blur program to separate file 2016-06-16 17:04:30 +02:00
twinaphex 8e454f7127 Simplify fft_build_params 2016-06-16 16:55:36 +02:00
twinaphex 72355683a3 (GLSM) GLuint64 might not be available depending on which GLES
version we are targeting
2016-06-16 16:34:31 +02:00
twinaphex 4282fd0c21 Cleanups 2016-06-16 16:33:39 +02:00
twinaphex bf708362b4 (XMB/MaterialUI) CLeanups 2016-06-16 16:31:59 +02:00
twinaphex 782f17ec23 Dehardcode some strings 2016-06-16 16:02:16 +02:00
twinaphex 4a552b66ff Use menu_entries_add_enum 2016-06-16 15:43:05 +02:00
twinaphex 64cb4b53df Start using menu_entries_add_enum for cheevos 2016-06-16 15:33:16 +02:00
twinaphex 2d61c6d2ed general_write_handler - use enum_idx and don't use menu_hash_calculate
anymore
2016-06-16 15:00:35 +02:00
twinaphex 992adbc2d4 Rewrite general_read_handler 2016-06-16 14:35:53 +02:00
twinaphex 88112c5732 COrrect typo 2016-06-16 14:30:51 +02:00
twinaphex 63d8020fa0 Remove last remnants of menu_hash_to_str 2016-06-16 13:48:36 +02:00
twinaphex 3320e44329 Get rid of last menu_hash_to_str instance 2016-06-16 13:41:53 +02:00
twinaphex b6972f9926 Cleanup 2016-06-16 13:37:33 +02:00
twinaphex f19d96d3c4 DOn't use MENU_VALUE_DETECT 2016-06-16 13:30:56 +02:00
twinaphex c67c37d641 Get rid of one more menu_hash_to_str instance 2016-06-16 13:28:04 +02:00
twinaphex e2d8a1b961 Use menu_hash_to_str_enum 2016-06-16 13:23:51 +02:00
twinaphex d59f137e69 Use menu_hash_to_str_enum for determining root 2016-06-16 13:18:09 +02:00
twinaphex 2acb04649e Add MENU_ENUM_LABEL_MAIN_MENU 2016-06-16 13:13:43 +02:00
twinaphex 707c56dab3 Start using menu_entries_add_enum 2016-06-16 13:09:35 +02:00
twinaphex 1ae4d9b22a Cleanups 2016-06-16 12:58:52 +02:00
twinaphex fce884775c Use menu_hash_to_str_enum 2016-06-16 12:56:10 +02:00
twinaphex 9b75ec2a77 Use menu_hash_to_str 2016-06-16 12:50:25 +02:00
twinaphex 547e240296 (menu_setting.c) Use menu_hash_to_str_enum for everything but parent_group values now 2016-06-16 12:23:10 +02:00
twinaphex 2afecd8c57 Use menu_hash_to_str_enum 2016-06-16 12:07:49 +02:00
Twinaphex c22c7688a8 Merge pull request #3116 from vanfanel/master
VIDEO/DISPMANX: Make the HW Bilinear Filtering setting work.
2016-06-16 11:38:42 +02:00
vanfanel c097eed755 VIDEO/DISPMANX: Make the HW Bilinear Filtering setting work. 2016-06-16 11:37:02 +02:00
rz5 362f50caf2 Merge pull request #2 from RobLoach/undo
Fix the Merge conflict
2016-06-16 03:42:53 +01:00
Rob Loach 5f41c35190 Merge branch 'master' of github.com:rz5/RetroArch into undo
Conflicts:
	msg_hash.h
2016-06-15 20:33:55 -04:00
twinaphex 4feaeae2a3 Cleanup - use menu_hash_to_str_enum 2016-06-16 02:12:46 +02:00
twinaphex abd1776240 (menu_setting.c) Use menu_hash_to_str_enum 2016-06-16 01:33:11 +02:00
twinaphex e91d9d5637 Don't bake in GLFFT for HAVE_GLES right now 2016-06-16 01:08:11 +02:00
twinaphex f14a97ecf4 Update menu_setting.c 2016-06-16 00:41:58 +02:00
twinaphex 66a116deca Use menu_hash_to_str_enum 2016-06-16 00:29:14 +02:00
twinaphex cfd34334a4 Use menu_hash_to_str_enum 2016-06-16 00:24:19 +02:00
twinaphex a24107b22a Use more menu_hash_to_str_enum 2016-06-16 00:17:46 +02:00
twinaphex 3fac600038 Use menu_hash_to_str_enum 2016-06-16 00:12:51 +02:00
twinaphex d5c2d85fbb Use menu_hash_to_str_enum 2016-06-16 00:10:10 +02:00
twinaphex 65d33f33c9 Buildfix 2016-06-16 00:04:13 +02:00
twinaphex 064aa8f9fa (More) use menu_hash_to_str_enum 2016-06-15 23:50:39 +02:00
twinaphex 6cc02cd400 Use menu_hash_to_str_enum 2016-06-15 23:46:18 +02:00
twinaphex e1316cb7ba Use menu_hash_to_str_enum 2016-06-15 23:43:24 +02:00
twinaphex e92d240f08 Use menu_hash_to_str_enum 2016-06-15 23:39:20 +02:00
twinaphex db679a85f3 (menu/drivers) Use menu_hash_to_str_enum 2016-06-15 23:34:47 +02:00
twinaphex 9aece7b695 Replace more menu_hash_to_str usage 2016-06-15 23:31:05 +02:00
twinaphex c05742c1fc Start using menu_hash_to_str_enum 2016-06-15 23:25:31 +02:00
twinaphex dcbba1a261 Buildfix for enum functions 2016-06-15 23:12:38 +02:00
twinaphex 99d09f779f Create enum function of US pseudo strings 2016-06-15 23:08:19 +02:00
twinaphex 619b8a42e0 Create PT/NL enum functions 2016-06-15 23:05:08 +02:00
twinaphex b0f07a3106 Create IT/FR enum functions 2016-06-15 23:00:18 +02:00
twinaphex 85612fc84f Create menu hash ES enum function 2016-06-15 22:47:30 +02:00
twinaphex 6be45c9392 Create pl enum function 2016-06-15 22:41:23 +02:00
twinaphex 2d55e35201 Create DE/EO enum string functions 2016-06-15 22:38:52 +02:00
twinaphex e3b4a79b1b Indenting nit 2016-06-15 22:29:38 +02:00
twinaphex 455b28eaca Update complex.h 2016-06-15 21:37:03 +02:00
twinaphex 962c52c5ae Move math/complex.h to libretro-common 2016-06-15 21:35:48 +02:00
twinaphex 58dae07212 (GL FFT) Cleanup struct 2016-06-15 21:26:45 +02:00
twinaphex 86e2925cf5 (FFT) Move more shaders to separate files 2016-06-15 21:08:27 +02:00
twinaphex 7e31e71d5b Split up more into files 2016-06-15 20:54:37 +02:00
twinaphex 38ab9c8003 (FFT/GLSL) Start moving shaders to separate files 2016-06-15 20:23:26 +02:00
twinaphex c05f873dff (FFT) Indenting nits 2016-06-15 20:15:21 +02:00
twinaphex 417439ba60 (FFT) Use filters.h from libretro-common 2016-06-15 20:00:01 +02:00
twinaphex c819686ba4 Add FFT for Griffin too 2016-06-15 19:34:23 +02:00
twinaphex 1534ec916b Include GL FFT when GL and ffmpeg builtin core are enabled 2016-06-15 19:32:59 +02:00
twinaphex 69c983a741 Fix libretro-ffmpeg Makefile 2016-06-15 19:21:06 +02:00
twinaphex 2f08e760ff Start adding FFT visualizer for libretro-ffmpeg - unforunately
depends on glm for now and is C++-based, no way around that for now
2016-06-15 19:16:27 +02:00
twinaphex 5ddec4efc2 Create menu_content_load_from_playlist 2016-06-15 18:58:18 +02:00
twinaphex 0e5e45595e Cleanup 2016-06-15 18:55:20 +02:00
twinaphex df9f1585de Simplify menu_content_find_first_core 2016-06-15 18:52:27 +02:00
twinaphex a8042bdc0c Create CONTENT_MODE_LOAD_NOTHING_WITH_NEW_CORE_FROM_MENU 2016-06-15 18:17:01 +02:00
twinaphex 49ceee1206 Rename two callbacks 2016-06-15 18:07:00 +02:00
twinaphex 53e46676f5 Group CONFIG_PATH behavior together 2016-06-15 17:56:15 +02:00
twinaphex f7d3ded79c Start grouping CONFIG_DIR behavior together 2016-06-15 17:52:22 +02:00
twinaphex c6196152e9 Get rid of some unnecessary calls 2016-06-15 17:43:08 +02:00
twinaphex d3d5d80e62 (video_driver.c) Buildfix 2016-06-15 17:40:09 +02:00
twinaphex 5b5cde28ce Add enum setting_flags parameter to CONFIG_BOOL function 2016-06-15 17:38:59 +02:00
twinaphex 61b7d13086 Cleanup to menu_settings_find_internal functions 2016-06-15 17:15:05 +02:00
twinaphex dd04705d25 Turn menu_settings_list_current_add_enum_idx into public scope
function so we can use it in gfx/video_driver.c
2016-06-15 17:13:28 +02:00
Twinaphex 177c96a382 Fix 'value stored to variable 'playlist' is never read' warning 2016-06-15 17:07:10 +02:00
Twinaphex 8e1e20fc5d remove unused variable name 2016-06-15 17:06:20 +02:00
twinaphex f8448dc7f3 Bugfix - should pass exact enum type 2016-06-15 17:04:22 +02:00
twinaphex 8720048b4e menu_entries_prepend - use menu_setting_find_enum if enum_idx
is set
2016-06-15 16:45:27 +02:00
twinaphex 6f3b8c4049 Set cbs->enum_idx when setting a menu entry with menu_entries_add_enum 2016-06-15 16:43:02 +02:00
twinaphex e1002719c0 Use menu_entries_add_enum 2016-06-15 14:59:49 +02:00
twinaphex 3864574541 Remove DISPLAYLIST_SETTING 2016-06-15 14:55:13 +02:00
twinaphex 5f064245c8 xmb_menu_init_list - use menu_entries_add_enum 2016-06-15 14:41:42 +02:00
Twinaphex def3ea9f0a Merge pull request #3113 from vanfanel/master
VIDEO/DISPMANX: Fixed segfault when loading new core and content from…
2016-06-15 14:35:40 +02:00
vanfanel 03dd7d4b51 VIDEO/DISPMANX: Fixed segfault when loading new core and content from RGUI 2016-06-15 14:28:13 +02:00
twinaphex 34d9daf7e3 Start using menu_entries_add_enum for most entries 2016-06-15 14:23:13 +02:00
twinaphex 8adda6e822 Create menu_hash_to_str_us_enum 2016-06-15 13:04:16 +02:00
twinaphex 277e46badc (XMB/MaterialUI) Use DISPLAYLIST_SETTING_ENUM 2016-06-15 10:57:59 +02:00
twinaphex 5435a1ad7d (XMB) Start using DISPLAYLIST_SETTING_ENUM 2016-06-15 01:52:42 +02:00
twinaphex e64b5cc62f Use DISPLAYLIST_SETTING_ENUM 2016-06-15 01:49:34 +02:00
twinaphex ef808b6591 Add DISPLAYLIST_SETTING_ENUM 2016-06-15 01:44:30 +02:00
twinaphex 2071f8eaaf Refactor menu_displaylist_parse_settings 2016-06-15 01:41:31 +02:00
twinaphex 3625158e63 Revert "Create menu_displaylist_parse_settings_enum"
This reverts commit aeffde9b3e.
2016-06-15 01:36:47 +02:00
twinaphex aeffde9b3e Create menu_displaylist_parse_settings_enum 2016-06-15 01:33:43 +02:00
twinaphex 1159ca17ff Start using menu_entries_add_enum 2016-06-15 01:15:37 +02:00
twinaphex fef343ff9e Create menu_setting_find_enum 2016-06-15 01:06:58 +02:00
twinaphex 0ee7eeb450 Cleanup unused variable warning 2016-06-15 00:57:54 +02:00
twinaphex 49a2a61354 (Android) Buildfix 2016-06-15 00:57:09 +02:00
twinaphex fa46693f77 Add enum_idx values 2016-06-15 00:52:15 +02:00
twinaphex 8910e66eb0 Add more enum idxs 2016-06-14 23:47:42 +02:00
twinaphex 91e9b22b02 Add menu_settings_list_current_add_enum_idx 2016-06-14 23:07:10 +02:00
twinaphex 9508730682 Create enum_idx 2016-06-14 23:04:53 +02:00
twinaphex 53dac26509 Get rid of menu_hash_calculate for detecting if a playlist entry
has core_name and core_path set to 'DETECT'
2016-06-14 22:54:43 +02:00
twinaphex 042ebca2ef Create action_ok_playlist_entry_collection 2016-06-14 22:48:25 +02:00
twinaphex 69503880f5 Get rid of menu_hash_calculate dependencies for menu keyboard
callback functions for settings
2016-06-14 22:16:07 +02:00
twinaphex 27ef0cf9c7 Get rid of menu_hash_calculate dependency in find_first_core 2016-06-14 22:11:10 +02:00
twinaphex fcda911a10 Revert "Start breaking up menu_displaylist_push_internal into separate"
This reverts commit 244b147b0c.
2016-06-14 19:09:47 +02:00
twinaphex ca4f719811 Revert "Set callback for action_refresh_playlist"
This reverts commit cb915e2998.
2016-06-14 19:09:37 +02:00
twinaphex cb915e2998 Set callback for action_refresh_playlist 2016-06-14 18:55:24 +02:00
twinaphex 244b147b0c Start breaking up menu_displaylist_push_internal into separate
functions
2016-06-14 18:51:16 +02:00
twinaphex c65fc21bac Add menu-refactor.diff 2016-06-14 17:59:02 +02:00
twinaphex 2bf2131224 Refactor msg_hash 2016-06-14 15:04:49 +02:00
Twinaphex f30aae9c8d Merge pull request #3110 from Themaister/master
Log which present modes are supported.
2016-06-13 22:03:27 +02:00
Hans-Kristian Arntzen 21be54501b Log which present modes are supported. 2016-06-13 22:00:32 +02:00
Twinaphex 118022ae88 Merge pull request #3107 from RobLoach/no-achievement-msg
Remove "This game doesn't feature achievements" message
2016-06-13 20:06:32 +02:00
Twinaphex 6c6cca33a1 Merge pull request #3109 from Themaister/master
Fix various Android Vulkan issues.
2016-06-13 20:05:05 +02:00
Hans-Kristian Arntzen e7b4f4fd4d Fix various Android Vulkan issues.
Was getting bogus swapchain width/height causing weird issues.
Also, create swapchain after swap interval is correctly set.
2016-06-13 19:51:44 +02:00
Rob Loach 9970e9c089 Remove "This game doesn't feature achievements" message 2016-06-13 11:59:11 -04:00
twinaphex 3ca57ddd84 Correct frontend_win32_get_mem_used 2016-06-12 21:51:08 +02:00
Twinaphex c50aa6f088 Merge pull request #3102 from thiolliere/master
resolve deadlink in readme.md
2016-06-12 21:20:08 +02:00
twinaphex 8ddafd0023 Cleanup 2016-06-12 21:00:52 +02:00
twinaphex dae55553b7 Rename memory_free to memory_used 2016-06-12 20:50:03 +02:00
twinaphex 040798cdb9 (GX) Implement get_mem_total/get_mem_free 2016-06-12 20:46:51 +02:00
thiolliere 75cdcf25ad resolve deadlink in readme.md 2016-06-12 20:44:55 +02:00
twinaphex 2b37c92a64 (Win32) Implement get_mem_total/get_mem_free 2016-06-12 20:39:23 +02:00
Twinaphex 3c71f273a1 Merge pull request #3101 from gouchi/master
Add French messages
2016-06-12 20:22:07 +02:00
neville 35b48bca2c (OSX PPC) Buildfix 2016-06-12 19:38:30 +02:00
gouchi e8988e29da Add French messages 2016-06-12 19:35:57 +02:00
Twinaphex b11bfc8a73 Add ui_companion_driver_get_main_window 2016-06-12 19:29:07 +02:00
twinaphex 8431b63235 Exclude this code for OSX PPC for now 2016-06-12 18:52:30 +02:00
Twinaphex a01985273b Implement frontend_darwin_get_mem_free 2016-06-12 18:42:03 +02:00
Twinaphex 19d4498d2c (iOS) Buildfix 2016-06-12 14:17:07 +02:00
twinaphex 6283cb5eef Get rid of warnings 2016-06-12 13:50:29 +02:00
Twinaphex ae894fb015 Implement frontend_darwin_get_mem_total 2016-06-12 13:49:00 +02:00
twinaphex d7c2201385 Show memory information in System Information 2016-06-12 13:20:54 +02:00
twinaphex c3056a0d06 Add free_memory function 2016-06-12 12:45:13 +02:00
twinaphex 9a25826ae9 Create get_mem_free callback 2016-06-12 12:44:28 +02:00
twinaphex f0e05ecbc8 Start adding get_total_mem callback 2016-06-12 02:33:07 +02:00
twinaphex 94545127a6 Ifdef __builtin_ctz to not be used for consoles 2016-06-11 22:21:04 +02:00
twinaphex 0c87175a61 Remove unused variables 2016-06-11 22:19:40 +02:00
twinaphex 7dc6d0f369 Cleanup 2016-06-11 22:00:29 +02:00
twinaphex 6f8b6a22b7 Creat APPLICATION_SPECIAL_DIRECTORY_CONFIG 2016-06-11 21:55:55 +02:00
twinaphex 7c904d47c2 Cleanups 2016-06-11 21:51:28 +02:00
twinaphex 8badf1787d CLeanups 2016-06-11 21:11:57 +02:00
twinaphex 917e3078e9 Cleanups 2016-06-11 21:08:57 +02:00
twinaphex 8990736e66 Cleanups 2016-06-11 20:34:49 +02:00
twinaphex 8cfb5b2922 Cleanups 2016-06-11 20:22:03 +02:00
twinaphex 1e13cb9c69 Cleanups 2016-06-11 20:21:22 +02:00
twinaphex deda6fdf01 Cleanups 2016-06-11 20:16:34 +02:00
twinaphex 3d2cc8b14a Cleanups 2016-06-11 20:11:36 +02:00
twinaphex 5b76402e6b Remove unused variables 2016-06-11 20:03:11 +02:00
twinaphex 7d0cb7c689 More cleanups 2016-06-11 20:01:33 +02:00
twinaphex f3815ed815 Add APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT 2016-06-11 19:57:45 +02:00
twinaphex 5ea923030b Rename functions/enums 2016-06-11 19:55:27 +02:00
twinaphex 538a8d9e18 (XMB) Cleanups 2016-06-11 19:50:44 +02:00
twinaphex c254c69c1a Use fill_pathname_application_path 2016-06-11 19:46:37 +02:00
twinaphex ecb5c1adc0 Cleanups 2016-06-11 19:43:14 +02:00
twinaphex 92bba6e46e (MaterialUI) Use fill_pathname_application_directory 2016-06-11 19:41:26 +02:00
twinaphex 78904911ca Start using fill_pathname_application_directory 2016-06-11 19:37:16 +02:00
twinaphex 6989d60cdc Create fill_pathname_application_directory 2016-06-11 19:21:58 +02:00
Arzed Five 0d3a866356 Corrected a mistake, added some more error checking. 2016-06-11 17:21:09 +01:00
twinaphex 89e3ce381d Make Python optional 2016-06-11 14:09:04 +02:00
Arzed Five 8e20b9e938 Both Undo options now write distinct messages in the OSD when buffers
are empty, when undoing fails and when undoing is successful.

Aside from some TODO/FIXME areas added by this fork, the features in the
fork are now complete.
2016-06-10 20:12:43 +01:00
Arzed Five 8a0b258fcd Merge remote-tracking branch 'upstream/master' 2016-06-10 19:30:03 +01:00
twinaphex cab9e0645c (qt) Add headers 2016-06-10 12:11:28 +02:00
twinaphex e1733697c3 (Qt) window - Start stub-implementing this 2016-06-10 10:22:49 +02:00
twinaphex 43dbbc20e0 (Qt) Add QtWindow class 2016-06-10 10:15:38 +02:00
twinaphex 0f90a3352b Create Qt5 implementation of msg window 2016-06-10 09:47:16 +02:00
twinaphex a66a46ca25 Start implementing ui_qt_application.cpp 2016-06-10 08:38:27 +02:00
twinaphex 6e9a4ef4a0 Revert "use printf here instead"
This reverts commit fec9c0c42b.
2016-06-10 07:54:08 +02:00
radius fec9c0c42b use printf here instead 2016-06-10 00:40:53 -05:00
twinaphex 7fbc9097f6 This can go 2016-06-10 06:17:49 +02:00
radius 53efdc11f0 improve platform driver logging for android 2016-06-09 22:59:36 -05:00
radius 6bd20c5aff try fixing android initialization 2016-06-09 20:02:04 -05:00
radius 490ba62973 log this later 2016-06-09 19:39:57 -05:00
radius 45fa93543c log path too 2016-06-09 19:29:22 -05:00
radius d9ebecb0ea fix indentation 2016-06-09 19:24:36 -05:00
radius 7bab58b4bf use string is empty here too 2016-06-09 19:22:43 -05:00
radius a7ff4da4c5 android platform driver cleanup 2016-06-09 19:21:39 -05:00
twinaphex acf0a74e6d Add ui_qt_application 2016-06-09 20:18:08 +02:00
twinaphex 69f32c3a35 Add qt/ui_qt_window.cpp 2016-06-09 20:11:26 +02:00
twinaphex b4085b6118 Hide Qt wrapper code behind an ifdef - HAVE_QT_WRAPPER, set this to
1 in Makefile.common in order to use it
2016-06-09 19:51:50 +02:00
Arzed Five 83a1d9ac1f Clean up some stuff, add comments, reduce the places where
content_reset_backup_buffers is called, try to make the undo messages
nicer.

* I'm trying to write to differentiate read/write errors from empty
buffer errors. I changed command.c and task_save_state.c so the
content_undo funcs are the ones writting the success messages.

I was told to use runloop_msg_queue_push() to write to the OSD, but that
doesn't seem to be working.
2016-06-09 16:14:40 +01:00
twinaphex c011090ebb ui_application - add initialize 2016-06-09 15:22:03 +02:00
twinaphex f183fab022 (Win32) Cleanups 2016-06-09 12:37:46 +02:00
twinaphex 50a2091cc6 (Win32) Implement browser window 2016-06-09 12:34:39 +02:00
Twinaphex 4481486071 (OSX) openDocument - cleanup 2016-06-09 10:57:02 +02:00
rz5 fa883d62fc Merge pull request #1 from fr500/undo
Undo cleanups
2016-06-09 09:20:29 +01:00
twinaphex e4f25d9984 Add new versions of whitespace trimming functions 2016-06-09 08:01:55 +02:00
radius 4ad2eba602 cleanups 2016-06-08 23:02:19 -05:00
Andrés 035f6ca210 Merge pull request #1 from rz5/master
rz5 implementation of undo
2016-06-08 22:27:21 -05:00
twinaphex a63fcc36aa Remove string functions 2016-06-09 04:35:39 +02:00
Twinaphex 7c92289a96 Buildfix 2016-06-09 03:54:40 +02:00
Arzed Five 9944ec98fd Both undo options print messages now. Undo Load State can now also be
undone ad infinitum. Doing it in succession swaps the current state for
the backed up state.
2016-06-09 00:38:27 +01:00
Arzed Five 8c5238c349 Undo Load State and Undo Save State both seem to be working. 2016-06-08 23:03:49 +01:00
Arzed Five 051cc3fe4d Undo Save State currently seems to be working almost as intended
(missing OSD messages). Undo Load State isn't working yet.
2016-06-08 20:27:54 +01:00
Alcaro b70c5b7529 We're including the ctype headers already, let's use them. 2016-06-08 19:42:09 +02:00
Alcaro 152adc953c Someone forgot something... (why aren't we using normal int here?) 2016-06-08 19:40:57 +02:00
twinaphex a877fc24fb (libretro-common/stdstring) Add string_trim_whitespace_left/string_trim_whitespace_right 2016-06-08 19:12:23 +02:00
Arzed Five 4d529ffbc0 Merge remote-tracking branch 'upstream/master' 2016-06-08 17:07:18 +01:00
Arzed Five c47b58228f Make this compile 2016-06-08 17:07:04 +01:00
twinaphex ac29a2acc2 Free heap variable 2016-06-08 17:56:09 +02:00
Twinaphex 29012aa74f (Cocoa) Cleanups 2016-06-08 17:54:55 +02:00
twinaphex 008e622843 Add capabilities to ui_browser_window_state 2016-06-08 17:53:51 +02:00
Twinaphex 5a746e04c2 (OSX) Refactor document loading code 2016-06-08 17:51:05 +02:00
neville 817b63be99 (OSX) Buildfix for pre-OSX 10.6 2016-06-08 17:39:20 +02:00
Twinaphex 1cd441b125 (Cocoa) Reimplement browser loading code 2016-06-08 17:18:48 +02:00
twinaphex 82ae93e348 Add ui_companion_driver_get_browser_window_ptr 2016-06-08 16:56:45 +02:00
Twinaphex 8088df5f09 Cleanups 2016-06-08 16:39:46 +02:00
Twinaphex 9e5ad14da0 Start implementing untested ui_browser_window_cocoa_open function 2016-06-08 16:11:06 +02:00
twinaphex d9e61e5153 Add missing file 2016-06-08 15:53:59 +02:00
twinaphex 7a3e3ab46b Add to Makefile files 2016-06-08 15:52:58 +02:00
twinaphex 969ef4b88d Add stub browser window implementations for Win32/Cocoa 2016-06-08 15:51:43 +02:00
twinaphex 0e01a3c84b Add ui_browser_window 2016-06-08 15:47:00 +02:00
twinaphex d63442ca3b Implement ui_win32_msg_window 2016-06-08 10:19:37 +02:00
twinaphex 47abc22fe9 ui_win32_window.c needs to become a C++ file for DragAcceptFiles 2016-06-08 10:05:48 +02:00
Twinaphex d178f90cc1 Remove this header 2016-06-08 08:19:06 +02:00
neville f170856374 (OSX) Fixes 2016-06-08 07:41:59 +02:00
twinaphex 0a7bc4d21f Add 'warning' 2016-06-08 07:27:46 +02:00
twinaphex 615fc0432f Free strdup'ed values 2016-06-08 07:24:26 +02:00
twinaphex 047ffe9d30 Remove apple_display_alert 2016-06-08 07:19:19 +02:00
Twinaphex 6cf905508e Reimplement apple_display_alert to use new ui_msg_window implementation 2016-06-08 07:07:10 +02:00
twinaphex 3c7fafe9a3 Create ui_companion_driver_get_msg_window_ptr 2016-06-08 07:02:38 +02:00
Twinaphex aa81c1d82f Start implementing ui_cocoa_msg_window.m 2016-06-08 06:56:42 +02:00
twinaphex 1fc0009cdc ui_msg_window_state - turn title and text into pointers 2016-06-08 06:37:00 +02:00
Twinaphex a6406a57ca Add ui_cocoa_msg_window.m to Cocoa 2016-06-08 06:35:04 +02:00
twinaphex 10a25209da (Msg window) Add backends for Win32/Cocoa 2016-06-08 06:33:15 +02:00
twinaphex a247b16164 Add ui_null_msg_window 2016-06-08 06:29:52 +02:00
twinaphex c35e75a0bd Create ui_msg_window_t 2016-06-08 06:24:15 +02:00
twinaphex 793d0de45c Add ui_message_window_buttons/ui_message_window_response 2016-06-08 06:17:26 +02:00
twinaphex b7d3ed5264 (nk_common.c) Add HAVE_GLSL ifdef 2016-06-08 05:32:45 +02:00
twinaphex 4e91f6fcd0 Use CG macro instead 2016-06-08 05:26:33 +02:00
Twinaphex 710a3fe249 Merge pull request #3090 from fr500/nuklear
[nk] fix nuklear / linux
2016-06-08 02:46:02 +02:00
radius 991ea3c008 [nk] fix nuklear in linux and don't request a core context on windows 2016-06-07 19:40:11 -05:00
Arzed Five 70b1f385e8 Change task_save_state so we save a single state and a single savestate
file in memory, allowing to undo a loadstate/savestate once.
2016-06-07 18:33:01 +01:00
twinaphex 20766147a6 Cleanup 2016-06-07 18:04:07 +02:00
twinaphex 3f44ba59eb Add pending_events function callback 2016-06-07 18:02:37 +02:00
twinaphex dbf59a72bd (ui_win32_application.c) Indenting cleanups 2016-06-07 17:32:37 +02:00
twinaphex f4c3a41f84 (Win32) Implement application process events 2016-06-07 17:28:51 +02:00
Twinaphex ba962d5dda Remove poll_iteration 2016-06-07 17:16:16 +02:00
Twinaphex 02910fd64d (Cocoa) Implement ui_application_process_events 2016-06-07 17:14:57 +02:00
twinaphex c1a321015a Create ui_companion_driver_get_application_ptr 2016-06-07 17:10:27 +02:00
twinaphex 4dded0c76b Change signature of process_events 2016-06-07 17:07:11 +02:00
twinaphex 3aeecc7eb2 Create ui_win32_application.c 2016-06-07 17:03:34 +02:00
Twinaphex 3b16eb1e91 Add (stub) ui_cocoa_application.m 2016-06-07 16:51:25 +02:00
Twinaphex f17b4fba05 Rename ui_cocoa_window.h 2016-06-07 16:47:48 +02:00
twinaphex 07ca97618d Add ui_application_win32 2016-06-07 16:43:25 +02:00
twinaphex ee8277b31c Rename ui_win32_window.h to ui_win32.h 2016-06-07 16:33:55 +02:00
twinaphex febe0a2a1e (UI) Turn some functions static 2016-06-07 16:32:13 +02:00
twinaphex a90bd8cb67 Add ui_null_application.c 2016-06-07 16:31:35 +02:00
twinaphex b83d58cd59 xmb_gradient_ident - don't bake it in when HAVE_SHADERPIPELINE
is not defined
2016-06-07 15:25:00 +02:00
twinaphex cf996f724e Rename HAVE_NETWORK_GAMEPAD to HAVE_NETWORKGAMEPAD - and
don't bake it in for the C89 build
2016-06-07 15:23:07 +02:00
twinaphex afe67ca254 C89/C90 don't support bitfields on uint8_t - work around this 2016-06-07 14:47:54 +02:00
twinaphex f15b722786 Buildfix 2016-06-07 06:35:48 +02:00
twinaphex 9b60b81f70 Buildfixes 2016-06-07 06:28:33 +02:00
twinaphex 180fb9cbff Don't compile in rbmp_encode when HAVE_RBMP is not defined 2016-06-07 06:14:55 +02:00
twinaphex b45824a7a8 Reorder files in Makefile.common 2016-06-07 06:14:28 +02:00
twinaphex 63af59a198 Add HAVE_LANGEXTRA 2016-06-07 06:05:41 +02:00
twinaphex 689b95f2f2 Don't compile in input_hid_driver.c either 2016-06-07 05:39:51 +02:00
twinaphex 175ec67112 Compile in hid_joypad.c only when HAVE_HID is defined 2016-06-07 05:15:22 +02:00
twinaphex b1fe3506d7 Change preprocessor conditional 2016-06-07 04:48:06 +02:00
twinaphex d14444e0fc Include intrin.h header for MSVC 2016-06-07 04:22:21 +02:00
twinaphex 53701a565f Add compat_clz_u16 2016-06-07 04:15:27 +02:00
twinaphex 6fc943228e Create libretro-common/include/compat/intrinsics.h 2016-06-07 04:07:12 +02:00
twinaphex d44062d841 Make HAVE_HID completely optional 2016-06-07 03:01:33 +02:00
Twinaphex d5db2a940a Merge pull request #3083 from fr500/nuklear
[nk] allow picking core and content on demo window
2016-06-07 02:24:16 +02:00
radius afe68b2a62 [nk] allow picking core and content on demo window 2016-06-06 19:22:43 -05:00
twinaphex d240437f6b Update GLSM 2016-06-07 02:18:45 +02:00
twinaphex e3919c9d49 (GLSM) Remove this -unnecessary 2016-06-07 02:09:19 +02:00
Hans-Kristian Arntzen c374c9853d Some potential fixes for Android Vulkan. 2016-06-07 01:43:14 +02:00
twinaphex 14fce400ce Another C89 fix 2016-06-07 00:17:00 +02:00
Twinaphex 23064f0590 Merge pull request #3081 from fr500/nuklear
Nuklear update
2016-06-07 00:03:36 +02:00
twinaphex 52b7a95a2b C89_BUILD fixes 2016-06-07 00:03:07 +02:00
twinaphex 883d9ff6b5 Add HAVE_SHADERPIPELINE define 2016-06-07 00:00:28 +02:00
radius 9777ea933f [nk] move function to nk_menu 2016-06-06 16:44:32 -05:00
radius 8ce0f9cf0a [nk] remove some nk references, fix carriage returns 2016-06-06 16:42:22 -05:00
twinaphex 8bef9743aa Avoid 'function not used' warnings 2016-06-06 23:42:12 +02:00
radius 4dd7bc4f72 [nk] add themes 2016-06-06 16:37:41 -05:00
twinaphex 4b76f88939 Update libretro-common 2016-06-06 21:48:59 +02:00
twinaphex ea5f458fbd Go through function pointer 2016-06-06 08:01:26 +02:00
Twinaphex b78b29cb14 (Cocoa) Turn functions static 2016-06-06 07:40:44 +02:00
Twinaphex c4cea05399 Go through ui_window_t function pointer 2016-06-06 07:39:31 +02:00
twinaphex 77d5de3b4c Create ui_companion_driver_get_window_ptr 2016-06-06 07:35:45 +02:00
Twinaphex 3e3ceba9aa Merge pull request #3079 from fr500/nuklear
implement file selector
2016-06-06 06:14:19 +02:00
radius 5721ce16e9 [nk] implement file selection 2016-06-05 23:00:04 -05:00
radius 7b43376dfb [nk] implement file selection 2016-06-05 22:57:41 -05:00
radius 6009d4a8b6 [nk] implement file selection 2016-06-05 22:56:13 -05:00
radius d8890b486a [nk] implement extension filtering 2016-06-05 22:32:07 -05:00
radius 2667289d45 [nk] implement directory sorting 2016-06-05 22:26:19 -05:00
radius fafb5cc272 [nk] remove windows carriage returns 2016-06-05 22:18:39 -05:00
radius fa3fee12e9 [nk] add initial dir for file picker 2016-06-05 22:18:20 -05:00
Twinaphex 22358d4a92 Merge pull request #3078 from fr500/master
fix windows debug builds
2016-06-06 05:12:46 +02:00
radius ed2177d524 fix windows debug builds 2016-06-05 21:54:37 -05:00
Twinaphex 680aafe8f8 Merge pull request #3077 from aliaspider/master
(VITA) build fix for latest sdk.
2016-06-05 23:03:03 +02:00
aliaspider 5a80bd6b30 (VITA) build fix for latest sdk. 2016-06-05 22:01:25 +01:00
Alcaro 2b338651ab That's not just use after free, it's complete crazy. 2016-06-05 22:50:01 +02:00
twinaphex 1d3d07ad7d Cleanup 2016-06-05 19:39:57 +02:00
twinaphex 7ea0a19a4f Prevent crash 2016-06-05 19:29:55 +02:00
twinaphex 7e2a077bd5 filestream_eof - prevent 'improper usage of negative value' 2016-06-05 19:20:08 +02:00
twinaphex 414ced5901 (libretrodb) Prevent uninitialized scalar variable 2016-06-05 19:18:54 +02:00
twinaphex 6d11f4ab9b Prevent 'logically dead code' warning 2016-06-05 19:09:54 +02:00
twinaphex b110b08b25 command.c - Prevent explicit NULL dereferenced 2016-06-05 19:08:19 +02:00
Twinaphex f77f743403 Merge pull request #3076 from FIX94/master
More GX gamma changes
2016-06-05 19:05:32 +02:00
twinaphex a6175a3989 (menu_cbs_ok.c) Fix explicit NULL dereferenced warnings 2016-06-05 19:04:59 +02:00
twinaphex 693ce8f6e5 (task_content.c) Fix explicit null dereferenced 2016-06-05 19:03:23 +02:00
twinaphex c1f9d7b498 (shader_glsl.c) Fix dereference after null check warnings 2016-06-05 19:02:13 +02:00
FIX94 b80bba2061 (GX) only apply better gamma setting to wii and use old setting on ngc
(GX) show gamma setting in the video options on ngc, was hidden before
2016-06-05 18:57:29 +02:00
twinaphex 553ff7f69f Prevent calling menu_setting_find if 'label' is NULL 2016-06-05 18:41:19 +02:00
twinaphex c61748d2a0 (menu_input.c) Fix 'explicit null dereferenced' 2016-06-05 18:40:09 +02:00
twinaphex 620f541ca1 detect_ps1_game_sub - fix 'resource leak' 2016-06-05 18:32:26 +02:00
twinaphex 5004113ce1 Cleanup 2016-06-05 18:27:31 +02:00
Twinaphex 5f87717295 Merge pull request #3075 from fr500/master
fix savefile bug when launching from the commandline
2016-06-05 18:24:42 +02:00
radius f8274800fb fix savefile bug when launching from the commandline 2016-06-05 11:21:16 -05:00
Twinaphex 52aba3c4d6 Merge pull request #3073 from FIX94/master
(GX) improved video gamma setting by allowing a wider spectrum (0.1 to 3.0)
2016-06-05 18:14:27 +02:00
FIX94 f3d0860483 (GX) improved video gamma setting by allowing a wider spectrum (0.1 to 3.0) 2016-06-05 18:03:39 +02:00
Twinaphex bb0a633296 Merge pull request #3071 from natinusala/master
(gl_raster_font) Fixed scaling for newlines
2016-06-05 16:46:27 +02:00
Nathan S 6889b58270 (gl_raster_font) Fixed scaling for newlines 2016-06-05 14:56:23 +02:00
twinaphex ca6f539ff5 (iOS) Prevent unused variable 'buf' warning 2016-06-05 07:02:44 +02:00
Twinaphex e4d202458a (iOS) Buildfix 2016-06-05 07:01:04 +02:00
twinaphex b87bbc7f98 Use retro_common_api.h 2016-06-05 05:31:55 +02:00
twinaphex 85802e6d5a Prevent defined but not used warnings 2016-06-05 05:25:44 +02:00
Twinaphex b59f7c0276 Merge pull request #3068 from libretro/command-ram
Add support for reading/writing core RAM over the command interface
2016-06-05 03:05:52 +02:00
twinaphex 51c875fdee Cleanup 2016-06-05 03:04:09 +02:00
Twinaphex 96d9a851b1 Merge pull request #3070 from fr500/undo
fix a few message issues with undo operations
2016-06-05 02:58:14 +02:00
radius f80ecf7739 fix a few message issues with undo operations 2016-06-04 19:27:17 -05:00
Twinaphex 86b35c8ff2 Merge pull request #3069 from fr500/undo
Undo savestate/loadstate
2016-06-05 01:19:35 +02:00
radius 20540a8f42 add menu entry for undo save state 2016-06-04 14:34:06 -05:00
radius 93acf0caa9 check if saving undo data was successful 2016-06-04 12:42:45 -05:00
radius 28aafddd91 copy the old save state before making a new savestate 2016-06-04 12:38:55 -05:00
radius aa81de0ca0 fix nit 2016-06-04 12:07:11 -05:00
twinaphex 2f7bc8760c Turn win32_browser into static function 2016-06-04 18:43:03 +02:00
Alcaro e3f594564a Fix segfault if no game is loaded. 2016-06-04 18:26:11 +02:00
twinaphex 757c83ea58 Turn apple_rarch_exited static 2016-06-04 18:10:52 +02:00
twinaphex 242e3d6a9e (ui_cocoa.m) Cleanups 2016-06-04 18:09:40 +02:00
Twinaphex 8e9bb03301 (Cocoa) Rewrite poll_iteration 2016-06-04 18:03:46 +02:00
Alcaro 6484fb0c75 This fits better as an argument. 2016-06-04 17:51:27 +02:00
Alcaro 1a64520a23 Fix some silly copypasta. 2016-06-04 17:46:11 +02:00
Alcaro d845093c7b Add support for reading and writing core RAM over the command interfaces. 2016-06-04 17:41:14 +02:00
Twinaphex 4b0401462f (OSX) Buildfixes 2016-06-04 17:34:01 +02:00
twinaphex cfc3b97808 Use ui_window_win32_focused 2016-06-04 17:30:06 +02:00
twinaphex 4a649695a5 Add prototypes 2016-06-04 17:27:23 +02:00
twinaphex 75781bb256 (Win32) Buildfix 2016-06-04 17:26:14 +02:00
twinaphex fc9954d967 Create window_focused callback 2016-06-04 17:24:46 +02:00
twinaphex b5830de236 Create stub GetForegroundWindow function for Xbox 2016-06-04 17:18:20 +02:00
twinaphex abbd39fc6e Might want to use GetForegroundWindow instead for window focus 2016-06-04 17:17:10 +02:00
twinaphex c63f11f6fd Use ui_window_win32_set_droppable 2016-06-04 08:50:43 +02:00
twinaphex 52d85c50d2 Implement ui_window_win32_set_droppable 2016-06-04 08:48:04 +02:00
Twinaphex bb5107b5fa Don't use ui_cocoa_window_set_droppable for now 2016-06-04 08:45:20 +02:00
twinaphex 47c7330cc8 Add set_droppable 2016-06-04 08:38:38 +02:00
twinaphex 80b194f491 (Cocoa) Cleanups 2016-06-04 08:20:39 +02:00
Twinaphex 37d4dcfac1 (Cocoa) Implement ui_window_cocoa_destroy 2016-06-04 08:16:14 +02:00
Twinaphex deb3efb8db (Cocoa) Implement ui_window_cocoa_set_focused and ui_window_cocoa_set_visible 2016-06-04 08:14:39 +02:00
Twinaphex 860fb1d525 (Cocoa) Implement ui_window_cocoa_set_title 2016-06-04 08:09:55 +02:00
Twinaphex 7a564720fb (Cocoa) Buildfix 2016-06-04 08:00:19 +02:00
Twinaphex 98014f7b66 (Cocoa) Add stub ui_cocoa_window.m 2016-06-04 07:56:28 +02:00
Twinaphex 810447e3ec (file_stream.c) Fix warnings 2016-06-04 07:37:54 +02:00
twinaphex fe0391825b (UI/Win32) Change on_top_checkbox's type 2016-06-04 06:58:00 +02:00
twinaphex f2f38be4e6 Refactor shader_param_ctrl_t 2016-06-04 06:55:29 +02:00
twinaphex e6c7450c53 Turn g_shader_dlg.separator into ui_win32_window type 2016-06-04 06:39:18 +02:00
twinaphex 0ae7bf2a53 Use ui_window_win32 for g_shader_dlg 2016-06-04 06:31:14 +02:00
twinaphex f8901d4e47 Fix initializer 2016-06-04 06:28:35 +02:00
twinaphex f7bcc68cd9 Buildfix 2016-06-04 06:27:49 +02:00
twinaphex 999437f31b Use ui_window_win32_t for g_shader_dlg 2016-06-04 06:27:04 +02:00
twinaphex b4c340ca88 (win32_common.cpp) Cleanup 2016-06-04 06:21:58 +02:00
twinaphex 492818deed (d3d_ctx.cpp) Use set_title function 2016-06-04 06:07:11 +02:00
twinaphex efc8df02f0 Put extern prototype inside ui_win32_window.h header 2016-06-04 06:04:02 +02:00
twinaphex d739e4771e Use set_title function from wgl_ctx.cpp 2016-06-04 06:02:15 +02:00
twinaphex 24688469b0 Buildfix 2016-06-04 05:58:03 +02:00
twinaphex 2d649f5147 Reimplement win32_monitor_from_window 2016-06-04 05:56:46 +02:00
twinaphex f490b2b58a Simplify win32_monitor_from_window 2016-06-04 05:54:33 +02:00
Twinaphex 9dec15767a Merge pull request #3067 from aliaspider/master
(ffmpeg_core.c) passing a format string without the arguments to log_cb
2016-06-04 05:46:18 +02:00
twinaphex 0c3bc35be1 (Win32) Buildfix 2016-06-04 05:45:39 +02:00
twinaphex 745b204a8f Start using ui_window_win32_t 2016-06-04 05:44:06 +02:00
aliaspider 5e5e1e6d50 (ffmpeg_core.c) passing a format string without the arguments to log_cb
can result in a crash.
2016-06-04 04:41:38 +01:00
twinaphex 8093d2f124 Remove this file 2016-06-04 05:41:12 +02:00
twinaphex 94e16e638d Cleanup WndProcCommon 2016-06-04 05:09:58 +02:00
twinaphex 05c4308cac (Win32) Buildfix 2016-06-04 05:05:41 +02:00
twinaphex aedd7fa53e Implement set_visible function callback 2016-06-04 05:04:00 +02:00
twinaphex cd49b89bbf Add set_title function callback to ui_window_t 2016-06-04 04:57:44 +02:00
twinaphex 2f1fb7783d Add set_focused function callback to window 2016-06-04 04:54:12 +02:00
Twinaphex 962cd48dc0 Merge pull request #3066 from mudlord/master
update to dragndrop (tiny nit)
2016-06-04 04:41:39 +02:00
twinaphex 5cf1b4b233 (Win32) Buildfix 2016-06-04 04:39:41 +02:00
twinaphex be08e07a66 ui_window - add destroy function callback 2016-06-04 04:37:37 +02:00
twinaphex bc7e7a26f0 Add ui/drivers/win32_ui_win32_window.h 2016-06-04 04:36:07 +02:00
mudlord d75fc24ad7 update 2016-06-04 12:36:05 +10:00
twinaphex 61e1c13ae6 Create stub window interface 2016-06-04 04:24:54 +02:00
twinaphex 563089558b Implement filestream_getc for PSP/Vita by just calling filestream_read
instead
2016-06-04 03:42:55 +02:00
twinaphex b88db89b89 (Win32) Buildfix 2016-06-04 03:22:31 +02:00
twinaphex 45d6b4a228 Create win32_drag_query_file 2016-06-04 03:20:55 +02:00
twinaphex b7bf13ed1c Update GLSM 2016-06-04 02:35:06 +02:00
twinaphex a759694b97 Add fxp.h 2016-06-03 22:35:12 +02:00
aliaspider e23b39d2b5 (task_database_cue) ps1 scanning: the boot entry isn't always the first
one in SYSTEM.CNF
2016-06-03 20:09:23 +01:00
Twinaphex be96ad0932 Merge pull request #3063 from Alexandre-Garcia/improve_translation_pt
Undoes the translation of the tabs, which is causing problems.
2016-06-03 21:03:09 +02:00
twinaphex d7d5f29c90 (win32_common.cpp) Buildfix 2016-06-03 19:46:09 +02:00
Alexandre Garcia f9098208a0 Undoes the translation of the tabs, which is causing problems in the menu, and adds translation to remote retropad item 2016-06-03 14:33:47 -03:00
Twinaphex cbae4af38a (OSX) Add preliminary drag and drop code 2016-06-03 19:21:37 +02:00
twinaphex d6d757e240 Cleanups 2016-06-03 19:06:24 +02:00
twinaphex 7d30885ab9 Cleanup 2016-06-03 19:02:19 +02:00
twinaphex 8595e4cf75 task_push_content_load_default - cleanups 2016-06-03 18:59:57 +02:00
twinaphex f675c5fdc7 task_push_content_load_default - simplify code a bit 2016-06-03 18:45:09 +02:00
twinaphex 6628da2646 Create CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_COMPANION_UI 2016-06-03 18:43:05 +02:00
aliaspider 748a913a6d (task_database_cue) more ps1 scanning fixes. 2016-06-03 11:36:48 +01:00
aliaspider 87788f0ffb (task_database_cue) ps1 scanning fix. 2016-06-03 10:46:55 +01:00
Twinaphex 4293e14dea Merge pull request #3062 from mudlord/master
updates to dragndrop
2016-06-03 10:31:38 +02:00
mudlord 1ab94a2c9a updates to dragndrop 2016-06-03 18:25:45 +10:00
twinaphex 0b6578f869 Turn file_list_epand_if_needed static 2016-06-03 10:16:40 +02:00
twinaphex 6e86f3ab5b Create file_list_expand_if_needed 2016-06-03 10:15:49 +02:00
twinaphex 7d7a9a2384 Move increment of list to file_list_add 2016-06-03 10:12:35 +02:00
twinaphex 8a6f1be61c Create static function file_list_add 2016-06-03 10:10:19 +02:00
twinaphex 3ef925d692 file_list_append - use memset too 2016-06-03 10:06:48 +02:00
twinaphex 44dc3f70b4 Fix regression in file_list_prepend 2016-06-03 10:05:05 +02:00
twinaphex 0ae2e90783 Buildfix for targets that don't have HAVE_BUFFERED_IO defined 2016-06-03 09:24:34 +02:00
twinaphex 30d3cf8a4e Indenting nits 2016-06-03 08:23:43 +02:00
twinaphex 4cfe09faed Nits 2016-06-03 08:21:56 +02:00
twinaphex 59413e0289 (win32_common.cpp) Cleanups/get rid of warning 2016-06-03 08:20:36 +02:00
twinaphex 01390f8ceb Use retro_common_api.h 2016-06-03 08:06:49 +02:00
Twinaphex 1aef6ddbc8 Merge pull request #3058 from mudlord/master
Updates to drag and drop:
2016-06-03 08:04:10 +02:00
mudlord bcf636283b Updates to drag and drop:
* Now recognises old core used, if compatible.
* If not compatible, compatibile cores are scanned and used.
* Different compatible cores are now enumerated to be selected at will.
2016-06-03 16:00:08 +10:00
twinaphex 169b5e7a6b (libretro-db) Cleanups 2016-06-03 07:58:15 +02:00
twinaphex d95c421ba9 (config_file.c) Cleanups 2016-06-03 07:52:57 +02:00
twinaphex a503db016e Create filestream_eof 2016-06-03 07:29:27 +02:00
twinaphex d40eade52c Create filestream_getline 2016-06-03 07:09:50 +02:00
twinaphex e9cf351c67 Move settings around for User Interface -
(config_file) Try to get rid of forward declarations
2016-06-03 06:43:11 +02:00
radius cd615b3e79 fix mwindows flag on the makefile 2016-06-02 23:38:04 -05:00
radius 04fc5d042f fix osd message 2016-06-02 23:35:57 -05:00
radius 7fb9ec5223 remove stray comment 2016-06-02 23:34:21 -05:00
radius a86cf6b99d initial implementation of undo save state 2016-06-02 23:33:52 -05:00
twinaphex 5230aeb9d0 Use retro_common_api.h 2016-06-03 06:02:49 +02:00
twinaphex 7ce2ac082a Use retro_common_api.h 2016-06-03 05:54:21 +02:00
twinaphex 07932bff3e Use retro_common_api.h 2016-06-03 05:49:46 +02:00
twinaphex 8fc8ff4ed9 Use retro_common_api.h 2016-06-03 05:43:49 +02:00
twinaphex 8ce3c2bbc8 use retro_common_api.h 2016-06-03 05:38:40 +02:00
twinaphex 8486bf0058 Prevent uninitialized scalar variable warnings 2016-06-03 05:35:30 +02:00
twinaphex 63b3f30112 Cleanups 2016-06-03 05:32:18 +02:00
twinaphex ddc3c2adcc Cleanup print_buf_lines 2016-06-03 05:30:06 +02:00
twinaphex 34ad3bd103 Cleanups 2016-06-03 05:24:21 +02:00
Twinaphex 75ad88e171 Cleanups 2016-06-03 05:09:54 +02:00
twinaphex a5dbae0505 Cleanups 2016-06-03 04:59:12 +02:00
twinaphex 48987918e4 Cleanups 2016-06-03 04:37:10 +02:00
twinaphex 7625a790ba Cleanups 2016-06-03 04:35:07 +02:00
twinaphex 2f133a6835 Cleanups 2016-06-03 04:32:18 +02:00
twinaphex f83dfb0621 (platform_linux.c) Prevent uninitialized scalar variable warnings 2016-06-03 04:27:42 +02:00
twinaphex 36e33bde90 Cleanup 2016-06-03 04:21:19 +02:00
twinaphex c2dd8b884e Cleanups 2016-06-03 04:18:28 +02:00
twinaphex 3b83b6d030 Fix uninitialized scalar variable warnings 2016-06-03 04:12:18 +02:00
twinaphex 21bc56aa04 Fix uninitialized scalar variable warnings 2016-06-03 04:02:27 +02:00
twinaphex ff8d00e12b Use RETRO_BEGIN_DECLS/RETRO_END_DECLS in more files 2016-06-03 03:22:35 +02:00
twinaphex 2b33c731d0 Create RFILE_MODE_READ_TEXT 2016-06-03 03:14:42 +02:00
twinaphex d9ba04e470 Fix CXX_BUILD 2016-06-03 02:43:30 +02:00
twinaphex b34786171e Use RETRO_BEGIN_DECLS/RETRO_END_DECLS 2016-06-03 02:39:35 +02:00
Twinaphex 5f843d30a0 Merge pull request #3055 from mudlord/master
added missing guards.
2016-06-03 02:33:50 +02:00
mudlord 6e1e8b3785 added missing guards. 2016-06-03 10:08:27 +10:00
Twinaphex 98278cc5cc Merge pull request #3054 from mudlord/master
add basic drag and drop to win32 gui
2016-06-03 01:23:25 +02:00
mudlord 4c53bdf4f9 add drag and drop 2016-06-03 09:14:53 +10:00
twinaphex 9c8f29c1ec (features_cpu.c) Use filestream 2016-06-03 00:17:09 +02:00
twinaphex ac6a319a9d playlist.c - use filestream 2016-06-03 00:12:58 +02:00
twinaphex 294777166f video_shader_parse.c - use filestream 2016-06-03 00:11:41 +02:00
twinaphex 4dc3fe9f8c Create filestream_getc 2016-06-03 00:07:00 +02:00
twinaphex 97427b343b (libretro-common) Create filestream_gets 2016-06-03 00:03:58 +02:00
twinaphex 858aae10cb Fix unchecked return value warnings 2016-06-02 23:00:11 +02:00
twinaphex 29ca5b8c34 Fix some unchecked return value issues 2016-06-02 22:49:26 +02:00
Alcaro 9b2f6522a2 Fix use-after-free (thanks, Coverity) 2016-06-02 21:31:08 +02:00
Alcaro 9ab4e79503 Simplify these checks a little. 2016-06-02 21:02:28 +02:00
twinaphex 1156406dfc Null-check core_info variable before using it 2016-06-02 20:58:42 +02:00
twinaphex 79c94513ec Fix 'dereference before null check' 2016-06-02 20:56:13 +02:00
twinaphex 307361e12c Prevent 'explicit null dereferenced' warning 2016-06-02 20:53:26 +02:00
twinaphex 7b04375c9b Fix 'dereference after null check' 2016-06-02 20:52:30 +02:00
twinaphex d8b3597455 menu_cbs_deferred_push.c - Fix 'array compared against 0' 2016-06-02 20:51:27 +02:00
twinaphex f1160f19b3 Fix uninitialized scalar variable warnings 2016-06-02 20:49:25 +02:00
twinaphex d6430b2f5e Attempt to fix wrong sizeof argument 2016-06-02 20:45:32 +02:00
twinaphex 65d5ebc2bb Fix some dereference after null check warnings 2016-06-02 20:40:51 +02:00
Jean-André Santoni 3d338446f8 Merge pull request #3052 from Alexandre-Garcia/improve_translation_pt
Improve translation PT
2016-06-02 18:13:29 +02:00
Alexandre Garcia 9f4a6bbae2 Improve translation PT 2016-06-02 11:16:10 -03:00
twinaphex 04c30c77e0 Try to always build with HAVE_VULKAN for Windows 2016-06-01 07:16:06 +02:00
twinaphex 1f3790fafa Fix statement is unreachable warning 2016-06-01 05:59:17 +02:00
twinaphex 36106dd90a C89_BUILD fix 2016-06-01 05:58:22 +02:00
twinaphex 43f06aecd9 (playlist.c) Prevent warnings 2016-06-01 05:34:15 +02:00
twinaphex 280eb95b9a Prevent logically dead code warning 2016-06-01 05:31:05 +02:00
twinaphex c7acb4658b Fix 'pointer to local outside scope' 2016-06-01 05:26:45 +02:00
twinaphex da7f6a2a3b Prevent more warnings 2016-06-01 05:18:59 +02:00
twinaphex 5eb43846da Prevent explicit NULL dereferenced warnings 2016-06-01 04:14:48 +02:00
twinaphex bc3eb34da5 Remove unused variables 2016-06-01 04:09:59 +02:00
twinaphex da6ac4aae7 Fix explicit NULL dereferenced warnings 2016-06-01 04:05:14 +02:00
twinaphex 9bb8c41ff6 Fix uninitialized scalar variables warnings 2016-06-01 03:23:38 +02:00
twinaphex ffdad57318 Fix double frees and resource leaks 2016-06-01 02:40:58 +02:00
twinaphex 2e42778f1e (task_queue.c) Prevent resource leak 2016-06-01 02:37:26 +02:00
twinaphex bedd67a8b8 (QNX/BB10) Use HAVE_MATERIALUI 2016-05-31 05:17:57 +02:00
twinaphex cf91d006b3 BB10 starts again 2016-05-31 05:16:35 +02:00
twinaphex 0c686e15db (QNX) Enable logging by default 2016-05-31 05:06:24 +02:00
twinaphex 5097240aef Add OFN_NOCHANGEDIR in hopes Win32 file dialogs won't change
current working dir
2016-05-31 04:48:00 +02:00
twinaphex 5b52098c54 Reimplement verbosity 2016-05-31 04:42:04 +02:00
twinaphex 0b47d98169 (BB) Update paths 2016-05-31 03:41:14 +02:00
Twinaphex ccf80cbaa9 (BB) Update 2016-05-31 03:36:52 +02:00
twinaphex b23784ddc5 Update modern_alpha_blend.gls.vert.h 2016-05-30 08:55:31 +02:00
twinaphex 632cc599d6 Change modern_alpha_blend.glsl.frag.h 2016-05-30 08:53:49 +02:00
twinaphex 0f12336737 Take this out too 2016-05-30 08:51:41 +02:00
twinaphex d93d8e7a8f Update stock_fragment_modern 2016-05-30 08:44:13 +02:00
twinaphex e820759ed2 Revert "(QNX) Define HAVE_MAIN"
This reverts commit ad3669a926.
2016-05-30 07:55:07 +02:00
twinaphex ad3669a926 (QNX) Define HAVE_MAIN 2016-05-30 07:51:11 +02:00
twinaphex e58dda0623 (QNX) Use relative paths 2016-05-30 07:48:17 +02:00
twinaphex 6213b9d3f1 Revert "Force HAVE_VULKAN on for Windows"
This reverts commit 1f8b4d6b9a.
2016-05-30 00:40:16 +02:00
twinaphex 1f8b4d6b9a Force HAVE_VULKAN on for Windows 2016-05-30 00:34:18 +02:00
Twinaphex 9e9cc3835f Merge pull request #3048 from diablodiab/fix_RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME
Allow cores that do not need content to still start with content if given
2016-05-30 00:26:21 +02:00
Diablodiab d7bfe70ca1 Check if content has been passed to core even if the core does not need content.
Only start without content if no content has been passed.

This fixes a problem with cores that are both able to start with or without
content, eg. ScummVM.
2016-05-30 00:19:05 +02:00
Twinaphex 00f0a7dd91 Merge pull request #3046 from leiradel/rpng
Optimized palette decoding; fixed bug while getting alpha values for palettized images.
2016-05-29 16:39:45 +02:00
Andre Leiradella b1daca2582 Merge branch 'rpng' of https://github.com/leiradel/RetroArch into rpng 2016-05-29 11:30:34 -03:00
Andre Leiradella 9cc830ecd6 fixed getting wrong alpha values from tRNS chunk 2016-05-29 11:30:04 -03:00
Andre Leiradella 88eab60b13 optimized palette decoding 2016-05-29 11:25:28 -03:00
Andre Leiradella 516918c163 optimized palette decoding 2016-05-29 10:57:57 -03:00
Twinaphex 6f3a78b41a Merge pull request #3044 from leiradel/rpng
support tRNS chunks in palettized images
2016-05-29 06:48:33 +02:00
Andre Leiradella d9ea20727c support tRNS chunks in palettized images 2016-05-29 01:03:44 -03:00
Twinaphex 419cdced44 Merge pull request #3043 from leiradel/imgviewer
show a checker background behind images with transparency
2016-05-29 05:41:29 +02:00
twinaphex e222df4eb6 Fix LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU 2016-05-29 05:36:41 +02:00
Andre Leiradella 97a4f0d2fd show a checker background behind images with transparency 2016-05-29 00:24:09 -03:00
twinaphex d39d925c1d Fix opsque Cg shader 2016-05-29 03:48:08 +02:00
twinaphex 78b208c441 Get rid of settings variable 2016-05-29 00:19:04 +02:00
twinaphex eafb235e66 Cleanups 2016-05-29 00:03:15 +02:00
twinaphex bf6fa07b25 Cleanups 2016-05-28 23:56:07 +02:00
twinaphex 2859f6f18d Cleanup 2016-05-28 23:53:13 +02:00
twinaphex efaf6e10ee Cleanups 2016-05-28 23:48:32 +02:00
twinaphex fdb218f64e We don't have to call task_load_core for ffmpeg/imageviewer paths 2016-05-28 23:40:58 +02:00
twinaphex e0885a71e3 Remove core_path lines from ffmpeg/imageviewer paths 2016-05-28 23:39:04 +02:00
twinaphex 383a5968cc Create task_push_quick_menu 2016-05-28 23:34:21 +02:00
twinaphex f8ed8ebde4 Create task_load_core 2016-05-28 23:20:43 +02:00
twinaphex 1b0c224c02 Create task_load_content 2016-05-28 23:16:57 +02:00
twinaphex da6a74b2dc Leave only GLSL_330 macro 2016-05-28 20:58:49 +02:00
Twinaphex 2056d25e3e Update GLSL_330_ES/GLSL_330_CORE 2016-05-28 20:56:37 +02:00
Twinaphex e331281d6a (shaders_common.h) Fix GLES 2016-05-28 20:56:02 +02:00
twinaphex 3d5cc14030 Convert other shaders 2016-05-28 18:43:00 +02:00
twinaphex 653359911a Cleanup shaders 2016-05-28 18:18:23 +02:00
twinaphex 2b5aae8a21 Add this too 2016-05-27 21:41:14 +02:00
twinaphex 828b9c6c46 task_content.c - can now reach this code 2016-05-27 21:25:42 +02:00
twinaphex 954aaa3fc6 More preparatory work for net retropad core 2016-05-27 21:16:25 +02:00
twinaphex c0d86cd8d3 Ifdef autosave code for HAVE_THREADS 2016-05-27 20:43:55 +02:00
twinaphex e8eb0ef013 Change invocation of task_content_push 2016-05-27 19:34:07 +02:00
twinaphex c16cae7ef9 Create retroarch_set_current_core_type 2016-05-27 19:26:45 +02:00
twinaphex ccd5b2f73d Add 'Start Remote Gamepad' entry 2016-05-27 19:18:46 +02:00
twinaphex 7d26034ebe Rename rarch_task_* to task_* 2016-05-27 18:14:47 +02:00
twinaphex c00f8c5dd6 Add comments 2016-05-27 18:07:51 +02:00
twinaphex 534c923b6b Remove autosave.c 2016-05-27 17:52:20 +02:00
twinaphex eeddd7072b Move struct to top 2016-05-27 17:29:12 +02:00
twinaphex 1c868ffaa2 Cleanups 2016-05-27 17:27:38 +02:00
twinaphex a6f95b307f Silence warnings 2016-05-27 17:24:54 +02:00
twinaphex 49f050b386 Move config_replace to configuration.c 2016-05-27 16:42:20 +02:00
twinaphex a70d8e43d9 Cleanups 2016-05-27 16:35:21 +02:00
twinaphex e8a02dd448 C89_BUILD fix 2016-05-27 06:03:38 +02:00
Twinaphex 130411365b Remove unused variable 2016-05-27 05:39:52 +02:00
twinaphex 9d6eda5409 Remove double entry in qb/config.params.sh 2016-05-27 05:22:11 +02:00
twinaphex e7aedb6fb9 Remove unneeded async_job - plug memory leak in cheevos.c 2016-05-27 05:19:27 +02:00
Andrés bf04b798fe Merge pull request #3037 from leiradel/cheevos
added all console ids; added fixup for pce; fixed mmap matching
2016-05-26 22:14:31 -05:00
twinaphex 6dc2e8ca45 (configuration.c) Cleanups 2016-05-27 05:13:05 +02:00
Andre Leiradella d791da9507 undefined debug macros 2016-05-27 00:06:03 -03:00
twinaphex dd03076976 Remove config_realloc 2016-05-27 05:05:27 +02:00
twinaphex 2b4baa0452 Cleanup configuration.c 2016-05-27 05:02:26 +02:00
Andre Leiradella fad2acf1ee added all console ids; added fixup for pce; fixed mmap matching 2016-05-26 23:47:14 -03:00
twinaphex e41efa9849 Cleanup menu_content_find_first_core 2016-05-27 04:41:39 +02:00
twinaphex a743c779f8 Prevent some 'conditional jump or move depends on unitialised value' warnings 2016-05-27 04:31:02 +02:00
twinaphex 0d271b0ca7 Cleanups 2016-05-27 04:18:27 +02:00
twinaphex 150d05c160 Not sure why it tried to call input_overlay_free twice in a row 2016-05-27 04:09:46 +02:00
Twinaphex af4d085632 Merge pull request #3036 from lakkatv/master
(Menu) Fixes a menu toggle bug
2016-05-26 22:51:31 +02:00
Jean-André Santoni 72e67acec0 (Menu) Fixes a menu toggle bug 2016-05-26 22:45:01 +02:00
Twinaphex b81b5b0dfe Revert "playlist.c - prevent logically dead code -a nd also try to prevent memleak"
This reverts commit a1034716e1.
2016-05-26 22:22:30 +02:00
twinaphex bd5c0effa4 Revert "playlist_free_entry - cleanups"
This reverts commit 9624406438.
2016-05-26 22:17:42 +02:00
Twinaphex 5a7ab3a394 Revert "Free before doing strdup"
This reverts commit 189f8d58ec.
2016-05-26 22:07:03 +02:00
twinaphex 189f8d58ec Free before doing strdup 2016-05-26 22:03:37 +02:00
twinaphex 1d632e26fe Add missing file 2016-05-26 20:52:27 +02:00
twinaphex 584ec83840 Start adding internal network retropad core hooks 2016-05-26 19:43:15 +02:00
twinaphex d6a36f3768 configuration.c - fix unchecked return value 2016-05-26 18:17:31 +02:00
twinaphex a1034716e1 playlist.c - prevent logically dead code -a nd also try to prevent memleak 2016-05-26 18:12:27 +02:00
twinaphex 03ded43280 Prevent explicit null dereferenced warnings 2016-05-26 18:09:46 +02:00
twinaphex a98616b45b Fix explicit NULL dereferenced/dereference before null check warnings 2016-05-26 17:47:21 +02:00
twinaphex 142dd82067 (input_overlay.c) Prevent dereference after null check 2016-05-26 17:35:46 +02:00
twinaphex e297da1b71 Take out this call to prevent another memory leak 2016-05-26 17:34:44 +02:00
twinaphex 4f98cf05f4 Fix uninitialized scalar variable warnings 2016-05-26 17:32:27 +02:00
twinaphex 0f954fd4c8 Resource leaks fixes (catched by Coverity) 2016-05-26 17:26:55 +02:00
twinaphex 9624406438 playlist_free_entry - cleanups 2016-05-26 16:37:39 +02:00
Twinaphex a816d150b1 Merge pull request #2857 from RobLoach/patch-1
Add documentation for libretro-db compilation
2016-05-26 16:17:54 +02:00
Twinaphex 427c73e7fd Merge pull request #3034 from sronsse/fixes_for_team
task overlay: Fix memory leak caused by overlay being loaded multiple…
2016-05-26 08:20:39 +02:00
Sebastien Ronsse 5366e88d1b task overlay: Fix memory leak caused by overlay being loaded multiple times 2016-05-26 16:14:34 +10:00
twinaphex 7d12408f24 x11_create_input_context - prevent memleak 2016-05-26 07:34:25 +02:00
twinaphex 4981cc65c9 Try to call snd_config_update_free_global after every call to
snd_pcm_close to prevent apparent memory leaks
2016-05-26 07:19:54 +02:00
Twinaphex f0157dea52 Merge pull request #3033 from sronsse/fixes_for_team
task image: Fix memory leak occurring for images loading non-progress…
2016-05-26 06:51:57 +02:00
twinaphex 023088e618 C89_BUILD fix 2016-05-26 06:50:57 +02:00
twinaphex befda7bcc9 Some C89 build fixes 2016-05-26 06:49:38 +02:00
twinaphex ebc8edd2bf Fix CXX_BUILD 2016-05-26 06:46:57 +02:00
twinaphex 20cc877ad3 (PS3) Cleanup warnings 2016-05-26 06:41:28 +02:00
twinaphex c8f1125e20 Take out unused settings variables 2016-05-26 06:37:16 +02:00
twinaphex 9d1273ce58 (Nuklear) Cleanups 2016-05-26 06:34:13 +02:00
Sebastien Ronsse 093b009422 task image: Fix memory leak occurring for images loading non-progressively 2016-05-26 14:32:25 +10:00
twinaphex 7780162d53 (Nuklear) Cleanups 2016-05-26 06:31:58 +02:00
radius da5fb291a6 [nk] fix selected file name 2016-05-25 23:00:42 -05:00
radius 22de61ff3d [nk] cleanup unused var 2016-05-25 22:35:31 -05:00
radius e31c53c144 [nk] file picker part 2 2016-05-25 22:32:36 -05:00
radius a79882bfc8 [nk] file picker part 2 2016-05-25 22:09:14 -05:00
radius b08aa06779 [nk] start implementing a file picker 2016-05-25 21:09:43 -05:00
radius ed911fcf27 [nk] add more stub windows 2016-05-25 19:58:16 -05:00
radius 6d7dc34238 [nk] add main window stub 2016-05-25 19:38:20 -05:00
radius ae1522293e [nk] cleanup 2016-05-25 19:24:53 -05:00
radius c5c6713489 [nk] cleanup/split window to it's own file 2016-05-25 19:06:54 -05:00
radius ddeb2b5ac0 organize nuklear files in their own subfolder 2016-05-25 18:45:35 -05:00
radius abbd269f02 reenable other windows that were removed when the api changed
- need to reimplement checkbox_bool
- need to reimplement the menu bar

but more than anything, needs a design, making a gui without any guidelines will mean we'll end up with a shiny new mess, instead of fixing anything
I can hack stuff together but I am not really a gui designer and it's important at this point
2016-05-25 17:18:00 -05:00
twinaphex 2f7684c743 (Android) Cleanups 2016-05-25 16:03:32 +02:00
twinaphex 7859868ffc (RPNG) Dehardcode return values 2016-05-25 15:24:18 +02:00
Andrés a27849cbfa Merge pull request #3031 from sronsse/fixes_for_team
rjpeg: Fix invalid read/writes during JPEG RGBA to ARGB conversion
2016-05-25 01:15:40 -05:00
Sebastien Ronsse 58328fa2b0 rjpeg: Fix invalid read/writes during JPEG RGBA to ARGB conversion 2016-05-25 15:57:01 +10:00
radius b6b2fdfaa6 comment out xbox 360 & dualshock hacks that are not needed anymore, friendly labels can be applied on the autoconf files instead 2016-05-25 00:47:01 -05:00
radius 73c78947b0 fix set_paths_redirect edge case 2016-05-24 23:06:20 -05:00
radius 08c136aab2 fix a logging error 2016-05-24 21:41:53 -05:00
radius 38305f8fb7 Update the menu driver to work with the latest version 2016-05-24 21:41:51 -05:00
radius 8b1604325f Update nuklear 2016-05-24 21:41:50 -05:00
twinaphex 40023833e0 (IOHIDManager) Plug another potential leak 2016-05-25 02:35:13 +02:00
twinaphex 8c106eb010 Allocate name_base memory and free it again 2016-05-25 02:25:09 +02:00
twinaphex 581f53a7c2 (task_screenshot.c) Grab global pointer only once 2016-05-25 02:23:54 +02:00
twinaphex f7ff1c66c4 Don't need to include this header anymore 2016-05-25 00:58:12 +02:00
twinaphex cd176d0737 Remove input_overlay_init 2016-05-25 00:57:58 +02:00
twinaphex ae0da06d8f Make input overlay state a part of struct input_overlay 2016-05-25 00:47:24 +02:00
twinaphex 5a4ada4311 Avoid some warnings by using return value for config_get_int 2016-05-24 23:53:35 +02:00
twinaphex 20aa9ed25a (list_special.c) Attempt to solve another defect 2016-05-24 23:45:56 +02:00
twinaphex d037d12faa (RJPEG) Attempt to solve defect 2016-05-24 23:43:51 +02:00
twinaphex 25eaab0a2b Start passing input_overlay_t * state around to other functions 2016-05-24 23:15:19 +02:00
twinaphex edebf76df6 config_file_userdata.c - get rid of macros 2016-05-24 22:55:40 +02:00
twinaphex a82a8cad51 Be more careful with config_get_bool 2016-05-24 22:48:15 +02:00
twinaphex bfa6f49ae6 Fix logically dead code warnings 2016-05-24 22:12:51 +02:00
Alcaro 26190043eb this mmap env is way more complicated than it has any right to be. 2016-05-24 22:06:21 +02:00
twinaphex 42971febba Fix resource leaks (pointed out by Coverity) 2016-05-24 22:01:43 +02:00
twinaphex 4e07d14488 Fix 'result is not floating point' warning 2016-05-24 21:53:08 +02:00
twinaphex ec88b464c3 Silence 'side effect in assertion' warnings 2016-05-24 21:51:45 +02:00
twinaphex 72d37e3917 Fix unreachable code 2016-05-24 21:48:32 +02:00
twinaphex 8a71830d44 Prevent some data race conditions (pointed out by Coverity) 2016-05-24 21:27:58 +02:00
twinaphex 46872f8fcb (gfx/font_driver.c) Cleanups 2016-05-24 21:07:02 +02:00
twinaphex 3cc84d60c8 (RJPEG) Cleanup 2016-05-24 20:54:32 +02:00
twinaphex fc37ef5c7d rjpeg_load_jpeg_image - cleanup 2016-05-24 20:44:46 +02:00
Twinaphex fae5eb89df rjpeg_process_image - cleanup 2016-05-24 20:36:27 +02:00
twinaphex d04810f5fd Reimplement rjpeg_process_image 2016-05-24 20:19:17 +02:00
twinaphex ae4cd05690 (RPNG) Simplification 2016-05-24 20:15:09 +02:00
Twinaphex 7e6f23ea54 (RJPEG) Cleanup 2016-05-24 20:05:45 +02:00
Twinaphex 1fe1b2318a (task_image.c) Cleanup handle which could leak 2016-05-24 20:04:49 +02:00
twinaphex 5656959085 Free overlay_ptr 2016-05-24 15:30:18 +02:00
twinaphex 160ac49089 (input_overlay.c) Cleanup 2016-05-24 15:29:12 +02:00
twinaphex fd7e2cd394 input_overlay_new - Call input_overlay_free from outside 2016-05-24 15:25:46 +02:00
twinaphex 8f7e253f1f (config_file.c) Fix control flow issue 2016-05-24 14:20:03 +02:00
twinaphex ffaa32842f (libretro-common) Update 2016-05-24 14:18:29 +02:00
Twinaphex c1e82d3f1a (IOHidManager) Fix adapter leak 2016-05-24 14:01:46 +02:00
twinaphex 4e74a990d4 (IOHIDManager) Free some resource leaks 2016-05-24 13:48:02 +02:00
twinaphex 1b35da2bd8 Cleanup load_images upon task cancellation 2016-05-24 13:35:09 +02:00
twinaphex 811f4f59de (task_overlay.c) Cleanups 2016-05-24 13:31:28 +02:00
Twinaphex 452957a117 Merge pull request #3027 from sronsse/fixes_for_team
xmb: Fix memory leak due to horizontal list not being freed properly
2016-05-24 11:45:50 +02:00
Sebastien Ronsse 420d8a5fb2 xmb: Fix memory leak due to horizontal list not being freed properly 2016-05-24 13:15:09 +10:00
twinaphex aae721a9d0 Remove logically dead code 2016-05-24 04:26:24 +02:00
twinaphex d1d46a59db Rewrite file_list_capacity 2016-05-24 04:19:36 +02:00
Twinaphex b01b7cf7cb Merge pull request #3026 from sronsse/fixes_for_team
query: Fix arguments memory leak
2016-05-24 03:58:48 +02:00
Sebastien Ronsse 2824057652 query: Fix arguments memory leak 2016-05-24 11:53:45 +10:00
twinaphex 1b9e222e6e (task_overlay.c) Another rewrite 2016-05-24 03:25:23 +02:00
twinaphex b58b002501 (task_overlay.c) Rewrite 2016-05-24 03:18:29 +02:00
twinaphex 41b6b82b24 Cleanups 2016-05-24 03:02:40 +02:00
twinaphex 690530e7aa (task_overlay.c) Implement cleanup callback 2016-05-24 02:57:37 +02:00
twinaphex 0f42249dd5 Cleanups 2016-05-24 02:55:27 +02:00
twinaphex 47c2b9ed43 (task_overlay.c) Cleanups 2016-05-24 02:39:37 +02:00
twinaphex 334cbd55d8 Cleanups 2016-05-24 02:33:38 +02:00
twinaphex 9bea4deac0 Cleanup 2016-05-24 02:29:43 +02:00
Twinaphex 497e424fc1 Cleanup 2016-05-24 02:23:00 +02:00
twinaphex 28ef2201cd (task_overlay.c) Cleanups 2016-05-24 02:21:49 +02:00
twinaphex 8f054aeb29 (task_overlay.c) Cleanup 2016-05-24 02:17:38 +02:00
Twinaphex b3cab9223c Merge pull request #3025 from sronsse/fixes_for_team
retroarch: Fix savefile directory memory leak
2016-05-24 01:51:45 +02:00
Sebastien Ronsse 07b3a081c0 retroarch: Fix savefile directory memory leak 2016-05-24 09:41:00 +10:00
twinaphex ac407588fa Include stdstring.h 2016-05-24 01:08:01 +02:00
twinaphex 8d4c06e133 (libretro-db) Namespace bintree and libretrodb 2016-05-24 01:07:41 +02:00
radius 86b5b361da fix the last commit 2016-05-23 18:06:50 -05:00
twinaphex 4717a2df64 query.c - namespace functions 2016-05-24 00:58:41 +02:00
radius 9300313fce fix lockup
this seems to fix a lockup that happens randomly on windows at startup, content load/content unload/controller hotplug
2016-05-23 17:57:15 -05:00
twinaphex 4a7bbc4dcc Free info->genre 2016-05-24 00:33:12 +02:00
twinaphex 9253eb52eb (menu_setting.c) don't pass by value 2016-05-24 00:28:26 +02:00
twinaphex 0bd999faa5 Revert "Don't use rarch_task_push_image inside xmb_context_reset_background"
This reverts commit 40e1082cda.
2016-05-23 22:53:09 +02:00
Twinaphex 59e465ea8c Merge pull request #3023 from t-paul/memory-leak-fix
Memory leak fix
2016-05-23 22:46:47 +02:00
Torsten Paul 30e9cc1f10 Ensure memory is not used after free(). 2016-05-23 22:41:24 +02:00
twinaphex 80abd06bd8 Not sure where this came from 2016-05-23 22:39:02 +02:00
Torsten Paul 845dcef6ab Add cleanup handler for tasks to free allocated resources after the task finished. 2016-05-23 22:36:29 +02:00
Torsten Paul 4c3281bd39 Revert "(XMB) Fixes memory leaks in XMB by not relying upon image tasks"
This reverts commit 2f1063ff72.
2016-05-23 22:36:29 +02:00
twinaphex c17315cd27 (DRM) Prevent double free and prevent dereference before NULL check 2016-05-23 22:30:01 +02:00
twinaphex d5d2f7f8ee Fix resource leaks 2016-05-23 22:17:28 +02:00
twinaphex 974d3245d2 Fix logically dead code warnings 2016-05-23 22:04:00 +02:00
twinaphex 69759f5fd7 Remove logically dead code 2016-05-23 21:55:30 +02:00
twinaphex 39faa9be1b Remove logically dead code 2016-05-23 21:50:07 +02:00
twinaphex 91220c3448 Remove logically dead code 2016-05-23 21:49:40 +02:00
twinaphex 5e5bb8e39b Remove logically dead code 2016-05-23 21:48:50 +02:00
twinaphex 2855526566 core_info.c 'logically dead code' fix 2016-05-23 21:48:24 +02:00
twinaphex 7c0532c3e7 Remove logically dead code 2016-05-23 21:47:41 +02:00
twinaphex 1eecb570aa Fix regression 2016-05-23 21:46:24 +02:00
twinaphex 0cff019c37 Remove self assignment 2016-05-23 21:41:06 +02:00
twinaphex ea5f3d30e4 Fix missing breaks 2016-05-23 21:39:17 +02:00
Twinaphex 44edf684db (RPNG) Another potential leak plugged 2016-05-23 21:33:26 +02:00
twinaphex faef7b498d (Coverity) Fix some resource leaks 2016-05-23 21:28:43 +02:00
twinaphex 0a3224180b (Coverity) Fix uninitialized variables; fix some resource leaks 2016-05-23 21:19:28 +02:00
twinaphex c72222b572 Remove menu_shader_free 2016-05-23 17:49:22 +02:00
Twinaphex 86ef11e756 Prevent another memory leak 2016-05-23 14:45:43 +02:00
twinaphex 09b10943b2 retroarch_get_current_savefile_dir - prevent memory leak 2016-05-23 14:42:22 +02:00
Twinaphex 1be1c6a6e2 Merge pull request #3020 from sronsse/fixes_for_team
Memory leak-related fixes
2016-05-23 12:25:51 +02:00
Sebastien Ronsse 18bff0401b menu setting: Fix memory leak in network settings data 2016-05-23 12:09:58 +10:00
Sebastien Ronsse 14c0984497 menu setting: Introduce generic concept of free flags for settings data 2016-05-23 12:09:58 +10:00
Sebastien Ronsse d9884b486a menu driver: Fix memory leak occurring on exit 2016-05-23 12:09:58 +10:00
Twinaphex 06aa001b82 Merge pull request #3019 from orbea/master
Set base man directory in MAN_DIR and move manpages to man6
2016-05-23 02:19:49 +02:00
orbea aeaaf7a319 Move man pages to man6 to satisfy man standard sections 2016-05-22 17:05:13 -07:00
orbea 7fc64b2c5e Set base man dir in MAN_DIR 2016-05-22 16:31:01 -07:00
twinaphex 0692a321c5 (GLSM )update 2016-05-22 03:49:42 +02:00
twinaphex 44bf799d36 Update GLSM 2016-05-21 23:00:39 +02:00
Twinaphex 2f1063ff72 (XMB) Fixes memory leaks in XMB by not relying upon image tasks 2016-05-21 21:37:41 +02:00
twinaphex 40e1082cda Don't use rarch_task_push_image inside xmb_context_reset_background 2016-05-21 21:00:37 +02:00
twinaphex 7fe5d21452 (XMB) use string_is_equal 2016-05-21 20:53:57 +02:00
twinaphex 2f2ddb472a (XMB) Move function to menu_display.c 2016-05-21 20:47:49 +02:00
twinaphex 0798157df3 Try calling video_driver_texture_unload before calling video_driver_texture_load 2016-05-21 19:43:32 +02:00
Twinaphex b7e15c2fe1 free user_data here too 2016-05-21 19:31:39 +02:00
twinaphex e4a44cbf13 menu_display_thumbnail_handle_upload - free userdata 2016-05-21 19:28:29 +02:00
twinaphex 59f3e733fb (libretro-common) rthreads - PS3 buildfix 2016-05-21 13:38:07 +02:00
twinaphex 6c840cdd59 (input_autodetect.c) Use dir_list_new_special 2016-05-21 13:31:41 +02:00
twinaphex 57f797dad6 Cleanup 2016-05-21 13:16:48 +02:00
twinaphex 6bd7fd482c Performance counters got function name changes 2016-05-21 13:14:25 +02:00
Twinaphex 72e1a33715 Merge pull request #3016 from Themaister/master
Add perf counter to fence waits.
2016-05-21 12:36:25 +02:00
Hans-Kristian Arntzen 218ecc07c1 Add perf counter to fence waits.
Makes it easy to check if we're GPU bound or not.
2016-05-21 12:13:46 +02:00
radius 6b0c978acb cut down some code duplication 2016-05-20 17:54:29 -05:00
radius dbb8cf7e32 AUTOSAVE should happen before loading the dummy core, not after 2016-05-20 17:36:55 -05:00
twinaphex 45cbe06401 rpng_process_image - cleanup resources if we fail 2016-05-20 21:05:27 +02:00
twinaphex fec5aca60b Revert "(task_image.c) Nits"
This reverts commit 94a9e7b923.
2016-05-20 21:03:42 +02:00
Twinaphex 2cd64c276f Merge pull request #3015 from simias/fix
potential fix for AMD and GL core contexts
2016-05-20 20:17:09 +02:00
Lionel Flandrin b7d5c1d3e8 potential fix for AMD and GL core contexts 2016-05-20 20:12:41 +02:00
twinaphex 94a9e7b923 (task_image.c) Nits 2016-05-20 20:04:07 +02:00
twinaphex fe516b0d01 Change type of status 2016-05-20 19:32:09 +02:00
twinaphex 1fd7cf473d Initialize file_path 2016-05-20 19:17:21 +02:00
twinaphex d02d27f92a (PNG) Cleanup 2016-05-20 15:37:36 +02:00
radius a49ef997de fix override unloading on close content 2016-05-20 02:21:15 -05:00
Twinaphex 4389008be6 (QNX) Can export Release build now 2016-05-19 23:38:38 +02:00
twinaphex 0e88d99798 (BB10) Update bar-descriptor 2016-05-19 23:23:06 +02:00
Twinaphex c2942b0873 (QNX) Builds and links 2016-05-19 22:25:39 +02:00
Twinaphex 323d5b1c6c (QNX) Buildfixes 2016-05-19 21:43:40 +02:00
Twinaphex 1f7c51b458 (QNX) more build fixes 2016-05-19 20:14:58 +02:00
Twinaphex e133ce31e8 (QNX) Buildfixes 2016-05-19 20:10:10 +02:00
twinaphex c104bc094b (QNX) Fix egl_create_surface call 2016-05-19 20:07:03 +02:00
Twinaphex 85331042be (QNX) Build fixes 2016-05-19 20:02:39 +02:00
twinaphex aabb1e409c Move netplay code to network/netplay dir 2016-05-19 11:46:54 +02:00
Twinaphex 67e1e5a9d0 (task_image.c) Prevent null pointer dereference 2016-05-19 02:09:56 +02:00
twinaphex 033bc60939 (RPNG) Cleanup 2016-05-19 01:00:03 +02:00
twinaphex ceb657eba2 Cleanups 2016-05-19 00:51:34 +02:00
twinaphex 6c2e933321 rpng_process_init - free resources when failing 2016-05-19 00:46:07 +02:00
twinaphex a0974a899d (RPNG) Rewrite initialization of process struct 2016-05-19 00:42:05 +02:00
twinaphex 257d8a8cf0 Silence some warnings by valgrind memcheck - label value was
uninitialized and passed to strtok
2016-05-19 00:24:39 +02:00
twinaphex 0c2958e384 (task_image.c) Style nit 2016-05-19 00:16:30 +02:00
twinaphex bebcc1c274 Move macros to task_image.c 2016-05-19 00:07:49 +02:00
twinaphex 2116c0cc4e Move typedef to task_image.c 2016-05-19 00:06:52 +02:00
twinaphex 824315865f Move http_transfer_info to task_http.c 2016-05-19 00:04:38 +02:00
twinaphex ae478b71b7 (rarch_task_push_image) Call rarch_task_image_load_free 2016-05-18 23:57:35 +02:00
twinaphex e59cd92108 rarch_task_image_load_free_internal - Run image_texture_free 2016-05-18 23:38:51 +02:00
twinaphex ad78fddf4e Move image allocation to task_image.c 2016-05-18 23:28:03 +02:00
twinaphex cb4db5c5ab Don't be dependent on nbio->image inside task_file_transfer 2016-05-18 23:14:07 +02:00
twinaphex 091496f74d Add ARMv7 entry too 2016-05-18 22:09:01 +02:00
twinaphex 017ef3fef7 (Android) Implement other archs too 2016-05-18 22:06:28 +02:00
twinaphex f1d859b826 (Android) Use uname for determining architecture 2016-05-18 22:02:11 +02:00
twinaphex c93b78147b Should avoid expensive 'djb2' operation now per-frame 2016-05-18 21:45:06 +02:00
twinaphex 4697d10e8c (get_value) Implement system information too 2016-05-18 21:43:07 +02:00
twinaphex 70a4361d29 Split up default get_value callback some more 2016-05-18 21:41:37 +02:00
twinaphex 3d87398011 Cleanup 2016-05-18 21:35:57 +02:00
twinaphex 09b3a6f2c5 Create separate callback for core option representation 2016-05-18 21:22:58 +02:00
twinaphex 8b93439738 Backport this 2016-05-18 21:21:58 +02:00
twinaphex d53b245528 Cancel task instead 2016-05-18 17:37:43 +02:00
twinaphex 7aadde73d8 Handle cb return error code for task cancellation 2016-05-18 17:32:39 +02:00
Twinaphex 3cf591ec09 (tasks/task_image.c) refactor cb_nbio_image_menu_thumbnail 2016-05-18 17:27:05 +02:00
twinaphex e21a655dc6 (RPNG) Use image process codes 2016-05-18 17:18:36 +02:00
twinaphex 5050ccf519 Move entry up 2016-05-18 15:43:20 +02:00
twinaphex b5b3d699bf (System Information) Show CPU Architecture 2016-05-18 15:42:16 +02:00
twinaphex 0986e2af7f Add frontend_driver_get_cpu_architecture 2016-05-18 15:34:03 +02:00
twinaphex 64a9cd29d3 (System Information) Add CPU Cores 2016-05-18 14:39:44 +02:00
twinaphex 5488806108 Add entries to system information 2016-05-18 14:36:23 +02:00
twinaphex de2d15c716 Add extra image format support to targets 2016-05-18 13:39:42 +02:00
twinaphex b052f07f6b Add HAVE_RBMP switch 2016-05-18 13:34:04 +02:00
twinaphex 9b572d0fe4 Make RBMP optional too 2016-05-18 13:28:20 +02:00
twinaphex c369a00a3e Start working towards making image viewer core no longer
dependent on stb_image
2016-05-18 13:11:09 +02:00
twinaphex 7e36dcb27f move video_texture_image to libretro-common and rename it to image_texture.c 2016-05-18 12:58:00 +02:00
Alcaro 4fd3a4743a Another todo 2016-05-18 12:51:17 +02:00
twinaphex 265c931c46 (gfx/video_texture_image.c) remove dependencies 2016-05-18 12:49:52 +02:00
Alcaro bc53d6fdc3 More TODO for this env. 2016-05-18 12:30:43 +02:00
twinaphex e2b5c69af9 (gfx/video_texture_image.c) Cleanups 2016-05-18 12:17:51 +02:00
twinaphex 1ef5eee8b3 Header cleanup 2016-05-18 11:08:09 +02:00
twinaphex dd774bd13c Cleanups 2016-05-18 11:04:23 +02:00
twinaphex 9bc11731fb Start reimplementing TGA image load support 2016-05-18 10:52:23 +02:00
twinaphex 248b99e8e7 (BMP) Fix color conversion 2016-05-17 22:40:29 +02:00
twinaphex 492dd59164 Hook up BMP image loading - color channels swapped - RGBA to ARGB
conversion won't work here
2016-05-17 21:38:51 +02:00
twinaphex 4309793b1d Add rbmp.c 2016-05-17 21:21:45 +02:00
Alcaro 56ce7b9b22 because @leiradel wants me to 2016-05-17 21:08:28 +02:00
twinaphex cecb50bd19 (RJPEG) Cleanups 2016-05-17 20:30:35 +02:00
twinaphex 4af31cee97 (ARM NEON) Buildfix 2016-05-17 17:00:16 +00:00
twinaphex 070b7b78b1 Create matrix_4x4_copy 2016-05-17 18:12:43 +02:00
twinaphex 8b915bbc22 Add memalloc_alloc_aligned 2016-05-17 16:56:13 +02:00
twinaphex 8c640a28c6 (RJPEG) Remove unused rjpeg_image_load 2016-05-17 16:40:11 +02:00
twinaphex 558dfd64f2 Exit video_texture_image_load_internal if we build
without HAVE_RJPEG/HAVE_RPNG depending on content type
2016-05-17 16:34:23 +02:00
twinaphex 1166be62ae (gfx/video_texture_image.c) Drop more implementation details 2016-05-17 16:32:53 +02:00
twinaphex 52948b436e We can take out RPNG implementation details out of video_texture_image.c
now
2016-05-17 16:23:22 +02:00
twinaphex e7e9e90b0d (gfx/video_texture_image.c) Cleanup 2016-05-17 16:15:37 +02:00
twinaphex b268869669 (gfx/video_texture_image.c) Refactor - go through image_transfer
interface
2016-05-17 16:11:37 +02:00
twinaphex 99bcf5946c Take out DEBUG printfs 2016-05-17 16:04:54 +02:00
twinaphex 7a282eab23 (rbmp_encode.c) Cleanups 2016-05-17 15:58:50 +02:00
twinaphex 2559139154 Cleanup tasks_save_ram.c 2016-05-17 15:32:50 +02:00
twinaphex 4a0334b4fa Turn content_push_to_history_playlist to static function 2016-05-17 15:22:26 +02:00
twinaphex 9b421948e4 Create tasks/task_save_state.c 2016-05-17 15:21:09 +02:00
twinaphex 81c7a8ac04 Create task_save_ram.c 2016-05-17 15:18:03 +02:00
twinaphex ce434a7f1c frontend.c - cleanup headers 2016-05-17 15:11:56 +02:00
twinaphex 86a82a47f6 (task_screenshot.c) Another cleanup 2016-05-17 15:04:28 +02:00
twinaphex df3547c65f (task_screenshot.c) Another cleanup 2016-05-17 15:03:17 +02:00
twinaphex 679c0e829c Cleanup 2016-05-17 15:02:25 +02:00
twinaphex 07c56b4340 (task_screenshot.c) Cleanup 2016-05-17 15:00:46 +02:00
twinaphex 747bac1cca task_screenshot.c - cleanups 2016-05-17 15:00:18 +02:00
twinaphex ce240dd47f Move async job code to retroarch.c 2016-05-17 14:40:04 +02:00
twinaphex 146d2c8a1d Rename screenshot.c to tasks/task_screenshot 2016-05-17 14:31:33 +02:00
twinaphex 5555d18a52 Cleanup 2016-05-17 14:24:43 +02:00
twinaphex a64f0a24c6 (RJPEG) Cleanups 2016-05-17 14:07:05 +02:00
twinaphex 50c176310c Add jpeg extension too 2016-05-17 13:55:14 +02:00
Twinaphex beac855ff7 (RJPEG) Remove unused variable 2016-05-17 13:51:42 +02:00
twinaphex ce0376e382 Remove debug printf 2016-05-17 13:50:35 +02:00
twinaphex ee90ce4b54 Ability to select JPEG wallpapers now too 2016-05-17 13:45:47 +02:00
twinaphex 0e3ff650c2 Remove WANT_RPNG 2016-05-17 13:41:40 +02:00
twinaphex 25ec6a8872 Add HAVE_JPEG to project files 2016-05-17 13:39:06 +02:00
twinaphex f052ebf872 Set #if 0 to 1 to test JPEG thumbnails 2016-05-17 13:19:47 +02:00
twinaphex 185050075a (RJPEG) Cleanups 2016-05-17 12:56:11 +02:00
twinaphex 6c79ecdae7 (RJPEG) Cleanups 2016-05-17 12:52:45 +02:00
twinaphex 808004a132 (RJPEG) Cleanups 2016-05-17 12:47:46 +02:00
twinaphex 609d00b3d7 (RJPEG) Image needs to be converted from RGBA to ARGB 2016-05-17 12:17:45 +02:00
twinaphex 9202256c3c Don't need rjpeg__jpeg_test 2016-05-17 12:02:24 +02:00
twinaphex a5cf78fd68 only bind to menu_environment_get when content_info->environ_get is
NULL
2016-05-17 10:35:57 +02:00
Twinaphex b83e43e8ce Fix 'Close Content' when menu is active 2016-05-17 10:15:43 +02:00
twinaphex 64c176288b Should fix JPEG decoding tasks 2016-05-17 10:07:40 +02:00
twinaphex c62f8cc7f4 (algorithms/mismatch.c) __STDC_LIMIT_MACROS not necesary here 2016-05-17 09:21:30 +02:00
twinaphex 747fe1ae63 (Cocoa) Remove obsolete forward declaration 2016-05-17 09:18:37 +02:00
Twinaphex 679cabd430 (OSX) Hopefully this GL hack is no longer necessary on 10.5-era OSX 2016-05-17 09:15:56 +02:00
Twinaphex 52937d4b02 Fix CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_COMPANION_UI 2016-05-17 09:14:18 +02:00
twinaphex fcf2decb2e Remove persist argument 2016-05-17 09:07:41 +02:00
Twinaphex 47cb3b899a Fix deferred content loaded from menu 2016-05-17 08:53:25 +02:00
twinaphex e2e53026aa rarch_main - reduce a lot of code duplication 2016-05-17 08:19:50 +02:00
twinaphex 80ce237878 (HAVE_MENU not defined) Buildfixes 2016-05-17 08:02:13 +02:00
twinaphex 6c9715027f Add HAVE_MENU ifdefs 2016-05-17 07:53:38 +02:00
twinaphex 0d850b9bda Improve content_load_wrapper - pushing to the history list should work again 2016-05-17 07:36:18 +02:00
Alcaro c19a39f49c Set calling convention for those pointers. (Yes, it's ugly.) 2016-05-16 23:51:11 +02:00
twinaphex 4b2d9a9ae5 (ui_win32) Include tasks_internal.h 2016-05-16 20:21:53 +02:00
twinaphex e9d29d246a (GLSM) Buildfix 2016-05-16 20:12:33 +02:00
twinaphex 2fa1c5abb2 (GLSM) Expand GLSM 2016-05-16 20:07:29 +02:00
twinaphex 3f9afce2cd (GLSM) Extend GLSM 2016-05-16 19:43:05 +02:00
twinaphex 9e9584c42d (GLSM) Add documentation 2016-05-16 19:11:38 +02:00
twinaphex d2fc91295e Revert "(Apple) Add workarounds for Apple when not using GL core profile"
This reverts commit 1be3042ef9.
2016-05-16 18:55:06 +02:00
twinaphex 1be3042ef9 (Apple) Add workarounds for Apple when not using GL core profile 2016-05-16 18:52:53 +02:00
twinaphex b9dde5320f (Menu) Buildfixes 2016-05-16 18:34:33 +02:00
twinaphex 6c62c297fd Cleanup 2016-05-16 17:32:38 +02:00
twinaphex bb1d1da693 Remove runloop_iterate_data 2016-05-16 17:29:02 +02:00
twinaphex e10270d459 Delete runloop_prepare_dummy 2016-05-16 17:19:16 +02:00
twinaphex d681d30249 Move code to task_content.c 2016-05-16 17:14:05 +02:00
twinaphex fa5971737e Implement CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE 2016-05-16 17:07:11 +02:00
twinaphex 0f35487e17 (menu_content.c) Cleanup 2016-05-16 17:02:20 +02:00
twinaphex 064e6a70bc Cleanup 2016-05-16 17:01:31 +02:00
twinaphex 6305f12ba2 Turn content_load function static 2016-05-16 16:44:34 +02:00
twinaphex 722eb5a69c Move content.c code to task_content.c 2016-05-16 16:42:33 +02:00
twinaphex 18a991e014 rarch_main - use rarch_task_push_content_load 2016-05-16 16:38:27 +02:00
twinaphex 3e91a4bb68 Rename menu_content_load to content_load_wrapper 2016-05-16 16:32:18 +02:00
twinaphex f70dc77a61 Pass content_ctx_info_t pointer to rarch_task_push_content 2016-05-16 16:25:16 +02:00
Twinaphex 81f669ca61 (Cocoa) Buildfix 2016-05-16 15:44:21 +02:00
twinaphex cb801ec065 (Windows) Buildfixes 2016-05-16 15:40:08 +02:00
twinaphex c66219846f (mismatch.h) Add another header 2016-05-16 15:39:15 +02:00
twinaphex e95bb7e37a (Windows) Another buildfix 2016-05-16 15:36:31 +02:00
twinaphex 8cd2d1deff (Windows) Buildfix 2016-05-16 15:35:00 +02:00
twinaphex 3678c4e72a menu_content_load - cleanups 2016-05-16 15:17:28 +02:00
twinaphex 9c33d91e68 Refactor content task code 2016-05-16 15:09:04 +02:00
twinaphex a687c47f7e Move command_event_cmd_exec to tasks/task_content.c 2016-05-16 14:58:08 +02:00
twinaphex 923d0a879b Reimplement menu_content_load_from_playlist 2016-05-16 14:54:26 +02:00
twinaphex 75160c6524 Reimplement task_content.c 2016-05-16 14:44:28 +02:00
twinaphex 4d30d931fe Move some logic to rarch_task_push_content_load_default 2016-05-16 14:33:50 +02:00
twinaphex 3cb26268ee Start writing rarch_task_push_content_load_default 2016-05-16 14:27:11 +02:00
twinaphex d4732d048e Start adding switch 2016-05-16 14:23:13 +02:00
twinaphex fe2eb7f4c1 Add mode to rarch_task_push_content_load_default to make
it explicit what each call does
2016-05-16 14:20:26 +02:00
twinaphex cb22859250 Add content_mode_load 2016-05-16 14:10:56 +02:00
twinaphex 57fedb9fa8 Use rarch_task_push_content_load_default 2016-05-16 13:43:14 +02:00
twinaphex 9846aeb53a Remove unused variable 2016-05-16 13:02:47 +02:00
Twinaphex 3ea4f494d7 Merge pull request #3007 from Themaister/master
Set audio enable in FFmpeg by default.
2016-05-16 12:56:09 +02:00
twinaphex 6ef0b86e30 Reimplement content loading - task_content_load 2016-05-16 12:51:55 +02:00
Hans-Kristian Arntzen 30e45902f2 Set audio enable in FFmpeg by default. 2016-05-16 12:51:09 +02:00
twinaphex 43b88cfba9 CMD_EVENT_LOAD_CONTENT_PERSIST - cleanup 2016-05-16 12:23:19 +02:00
twinaphex e13bb23ea0 (runloop.h) Cleanup 2016-05-16 12:21:38 +02:00
twinaphex d84be35fcc (PSP) Buildfix 2016-05-16 12:09:36 +02:00
twinaphex cde1fb0490 Cleanups 2016-05-16 12:08:43 +02:00
Twinaphex 96b673f809 (iOS) Buildfix 2016-05-16 11:35:28 +02:00
twinaphex 65d33700d4 Move audio_utils to libretro-common as s16_to_float 2016-05-16 11:33:49 +02:00
twinaphex a3ca1029f0 Get rid of this file 2016-05-16 11:25:11 +02:00
twinaphex 3725644ce6 Rename audio_convert_s16_to_float 2016-05-16 11:24:34 +02:00
twinaphex c21f84fd9b Simplify audio_convert_get_cpu_features 2016-05-16 11:18:55 +02:00
Twinaphex 0c1d639911 (iOS) Buildfix 2016-05-16 11:15:46 +02:00
twinaphex 2422dfbbbe (libretro-common) Create libretro-common/conversion/float_to_s16 2016-05-16 11:11:02 +02:00
twinaphex d7b28d3b24 (state_manager.c) Remove __SSE2__ includes 2016-05-16 10:40:28 +02:00
twinaphex 1405db5b19 Move mismatch.c to libretro-common/algorithms 2016-05-16 10:27:20 +02:00
twinaphex 08e637a573 Add Vulkan check back 2016-05-16 10:08:10 +02:00
twinaphex 9a43dfda51 Cleanups 2016-05-16 10:05:39 +02:00
twinaphex 99855eb666 Rename more performance counter functions 2016-05-16 10:03:31 +02:00
twinaphex fd951be053 Rename retro_perf_clear 2016-05-16 10:00:50 +02:00
twinaphex 281a33d61f Rename function to performance_counter_init 2016-05-16 09:58:45 +02:00
twinaphex f5bc75c640 Rename retro_perf_start/retro_perf_stop 2016-05-16 09:53:54 +02:00
twinaphex 18355d4748 Rename retro_perf_stop 2016-05-16 09:48:14 +02:00
twinaphex 449c7483cd Rename content_playlist_ to playlist_ 2016-05-16 09:07:44 +02:00
twinaphex c0e447a3af Get rid of ununused variable 2016-05-16 08:46:06 +02:00
twinaphex afa99db9dc (Vulkan Windows/WGL) Change ifdef for Griffin 2016-05-16 08:38:17 +02:00
twinaphex b9ce94b360 (WGL) Change ifdef 2016-05-16 08:36:22 +02:00
twinaphex 0433d3ca6e (WGL) Make context driver more modular 2016-05-16 08:34:56 +02:00
twinaphex 822d66f401 (WGL) Avoid some warnings 2016-05-16 08:25:14 +02:00
twinaphex a7502a3599 Turn HAVE_VULKAN to auto 2016-05-16 07:57:10 +02:00
twinaphex 01e3362f21 Remove unused variable 2016-05-16 07:52:26 +02:00
twinaphex 0d833c903a Merge remote-tracking branch 'origin/vulkan-windows' 2016-05-16 07:51:01 +02:00
twinaphex cda8e7b560 Rename gl_init_vao to gl_check_vao 2016-05-16 06:14:32 +02:00
twinaphex 1983604134 Remove GLSM_CTL_IS_FRAMEBUFFER_LOCKED 2016-05-16 06:02:03 +02:00
twinaphex 8de39f261c (GLSL) Remove unused variables 2016-05-16 05:58:00 +02:00
twinaphex e2cc3bc08d Create gl_query_core_context_in_use 2016-05-16 05:55:42 +02:00
twinaphex c28b4da58c Remove more dependencies on gl pointer 2016-05-16 05:50:39 +02:00
twinaphex 8f2c665dc7 Remove dependence on gl pointer for querying extensions 2016-05-16 05:47:34 +02:00
twinaphex e5f00e8346 (PS3) Non-zipped rom file loading should work again 2016-05-15 20:45:21 +02:00
twinaphex c010d81919 (PS3) Enable GLUI/XMB 2016-05-15 20:26:53 +02:00
twinaphex b4abec5181 Cleanups 2016-05-15 19:59:03 +02:00
twinaphex d63e7defb5 (GLSL) Remove more code 2016-05-15 19:58:02 +02:00
twinaphex 67d08f6790 Restore glsl_set_params 2016-05-15 19:56:53 +02:00
twinaphex c15ec92c83 (Cg) set_params - don't use set_uniform_parameter function - fixes PS3 port 2016-05-15 19:03:39 +02:00
twinaphex 2f69c20e39 Revert "(Shaders) Get rid of third parameter"
This reverts commit 52d6a21e55.
2016-05-15 17:26:23 +02:00
twinaphex 52d6a21e55 (Shaders) Get rid of third parameter 2016-05-15 17:22:55 +02:00
twinaphex 4ae92cfc4b (Android) Bake in Vulkan, and use spirv-cross now 2016-05-15 14:02:48 +02:00
twinaphex e730dd6ae2 (Android) Change STL 2016-05-15 13:53:12 +02:00
twinaphex acce19d5b3 Cleanups 2016-05-15 10:19:07 +02:00
twinaphex a9c959b7e5 REmove RUNLOOP_CTL_CHECK_IDLE_STATE 2016-05-15 10:14:23 +02:00
twinaphex 73cc9c4b15 Rename RUNLOOP_CTL_COREOPTS_GET 2016-05-15 10:09:41 +02:00
twinaphex 01777ac500 (GLSM) Add some documentation 2016-05-15 10:05:31 +02:00
twinaphex cb73de77e9 (libretro-common) Update 2016-05-15 06:59:23 +02:00
twinaphex f8982a89d7 Add vector_3.c 2016-05-15 06:46:41 +02:00
twinaphex 271f4b6f8d Update 2016-05-15 06:07:25 +02:00
twinaphex b56f880c44 (memalign) Cleanups 2016-05-15 06:06:07 +02:00
twinaphex 00d0cdd04e Merge branch 'master' of https://github.com/libretro/RetroArch into staging 2016-05-15 04:22:01 +02:00
Alcaro 33e9003107 This is just noise. 2016-05-14 23:20:35 +02:00
twinaphex 92b1398a79 Fix CXX_BUILD warnings 2016-05-14 16:49:29 +02:00
twinaphex c1633a8695 Add jpeg to retroarch_print_features 2016-05-14 16:40:09 +02:00
twinaphex 4680d7059a (platform_linux.c) Cleanups 2016-05-14 16:34:28 +02:00
twinaphex ca0634e16d Check if file exists for all power management routines 2016-05-14 16:01:29 +02:00
twinaphex 2ea009d301 Check if power management file exists first before trying to
access it
2016-05-14 15:59:22 +02:00
twinaphex 8b9cabf41d Show VFPv3/VFPv4 2016-05-14 13:37:07 +02:00
twinaphex 1e27312c25 Get rid of unused functions 2016-05-14 13:35:50 +02:00
twinaphex cd0b925fa1 Try to see if this gets us past the crash 2016-05-14 06:00:53 +02:00
twinaphex d3f4be0bbc (features_cpu.c) Fix mingw error 2016-05-14 02:54:56 +02:00
twinaphex 9e1276d76f (MSVC) Buildfixes 2016-05-14 01:32:05 +02:00
twinaphex 3257ecdaef (features_cpu.c) Move _WIN32 up in priority 2016-05-14 01:27:09 +02:00
twinaphex 23f410c5fe (RPNG) Fix test 2016-05-14 01:12:05 +02:00
twinaphex f8e99403a4 Cleanups 2016-05-14 00:48:40 +02:00
twinaphex 42adb48d9c (task_image.c )Cleanups 2016-05-13 15:18:40 +02:00
twinaphex acbc9116e3 Turn nbio_image_handle_t member image into pointer 2016-05-13 15:00:44 +02:00
twinaphex 7a16cf8806 Revert "(RJPEG) Remove rjpeg_test"
This reverts commit 5a4b062b0d.
2016-05-13 13:31:10 +02:00
twinaphex e56abc03b3 (rjpeg_process_image) Handle error 2016-05-13 11:15:31 +02:00
twinaphex 5a4b062b0d (RJPEG) Remove rjpeg_test 2016-05-13 11:10:59 +02:00
twinaphex 19eaa05040 (RJPEG) Cleanups 2016-05-13 10:55:22 +02:00
twinaphex fad7f8c1df Cleanups 2016-05-13 10:28:44 +02:00
twinaphex 7c1938b674 Rename task functions 2016-05-13 10:19:53 +02:00
twinaphex 025c51e4c9 (task_image.c) Rename functions 2016-05-13 10:13:36 +02:00
twinaphex bdf4a173f2 Remove file transfer frame_count 2016-05-13 10:10:54 +02:00
twinaphex a283923393 Get rid of image->frame_count 2016-05-13 10:10:23 +02:00
twinaphex 101539b489 (RJPEG) more internal changes 2016-05-13 09:58:42 +02:00
twinaphex ee95af8ae3 (RPNG) Cleanup 2016-05-13 09:51:08 +02:00
twinaphex fa27a8447e Rename RPNG functions 2016-05-13 09:49:38 +02:00
twinaphex 1623d538d5 Add rjpeg_set_buf_ptr 2016-05-13 09:42:02 +02:00
twinaphex 1512d36220 rjpeg_process_image should not set the texture image's width/height -
that is done later
2016-05-13 09:34:42 +02:00
twinaphex 1e872108b7 (RJPEG) Add back rgba to bgra routines 2016-05-13 09:27:58 +02:00
twinaphex f2912eb4c3 Cleanup 2016-05-13 09:22:29 +02:00
twinaphex 8efe2de0ec (RJPEG/RPNG) Add debug logs and change function signatures 2016-05-13 09:08:32 +02:00
twinaphex 5068accc4e Start preparing image transfer for RJPEG 2016-05-13 08:50:50 +02:00
twinaphex 17d39fd54f Add rjpeg_free 2016-05-13 08:16:13 +02:00
twinaphex d3df016005 (RJPEG) Add rjpeg_alloc 2016-05-13 08:13:21 +02:00
twinaphex 98a403defd Don't let it fall through when trying to use certain env callbacks 2016-05-13 04:53:35 +02:00
twinaphex 4ba5ae42a6 Add HAVE_CHEEVOS ifdefs 2016-05-13 04:41:46 +02:00
twinaphex 13f49e1d9a Split up image transfer code to separate file 2016-05-13 04:38:21 +02:00
twinaphex 6daf6e2270 Cleanups 2016-05-13 04:33:11 +02:00
twinaphex d040263a83 image_transfer_new/image_transfer_free 2016-05-13 04:28:16 +02:00
twinaphex f20b969165 (libretro-common) features_cpu - reimplement ARM cpu features code 2016-05-13 04:02:08 +02:00
Twinaphex af39105c04 Merge pull request #2994 from leiradel/master
Added RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS
2016-05-13 03:41:12 +02:00
Andre Leiradella bc8b75148e updated with upstream 2016-05-12 22:36:49 -03:00
Andre Leiradella 031686f27a added RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS; cheevos now work with mmaps 2016-05-12 22:03:18 -03:00
twinaphex be506c6d64 (task_image.c) Cleanups 2016-05-12 13:13:14 +02:00
twinaphex 3bdfbb6318 features_cpu.c - cleanups 2016-05-12 12:22:32 +02:00
twinaphex 597102e863 Remove __ARM_ARCH__ ifdefs 2016-05-12 12:15:53 +02:00
twinaphex cba281052a Rename np_ functions 2016-05-12 12:03:43 +02:00
twinaphex 315c6b9687 Cleanups 2016-05-12 10:44:15 +02:00
twinaphex 193eb62354 (Android) Add include dirs 2016-05-12 10:29:19 +02:00
twinaphex a7d4379011 Rename np_is_server to netplay_is_server 2016-05-12 10:20:14 +02:00
twinaphex df3b090d7a Revert "Create runloop_get_system_info/runloop_free_system_info/runloop_init_system_info"
This reverts commit 35bf38e05c.
2016-05-12 09:37:21 +02:00
twinaphex 6b33c19802 Fix CXX_BUILD 2016-05-12 09:31:25 +02:00
twinaphex 35bf38e05c Create runloop_get_system_info/runloop_free_system_info/runloop_init_system_info 2016-05-12 09:25:52 +02:00
twinaphex c1bfe795f8 Create runloop_prepare_dummy 2016-05-12 09:04:31 +02:00
Twinaphex 1d98d3c17f Merge pull request #2991 from Ezio-PS/master
Updated Italian Translation
2016-05-12 08:23:39 +02:00
Ezio-PS e1d9e34183 Updated Italian Translation 2016-05-12 08:14:10 +02:00
twinaphex f0b99edafc Prevent some warnings/errors from occurring with MESA_DEBUG 2016-05-12 04:29:36 +02:00
twinaphex 21438fc0af Some buildfixes for GL_DEBUG 2016-05-12 02:58:09 +02:00
twinaphex 2321ee829f Add glsym_es3 2016-05-11 23:17:42 +02:00
neville 67e64f4ca6 gl_check_mipmap - don't look for GL_EXT_framebuffer_object here
- breaks OSX PPC
2016-05-11 23:04:48 +02:00
twinaphex c9d3936ee5 Check for GL_EXT_framebuffer_object too 2016-05-11 22:49:41 +02:00
twinaphex 670b564f13 Add HAVE_RTGA switch 2016-05-11 21:57:41 +02:00
twinaphex 367150b487 Cleanups 2016-05-11 21:48:30 +02:00
twinaphex 1abe81b222 Create retroarch_replace_config 2016-05-11 21:44:52 +02:00
twinaphex 07101f48d3 Move struct to content.c 2016-05-11 21:41:19 +02:00
twinaphex e3802c499f Add RJPEG header include 2016-05-11 21:38:33 +02:00
twinaphex 28dd2c2545 Add HAVE_RJPEG ifdefs 2016-05-11 21:27:17 +02:00
twinaphex 4100bf95b4 Able to compile without RPNG support 2016-05-11 21:22:45 +02:00
twinaphex 90d7722125 Remove CMD_EVENT_QUIT_RETROARCH 2016-05-11 20:56:02 +02:00
twinaphex cf3f8d587c Cleanup 2016-05-11 20:53:28 +02:00
twinaphex a082198d4b Change retroarch_main_init 2016-05-11 20:50:34 +02:00
twinaphex 0e972b9804 Rename rarch_git_version to retroarch_git_version 2016-05-11 20:44:24 +02:00
twinaphex 5cc86384b8 (task_image.c) Cleanups 2016-05-11 20:38:09 +02:00
twinaphex dc46c0d012 C89 build-fix 2016-05-11 19:38:46 +02:00
twinaphex 322d11e387 Avoid some warnings when compiling with --disable-netplay 2016-05-11 19:37:56 +02:00
twinaphex 22bea3a50b Remove some RUNLOOP_CTL_ enums 2016-05-11 19:28:22 +02:00
twinaphex daf031173f Remove unused variable 2016-05-11 19:25:15 +02:00
twinaphex 123025665d (Qb) When threads are disabled, disable cheevos and/or libusb too 2016-05-11 19:11:09 +02:00
twinaphex 5845a9944d Add more HAVE_THREADS ifdefs 2016-05-11 19:02:43 +02:00
twinaphex 377f09f12a Change back retro_dirent_is_dir to hopefully avoid sshfs issues
- more rigorous testing should be applied before changing these
functions
2016-05-11 18:54:22 +02:00
twinaphex fc56f6ebdb Add some HAVE_THREADS ifdefs 2016-05-11 10:10:30 +02:00
twinaphex 78783cc2aa Buildfixes for compiling without HAVE_MENU 2016-05-11 10:06:15 +02:00
twinaphex b0342ebe44 Buildfix for compiling without ffmpeg 2016-05-11 09:52:06 +02:00
twinaphex 7ebfe1b66d Create retroarch_set_pathnames 2016-05-11 04:32:29 +02:00
twinaphex 030513bcee Create retroarch_fill_pathnames 2016-05-11 04:29:01 +02:00
twinaphex 95a6428915 RARCH_CTL_FORCE_QUIT is the same as RARCH_CTL_QUIT 2016-05-11 04:24:27 +02:00
twinaphex b9df6f52f5 Kill off a bunch of RARCH_CTL_LOAD_CONTENT enums 2016-05-11 04:22:22 +02:00
twinaphex 5ad45ea17f task_image.c - Refactors to prepare it for JPEG support 2016-05-11 04:10:42 +02:00
twinaphex e6969f7ced Cleanups 2016-05-11 04:03:21 +02:00
twinaphex 556017f23d Cleanup 2016-05-11 03:56:31 +02:00
twinaphex e6f55814a9 (task_image.c) Cleanups 2016-05-11 03:55:09 +02:00
twinaphex 1b4d744dcd (task_image.c) Cleanups 2016-05-11 03:51:26 +02:00
twinaphex 1ac30884c4 (RJPEG) Prevent warnings 2016-05-11 03:40:25 +02:00
twinaphex 4ad23c927a Take out RARCH_CONSOLE ifdefs 2016-05-11 00:40:34 +02:00
twinaphex 2c6cf33dec Take out RARCH_CONSOLE ifdef 2016-05-11 00:26:31 +02:00
Twinaphex 19afc807ef (iOS) Not sure why we are calling rarch_main() twice for iOS 2016-05-10 23:33:51 +02:00
Alcaro 8420480981 Merge pull request #2989 from leiradel/master
renamed some functions because of griffin
2016-05-10 22:41:03 +02:00
Andre Leiradella 3d7be61363 renamed some functions because of griffin 2016-05-10 17:39:20 -03:00
Twinaphex d9393d5872 Merge pull request #2986 from leiradel/master
implemented the RETRO_ENVIRONMENT_SET_MEMORY_MAPS callback
2016-05-10 22:22:40 +02:00
Andre Leiradella c62723ebe2 replaced tab by spaces 2016-05-10 16:47:14 -03:00
Andre Leiradella 44ab560dd6 pre-processed mmaps according to instructions at https://github.com/Alcaro/minir/blob/master/minircheats-model.cpp#L21 2016-05-10 16:42:13 -03:00
twinaphex eec4218ebb (RJPEG) Use features_cpu 2016-05-10 20:36:05 +02:00
twinaphex 9aed52ac65 Move performance.c to libretro-common/features/features_cpu.c 2016-05-10 20:31:27 +02:00
twinaphex 1fdc547a97 Refactor performance.c - merge Android performance code 2016-05-10 20:20:44 +02:00
twinaphex 1bef3665e2 Cleanups 2016-05-10 20:06:38 +02:00
Alcaro 2235aad731 Need these even without networking 2016-05-10 19:43:38 +02:00
Alcaro fe4ef69aaf Better check this one too. (Vulkan is the only user of that, right?) 2016-05-10 19:43:38 +02:00
twinaphex 4a7ab8366b Move libretro.h headers to libretro-common/include 2016-05-10 19:03:53 +02:00
twinaphex f49dcd0739 (performance.c ) Cleanups 2016-05-10 18:43:23 +02:00
Alcaro 7a0ff5911d Fix #2897 2016-05-10 18:34:46 +02:00
Andre Leiradella 9f4a308c1a better mmap flag visualization 2016-05-10 08:55:10 -03:00
Andre Leiradella 723463149e implemented the RETRO_ENVIRONMENT_SET_MEMORY_MAPS callback 2016-05-10 08:04:41 -03:00
Twinaphex 16894e5a5a (Griffin) Buildfix 2016-05-10 09:33:11 +02:00
twinaphex 35ea37b37f Revert "Move cpu_features to libretro-common"
This reverts commit 2b8ff3bf38.
2016-05-10 09:32:24 +02:00
twinaphex 2b8ff3bf38 Move cpu_features to libretro-common 2016-05-10 09:27:29 +02:00
twinaphex 0d371def5c Refactor performance.c code 2016-05-10 09:17:04 +02:00
twinaphex 288dbe2bd0 retro_get_cpu_features - don't spam log 2016-05-10 08:55:28 +02:00
twinaphex b79b2dca13 Create performance_counters 2016-05-10 08:53:14 +02:00
twinaphex 4a49c197c9 (task_image.c) Rename function 2016-05-10 08:31:07 +02:00
twinaphex a4ccfc4d96 Cleanups 2016-05-10 08:28:48 +02:00
twinaphex 58ae02207f Move rpng_is_valid to function 2016-05-10 08:25:18 +02:00
twinaphex 4e04588d2d Create rarch_main_data_image_iterate 2016-05-10 08:23:49 +02:00
twinaphex d160ed322e (task_image.c) Cleanup 2016-05-10 08:09:12 +02:00
twinaphex dc0616d678 CXX_BUILD fixes 2016-05-10 08:02:42 +02:00
twinaphex 55c5052253 Cleanups 2016-05-10 07:55:31 +02:00
twinaphex 8b07f39d6f Create tasks/task_image.c 2016-05-10 07:54:47 +02:00
twinaphex ea8715ca92 (RJPEG) Cleanup 2016-05-10 07:16:27 +02:00
twinaphex f3af0263ed Remove RJPEG_NO_JPEG 2016-05-10 07:15:23 +02:00
twinaphex bb063fb692 Cleanups 2016-05-10 07:13:52 +02:00
twinaphex 8d3f6c39ac Replace STBI_ with RJPEG_ 2016-05-10 07:10:42 +02:00
Twinaphex b59b56d2fc (RJPEG) Last buildfixes 2016-05-10 07:09:27 +02:00
twinaphex 3c4329aa1f (RJPEG) uniquely namespace all functions 2016-05-10 07:08:45 +02:00
Twinaphex 88f259d3ef (RJPEG) Mass renaming (pt. 1) 2016-05-10 07:05:52 +02:00
twinaphex c321c161a8 Update rjpeg 2016-05-10 06:51:58 +02:00
twinaphex 60b8cf7993 Start adding notes to task_file_transfer.c 2016-05-10 06:16:27 +02:00
twinaphex f931ce7606 Adds conversion when color shifts are BGRA 2016-05-10 06:02:00 +02:00
twinaphex 7462988f33 Use stb_image jpeg code 2016-05-10 05:50:38 +02:00
Andrés 2fb69c4a33 Merge pull request #2984 from sronsse/fixes_for_team
rbmp encode: Fix memory leak when saving image
2016-05-09 22:13:17 -05:00
Sebastien Ronsse bab8935b58 rbmp encode: Fix memory leak when saving image 2016-05-10 13:09:38 +10:00
Andrés 5e7e4c2f3a Merge pull request #2983 from sronsse/fixes_for_team
Fix for "Screenshots flipped vertically #2979"
2016-05-09 21:01:01 -05:00
Sebastien Ronsse 3db9623809 rbmp encode: Fix saving mechanism resulting in vertically flipped screenshots. 2016-05-10 11:51:56 +10:00
twinaphex b9c9df3a8b (GLSM) Buildfix 2016-05-10 03:48:05 +02:00
twinaphex 91d2af7e36 Update comments 2016-05-10 03:41:49 +02:00
twinaphex bca9c687a1 (RJPEG) Remove register storage class 2016-05-10 03:23:15 +02:00
twinaphex 71c5b4972c CXX_BUILD buildfix 2016-05-10 03:19:40 +02:00
Twinaphex f2631809bb Cleanup 2016-05-10 03:15:55 +02:00
twinaphex 7c20f2b868 Change namespace of thread functions 2016-05-10 03:14:23 +02:00
twinaphex 88ae5c0875 Rename gfx_mut_coords 2016-05-10 02:42:52 +02:00
twinaphex b2f5e2ac08 Rename gfx_font_raster_block 2016-05-10 02:42:02 +02:00
twinaphex dde471e001 Rename gfx_ structs 2016-05-10 02:39:09 +02:00
twinaphex 2ebb92834c Rename gfx_fbo_rect to video_fbo_rect 2016-05-10 02:34:36 +02:00
twinaphex 0e08dbe931 Rename gfx_coord to video_coord 2016-05-10 02:32:59 +02:00
Twinaphex 24a4436c9f Merge pull request #2981 from leiradel/master
better logging
2016-05-10 01:50:37 +02:00
Andre Leiradella 938257b1ed better logging 2016-05-09 20:44:59 -03:00
twinaphex d0f6facc0f (runloop.c) Rename functions 2016-05-10 01:44:13 +02:00
twinaphex 5d821f42a3 Turn another runloop_ctl action into a static function 2016-05-10 01:41:58 +02:00
twinaphex af2a33a8cb Move core_option_manager to managers/ 2016-05-10 01:25:47 +02:00
twinaphex 2c6d6a223c Rename core_option functions 2016-05-10 01:21:55 +02:00
twinaphex 3dc55d4e72 command.c - cleanups 2016-05-09 21:36:17 +02:00
twinaphex b3422b33fd Add parameter to command_new 2016-05-09 21:25:37 +02:00
twinaphex f15f28ce02 Refactor some command code 2016-05-09 21:23:53 +02:00
twinaphex 2691ab0c7d Rename command_event enums 2016-05-09 20:51:53 +02:00
twinaphex c6e65e1669 Rename functions 2016-05-09 20:41:59 +02:00
twinaphex 523ebed112 Combine command_event.c and command.c 2016-05-09 20:30:47 +02:00
twinaphex a98ef36d36 Rename event_cmd_ctl to command_event 2016-05-09 20:20:50 +02:00
twinaphex 3c74031c2f Rename rarch_cmd to command 2016-05-09 20:10:08 +02:00
twinaphex 1e87fed448 Change ifdef 2016-05-09 20:05:09 +02:00
twinaphex 6bbe5fb83a Avoid warning 2016-05-09 19:24:10 +02:00
twinaphex 1cd98f1cf7 (Androd) Buildfix 2016-05-09 19:21:40 +02:00
twinaphex 6ae20f2016 Create managers/ dir - move cheats.c and state_manager.c to it 2016-05-09 18:20:52 +02:00
twinaphex 7ba97e8703 Remove core_info_ctl 2016-05-09 18:11:17 +02:00
twinaphex 7ca75d46f8 Move net_http_special to network/ 2016-05-09 17:47:45 +02:00
twinaphex 751872afa4 Move netlogger.c to network/ 2016-05-09 17:45:21 +02:00
twinaphex 3722826e0a Rename netplay/ to network/ 2016-05-09 17:43:38 +02:00
twinaphex 344d1bf949 move remote.c to input/ 2016-05-09 17:37:29 +02:00
twinaphex d57574a2ca Rename some autosve functions 2016-05-09 08:17:35 +02:00
twinaphex 5f3f578311 Further otpimization 2016-05-09 08:03:36 +02:00
twinaphex 8bcc889d90 Comment this out - makes all tasks way too slow 2016-05-09 07:54:45 +02:00
twinaphex c82505ed9e Show FPS in title bar only when 'Display Framerate' is enabled 2016-05-09 07:44:13 +02:00
twinaphex b72f7001de (retroarch.c) Rename functions 2016-05-09 07:24:28 +02:00
twinaphex 685b234350 (remote.c) Rename functions 2016-05-09 07:19:18 +02:00
twinaphex 372e7d94cd Rename rewind.c to state_manager 2016-05-09 07:14:10 +02:00
twinaphex f8a7154557 Rename rarch_ functions 2016-05-09 07:09:26 +02:00
twinaphex 3b344257d7 (netplay.c) Refactor 2016-05-09 06:46:08 +02:00
twinaphex a66aa1c50d Cleanups 2016-05-09 06:42:59 +02:00
twinaphex 87b83ecf56 (RetroPad) Use socket_set_target 2016-05-09 06:40:51 +02:00
twinaphex e87f030246 C89_BUILD fixes 2016-05-09 05:50:08 +02:00
twinaphex 44ed8d1116 CXX_BUILD fixes 2016-05-09 05:48:47 +02:00
twinaphex d50109f60a video_texture_image.c - prevent warning 2016-05-09 04:56:41 +02:00
twinaphex 7272a3fdaf Prevent some warnings 2016-05-09 04:54:25 +02:00
twinaphex e1d04737cb (OSX PPC) Add line to libretro-common/include/compat/zlib.h 2016-05-09 04:51:18 +02:00
twinaphex 9c1d1f3af8 (GL) Remove these conditionals - mipmap support should be
detected at runtime
2016-05-09 04:38:20 +02:00
twinaphex 3dfd8a0584 Split up vertex/fragment shader conditionals for XMB ribbon 2016-05-09 04:31:21 +02:00
twinaphex 3e40b77108 Improve check for gl_check_mipmap 2016-05-09 03:49:57 +02:00
twinaphex ca976aeda9 Make gl_load_texture_data a static function 2016-05-09 03:44:46 +02:00
twinaphex 4e535f77c6 Add gl_check_mipmap 2016-05-09 03:40:59 +02:00
twinaphex d57395effb Define HAVE_ZLIB_DEFLATE 2016-05-09 02:51:51 +02:00
twinaphex 3f3adf0c0e Add return value for inet_aton 2016-05-09 02:50:02 +02:00
Twinaphex 6847ae689a Merge pull request #2978 from lakkatv/master
(XMB) Separate ps3 and psp layouts, for Gamegirl
2016-05-09 00:20:25 +02:00
Jean-André Santoni 7bb4af1e6d (XMB) separate ps3 and psp displays and start introducing more differences 2016-05-09 05:12:40 +07:00
twinaphex e07bba66f3 Buildfix 2016-05-08 23:52:05 +02:00
Jean-André Santoni 91835daee8 (XMB) Refactor variable names 2016-05-09 04:22:22 +07:00
Jean-André Santoni a5f06e9250 (XMB) Refactor variable names 2016-05-09 04:19:34 +07:00
Jean-André Santoni 8ac6d05e55 (XMB) Use variables instead of defines for icon alpha. 2016-05-09 04:16:23 +07:00
Twinaphex dad33da9cf Merge pull request #2977 from lakkatv/master
(XMB) Initial support for the Pixel theme, for Gamegirl
2016-05-08 23:12:54 +02:00
twinaphex 725c202498 Remove input_driver_ctl 2016-05-08 23:12:04 +02:00
Jean-André Santoni aa32b5cc6e (XMB) Use variables instead of defines for icon zoom. 2016-05-09 04:09:52 +07:00
Jean-André Santoni dfe9419522 (XMB) Use variables instead of defines for icon placement 2016-05-09 04:05:11 +07:00
Jean-André Santoni 08de0c75eb (XMB) Variable shadow offset 2016-05-09 03:57:02 +07:00
Jean-André Santoni ea53567520 (XMB) Initial support for the Pixel theme, for Gamegirl 2016-05-09 03:45:38 +07:00
Twinaphex 21907c77c8 Merge pull request #2976 from lakkatv/master
(XMB) Unhardcode shadow offset
2016-05-08 22:20:15 +02:00
Jean-André Santoni 464ed074e2 (XMB) Unhardcode shadow offset 2016-05-09 03:12:54 +07:00
Twinaphex 6ca2223671 Merge pull request #2975 from t-paul/vg-compile-fix
Fix typos in VideoCore driver causing compile error on Raspberry Pi.
2016-05-08 22:02:27 +02:00
Twinaphex 219f2f2430 Merge pull request #2974 from lakkatv/master
(XMB) Disable an optimization bug fixes a display bug
2016-05-08 22:00:43 +02:00
twinaphex 9c1885a46e Fix Display FPS 2016-05-08 22:00:30 +02:00
Jean-André Santoni 7341501e7e (XMB) Disable an optimization bug fixes a display bug 2016-05-09 02:58:35 +07:00
Torsten Paul 737e2832f2 Fix typos in VideoCore driver causing compile error on Raspberry Pi. 2016-05-08 21:55:46 +02:00
twinaphex 3002777196 Bugfix 2016-05-08 21:30:06 +02:00
twinaphex 1b8e8ac22a Remove video_shader_driver_ctl 2016-05-08 21:11:27 +02:00
twinaphex ed5954420b (MSVC) Buildfixes 2016-05-08 20:40:42 +02:00
twinaphex b20d550cc4 Rename video context driver functions 2016-05-08 20:32:56 +02:00
Twinaphex be1daeebd7 Merge pull request #2971 from t-paul/screensaver-fix
Suppress screensaver only if requested by user settings.
2016-05-08 20:26:39 +02:00
twinaphex 7399ba386a Rename gfx_ctx_ prefix 2016-05-08 19:24:23 +02:00
Torsten Paul 1979ea52d2 Suppress screensaver only if requested by user settings. 2016-05-08 19:22:45 +02:00
twinaphex bc74e7199b Move variables outside of gfx_ctx_ctl 2016-05-08 19:18:17 +02:00
twinaphex 510c804781 (Win32) Provide inet_aton implementation 2016-05-08 19:12:01 +02:00
Twinaphex 1ced4bda11 Merge pull request #2970 from t-paul/video-driver-init-fix
Ensure video_driver_frame_count is reset when the driver is (re-)initialized.
2016-05-08 19:01:12 +02:00
Torsten Paul 50a3cc3cf7 Ensure video_driver_frame_count is reset when the driver is (re-)initialized. 2016-05-08 18:48:38 +02:00
twinaphex 807b5c6325 Get rid of audio_driver_ctl 2016-05-08 18:24:25 +02:00
twinaphex 4791c37039 (Vita) Reimplement inet_ptrton for Vita 2016-05-08 18:09:03 +02:00
twinaphex de71776405 (audio driver) Cleanups 2016-05-08 18:03:09 +02:00
twinaphex 93d16aaba3 (audio driver) refactor functions 2016-05-08 18:00:32 +02:00
twinaphex 7e1a06d8dd Remove some warnings 2016-05-08 17:54:30 +02:00
twinaphex 518a83b2c3 Create audio_driver_toggle_mute 2016-05-08 17:42:20 +02:00
twinaphex ca79faa4ed Rename for consistency 2016-05-08 17:26:17 +02:00
twinaphex b1f6a7e0a1 Rename another function 2016-05-08 17:25:31 +02:00
twinaphex 8125579b7c (audio driver) Refactors 2016-05-08 17:03:51 +02:00
twinaphex 8b714d2932 (audio driver) Refactor 2016-05-08 16:54:15 +02:00
twinaphex 13998f583a (audio driver) Refactors 2016-05-08 16:50:23 +02:00
twinaphex 9dc3326d0e (audio_driver) Refactors 2016-05-08 16:45:58 +02:00
twinaphex e1307c7d4b Create audio_driver_setup_rewind 2016-05-08 16:28:24 +02:00
twinaphex 60789e0141 Cleanups 2016-05-08 16:25:26 +02:00
twinaphex e2090dc02d Vita doesn't support inet_pton either 2016-05-08 16:13:55 +02:00
twinaphex 0c05828874 Change more functions 2016-05-08 16:09:08 +02:00
twinaphex fc5f1524cc Convert more functions over 2016-05-08 16:02:46 +02:00
twinaphex 41a8496b1c Start converting functions 2016-05-08 15:53:12 +02:00
twinaphex d1eb9a0d3a Move variables outside of audio_driver_ctl 2016-05-08 15:48:12 +02:00
twinaphex 11ec23bc18 Create inet_ptrton 2016-05-08 15:41:34 +02:00
Twinaphex c3676a07b1 Merge pull request #2968 from Themaister/master
Fix inconsistencies between Vulkan and GL in ribbon.
2016-05-08 15:35:01 +02:00
Hans-Kristian Arntzen f91b36eec8 Fix inconsistencies between Vulkan and GL in ribbon.
Also fixes a shitty bug in menu_driver_draw_bg with pointer to stack.
2016-05-08 15:21:53 +02:00
Twinaphex b9d3de70ab Merge pull request #2967 from Themaister/master
Some ioctl cleanups, XMB ribbon in Vulkan.
2016-05-08 15:13:27 +02:00
Hans-Kristian Arntzen 8870e85395 More fixes for menu_display_ctl.
Grep shows nothing now.
2016-05-08 14:18:12 +02:00
Hans-Kristian Arntzen 66c4f608e6 Clear out rest of video_driver_ctl use. 2016-05-08 14:10:28 +02:00
Hans-Kristian Arntzen d723411436 De ioctl video_driver. 2016-05-08 14:00:51 +02:00
Hans-Kristian Arntzen ade5131833 Vulkan: Move to SPIRV-Cross. 2016-05-08 12:43:58 +02:00
Hans-Kristian Arntzen 951c3e4085 De-ioctl menu display interface.
Holy crap ...
2016-05-08 12:38:46 +02:00
Hans-Kristian Arntzen 464a4add66 XMB ribbon works in Vulkan. 2016-05-08 11:11:28 +02:00
Hans-Kristian Arntzen 26cfedc546 Add XMB ribbon shaders to Vulkan. 2016-05-08 09:54:36 +02:00
Hans-Kristian Arntzen 8faa6231db Fix some warnings. 2016-05-08 09:37:27 +02:00
twinaphex 2f6baffe45 Expand net_socket.c 2016-05-08 07:24:10 +02:00
twinaphex 897a058d29 (PS3) Avoid warning 2016-05-08 07:11:49 +02:00
twinaphex 889306f8ad Remove unused variable 2016-05-08 07:10:51 +02:00
twinaphex b909342e12 Cleanup 2016-05-08 07:00:28 +02:00
twinaphex b21f098119 Cleanups 2016-05-08 06:58:52 +02:00
twinaphex a9cec38c1d Remove RUNLOOP_CTL_IS_FRAME_COUNT_END 2016-05-08 06:36:52 +02:00
twinaphex 8e599379f6 Create runloop_is_focused 2016-05-08 06:34:25 +02:00
twinaphex 3f36c7f877 Get rid of RUNLOOP_CTL_FRAME_TIME 2016-05-08 06:31:12 +02:00
twinaphex 13e67aa44e Create runloop_iterate_data 2016-05-08 06:29:11 +02:00
twinaphex 0f7cdeaf78 Reduce two enums 2016-05-08 06:09:39 +02:00
twinaphex e165954395 Rename libretro_version_1 to core_impl 2016-05-08 05:29:10 +02:00
twinaphex 7e9eb5b6c4 Cleanup 2016-05-08 05:21:31 +02:00
twinaphex 5c269d38a1 (content.c) Remove content_ctl 2016-05-08 05:17:31 +02:00
twinaphex 6bf7112282 Cleanup another enum 2016-05-08 04:42:28 +02:00
twinaphex fadf87e022 Remove another useless enum 2016-05-08 04:38:01 +02:00
twinaphex ccb13cdd82 remove unnecessary enum 2016-05-08 04:36:16 +02:00
twinaphex 0bd45c7f51 Add content_load 2016-05-08 04:35:00 +02:00
twinaphex 6195deb188 De-ioctl-ify content functions 2016-05-08 04:31:56 +02:00
twinaphex eb689fdd24 C89_BUILD fix 2016-05-08 04:21:56 +02:00
twinaphex b690b58f8d Another buildfix for CXX_BUILD 2016-05-08 04:20:25 +02:00
twinaphex 496fcc9798 Buildfix 2016-05-08 04:16:11 +02:00
twinaphex 1968b0a333 Dunno where this came from 2016-05-08 04:06:07 +02:00
twinaphex ae9ea8f2db (MSVC) Buildfixes 2016-05-08 04:04:50 +02:00
radius be3f0f9267 example implementation of using the menu driver to display the OSD, commented out 2016-05-07 19:51:52 -05:00
radius 6999322a53 add a function to retrieve the current OSD line 2016-05-07 19:51:51 -05:00
twinaphex a64fe6ce63 Move static variables outside of runloop_ctl 2016-05-08 01:41:32 +02:00
twinaphex 6544772fb8 De-ioctl ify core_ctl 2016-05-08 01:33:57 +02:00
twinaphex 831de5f15e Add prefix 'core' to libretro_version_1.c 2016-05-08 00:31:21 +02:00
twinaphex 80a453bad1 De-ioctlify command.c 2016-05-08 00:25:04 +02:00
twinaphex 42019bd02f People don't like ioctl functions - so here goes 2016-05-08 00:15:21 +02:00
Twinaphex 271a4a41ba Merge pull request #2964 from GeneralFailer/master
Minor capitalization fix
2016-05-07 21:45:16 +02:00
GeneralFailer fb62f9bef5 Update retroarch.1 2016-05-07 23:42:48 +04:00
twinaphex ef5da43d35 Cleanups 2016-05-07 18:35:06 +02:00
twinaphex 7f272a4bd0 Add missing parameters 2016-05-07 16:24:26 +02:00
twinaphex 0a2544c1bf (rjpeg) Try manual conversion to RGB 2016-05-07 06:55:52 +02:00
twinaphex c5895b4aa0 (libretro-common/formats/jpeg/rjpeg.c) Allocate out_img->pixels 2016-05-07 06:49:48 +02:00
twinaphex f86d4d400d Start adding jpeg hooks 2016-05-07 06:20:17 +02:00
twinaphex 7b79975516 Start adding rjpeg_image_load 2016-05-07 06:16:02 +02:00
twinaphex b2df35bd7c Correct glDeleteVertexArrays 2016-05-07 05:00:14 +02:00
twinaphex 5127536217 (libretro-common) Expand GLSM 2016-05-07 04:42:18 +02:00
twinaphex 0ab61a2428 (libretro-common) Add rjpeg 2016-05-07 04:33:54 +02:00
twinaphex 857a6ac479 Remove streams/file_stream.h 2016-05-07 04:17:33 +02:00
twinaphex 268be70fe8 Cleanups 2016-05-07 04:15:39 +02:00
twinaphex c192b8d61f (video_texture_image.c) Cleanup 2016-05-07 04:07:27 +02:00
twinaphex b8644536d2 (video_texture_image.c) Cleanups - we use nbio now in video_texture_image_load
for both TGA and PNG, and we remove the file I/O based RPNG function
2016-05-07 04:04:09 +02:00
twinaphex 9ac9ed4b36 Cleanups 2016-05-07 03:35:31 +02:00
twinaphex afd56893f5 video_texture_image - cleanups 2016-05-07 03:31:24 +02:00
twinaphex b38e269215 (GLSM) Some buildfixes 2016-05-07 01:32:34 +02:00
twinaphex f4553505a4 (GLSM) Update 2016-05-07 00:07:49 +02:00
twinaphex 7eef9b87b0 Add glTexSubImage2D 2016-05-06 23:54:48 +02:00
twinaphex d997526a1d Updates 2016-05-06 22:40:11 +02:00
twinaphex dd36a3792c (GLSM) Add new wrapper functions 2016-05-06 22:20:03 +02:00
twinaphex 5d5ad0548a Update 2016-05-06 22:15:24 +02:00
twinaphex 2e319213e3 Expand glsm 2016-05-06 22:08:49 +02:00
Alcaro e4c9ec0903 Or here. 2016-05-06 20:23:54 +02:00
Alcaro 056e8c3ab3 No need to remove function names here either. 2016-05-06 20:22:37 +02:00
Alcaro eae911bcd2 No need to remove function names, they don't slow anything down and they're invaluable for crash debugging. 2016-05-06 20:20:21 +02:00
Twinaphex 77649b2f23 Fix memory leak in async_job_free 2016-05-06 19:14:38 +02:00
twinaphex 648da7b6e6 (task_queue) Remove unused variable 2016-05-06 18:57:11 +02:00
Twinaphex a85bc7bab6 RARCH_DISPLAY_CT_LOCK_NEW - make sure lock is freed beforehand 2016-05-06 18:55:42 +02:00
Twinaphex 6708be93e4 Merge pull request #2957 from sronsse/fixes_for_team
Task retrieval mechanism
2016-05-06 16:22:52 +02:00
Twinaphex cdd199f763 Merge pull request #2958 from lakkatv/master
(Lakka) Disable buildbot updaters
2016-05-06 15:55:36 +02:00
Jean-André Santoni d757889b19 (Lakka) Disable buildbot updaters
Keeping two concurrent update systems causes a lot of bugs. Especially in our case where the buildbot stuff overrides the system stuff. Users don't get how to use both updaters properly. They end up using outdated cores or joyconfigs, or even assets. Using the Lakka updater in our case is a better solution, because it ensures version compatibility between all the components. I will do an additional effort to keep all the libretro packages up to date in Lakka.
2016-05-06 15:08:53 +07:00
Sebastien Ronsse 9f45722020 task http: Update http_task_get_transfer_list using new task retrieval mechanism 2016-05-06 16:42:17 +10:00
Sebastien Ronsse 8f6bb23f38 task queue: Implement running tasks retrieval mechanism 2016-05-06 14:41:45 +10:00
twinaphex 10fe532d29 Cleanup 2016-05-06 06:25:06 +02:00
twinaphex 5db093924c Cleanup - slock_new 2016-05-06 06:05:30 +02:00
twinaphex 9c00dd0e2e Cleanup 2016-05-06 05:51:01 +02:00
twinaphex 3dc40263ea menu_content_load_from_playlist - use path_is_valid 2016-05-06 05:38:04 +02:00
twinaphex 9cff56ea62 Cleanup 2016-05-06 05:31:17 +02:00
twinaphex b5e7861125 menu_input_frame_retropad - cleanup 2016-05-06 05:19:31 +02:00
twinaphex 4ec6cb47ec Use BIT32_SET 2016-05-06 05:16:15 +02:00
twinaphex b91ad3a70e (libretro-common) Update glsm 2016-05-06 05:08:42 +02:00
twinaphex cce9190cb2 More cleanups 2016-05-06 04:51:00 +02:00
twinaphex 72bc5e134a Cleanup input_config_autoconfigure_joypad 2016-05-06 04:50:02 +02:00
Twinaphex 1552975c1d Merge pull request #2955 from t-paul/issue1521
Initialize window name at window creation time (fixes #1521).
2016-05-06 00:30:22 +02:00
Torsten Paul ccb224043b Initialize window name at window creation time (fixes #1521).
The protocol error reported in #1521 is caused by two different issues.
First xdg-screensaver fails to parse decimal values for the window id
(https://bugzilla.redhat.com/show_bug.cgi?id=1274931). Using the hex
notation fixes this part.

Second, the script reads the WM_NAME property from the window which is
not yet available at this time. Calling x11_update_window_title() early
ensures the property is set when xdg-screensaver is run.
2016-05-06 00:17:47 +02:00
Twinaphex 548baa7ece Merge pull request #2953 from leiradel/master
made find_last_slash public
2016-05-05 22:13:44 +02:00
Andre Leiradella b38e234d2e made find_last_slash public 2016-05-05 16:22:35 -03:00
Twinaphex f46bd99d0f Merge pull request #2952 from leiradel/master
http tasks can now be cancelled
2016-05-05 20:34:29 +02:00
Andre Leiradella 8be7fd5f0a http tasks can now be cancelled 2016-05-05 15:32:36 -03:00
twinaphex 8a77ac1f04 (GX) Should not be used for Salamander 2016-05-05 18:23:18 +02:00
twinaphex 78cbf97e70 Another fix 2016-05-05 17:58:58 +02:00
twinaphex 2314733af7 Cleanup 2016-05-05 17:52:30 +02:00
twinaphex 493ad4dfb8 (WGL) Typo buildfix 2016-05-05 17:50:26 +02:00
twinaphex 18e94a5365 (task_queue.c) Remove unused variable 2016-05-05 17:46:04 +02:00
twinaphex a7588292bf Another cleanup 2016-05-05 17:44:43 +02:00
twinaphex 8966f46d36 video_shader_set_backend - cleanup 2016-05-05 17:44:10 +02:00
twinaphex c04122d385 Set context driver's set_flags function when core GL context
is requested, and query the core GL context set bit when
loading a Cg shader
2016-05-05 17:40:38 +02:00
twinaphex 10b0fca258 Add GFX_CTL_SET_FLAGS 2016-05-05 17:37:24 +02:00
twinaphex 60233d1abb Add set_flags to context driver 2016-05-05 17:35:28 +02:00
Twinaphex b2dac30a5d Merge pull request #2945 from sronsse/fixes_for_team
task http: Add support for retrieving list of active transfers
2016-05-05 17:01:12 +02:00
Twinaphex 9b1dee0c9a Merge pull request #2951 from libretro/revert-2947-master
Revert "http tasks can now be cancelled; on-demand thumbnail download working"
2016-05-05 17:00:49 +02:00
Twinaphex 1c2bf6e305 Revert "http tasks can now be cancelled; on-demand thumbnail download working" 2016-05-05 17:00:43 +02:00
Twinaphex 36f63e87d2 Merge pull request #2950 from libretro/revert-2948-master
Revert "(XMB) Bugfix the thumbnail display. And prevent download on non playl…"
2016-05-05 17:00:32 +02:00
Twinaphex c2102ecfb5 Revert "(XMB) Bugfix the thumbnail display. And prevent download on non playl…" 2016-05-05 17:00:24 +02:00
Twinaphex 6a7ccdf355 Merge pull request #2949 from FIX94/master
(GX) fixed program crash when no argv structure is present on start
2016-05-05 16:50:34 +02:00
FIX94 dc4a114d36 (GX) fixed program crash when no argv structure is present on start 2016-05-05 16:47:44 +02:00
Twinaphex cf07e06191 Merge pull request #2948 from lakkatv/master
(XMB) Bugfix the thumbnail display. And prevent download on non playl…
2016-05-05 16:35:36 +02:00
Jean-André Santoni 87e22df9c8 (XMB) Bugfix the thumbnail display. And prevent download on non playlist entries. 2016-05-05 21:15:05 +07:00
Twinaphex e02a81a96a Merge pull request #2947 from leiradel/master
http tasks can now be cancelled; on-demand thumbnail download working
2016-05-05 15:37:11 +02:00
Andre Leiradella 9b889e14d4 http tasks can now be cancelled; on-demand thumbnail download working 2016-05-05 09:48:50 -03:00
Sebastien Ronsse 14c14b72ac task http: Add support for retrieving list of active transfers 2016-05-05 14:59:58 +10:00
twinaphex 400f50ddac Comment this out for now until we fundamentally fix it 2016-05-05 05:58:40 +02:00
twinaphex a22b99838d Get rid of variable core_context_inited 2016-05-05 05:53:50 +02:00
twinaphex d176f2d48f Try to query context driver about core GL context ability 2016-05-05 05:52:38 +02:00
twinaphex 9d225e388f Add GFX_CTL_GET_FLAGS 2016-05-05 05:49:48 +02:00
twinaphex 8136683ffc (context drivers) Start exposing core GL flag 2016-05-05 05:46:00 +02:00
twinaphex a0425dfb14 (Context drivers) Add get_flags function 2016-05-05 05:35:35 +02:00
Twinaphex cc0f8160b5 Merge pull request #2944 from sronsse/fixes_for_team
Queue and download/extract related fixes
2016-05-05 02:56:28 +02:00
Sebastien Ronsse d5b358fde8 menu: Fix bus error during simultaneous file download/decompression 2016-05-05 10:30:10 +10:00
Sebastien Ronsse e346eccbb7 task http: Fix http task finder logic leading to erroneous results 2016-05-05 10:18:29 +10:00
Sebastien Ronsse b100846ad5 task decompress: Refactor decompress checking code 2016-05-05 10:18:29 +10:00
Sebastien Ronsse b8849a574c task decompress: Add helper decompress check method 2016-05-05 10:18:29 +10:00
Sebastien Ronsse cc4b5dbf35 task queue: Fix multi-threading issues in threaded worker 2016-05-05 10:18:29 +10:00
Sebastien Ronsse d3c3d20994 task queue: Add task_queue_remove method 2016-05-05 10:18:29 +10:00
twinaphex e482bc7556 (GL) Avoid warning 2016-05-05 02:08:07 +02:00
twinaphex eb2a4f5c56 (GL) Nits 2016-05-05 02:07:33 +02:00
twinaphex 2c77616ec3 (gfx/drivers) Cleanups 2016-05-05 01:59:05 +02:00
twinaphex 1b84895ba0 (GL) Cleanup gl_check_fbo_dimensions 2016-05-05 01:42:08 +02:00
twinaphex d4a322add3 Cleanups 2016-05-05 01:33:54 +02:00
twinaphex 0ad0763413 gl_read_viewport - cleanup 2016-05-05 01:32:35 +02:00
twinaphex 7feac862db (GL) Cleanups 2016-05-05 01:29:52 +02:00
twinaphex b0193885ca (GLSM) Update 2016-05-05 00:23:12 +02:00
twinaphex 9a7bde6a02 (GLSM) Add glBlendEquationSeparate 2016-05-04 23:53:21 +02:00
twinaphex 5889489ff7 (libretro-common) Update GLSM 2016-05-04 21:12:34 +02:00
twinaphex 9465a00d4b Create video_frame_convert_rgba_to_bgr 2016-05-04 18:44:39 +02:00
twinaphex 55bc1ccd78 (video4linux2) Cleanup/nits 2016-05-04 17:16:06 +02:00
twinaphex 2e20e4bbdb Add header 2016-05-04 17:13:25 +02:00
twinaphex b8e140d6c4 (record_ffmpeg.c) Move scaler code to gfx/video_frame.h 2016-05-04 17:11:22 +02:00
twinaphex bfcc89f580 (SDL) Use video_frame_scale 2016-05-04 16:56:16 +02:00
twinaphex 7b2a2f2336 Create video_frame_scale 2016-05-04 16:44:38 +02:00
twinaphex 71cc2fe761 (screenshot.c) Cleanups 2016-05-04 16:37:58 +02:00
twinaphex 3567c40bb7 take_screenshot - cleanup 2016-05-04 16:36:10 +02:00
twinaphex 2c3ca6efed Move convert frame function to gfx/video_frame.h 2016-05-04 16:34:13 +02:00
twinaphex bf53a939da Create gfx/video_frame.h 2016-05-04 16:32:24 +02:00
Twinaphex dce7730928 Merge pull request #2943 from sronsse/fixes_for_team
Fix deadlock due to missing slock_unlock in task threaded find function.
2016-05-04 14:28:10 +02:00
Sebastien Ronsse 9b36274a95 Add check for decompression failure in generic download function 2016-05-04 15:23:37 +10:00
Sebastien Ronsse 3c23159148 Fix deadlock due to missing unlock in task threaded find function 2016-05-04 15:23:30 +10:00
twinaphex 83584c84f8 (sdl_gfx.c) Style nit 2016-05-04 04:45:46 +02:00
twinaphex 66b6129e98 Cleanups 2016-05-04 04:43:24 +02:00
twinaphex dca400aa40 Add ifdef 2016-05-04 04:38:44 +02:00
twinaphex 3ba02a3786 Cleanups 2016-05-04 04:34:05 +02:00
twinaphex a393d9a75b Cleanups 2016-05-04 04:22:41 +02:00
Twinaphex 803c27c582 (iOS) Cleanups 2016-05-04 04:13:33 +02:00
Twinaphex 51565e6336 (iOS) Avoid some analyze warnings 2016-05-04 04:10:33 +02:00
twinaphex f9bd28663a Nit 2016-05-04 04:03:46 +02:00
twinaphex d8dcaab996 (RPNG) Cleanup 2016-05-04 03:58:29 +02:00
Alcaro 64501d2cb0 No point pegging the CPU to download a file. 2016-05-03 18:17:12 +02:00
Alcaro 22f69da0e3 Uninitialized variables taste bad. 2016-05-03 17:52:43 +02:00
twinaphex 0e774f28d8 (Nuklear) Use menu_display_draw_cursor 2016-05-03 16:14:34 +02:00
twinaphex 93df66ea2f (Nuklear) Buildfix 2016-05-03 15:33:36 +02:00
twinaphex acd1e0b1e1 Move sendbuf variable to logger_send_v 2016-05-03 05:00:52 +02:00
twinaphex f60676f43e Create inet_htons 2016-05-03 04:35:51 +02:00
twinaphex 35b7d0423f init_network - fix some codepaths 2016-05-03 04:28:58 +02:00
twinaphex fd2096f3dc Cleanups 2016-05-03 04:26:18 +02:00
Twinaphex a3f3f00959 Merge pull request #2937 from lakkatv/master
(XMB) Prevent showing 'Directory not found' as a playlist. Fixes the …
2016-05-03 03:11:20 +02:00
Jean-André Santoni c7067356b5 (XMB) Prevent showing 'Directory not found' as a playlist. Fixes the black square bug. 2016-05-03 08:10:04 +07:00
Andrés 80509fdf7a Merge pull request #2918 from diablodiab/master
Change ALooper_pollAll in android_input_poll from a non blocking call…
2016-04-29 01:48:36 +02:00
Rob Loach 6f292fb435 Add documentation for libretro-db compilation 2016-04-14 03:56:58 -04:00
Hans-Kristian Arntzen 406f084c4b Vulkan: Set g_inited in Windows. 2016-03-29 18:02:32 +02:00
Hans-Kristian Arntzen e04bbfbae2 Vulkan: Add more logging ... 2016-03-29 17:57:13 +02:00
Hans-Kristian Arntzen c7b96b75b8 Vulkan: Add more error logging. 2016-03-29 17:36:13 +02:00
Hans-Kristian Arntzen 02736963bc Vulkan: Implement get_context_data callback in Win32.
Also fix some potential crashes with dinput handling.
2016-03-29 15:50:12 +02:00
Hans-Kristian Arntzen 8ade7fb274 Vulkan: Attempt Windows backend support.
Completely bind since I cannot test myself, but compiles.
2016-03-29 15:50:12 +02:00
Hans-Kristian Arntzen 72f65396c7 Fix cross-compile build on Linux. 2016-03-29 15:50:12 +02:00
851 changed files with 127504 additions and 46843 deletions

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
[submodule "deps/glslang/glslang"]
path = deps/glslang/glslang
url = git://github.com/KhronosGroup/glslang.git
[submodule "deps/spir2cross"]
path = deps/spir2cross
url = git://github.com/ARM-software/spir2cross
[submodule "deps/SPIRV-Cross"]
path = deps/SPIRV-Cross
url = git://github.com/KhronosGroup/SPIRV-Cross
+19 -12
View File
@@ -1,4 +1,5 @@
HAVE_FILE_LOGGER=1
NEED_CXX_LINKER=0
MISSING_DECLS =0
ifneq ($(C90_BUILD),)
@@ -33,7 +34,7 @@ endif
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
ifeq ($(MISSING_DECLS), 1)
DEFINES += -Werror=missing-declarations
DEFINES += -Werror=missing-declarations
endif
ifeq ($(HAVE_DYLIB), 1)
@@ -54,9 +55,9 @@ ifeq ($(DEBUG), 1)
OPTIMIZE_FLAG = -O0 -g
else
OPTIMIZE_FLAG = -O3 -ffast-math
ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows
endif
ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows
endif
endif
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) $(DEBUG_FLAG) -I.
@@ -68,10 +69,12 @@ OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
ifeq ($(CXX_BUILD), 1)
LINK = $(CXX)
CFLAGS := $(CXXFLAGS) -xc++
CFLAGS += -DCXX_BUILD
CXXFLAGS += -DCXX_BUILD
CFLAGS += -DCXX_BUILD
CXXFLAGS += -DCXX_BUILD
else
ifeq ($(findstring Win32,$(OS)),)
ifeq ($(NEED_CXX_LINKER),1)
LINK = $(CXX)
else ifeq ($(findstring Win32,$(OS)),)
LINK = $(CC)
else
# directx-related code is c++
@@ -117,10 +120,14 @@ endif
all: $(TARGET) config.mk
ifeq ($(MAKECMDGOALS),clean)
config.mk:
else
-include $(RARCH_OBJ:.o=.d)
config.mk: configure qb/*
@echo "config.mk is outdated or non-existing. Run ./configure again."
@exit 1
endif
retroarch: $(RARCH_OBJ)
@$(if $(Q), $(shell echo echo LD $@),)
@@ -163,14 +170,14 @@ install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(PREFIX)/share/applications 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(MAN_DIR) 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps 2>/dev/null || /bin/true
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin
install -m755 tools/cg2glsl.py $(DESTDIR)$(PREFIX)/bin/retroarch-cg2glsl
install -m644 retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
install -m644 retroarch.desktop $(DESTDIR)$(PREFIX)/share/applications
install -m644 docs/retroarch.1 $(DESTDIR)$(MAN_DIR)
install -m644 docs/retroarch-cg2glsl.1 $(DESTDIR)$(MAN_DIR)
install -m644 docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
install -m644 docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
install -m644 media/retroarch.svg $(DESTDIR)$(PREFIX)/share/pixmaps
uninstall:
@@ -178,8 +185,8 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/retroarch-cg2glsl
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
rm -f $(DESTDIR)$(PREFIX)/share/applications/retroarch.desktop
rm -f $(DESTDIR)$(MAN_DIR)/retroarch.1
rm -f $(DESTDIR)$(MAN_DIR)/retroarch-cg2glsl.1
rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
rm -f $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/retroarch.svg
clean:
+221 -123
View File
@@ -18,6 +18,10 @@ ifeq ($(HAVE_LIBRETRODB),)
HAVE_LIBRETRODB = 1
endif
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_HID
endif
ifeq ($(HAVE_LIBRETRODB), 1)
DEFINES += -DHAVE_LIBRETRODB
endif
@@ -44,6 +48,11 @@ ifeq ($(GL_DEBUG), 1)
CXXFLAGS += -DGL_DEBUG
endif
ifeq ($(VULKAN_DEBUG), 1)
CFLAGS += -DVULKAN_DEBUG
CXXFLAGS += -DVULKAN_DEBUG
endif
ifeq ($(HAVE_HARD_FLOAT), 1)
DEFINES += -mfloat-abi=hard
endif
@@ -56,6 +65,10 @@ ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
endif
ifeq ($(HAVE_SHADERPIPELINE), 1)
CFLAGS += -DHAVE_SHADERPIPELINE
endif
CFLAGS += -I./libretro-common/include
# Switches
@@ -65,6 +78,7 @@ CFLAGS += -I./libretro-common/include
ifneq ($(findstring BSD,$(OS)),)
BSD_LOCAL_INC += -I/usr/local/include
OBJ += frontend/drivers/platform_bsd.o
endif
ifneq ($(findstring Darwin,$(OS)),)
@@ -108,33 +122,31 @@ OBJ += frontend/frontend.o \
frontend/drivers/platform_null.o \
ui/ui_companion_driver.o \
ui/drivers/ui_null.o \
libretro_version_1.o \
ui/drivers/null/ui_null_window.o \
ui/drivers/null/ui_null_browser_window.o \
ui/drivers/null/ui_null_msg_window.o \
ui/drivers/null/ui_null_application.o \
core_impl.o \
retroarch.o \
input/input_keyboard.o \
command_event.o \
command.o \
msg_hash.o \
intl/msg_hash_de.o \
intl/msg_hash_eo.o \
intl/msg_hash_es.o \
intl/msg_hash_fr.o \
intl/msg_hash_it.o \
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o \
intl/msg_hash_us.o \
runloop.o \
libretro-common/algorithms/mismatch.o \
libretro-common/queues/task_queue.o \
tasks/tasks_internal.o \
tasks/task_content.o \
tasks/task_save_ram.o \
tasks/task_save_state.o \
tasks/task_file_transfer.o \
content.o \
tasks/task_image.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/lists/file_list.o \
libretro-common/lists/dir_list.o \
libretro-common/file/retro_dirent.o \
libretro-common/streams/file_stream.o \
libretro-common/streams/interface_stream.o \
libretro-common/streams/memory_stream.o \
libretro-common/streams/interface_stream.o \
libretro-common/streams/memory_stream.o \
libretro-common/file/retro_stat.o \
libretro-common/lists/string_list.o \
libretro-common/string/stdstring.o \
@@ -143,10 +155,10 @@ OBJ += frontend/frontend.o \
libretro-common/file/nbio/nbio_stdio.o \
libretro-common/file/file_path.o \
file_path_special.o \
file_path_str.o \
libretro-common/hash/rhash.o \
audio/audio_driver.o \
input/input_driver.o \
input/input_hid_driver.o \
gfx/video_coord_array.o \
gfx/video_driver.o \
camera/camera_driver.o \
@@ -157,7 +169,7 @@ OBJ += frontend/frontend.o \
dynamic.o \
cores/dynamic_dummy.o \
libretro-common/queues/message_queue.o \
rewind.o \
managers/state_manager.o \
gfx/drivers_font_renderer/bitmapfont.o \
input/input_autodetect.o \
input/input_joypad_driver.o \
@@ -168,14 +180,14 @@ OBJ += frontend/frontend.o \
input/input_overlay.o \
patch.o \
libretro-common/queues/fifo_queue.o \
core_options.o \
managers/core_option_manager.o \
libretro-common/compat/compat_fnmatch.o \
libretro-common/compat/compat_posix_string.o \
cheats.o \
managers/cheat_manager.o \
core_info.o \
libretro-common/file/config_file.o \
config_file_userdata.o \
screenshot.o \
tasks/task_screenshot.o \
libretro-common/gfx/scaler/scaler.o \
gfx/drivers_shader/shader_null.o \
gfx/video_shader_driver.o \
@@ -198,14 +210,27 @@ OBJ += frontend/frontend.o \
input/drivers/nullinput.o \
input/drivers_hid/null_hid.o \
input/drivers_joypad/null_joypad.o \
input/drivers_joypad/hid_joypad.o \
playlist.o \
movie.o \
record/record_driver.o \
record/drivers/record_null.o \
performance.o \
libretro-common/features/features_cpu.o \
performance_counters.o \
verbosity.o
ifeq ($(HAVE_LANGEXTRA), 1)
DEFINES += -DHAVE_LANGEXTRA
OBJ += intl/msg_hash_de.o \
intl/msg_hash_eo.o \
intl/msg_hash_es.o \
intl/msg_hash_fr.o \
intl/msg_hash_it.o \
intl/msg_hash_nl.o \
intl/msg_hash_pl.o \
intl/msg_hash_pt.o
endif
ifneq ($(HAVE_GETOPT_LONG), 1)
OBJ += libretro-common/compat/compat_getopt.o
endif
@@ -218,7 +243,7 @@ ifneq ($(HAVE_STRL), 1)
OBJ += libretro-common/compat/compat_strl.o
endif
OBJ += gfx/video_texture_image.o
OBJ += libretro-common/formats/image_texture.o
ifeq ($(HAVE_IMAGEVIEWER), 1)
DEFINES += -DHAVE_IMAGEVIEWER
@@ -228,9 +253,23 @@ endif
# Qt
ifeq ($(HAVE_QT), 1)
OBJ += ui/drivers/ui_qt.o
HAVE_QT_WRAPPER=0
OBJ += ui/drivers/ui_qt.o \
ui/drivers/qt/ui_qt_application.o \
ui/drivers/qt/ui_qt_window.o \
ui/drivers/qt/ui_qt_browser_window.o \
ui/drivers/qt/ui_qt_msg_window.o
ifneq ($(findstring Linux,$(OS)),)
DEFINES += -I/usr/include/qt -fPIC
endif
# TODO/FIXME - figure out which libraries we need to link against
LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lglu32 -lopengl32 -L./ui/drivers/qt/wrapper/build/release -lwrapper
LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -L./ui/drivers/qt/wrapper/build/release
ifeq ($(HAVE_QT_WRAPPER), 1)
LIBS += -lwrapper
endif
endif
ifeq ($(HAVE_SSA),1)
@@ -289,8 +328,11 @@ ifeq ($(HAVE_OSS_BSD), 1)
endif
ifeq ($(HAVE_ALSA), 1)
OBJ += audio/drivers/alsa.o \
audio/drivers/alsathread.o
OBJ += audio/drivers/alsa.o
ifeq ($(HAVE_THREADS), 1)
OBJ += audio/drivers/alsathread.o
endif
LIBS += $(ALSA_LIBS)
DEFINES += $(ALSA_CFLAGS)
endif
@@ -363,19 +405,26 @@ ifeq ($(HAVE_NEON),1)
DEFINES += -DSINC_LOWER_QUALITY
endif
OBJ += audio/audio_utils.o
OBJ += libretro-common/conversion/s16_to_float.o \
libretro-common/conversion/float_to_s16.o
ifeq ($(HAVE_NEON),1)
OBJ += audio/audio_utils_neon.o
OBJ += libretro-common/conversion/s16_to_float_neon.o \
libretro-common/conversion/float_to_s16_neon.o
endif
ifneq ($(findstring Win32,$(OS)),)
HAVE_VULKAN=1
DEFINES += -DHAVE_VULKAN
endif
HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI)
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
ifeq ($(HAVE_GL_CONTEXT),1)
HW_CONTEXT_MENU_DRIVERS=1
HW_CONTEXT_MENU_DRIVERS=1
endif
ifeq ($(HAVE_VULKAN),1)
HW_CONTEXT_MENU_DRIVERS=1
HW_CONTEXT_MENU_DRIVERS=1
endif
endif
@@ -412,8 +461,12 @@ ifeq ($(HAVE_MATERIALUI), 1)
DEFINES += -DHAVE_MATERIALUI
endif
ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nk_common.o
OBJ += menu/drivers/nk_menu.o
OBJ += menu/drivers/nuklear/nk_common.o
OBJ += menu/drivers/nuklear/nk_menu.o
OBJ += menu/drivers/nuklear/nk_wnd_main.o
OBJ += menu/drivers/nuklear/nk_wnd_file_picker.o
OBJ += menu/drivers/nuklear/nk_wnd_shader_parameters.o
OBJ += menu/drivers/nuklear/nk_wnd_settings.o
OBJ += menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR
endif
@@ -438,18 +491,9 @@ ifeq ($(HAVE_MENU_COMMON), 1)
else
PSEUDO_NS :=
endif
OBJ += menu/menu_hash.o \
menu/menu_driver.o \
OBJ += menu/menu_driver.o \
menu/menu_content.o \
menu/intl/menu_hash_de.o \
menu/intl/menu_hash_es.o \
menu/intl/menu_hash_eo.o \
menu/intl/menu_hash_fr.o \
menu/intl/menu_hash_it.o \
menu/intl/menu_hash_nl.o \
menu/intl/menu_hash_pl.o \
menu/intl/menu_hash_pt.o \
menu/intl/menu_hash_us$(PSEUDO_NS).o \
menu/menu_input.o \
menu/menu_entry.o \
menu/menu_entries.o \
@@ -468,6 +512,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/cbs/menu_cbs_deferred_push.o \
menu/cbs/menu_cbs_scan.o \
menu/cbs/menu_cbs_get_value.o \
menu/cbs/menu_cbs_label.o \
menu/cbs/menu_cbs_title.o \
menu/cbs/menu_cbs_up.o \
menu/cbs/menu_cbs_down.o \
@@ -482,8 +527,8 @@ endif
ifeq ($(UTF8), 1)
DEFINES += -DHAVE_UTF8
OBJ += intl/msg_hash_ru.o
DEFINES += -finput-charset=UTF-8
OBJ += intl/msg_hash_ru.o
DEFINES += -finput-charset=UTF-8
endif
ifeq ($(HAVE_STB_FONT), 1)
@@ -497,10 +542,8 @@ ifeq ($(HAVE_FREETYPE), 1)
endif
ifeq ($(HAVE_THREADS), 1)
OBJ += autosave.o \
libretro-common/rthreads/rthreads.o \
OBJ += libretro-common/rthreads/rthreads.o \
libretro-common/rthreads/rsemaphore.o \
libretro-common/rthreads/async_job.o \
gfx/video_thread_wrapper.o \
audio/audio_thread_wrapper.o
DEFINES += -DHAVE_THREADS
@@ -509,10 +552,6 @@ ifeq ($(HAVE_THREADS), 1)
endif
endif
ifeq ($(HAVE_COMMAND), 1)
OBJ += command.o
endif
ifeq ($(HAVE_WAYLAND), 1)
OBJ += gfx/drivers_context/wayland_ctx.o
DEFINES += $(WAYLAND_CFLAGS)
@@ -536,9 +575,9 @@ ifeq ($(HAVE_XINPUT), 1)
endif
ifeq ($(HAVE_OPENDINGUX_FBDEV), 1)
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
DEFINES += $(EGL_CFLAGS)
LIBS += $(EGL_LIBS)
endif
ifeq ($(HAVE_X11), 1)
@@ -550,16 +589,16 @@ ifeq ($(HAVE_X11), 1)
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS)
DEFINES += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
ifeq ($(HAVE_XCB),1)
LIBS += -lX11-xcb
LIBS += -lX11-xcb
endif
ifneq ($(HAVE_GLES), 1)
OBJ += gfx/drivers_context/x_ctx.o
OBJ += gfx/drivers_context/x_ctx.o
endif
endif
ifeq ($(HAVE_XCB),1)
DEFINES += $(XCB_CFLAGS)
LIBS += $(XCB_LIBS)
DEFINES += $(XCB_CFLAGS)
LIBS += $(XCB_LIBS)
endif
ifeq ($(HAVE_XKBCOMMON), 1)
@@ -577,18 +616,22 @@ ifeq ($(HAVE_UDEV), 1)
endif
ifeq ($(HAVE_LIBUSB), 1)
ifeq ($(HAVE_THREADS), 1)
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_LIBUSB
OBJ += input/drivers_hid/libusb_hid.o
LIBS += -lusb-1.0
HAVE_HID = 1
endif
endif
endif
ifeq ($(HAVE_IOHIDMANAGER), 1)
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_IOHIDMANAGER
OBJ += input/drivers_hid/iohidmanager_hid.o
HAVE_HID = 1
LIBS += -framework IOKit
endif
endif
ifeq ($(HAVE_CORELOCATION), 1)
DEFINES += -DHAVE_CORELOCATION
@@ -597,8 +640,10 @@ endif
ifeq ($(HAVE_HID), 1)
DEFINES += -DHAVE_HID
OBJ += input/connect/joypad_connection.o \
input/connect/connect_ps2adapter.o \
OBJ += input/input_hid_driver.o \
input/drivers_joypad/hid_joypad.o \
input/connect/joypad_connection.o \
input/connect/connect_ps2adapter.o \
input/connect/connect_ps3.o \
input/connect/connect_ps4.o \
input/connect/connect_wii.o \
@@ -615,7 +660,11 @@ endif
# Companion UI
ifneq ($(findstring Win32,$(OS)),)
OBJ += ui/drivers/ui_win32.o
OBJ += ui/drivers/ui_win32.o \
ui/drivers/win32/ui_win32_window.o \
ui/drivers/win32/ui_win32_browser_window.o \
ui/drivers/win32/ui_win32_msg_window.o \
ui/drivers/win32/ui_win32_application.o
endif
# Video
@@ -623,14 +672,20 @@ endif
OBJ += gfx/video_context_driver.o \
gfx/drivers_context/gfx_null_ctx.o \
gfx/video_state_tracker.o \
libretro-common/gfx/math/vector_2.o \
libretro-common/gfx/math/vector_3.o \
libretro-common/gfx/math/matrix_4x4.o \
libretro-common/gfx/math/matrix_3x3.o
ifeq ($(HAVE_KMS), 1)
HAVE_AND_WILL_USE_DRM = 1
OBJ += gfx/drivers_context/drm_ctx.o
DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS)
LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS)
HAVE_AND_WILL_USE_DRM = 1
OBJ += gfx/drivers_context/drm_ctx.o
DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS)
LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS)
endif
ifeq ($(HAVE_PLAIN_DRM), 1)
OBJ += gfx/drivers/drm_gfx.o
endif
ifeq ($(HAVE_GL_CONTEXT), 1)
@@ -674,6 +729,15 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
endif
endif
ifeq ($(HAVE_FFMPEG), 1)
ifneq ($(C89_BUILD), 1)
ifneq ($(HAVE_GLES), 1)
OBJ += cores/libretro-ffmpeg/fft/fft.o
DEFINES += -Ideps -DHAVE_GL_FFT
NEED_CXX_LINKER=1
endif
endif
endif
ifeq ($(HAVE_GLES), 1)
LIBS += $(GLES_LIBS)
@@ -738,49 +802,61 @@ ifeq ($(HAVE_SDL2), 1)
endif
ifeq ($(HAVE_VULKAN), 1)
ifeq ($(platform), win)
GLSLANG_PLATFORM := Windows
else
GLSLANG_PLATFORM := Unix
endif
GLSLANG_SOURCES := \
$(wildcard deps/glslang/*.cpp) \
$(wildcard deps/glslang/glslang/SPIRV/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/GenericCodeGen/*.cpp) \
$(wildcard deps/glslang/glslang/OGLCompilersDLL/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/MachineIndependent/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp)
ifneq ($(findstring Win32,$(OS)),)
GLSLANG_PLATFORM := Windows
else
GLSLANG_PLATFORM := Unix
endif
SPIR2CROSS_SOURCES := deps/spir2cross/spir2cross.cpp
GLSLANG_SOURCES := \
$(wildcard deps/glslang/*.cpp) \
$(wildcard deps/glslang/glslang/SPIRV/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/GenericCodeGen/*.cpp) \
$(wildcard deps/glslang/glslang/OGLCompilersDLL/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/MachineIndependent/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \
$(wildcard deps/glslang/glslang/hlsl/*.cpp) \
$(wildcard deps/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp)
DEFINES += \
-Ideps/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM) \
-Ideps/glslang/glslang \
-Ideps/glslang/glslang/glslang/MachineIndependent \
-Ideps/glslang/glslang/glslang/Public \
-Ideps/glslang/glslang/SPIRV \
-Ideps/glslang \
-Ideps/spir2cross
SPIRV_CROSS_SOURCES := deps/SPIRV-Cross/spirv_cross.cpp
ifneq ($(findstring Win32,$(OS)),)
# Trivial temporary workaround for MinGW and glslang.
CXXFLAGS += -fpermissive
endif
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -I./gfx/include/vulkan
CFLAGS += -I./gfx/include/vulkan
DEFINES += \
-Ideps/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM) \
-Ideps/glslang/glslang/OGLCompilersDLL \
-Ideps/glslang/glslang \
-Ideps/glslang/glslang/glslang/MachineIndependent \
-Ideps/glslang/glslang/glslang/Public \
-Ideps/glslang/glslang/SPIRV \
-Ideps/glslang \
-Ideps/SPIRV-Cross
GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
SPIR2CROSS_OBJ := $(SPIR2CROSS_SOURCES:.cpp=.o)
CXXFLAGS += -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses -Igfx/include
CFLAGS += -Igfx/include
OBJ += gfx/drivers/vulkan.o \
gfx/common/vulkan_common.o \
gfx/drivers_font/vulkan_raster_font.o \
gfx/drivers_shader/shader_vulkan.o \
gfx/drivers_shader/glslang_util.o \
gfx/drivers_shader/slang_reflection.o \
$(GLSLANG_OBJ) \
$(SPIR2CROSS_OBJ)
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_vulkan.o
endif
LIBS += -lstdc++
GLSLANG_OBJ := $(GLSLANG_SOURCES:.cpp=.o)
SPIRV_CROSS_OBJ := $(SPIRV_CROSS_SOURCES:.cpp=.o)
OBJ += gfx/drivers/vulkan.o \
gfx/common/vulkan_common.o \
libretro-common/vulkan/vulkan_symbol_wrapper.o \
gfx/drivers_font/vulkan_raster_font.o \
gfx/drivers_shader/shader_vulkan.o \
gfx/drivers_shader/glslang_util.o \
gfx/drivers_shader/slang_reflection.o \
$(GLSLANG_OBJ) \
$(SPIRV_CROSS_OBJ)
ifeq ($(HAVE_VULKAN_KHR_DISPLAY), 1)
OBJ += gfx/drivers_context/khr_display_ctx.o
endif
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_vulkan.o
endif
LIBS += -lstdc++
endif
ifeq ($(HAVE_OMAP), 1)
@@ -887,7 +963,6 @@ ifeq ($(HAVE_ZLIB), 1)
tasks/task_decompress.o
OBJ += $(ZLIB_OBJS)
DEFINES += -DHAVE_ZLIB
HAVE_RPNG = 1
HAVE_COMPRESSION = 1
ifeq ($(WANT_ZLIB), 1)
DEFINES += -DWANT_ZLIB
@@ -897,17 +972,30 @@ ifeq ($(HAVE_ZLIB), 1)
endif
endif
ifdef HAVE_RPNG
DEFINES += -DHAVE_RPNG
ifeq ($(HAVE_RTGA), 1)
DEFINES += -DHAVE_RTGA
OBJ += libretro-common/formats/tga/rtga.o
endif
ifeq ($(HAVE_RPNG), 1)
DEFINES += -DHAVE_RPNG
OBJ += libretro-common/formats/png/rpng.o \
libretro-common/formats/png/rpng_encode.o
endif
ifeq ($(HAVE_RJPEG), 1)
DEFINES += -DHAVE_RJPEG
OBJ += libretro-common/formats/jpeg/rjpeg.o
endif
ifeq ($(HAVE_RBMP), 1)
DEFINES += -DHAVE_RBMP
OBJ += libretro-common/formats/bmp/rbmp.o
endif
OBJ += libretro-common/formats/bmp/rbmp_encode.o \
libretro-common/formats/tga/rtga.o \
libretro-common/formats/json/jsonsax.o
libretro-common/formats/json/jsonsax.o \
libretro-common/formats/image_transfer.o
ifdef HAVE_COMPRESSION
DEFINES += -DHAVE_COMPRESSION
@@ -952,18 +1040,18 @@ ifeq ($(HAVE_NETWORKING), 1)
DEFINES += -DHAVE_NETWORKING
OBJ += libretro-common/net/net_compat.o \
libretro-common/net/net_http.o \
libretro-common/net/net_socket.o \
net_http_special.o \
libretro-common/net/net_socket.o \
network/net_http_special.o \
tasks/task_http.o
ifneq ($(HAVE_SOCKET_LEGACY),1)
OBJ += libretro-common/net/net_ifinfo.o
endif
OBJ += libretro-common/net/net_ifinfo.o
endif
ifeq ($(WANT_IFADDRS), 1)
DEFINES += -DWANT_IFADDRS
OBJ += libretro-common/compat/compat_ifaddrs.o
endif
DEFINES += -DWANT_IFADDRS
OBJ += libretro-common/compat/compat_ifaddrs.o
endif
ifneq ($(findstring Win32,$(OS)),)
LIBS += -lws2_32 -liphlpapi
@@ -972,8 +1060,11 @@ ifeq ($(HAVE_NETWORKING), 1)
# Netplay
ifeq ($(HAVE_NETPLAY), 1)
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD -DHAVE_NETWORK_GAMEPAD
OBJ += netplay/netplay_net.o netplay/netplay_spectate.o netplay/netplay_common.o netplay/netplay.o
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD
OBJ += network/netplay/netplay_net.o \
network/netplay/netplay_spectate.o \
network/netplay/netplay_common.o \
network/netplay/netplay.o
endif
# Retro Achievements (also depends on threads)
@@ -985,8 +1076,9 @@ ifeq ($(HAVE_NETWORKING), 1)
endif
endif
ifeq ($(HAVE_NETWORK_GAMEPAD), 1)
OBJ += remote.o
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
OBJ += input/input_remote.o \
cores/libretro-net-retropad/net_retropad_core.o
endif
endif
@@ -1011,9 +1103,11 @@ endif
ifeq ($(HAVE_FFMPEG), 1)
OBJ += record/drivers/record_ffmpeg.o \
cores/libretro-ffmpeg/ffmpeg_core.o
LIBS += $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(SWSCALE_LIBS) $(SWRESAMPLE_LIBS) $(FFMPEG_LIBS)
DEFINES += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) $(SWRESAMPLE_CFLAGS)
DEFINES += -DHAVE_FFMPEG -Iffmpeg
DEFINES += -Wno-deprecated-declarations -DHAVE_FFMPEG -Iffmpeg
endif
ifeq ($(HAVE_COMPRESSION), 1)
@@ -1029,6 +1123,10 @@ ifeq ($(HAVE_COCOA),1)
OBJ += input/drivers/cocoa_input.o \
input/drivers_keyboard/keyboard_event_apple.o \
ui/drivers/ui_cocoa.o \
ui/drivers/cocoa/ui_cocoa_window.o \
ui/drivers/cocoa/ui_cocoa_browser_window.o \
ui/drivers/cocoa/ui_cocoa_msg_window.o \
ui/drivers/cocoa/ui_cocoa_application.o \
ui/drivers/cocoa/cocoa_common.o \
gfx/drivers_context/cocoa_gl_ctx.o
endif
+2 -2
View File
@@ -61,7 +61,7 @@ else
OBJS += libretro-common/hash/rhash.o
OBJS += gfx/video_context_driver.o
OBJS += gfx/drivers_context/gfx_null_ctx.o
OBJS += gfx/video_texture_image.o
OBJS += libretro-common/formats/image_texture.o
OBJS += libretro-common/formats/tga/rtga.o
OBJS += libretro-common/formats/png/rpng.o
OBJS += libretro-common/formats/png/rpng_encode.o
@@ -292,7 +292,7 @@ CFLAGS += -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY
CFLAGS += -DHAVE_GRIFFIN=1 -DHAVE_FILTERS_BUILTIN -DHAVE_MENU -DHAVE_RGUI
CFLAGS += -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_BUILTIN_AUTOCONFIG
CFLAGS += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_BUILTIN_AUTOCONFIG
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
+1 -1
View File
@@ -72,7 +72,7 @@ else
CFLAGS += -O2
endif
CFLAGS += -DWANT_RPNG -Wall -Wno-unused-result -Wno-unused-variable -I. -Ilibretro-common/include -std=gnu99 -s USE_ZLIB=1 \
CFLAGS += -DHAVE_RPNG -DHAVE_RJPEG -Wall -Wno-unused-result -Wno-unused-variable -I. -Ilibretro-common/include -std=gnu99 -s USE_ZLIB=1 \
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_take_screenshot']"
all: $(TARGET)
+29 -4
View File
@@ -127,6 +127,9 @@ endif
HAVE_FILTERS_BUILTIN := 1
HAVE_THREADS := 1
HAVE_RPNG := 1
HAVE_RJPEG := 1
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_OVERLAY := 1
HAVE_BUILTIN_AUTOCONFIG := 1
HAVE_ZLIB := 1
@@ -134,6 +137,7 @@ endif
RARCH_CONSOLE = 1
ifeq ($(platform), wii)
HAVE_LANGEXTRA := 1
HAVE_WIIUSB_HID := 1
HAVE_RARCH_EXEC := 1
HAVE_RSOUND := 1
@@ -185,7 +189,11 @@ else ifeq ($(platform), psp1)
BUILD_PRX = 1
HAVE_RPNG := 1
HAVE_RJPEG := 1
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_KERNEL_PRX := 1
HAVE_LANGEXTRA := 1
RARCH_CONSOLE = 1
ifeq ($(BUILD_PRX), 1)
@@ -205,7 +213,8 @@ else ifeq ($(platform), vita)
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lUVLoader_stub \
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lfreetype -lz -lm -lc -lpng
PLATOBJS += audio/audio_utils_neon.o audio/drivers_resampler/sinc_resampler_neon.o \
PLATOBJS += libretro-common/conversion/s16_to_float_neon.o \
audio/drivers_resampler/sinc_resampler_neon.o \
audio/drivers_resampler/cc_resampler_neon.o
LIBDIRS += -L.
@@ -213,7 +222,11 @@ else ifeq ($(platform), vita)
HAVE_FILTERS_BUILTIN := 1
HAVE_BUILTIN_AUTOCONFIG := 1
HAVE_LANGEXTRA := 1
HAVE_RPNG := 1
HAVE_RJPEG := 1
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_ZLIB := 1
HAVE_VITA2D := 1
HAVE_NETWORKING := 1
@@ -262,8 +275,8 @@ ifeq ($(BIG_STACK),1)
CFLAGS += -DBIG_STACK
endif
ifeq ($(HAVE_RPNG), 1)
CFLAGS += -DWANT_RPNG
ifeq ($(HAVE_RJPEG), 1)
CFLAGS += -DHAVE_RJPEG
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
@@ -282,6 +295,14 @@ ifeq ($(HAVE_RPNG), 1)
CFLAGS += -DHAVE_RPNG
endif
ifeq ($(HAVE_RBMP), 1)
CFLAGS += -DHAVE_RBMP
endif
ifeq ($(HAVE_RTGA), 1)
CFLAGS += -DHAVE_RTGA
endif
ifeq ($(HAVE_7ZIP), 1)
CFLAGS += -DHAVE_7ZIP
endif
@@ -312,6 +333,10 @@ endif
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
ifeq ($(HAVE_LANGEXTRA), 1)
CFLAGS += -DHAVE_LANGEXTRA
endif
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
CFLAGS += -DHAVE_FILTERS_BUILTIN
endif
@@ -350,7 +375,7 @@ all: $(EXT_TARGET)
%.velf: %.elf
arm-vita-eabi-strip -g $<
vita-elf-create $< $@ $(VITASDK)/bin/db.json $(VITASDK)/bin/extra.json
vita-elf-create $< $@ $(VITASDK)/share/db.json $(VITASDK)/share/extra.json
%.elf32: %.elf
ifeq ($(platform), xenon360)
+2 -2
View File
@@ -10,12 +10,12 @@ TARGET := retroarch-pandora
LDDIRS = -L. -L$(PNDSDK)/usr/lib
INCDIRS = -I. -I$(PNDSDK)/usr/include
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o audio/audio_utils_neon.o
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
DEFINES += -D__ARM_ARCH_6__ -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DWANT_RPNG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
DEFINES += -D__ARM_ARCH_6__ -DSINC_LOWER_QUALITY -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
DEFINES += $(INCDIRS)
DEFINES += -D__OPENPANDORA__ -DPANDORA
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
+2 -2
View File
@@ -68,7 +68,7 @@ ifeq ($(HAVE_RLAUNCH), 1)
DEFINES += -DHAVE_RLAUNCH
endif
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY
ifeq ($(HAVE_GCMGL), 1)
DEFINES += -DHAVE_GCMGL
@@ -106,7 +106,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
ifeq ($(DEBUG), 1)
PPU_OPTIMIZE_LV := -O0 -g
+2 -1
View File
@@ -33,11 +33,12 @@ PPU_SRCS = frontend/frontend_salamander.c \
libretro-common/compat/compat_strl.c \
libretro-common/streams/file_stream.c \
libretro-common/file/config_file.c \
file_path_str.c \
verbosity.c
ifeq ($(HAVE_LOGGER), 1)
PPU_CFLAGS += -DHAVE_LOGGER
PPU_SRCS += netlogger.c \
PPU_SRCS += network/net_logger.c \
libretro-common/net/net_compat.c \
libretro-common/net/net_socket.c
endif
-1
View File
@@ -83,7 +83,6 @@ OBJ = griffin/griffin.o
ifeq ($(HAVE_LOGGER), 1)
CFLAGS += -DHAVE_LOGGER
CFLAGS += -Ilogger/netlogger
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
+1 -1
View File
@@ -23,7 +23,7 @@ INCDIR = deps/zlib deps/7zip libretro-common/include
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DWANT_RPNG -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP
LIBDIR =
LDFLAGS =
+1
View File
@@ -45,6 +45,7 @@ OBJS = frontend/frontend_salamander.o \
libretro-common/streams/file_stream.o \
libretro-common/file/retro_stat.o \
libretro-common/hash/rhash.o \
file_path_str.o \
verbosity.o \
bootstrap/psp1/kernel_functions.o
+2 -1
View File
@@ -54,13 +54,14 @@ OBJ = frontend/frontend_salamander.o \
libretro-common/file/retro_stat.o \
libretro-common/compat/compat_strl.o \
libretro-common/file/config_file.o \
file_path_str.o \
verbosity.o \
$(APP_BOOTER_DIR)/app_booter.binobj
ifeq ($(HAVE_LOGGER), 1)
CFLAGS += -DHAVE_LOGGER
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
OBJ += logger/netlogger.o \
OBJ += network/net_logger.o \
libretro-common/net/net_compat.o \
libretro-common/net/net_socket.o
endif
-1
View File
@@ -120,7 +120,6 @@ ifeq ($(DEBUG), 1)
else
CFLAGS += -O3 -ffast-math
CXXFLAGS += -O3 -ffast-math
LDCXXFLAGS += -s
endif
CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I.
+1 -1
View File
@@ -14,7 +14,7 @@ A libretro core written in portable C or C++ can run seamlessly on many platform
While RetroArch is the reference frontend for libretro, several other projects have used the libretro
interface to include support for emulators and/or game engines. libretro is completely open and free for anyone to use.
[libretro API header](https://github.com/libretro/RetroArch/blob/master/libretro.h)
[libretro API header](https://github.com/libretro/RetroArch/blob/master/libretro-common/include/libretro.h)
## Binaries
+292 -238
View File
@@ -19,18 +19,19 @@
#include <retro_assert.h>
#include <lists/string_list.h>
#include <conversion/float_to_s16.h>
#include <conversion/s16_to_float.h>
#include "audio_driver.h"
#include "audio_resampler_driver.h"
#include "../record/record_driver.h"
#include "audio_utils.h"
#include "audio_thread_wrapper.h"
#include "../command_event.h"
#include "../command.h"
#include "../configuration.h"
#include "../retroarch.h"
#include "../runloop.h"
#include "../performance.h"
#include "../performance_counters.h"
#include "../verbosity.h"
#include "../list_special.h"
@@ -38,7 +39,7 @@
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
#endif
typedef struct audio_driver_input_data
struct audio_driver_input_data
{
float *data;
@@ -88,12 +89,12 @@ typedef struct audio_driver_input_data
unsigned buf[AUDIO_BUFFER_FREE_SAMPLES_COUNT];
uint64_t count;
} free_samples;
} audio_driver_input_data_t;
};
static const audio_driver_t *audio_drivers[] = {
#ifdef HAVE_ALSA
&audio_alsa,
#ifndef __QNX__
#if !defined(__QNX__) && defined(HAVE_THREADS)
&audio_alsathread,
#endif
#endif
@@ -153,9 +154,16 @@ static const audio_driver_t *audio_drivers[] = {
NULL,
};
static audio_driver_input_data_t audio_driver_data;
static const audio_driver_t *current_audio = NULL;
static void *audio_driver_context_audio_data = NULL;
static struct audio_driver_input_data audio_driver_data;
static struct retro_audio_callback audio_callback;
static struct string_list *audio_driver_devices_list = NULL;
static struct retro_perf_counter resampler_proc = {0};
static const rarch_resampler_t *audio_driver_resampler = NULL;
static void *audio_driver_resampler_data = NULL;
static bool audio_driver_active = false;
static bool audio_driver_data_own = false;
static const audio_driver_t *current_audio = NULL;
static void *audio_driver_context_audio_data = NULL;
/**
* compute_audio_buffer_statistics:
@@ -253,7 +261,6 @@ const char *config_get_audio_driver_options(void)
return char_list_new_special(STRING_LIST_AUDIO_DRIVERS, NULL);
}
static bool uninit_audio(void)
{
settings_t *settings = config_get_ptr();
@@ -277,11 +284,11 @@ static bool uninit_audio(void)
if (!settings->audio.enable)
{
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
audio_driver_unset_active();
return false;
}
audio_driver_ctl(RARCH_AUDIO_CTL_RESAMPLER_DEINIT, NULL);
audio_driver_deinit_resampler();
if (audio_driver_data.data)
free(audio_driver_data.data);
@@ -291,27 +298,29 @@ static bool uninit_audio(void)
free(audio_driver_data.output_samples.buf);
audio_driver_data.output_samples.buf = NULL;
event_cmd_ctl(EVENT_CMD_DSP_FILTER_DEINIT, NULL);
command_event(CMD_EVENT_DSP_FILTER_DEINIT, NULL);
compute_audio_buffer_statistics();
return true;
}
static bool init_audio(bool audio_cb_inited)
static bool audio_driver_init_internal(bool audio_cb_inited)
{
size_t outsamples_max, max_bufsamples = AUDIO_CHUNK_SIZE_NONBLOCKING * 2;
settings_t *settings = config_get_ptr();
audio_convert_init_simd();
convert_s16_to_float_init_simd();
convert_float_to_s16_init_simd();
/* Accomodate rewind since at some point we might have two full buffers. */
outsamples_max = max_bufsamples * AUDIO_MAX_RATIO *
settings->slowmotion_ratio;
audio_driver_data.output_samples.conv_buf =
(int16_t*)malloc(outsamples_max * sizeof(int16_t));
/* Used for recording even if audio isn't enabled. */
retro_assert(audio_driver_data.output_samples.conv_buf =
(int16_t*)malloc(outsamples_max * sizeof(int16_t)));
retro_assert(audio_driver_data.output_samples.conv_buf != NULL);
if (!audio_driver_data.output_samples.conv_buf)
goto error;
@@ -322,8 +331,9 @@ static bool init_audio(bool audio_cb_inited)
/* Needs to be able to hold full content of a full max_bufsamples
* in addition to its own. */
retro_assert(audio_driver_data.rewind.buf = (int16_t*)
malloc(max_bufsamples * sizeof(int16_t)));
audio_driver_data.rewind.buf = (int16_t*)malloc
(max_bufsamples * sizeof(int16_t));
retro_assert(audio_driver_data.rewind.buf != NULL);
if (!audio_driver_data.rewind.buf)
goto error;
@@ -332,16 +342,16 @@ static bool init_audio(bool audio_cb_inited)
if (!settings->audio.enable)
{
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
audio_driver_unset_active();
return false;
}
audio_driver_ctl(RARCH_AUDIO_CTL_FIND_DRIVER, NULL);
audio_driver_find_driver();
#ifdef HAVE_THREADS
if (audio_cb_inited)
{
RARCH_LOG("Starting threaded audio driver ...\n");
if (!rarch_threaded_audio_init(
if (!audio_init_thread(
&current_audio,
&audio_driver_context_audio_data,
*settings->audio.device ? settings->audio.device : NULL,
@@ -349,7 +359,7 @@ static bool init_audio(bool audio_cb_inited)
current_audio))
{
RARCH_ERR("Cannot open threaded audio driver ... Exiting ...\n");
retro_fail(1, "init_audio()");
retroarch_fail(1, "audio_driver_init_internal()");
}
}
else
@@ -364,17 +374,17 @@ static bool init_audio(bool audio_cb_inited)
if (!audio_driver_context_audio_data)
{
RARCH_ERR("Failed to initialize audio driver. Will continue without audio.\n");
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
audio_driver_unset_active();
}
audio_driver_data.use_float = false;
if ( audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL)
if ( audio_driver_is_active()
&& current_audio->use_float(audio_driver_context_audio_data))
audio_driver_data.use_float = true;
if (!settings->audio.sync && audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL))
if (!settings->audio.sync && audio_driver_is_active())
{
event_cmd_ctl(EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE, NULL);
command_event(CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE, NULL);
audio_driver_data.chunk.size = audio_driver_data.chunk.nonblock_size;
}
@@ -390,15 +400,16 @@ static bool init_audio(bool audio_cb_inited)
audio_driver_data.audio_rate.source_ratio.current =
(double)settings->audio.out_rate / audio_driver_data.audio_rate.input;
if (!audio_driver_ctl(RARCH_AUDIO_CTL_RESAMPLER_INIT, NULL))
if (!audio_driver_init_resampler())
{
RARCH_ERR("Failed to initialize resampler \"%s\".\n",
settings->audio.resampler);
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
audio_driver_unset_active();
}
retro_assert(audio_driver_data.data = (float*)
malloc(max_bufsamples * sizeof(float)));
audio_driver_data.data = (float*)
malloc(max_bufsamples * sizeof(float));
retro_assert(audio_driver_data.data != NULL);
if (!audio_driver_data.data)
goto error;
@@ -407,8 +418,10 @@ static bool init_audio(bool audio_cb_inited)
retro_assert(settings->audio.out_rate <
audio_driver_data.audio_rate.input * AUDIO_MAX_RATIO);
retro_assert(audio_driver_data.output_samples.buf = (float*)
malloc(outsamples_max * sizeof(float)));
audio_driver_data.output_samples.buf = (float*)
malloc(outsamples_max * sizeof(float));
retro_assert(audio_driver_data.output_samples.buf != NULL);
if (!audio_driver_data.output_samples.buf)
goto error;
@@ -416,7 +429,7 @@ static bool init_audio(bool audio_cb_inited)
audio_driver_data.audio_rate.control = false;
if (
!audio_cb_inited
&& audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL)
&& audio_driver_is_active()
&& settings->audio.rate_control
)
{
@@ -432,22 +445,22 @@ static bool init_audio(bool audio_cb_inited)
RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n");
}
event_cmd_ctl(EVENT_CMD_DSP_FILTER_INIT, NULL);
command_event(CMD_EVENT_DSP_FILTER_INIT, NULL);
audio_driver_data.free_samples.count = 0;
/* Threaded driver is initially stopped. */
if (
audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL)
audio_driver_is_active()
&& !settings->audio.mute_enable
&& audio_cb_inited
)
audio_driver_ctl(RARCH_AUDIO_CTL_START, NULL);
audio_driver_start();
return true;
error:
return audio_driver_ctl(RARCH_AUDIO_CTL_DEINIT, NULL);
return audio_driver_deinit();
}
/*
@@ -487,7 +500,7 @@ void audio_driver_set_nonblocking_state(bool enable)
{
settings_t *settings = config_get_ptr();
if (
audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL)
audio_driver_is_active()
&& audio_driver_context_audio_data
)
current_audio->set_nonblock_state(audio_driver_context_audio_data,
@@ -525,16 +538,16 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) || settings->audio.mute_enable)
return true;
if (!audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL))
if (!audio_driver_is_active())
return false;
if (!audio_driver_data.data)
return false;
rarch_perf_init(&audio_convert_s16, "audio_convert_s16");
retro_perf_start(&audio_convert_s16);
audio_convert_s16_to_float(audio_driver_data.data, data, samples,
performance_counter_init(&audio_convert_s16, "audio_convert_s16");
performance_counter_start(&audio_convert_s16);
convert_s16_to_float(audio_driver_data.data, data, samples,
audio_driver_data.volume_gain);
retro_perf_stop(&audio_convert_s16);
performance_counter_stop(&audio_convert_s16);
src_data.data_in = audio_driver_data.data;
src_data.input_frames = samples >> 1;
@@ -544,10 +557,10 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
if (audio_driver_data.dsp)
{
rarch_perf_init(&audio_dsp, "audio_dsp");
retro_perf_start(&audio_dsp);
performance_counter_init(&audio_dsp, "audio_dsp");
performance_counter_start(&audio_dsp);
rarch_dsp_filter_process(audio_driver_data.dsp, &dsp_data);
retro_perf_stop(&audio_dsp);
performance_counter_stop(&audio_dsp);
if (dsp_data.output)
{
@@ -566,18 +579,18 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
if (runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL))
src_data.ratio *= settings->slowmotion_ratio;
audio_driver_ctl(RARCH_AUDIO_CTL_RESAMPLER_PROCESS, &src_data);
audio_driver_process_resampler(&src_data);
output_data = audio_driver_data.output_samples.buf;
output_frames = src_data.output_frames;
if (!audio_driver_data.use_float)
{
rarch_perf_init(&audio_convert_float, "audio_convert_float");
retro_perf_start(&audio_convert_float);
audio_convert_float_to_s16(audio_driver_data.output_samples.conv_buf,
performance_counter_init(&audio_convert_float, "audio_convert_float");
performance_counter_start(&audio_convert_float);
convert_float_to_s16(audio_driver_data.output_samples.conv_buf,
(const float*)output_data, output_frames * 2);
retro_perf_stop(&audio_convert_float);
performance_counter_stop(&audio_convert_float);
output_data = audio_driver_data.output_samples.conv_buf;
output_size = sizeof(int16_t);
@@ -586,7 +599,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
if (current_audio->write(audio_driver_context_audio_data,
output_data, output_frames * output_size * 2) < 0)
{
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
audio_driver_unset_active();
return false;
}
@@ -699,8 +712,7 @@ void audio_driver_set_buffer_size(size_t bufsize)
audio_driver_data.driver_buffer_size = bufsize;
}
static void audio_monitor_adjust_system_rates(void)
void audio_driver_monitor_adjust_system_rates(void)
{
float timing_skew;
settings_t *settings = config_get_ptr();
@@ -723,7 +735,7 @@ static void audio_monitor_adjust_system_rates(void)
audio_driver_data.audio_rate.input);
}
static void audio_driver_setup_rewind(void)
void audio_driver_setup_rewind(void)
{
unsigned i;
@@ -742,7 +754,7 @@ static void audio_driver_setup_rewind(void)
audio_driver_data.data_ptr = 0;
}
static bool find_audio_driver(void)
bool audio_driver_find_driver(void)
{
int i;
driver_ctx_info_t drv;
@@ -770,202 +782,244 @@ static bool find_audio_driver(void)
current_audio = (const audio_driver_t*)audio_driver_find_handle(0);
if (!current_audio)
retro_fail(1, "find_audio_driver()");
retroarch_fail(1, "audio_driver_find()");
}
return true;
}
bool audio_driver_ctl(enum rarch_audio_ctl_state state, void *data)
void audio_driver_deinit_resampler(void)
{
static struct retro_audio_callback audio_callback;
static struct string_list *audio_driver_devices_list = NULL;
static struct retro_perf_counter resampler_proc = {0};
static const rarch_resampler_t *audio_driver_resampler = NULL;
static void *audio_driver_resampler_data = NULL;
static bool audio_driver_active = false;
static bool audio_driver_data_own = false;
settings_t *settings = config_get_ptr();
rarch_resampler_freep(&audio_driver_resampler,
&audio_driver_resampler_data);
}
switch (state)
{
case RARCH_AUDIO_CTL_RESAMPLER_DEINIT:
rarch_resampler_freep(&audio_driver_resampler,
&audio_driver_resampler_data);
break;
case RARCH_AUDIO_CTL_DEVICES_LIST_FREE:
if (!current_audio || !current_audio->device_list_free
|| !audio_driver_context_audio_data)
return false;
current_audio->device_list_free(audio_driver_context_audio_data,
audio_driver_devices_list);
audio_driver_devices_list = NULL;
break;
case RARCH_AUDIO_CTL_DEVICES_LIST_NEW:
if (!current_audio || !current_audio->device_list_new
|| !audio_driver_context_audio_data)
return false;
audio_driver_devices_list = (struct string_list*)
current_audio->device_list_new(audio_driver_context_audio_data);
if (!audio_driver_devices_list)
return false;
break;
case RARCH_AUDIO_CTL_DEVICES_LIST_GET:
{
struct string_list**ptr = (struct string_list**)data;
if (!ptr)
return false;
*ptr = audio_driver_devices_list;
}
break;
case RARCH_AUDIO_CTL_RESAMPLER_INIT:
return rarch_resampler_realloc(
&audio_driver_resampler_data,
&audio_driver_resampler,
settings->audio.resampler,
audio_driver_data.audio_rate.source_ratio.original);
case RARCH_AUDIO_CTL_RESAMPLER_PROCESS:
rarch_perf_init(&resampler_proc, "resampler_proc");
retro_perf_start(&resampler_proc);
rarch_resampler_process(audio_driver_resampler,
audio_driver_resampler_data,
(struct resampler_data*)data);
retro_perf_stop(&resampler_proc);
break;
case RARCH_AUDIO_CTL_INIT:
return init_audio(audio_callback.callback != NULL);
case RARCH_AUDIO_CTL_DESTROY:
audio_driver_active = false;
audio_driver_data_own = false;
current_audio = NULL;
break;
case RARCH_AUDIO_CTL_DESTROY_DATA:
audio_driver_context_audio_data = NULL;
break;
case RARCH_AUDIO_CTL_DEINIT:
audio_driver_ctl(RARCH_AUDIO_CTL_DEVICES_LIST_FREE, NULL);
if (!uninit_audio())
return false;
break;
case RARCH_AUDIO_CTL_SETUP_REWIND:
audio_driver_setup_rewind();
break;
case RARCH_AUDIO_CTL_SET_CALLBACK_ENABLE:
if (!audio_driver_ctl(RARCH_AUDIO_CTL_HAS_CALLBACK, NULL))
return false;
if (audio_callback.set_state)
audio_callback.set_state(true);
break;
case RARCH_AUDIO_CTL_SET_CALLBACK_DISABLE:
if (!audio_driver_ctl(RARCH_AUDIO_CTL_HAS_CALLBACK, NULL))
return false;
bool audio_driver_free_devices_list(void)
{
if (!current_audio || !current_audio->device_list_free
|| !audio_driver_context_audio_data)
return false;
current_audio->device_list_free(audio_driver_context_audio_data,
audio_driver_devices_list);
audio_driver_devices_list = NULL;
return true;
}
if (audio_callback.set_state)
audio_callback.set_state(false);
break;
case RARCH_AUDIO_CTL_HAS_CALLBACK:
return audio_callback.callback;
case RARCH_AUDIO_CTL_CALLBACK:
if (!audio_driver_ctl(RARCH_AUDIO_CTL_HAS_CALLBACK, NULL))
return false;
bool audio_driver_new_devices_list(void)
{
if (!current_audio || !current_audio->device_list_new
|| !audio_driver_context_audio_data)
return false;
audio_driver_devices_list = (struct string_list*)
current_audio->device_list_new(audio_driver_context_audio_data);
if (!audio_driver_devices_list)
return false;
return true;
}
if (audio_callback.callback)
audio_callback.callback();
break;
case RARCH_AUDIO_CTL_UNSET_CALLBACK:
audio_callback.callback = NULL;
audio_callback.set_state = NULL;
break;
case RARCH_AUDIO_CTL_SET_CALLBACK:
{
const struct retro_audio_callback *cb =
(const struct retro_audio_callback*)data;
bool audio_driver_init(void)
{
return audio_driver_init_internal(audio_callback.callback != NULL);
}
bool audio_driver_get_devices_list(void **data)
{
struct string_list**ptr = (struct string_list**)data;
if (!ptr)
return false;
*ptr = audio_driver_devices_list;
return true;
}
bool audio_driver_init_resampler(void)
{
settings_t *settings = config_get_ptr();
return rarch_resampler_realloc(
&audio_driver_resampler_data,
&audio_driver_resampler,
settings->audio.resampler,
audio_driver_data.audio_rate.source_ratio.original);
}
void audio_driver_process_resampler(struct resampler_data *data)
{
performance_counter_init(&resampler_proc, "resampler_proc");
performance_counter_start(&resampler_proc);
rarch_resampler_process(audio_driver_resampler,
audio_driver_resampler_data, data);
performance_counter_stop(&resampler_proc);
}
bool audio_driver_deinit(void)
{
audio_driver_free_devices_list();
if (!uninit_audio())
return false;
return true;
}
bool audio_driver_set_callback(const void *data)
{
const struct retro_audio_callback *cb = (const struct retro_audio_callback*)data;
#ifdef HAVE_NETPLAY
global_t *global = global_get_ptr();
global_t *global = global_get_ptr();
#endif
if (recording_driver_get_data_ptr()) /* A/V sync is a must. */
return false;
if (recording_driver_get_data_ptr()) /* A/V sync is a must. */
return false;
#ifdef HAVE_NETPLAY
if (global->netplay.enable)
return false;
if (global->netplay.enable)
return false;
#endif
if (cb)
audio_callback = *cb;
}
break;
case RARCH_AUDIO_CTL_MONITOR_ADJUST_SYSTEM_RATES:
audio_monitor_adjust_system_rates();
break;
case RARCH_AUDIO_CTL_MONITOR_SET_REFRESH_RATE:
{
double new_src_ratio = (double)settings->audio.out_rate /
audio_driver_data.audio_rate.input;
audio_driver_data.audio_rate.source_ratio.original = new_src_ratio;
audio_driver_data.audio_rate.source_ratio.current = new_src_ratio;
}
break;
case RARCH_AUDIO_CTL_MUTE_TOGGLE:
if (!audio_driver_context_audio_data)
return false;
if (!audio_driver_ctl(RARCH_AUDIO_CTL_IS_ACTIVE, NULL))
return false;
settings->audio.mute_enable = !settings->audio.mute_enable;
if (settings->audio.mute_enable)
event_cmd_ctl(EVENT_CMD_AUDIO_STOP, NULL);
else if (!event_cmd_ctl(EVENT_CMD_AUDIO_START, NULL))
{
audio_driver_ctl(RARCH_AUDIO_CTL_UNSET_ACTIVE, NULL);
return false;
}
break;
case RARCH_AUDIO_CTL_ALIVE:
if (!current_audio || !current_audio->alive
|| !audio_driver_context_audio_data)
return false;
return current_audio->alive(audio_driver_context_audio_data);
case RARCH_AUDIO_CTL_START:
if (!current_audio || !current_audio->start
|| !audio_driver_context_audio_data)
return false;
return current_audio->start(audio_driver_context_audio_data);
case RARCH_AUDIO_CTL_STOP:
if (!current_audio || !current_audio->stop
|| !audio_driver_context_audio_data)
return false;
return current_audio->stop(audio_driver_context_audio_data);
case RARCH_AUDIO_CTL_FIND_DRIVER:
return find_audio_driver();
case RARCH_AUDIO_CTL_SET_OWN_DRIVER:
audio_driver_data_own = true;
break;
case RARCH_AUDIO_CTL_UNSET_OWN_DRIVER:
audio_driver_data_own = false;
break;
case RARCH_AUDIO_CTL_OWNS_DRIVER:
return audio_driver_data_own;
case RARCH_AUDIO_CTL_SET_ACTIVE:
audio_driver_active = true;
break;
case RARCH_AUDIO_CTL_UNSET_ACTIVE:
audio_driver_active = false;
break;
case RARCH_AUDIO_CTL_IS_ACTIVE:
return audio_driver_active;
case RARCH_AUDIO_CTL_FRAME_IS_REVERSE:
/* We just rewound. Flush rewind audio buffer. */
audio_driver_flush(
audio_driver_data.rewind.buf + audio_driver_data.rewind.ptr,
audio_driver_data.rewind.size - audio_driver_data.rewind.ptr);
break;
case RARCH_AUDIO_CTL_NONE:
default:
break;
}
if (cb)
audio_callback = *cb;
return true;
}
bool audio_driver_enable_callback(void)
{
if (!audio_driver_has_callback())
return false;
if (audio_callback.set_state)
audio_callback.set_state(true);
return true;
}
bool audio_driver_disable_callback(void)
{
if (!audio_driver_has_callback())
return false;
if (audio_callback.set_state)
audio_callback.set_state(false);
return true;
}
/* Sets audio monitor rate to new value. */
void audio_driver_monitor_set_rate(void)
{
settings_t *settings = config_get_ptr();
double new_src_ratio = (double)settings->audio.out_rate /
audio_driver_data.audio_rate.input;
audio_driver_data.audio_rate.source_ratio.original = new_src_ratio;
audio_driver_data.audio_rate.source_ratio.current = new_src_ratio;
}
bool audio_driver_callback(void)
{
if (!audio_driver_has_callback())
return false;
if (audio_callback.callback)
audio_callback.callback();
return true;
}
bool audio_driver_has_callback(void)
{
return audio_callback.callback;
}
bool audio_driver_toggle_mute(void)
{
settings_t *settings = config_get_ptr();
if (!audio_driver_context_audio_data)
return false;
if (!audio_driver_is_active())
return false;
settings->audio.mute_enable = !settings->audio.mute_enable;
if (settings->audio.mute_enable)
command_event(CMD_EVENT_AUDIO_STOP, NULL);
else if (!command_event(CMD_EVENT_AUDIO_START, NULL))
{
audio_driver_unset_active();
return false;
}
return true;
}
bool audio_driver_start(void)
{
if (!current_audio || !current_audio->start
|| !audio_driver_context_audio_data)
return false;
return current_audio->start(audio_driver_context_audio_data);
}
bool audio_driver_stop(void)
{
if (!current_audio || !current_audio->stop
|| !audio_driver_context_audio_data)
return false;
return current_audio->stop(audio_driver_context_audio_data);
}
void audio_driver_unset_callback(void)
{
audio_callback.callback = NULL;
audio_callback.set_state = NULL;
}
bool audio_driver_alive(void)
{
if (!current_audio || !current_audio->alive
|| !audio_driver_context_audio_data)
return false;
return current_audio->alive(audio_driver_context_audio_data);
}
void audio_driver_frame_is_reverse(void)
{
/* We just rewound. Flush rewind audio buffer. */
audio_driver_flush(
audio_driver_data.rewind.buf + audio_driver_data.rewind.ptr,
audio_driver_data.rewind.size - audio_driver_data.rewind.ptr);
}
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_set_active(void)
{
audio_driver_active = true;
}
void audio_driver_unset_active(void)
{
audio_driver_active = false;
}
bool audio_driver_is_active(void)
{
return audio_driver_active;
}
void audio_driver_destroy(void)
{
audio_driver_active = false;
audio_driver_data_own = false;
current_audio = NULL;
}
+69 -46
View File
@@ -20,12 +20,14 @@
#include <stdint.h>
#include <stddef.h>
#include <sys/types.h>
#include <boolean.h>
#include "audio_dsp_filter.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <boolean.h>
#include <retro_common_api.h>
#include "audio_dsp_filter.h"
#include "audio_resampler_driver.h"
RETRO_BEGIN_DECLS
#define AUDIO_CHUNK_SIZE_BLOCKING 512
@@ -34,43 +36,6 @@ extern "C" {
#define AUDIO_MAX_RATIO 16
enum rarch_audio_ctl_state
{
RARCH_AUDIO_CTL_NONE = 0,
RARCH_AUDIO_CTL_INIT,
RARCH_AUDIO_CTL_DEINIT,
RARCH_AUDIO_CTL_DESTROY,
RARCH_AUDIO_CTL_DESTROY_DATA,
RARCH_AUDIO_CTL_START,
RARCH_AUDIO_CTL_STOP,
RARCH_AUDIO_CTL_FIND_DRIVER,
RARCH_AUDIO_CTL_SETUP_REWIND,
/* Sets audio monitor refresh rate to new value. */
RARCH_AUDIO_CTL_MONITOR_SET_REFRESH_RATE,
RARCH_AUDIO_CTL_MONITOR_ADJUST_SYSTEM_RATES,
RARCH_AUDIO_CTL_MUTE_TOGGLE,
RARCH_AUDIO_CTL_SET_CALLBACK_ENABLE,
RARCH_AUDIO_CTL_SET_CALLBACK_DISABLE,
RARCH_AUDIO_CTL_SET_CALLBACK,
RARCH_AUDIO_CTL_UNSET_CALLBACK,
RARCH_AUDIO_CTL_CALLBACK,
RARCH_AUDIO_CTL_HAS_CALLBACK,
RARCH_AUDIO_CTL_ALIVE,
RARCH_AUDIO_CTL_FRAME_IS_REVERSE,
RARCH_AUDIO_CTL_SET_OWN_DRIVER,
RARCH_AUDIO_CTL_UNSET_OWN_DRIVER,
RARCH_AUDIO_CTL_OWNS_DRIVER,
RARCH_AUDIO_CTL_SET_ACTIVE,
RARCH_AUDIO_CTL_UNSET_ACTIVE,
RARCH_AUDIO_CTL_IS_ACTIVE,
RARCH_AUDIO_CTL_RESAMPLER_DEINIT,
RARCH_AUDIO_CTL_RESAMPLER_INIT,
RARCH_AUDIO_CTL_RESAMPLER_PROCESS,
RARCH_AUDIO_CTL_DEVICES_LIST_NEW,
RARCH_AUDIO_CTL_DEVICES_LIST_FREE,
RARCH_AUDIO_CTL_DEVICES_LIST_GET
};
typedef struct audio_driver
{
/* Creates and initializes handle to audio driver.
@@ -122,8 +87,33 @@ typedef struct audio_driver
size_t (*buffer_size)(void *data);
} audio_driver_t;
void audio_driver_destroy_data(void);
bool audio_driver_ctl(enum rarch_audio_ctl_state state, void *data);
void audio_driver_set_own_driver(void);
void audio_driver_unset_own_driver(void);
void audio_driver_set_active(void);
void audio_driver_unset_active(void);
bool audio_driver_is_active(void);
void audio_driver_destroy(void);
void audio_driver_deinit_resampler(void);
bool audio_driver_init_resampler(void);
void audio_driver_process_resampler(struct resampler_data *data);
bool audio_driver_free_devices_list(void);
bool audio_driver_new_devices_list(void);
bool audio_driver_enable_callback(void);
bool audio_driver_disable_callback(void);
/**
* audio_driver_find_handle:
@@ -170,6 +160,41 @@ void audio_driver_dsp_filter_init(const char *device);
void audio_driver_set_buffer_size(size_t bufsize);
bool audio_driver_get_devices_list(void **ptr);
void audio_driver_setup_rewind(void);
void audio_driver_monitor_adjust_system_rates(void);
bool audio_driver_set_callback(const void *data);
bool audio_driver_callback(void);
bool audio_driver_has_callback(void);
/* Sets audio monitor rate to new value. */
void audio_driver_monitor_set_rate(void);
bool audio_driver_find_driver(void);
bool audio_driver_toggle_mute(void);
bool audio_driver_start(void);
bool audio_driver_stop(void);
bool audio_driver_owns_driver(void);
void audio_driver_unset_callback(void);
void audio_driver_frame_is_reverse(void);
bool audio_driver_alive(void);
bool audio_driver_deinit(void);
bool audio_driver_init(void);
extern audio_driver_t audio_rsound;
extern audio_driver_t audio_oss;
extern audio_driver_t audio_alsa;
@@ -192,8 +217,6 @@ extern audio_driver_t audio_ctr_dsp;
extern audio_driver_t audio_rwebaudio;
extern audio_driver_t audio_null;
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+4 -3
View File
@@ -23,13 +23,14 @@
#include <file/file_path.h>
#include <lists/dir_list.h>
#include <features/features_cpu.h>
#include "audio_dsp_filter.h"
#include "audio_filters/dspfilter.h"
#include "../config_file_userdata.h"
#include "../frontend/frontend_driver.h"
#include "../performance.h"
#include "../performance_counters.h"
#include "../dynamic.h"
struct rarch_dsp_plug
@@ -146,7 +147,7 @@ static const dspfilter_get_implementation_t dsp_plugs_builtin[] = {
static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
{
unsigned i;
dspfilter_simd_mask_t mask = retro_get_cpu_features();
dspfilter_simd_mask_t mask = cpu_features_get();
(void)list;
@@ -170,7 +171,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
{
unsigned i;
dspfilter_simd_mask_t mask = retro_get_cpu_features();
dspfilter_simd_mask_t mask = cpu_features_get();
for (i = 0; i < list->size; i++)
{
+4 -6
View File
@@ -17,9 +17,9 @@
#ifndef __AUDIO_DSP_FILTER_H__
#define __AUDIO_DSP_FILTER_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef struct rarch_dsp_filter rarch_dsp_filter_t;
@@ -41,9 +41,7 @@ struct rarch_dsp_data
void rarch_dsp_filter_process(rarch_dsp_filter_t *dsp,
struct rarch_dsp_data *data);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+4 -6
View File
@@ -18,9 +18,9 @@
#ifndef DSPFILTER_API_H__
#define DSPFILTER_API_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
#define DSPFILTER_SIMD_SSE (1 << 0)
#define DSPFILTER_SIMD_SSE2 (1 << 1)
@@ -177,8 +177,6 @@ struct dspfilter_implementation
const char *short_ident;
};
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+1 -52
View File
@@ -17,61 +17,10 @@
#define RARCH_FFT_H__
#include <retro_inline.h>
#include <math/complex.h>
typedef struct fft fft_t;
// C99 <complex.h> would be nice.
typedef struct
{
float real;
float imag;
} fft_complex_t;
static INLINE fft_complex_t fft_complex_mul(fft_complex_t a,
fft_complex_t b)
{
fft_complex_t out = {
a.real * b.real - a.imag * b.imag,
a.imag * b.real + a.real * b.imag,
};
return out;
}
static INLINE fft_complex_t fft_complex_add(fft_complex_t a,
fft_complex_t b)
{
fft_complex_t out = {
a.real + b.real,
a.imag + b.imag,
};
return out;
}
static INLINE fft_complex_t fft_complex_sub(fft_complex_t a,
fft_complex_t b)
{
fft_complex_t out = {
a.real - b.real,
a.imag - b.imag,
};
return out;
}
static INLINE fft_complex_t fft_complex_conj(fft_complex_t a)
{
fft_complex_t out = {
a.real, -a.imag,
};
return out;
}
fft_t *fft_new(unsigned block_size_log2);
void fft_free(fft_t *fft);
+3 -23
View File
@@ -17,15 +17,14 @@
#include <string.h>
#include <string/stdstring.h>
#include <features/features_cpu.h>
#include "audio_resampler_driver.h"
#include "../config_file_userdata.h"
#ifdef RARCH_INTERNAL
#include "../performance.h"
#include "../performance_counters.h"
#endif
#ifndef DONT_HAVE_STRING_LIST
#include "../list_special.h"
#endif
static const rarch_resampler_t *resampler_drivers[] = {
&sinc_resampler,
@@ -93,7 +92,6 @@ const char *audio_resampler_driver_find_ident(int idx)
return drv->ident;
}
#ifndef DONT_HAVE_STRING_LIST
/**
* config_get_audio_resampler_driver_options:
*
@@ -105,7 +103,6 @@ const char* config_get_audio_resampler_driver_options(void)
{
return char_list_new_special(STRING_LIST_AUDIO_RESAMPLER_DRIVERS, NULL);
}
#endif
/**
* find_resampler_driver:
@@ -126,26 +123,9 @@ static const rarch_resampler_t *find_resampler_driver(const char *ident)
return resampler_drivers[0];
}
#ifndef RARCH_INTERNAL
#ifdef __cplusplus
extern "C" {
#endif
retro_get_cpu_features_t perf_get_cpu_features_cb;
#ifdef __cplusplus
}
#endif
#endif
static resampler_simd_mask_t resampler_get_cpu_features(void)
{
#ifdef RARCH_INTERNAL
return retro_get_cpu_features();
#else
return perf_get_cpu_features_cb();
#endif
return cpu_features_get();
}
/**
+7 -15
View File
@@ -18,16 +18,16 @@
#ifndef __AUDIO_RESAMPLER_DRIVER_H
#define __AUDIO_RESAMPLER_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include <stddef.h>
#include <math.h>
#include <boolean.h>
#include <boolean.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
#include <libretro.h>
RETRO_BEGIN_DECLS
#define RESAMPLER_SIMD_SSE (1 << 0)
#define RESAMPLER_SIMD_SSE2 (1 << 1)
@@ -200,14 +200,6 @@ bool rarch_resampler_realloc(void **re, const rarch_resampler_t **backend,
(backend)->process(handle, data); \
} while(0)
#ifndef RARCH_INTERNAL
#include "libretro.h"
extern retro_get_cpu_features_t perf_get_cpu_features_cb;
#endif
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+7 -7
View File
@@ -21,7 +21,7 @@
#include <rthreads/rthreads.h>
#include "audio_thread_wrapper.h"
#include "../performance.h"
#include "../performance_counters.h"
#include "../verbosity.h"
typedef struct audio_thread
@@ -81,8 +81,8 @@ static void audio_thread_loop(void *data)
if (!thr->alive)
{
scond_signal(thr->cond);
slock_unlock(thr->lock);
thr->stopped_ack = true;
slock_unlock(thr->lock);
break;
}
@@ -102,7 +102,7 @@ static void audio_thread_loop(void *data)
}
slock_unlock(thr->lock);
audio_driver_ctl(RARCH_AUDIO_CTL_CALLBACK, NULL);
audio_driver_callback();
}
RARCH_LOG("[Audio Thread]: Tearing down driver.\n");
@@ -190,7 +190,7 @@ static bool audio_thread_stop(void *data)
audio_thread_block(thr);
thr->is_paused = true;
audio_driver_ctl(RARCH_AUDIO_CTL_SET_CALLBACK_DISABLE, NULL);
audio_driver_disable_callback();
return true;
}
@@ -202,7 +202,7 @@ static bool audio_thread_start(void *data)
if (!thr)
return false;
audio_driver_ctl(RARCH_AUDIO_CTL_SET_CALLBACK_ENABLE, NULL);
audio_driver_enable_callback();
thr->is_paused = false;
audio_thread_unblock(thr);
@@ -260,7 +260,7 @@ static const audio_driver_t audio_thread = {
};
/**
* rarch_threaded_audio_init:
* audio_init_thread:
* @out_driver : output driver
* @out_data : output audio data
* @device : audio device (optional)
@@ -275,7 +275,7 @@ static const audio_driver_t audio_thread = {
*
* Returns: true (1) if successful, otherwise false (0).
**/
bool rarch_threaded_audio_init(const audio_driver_t **out_driver,
bool audio_init_thread(const audio_driver_t **out_driver,
void **out_data, const char *device, unsigned audio_out_rate,
unsigned latency, const audio_driver_t *drv)
{
+2 -2
View File
@@ -22,7 +22,7 @@
#include "audio_driver.h"
/**
* rarch_threaded_audio_init:
* audio_init_thread:
* @out_driver : output driver
* @out_data : output audio data
* @device : audio device (optional)
@@ -36,7 +36,7 @@
*
* Returns: true (1) if successful, otherwise false (0).
**/
bool rarch_threaded_audio_init(const audio_driver_t **out_driver, void **out_data,
bool audio_init_thread(const audio_driver_t **out_driver, void **out_data,
const char *device, unsigned out_rate, unsigned latency,
const audio_driver_t *driver);
-435
View File
@@ -1,435 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2014-2016 - Ali Bouhlel ( [email protected] )
*
* 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 <boolean.h>
#include "audio_utils.h"
#if defined(__SSE2__)
#include <emmintrin.h>
#elif defined(__ALTIVEC__)
#include <altivec.h>
#endif
#ifdef RARCH_INTERNAL
#include "../performance.h"
#endif
/**
* audio_convert_s16_to_float_C:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* C implementation callback function.
**/
void audio_convert_s16_to_float_C(float *out,
const int16_t *in, size_t samples, float gain)
{
size_t i;
gain = gain / 0x8000;
for (i = 0; i < samples; i++)
out[i] = (float)in[i] * gain;
}
/**
* audio_convert_float_to_s16_C:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* C implementation callback function.
**/
void audio_convert_float_to_s16_C(int16_t *out,
const float *in, size_t samples)
{
size_t i;
for (i = 0; i < samples; i++)
{
int32_t val = (int32_t)(in[i] * 0x8000);
out[i] = (val > 0x7FFF) ? 0x7FFF :
(val < -0x8000 ? -0x8000 : (int16_t)val);
}
}
#if defined(__SSE2__)
/**
* audio_convert_s16_to_float_SSE2:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* SSE2 implementation callback function.
**/
void audio_convert_s16_to_float_SSE2(float *out,
const int16_t *in, size_t samples, float gain)
{
size_t i;
float fgain = gain / UINT32_C(0x80000000);
__m128 factor = _mm_set1_ps(fgain);
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
{
__m128i input = _mm_loadu_si128((const __m128i *)in);
__m128i regs_l = _mm_unpacklo_epi16(_mm_setzero_si128(), input);
__m128i regs_r = _mm_unpackhi_epi16(_mm_setzero_si128(), input);
__m128 output_l = _mm_mul_ps(_mm_cvtepi32_ps(regs_l), factor);
__m128 output_r = _mm_mul_ps(_mm_cvtepi32_ps(regs_r), factor);
_mm_storeu_ps(out + 0, output_l);
_mm_storeu_ps(out + 4, output_r);
}
audio_convert_s16_to_float_C(out, in, samples - i, gain);
}
/**
* audio_convert_float_to_s16_SSE2:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* SSE2 implementation callback function.
**/
void audio_convert_float_to_s16_SSE2(int16_t *out,
const float *in, size_t samples)
{
size_t i;
__m128 factor = _mm_set1_ps((float)0x8000);
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
{
__m128 input_l = _mm_loadu_ps(in + 0);
__m128 input_r = _mm_loadu_ps(in + 4);
__m128 res_l = _mm_mul_ps(input_l, factor);
__m128 res_r = _mm_mul_ps(input_r, factor);
__m128i ints_l = _mm_cvtps_epi32(res_l);
__m128i ints_r = _mm_cvtps_epi32(res_r);
__m128i packed = _mm_packs_epi32(ints_l, ints_r);
_mm_storeu_si128((__m128i *)out, packed);
}
audio_convert_float_to_s16_C(out, in, samples - i);
}
#elif defined(__ALTIVEC__)
/**
* audio_convert_s16_to_float_altivec:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* AltiVec implementation callback function.
**/
void audio_convert_s16_to_float_altivec(float *out,
const int16_t *in, size_t samples, float gain)
{
size_t samples_in = samples;
/* Unaligned loads/store is a bit expensive, so we
* optimize for the good path (very likely). */
if (((uintptr_t)out & 15) + ((uintptr_t)in & 15) == 0)
{
size_t i;
const vector float gain_vec = { gain, gain , gain, gain };
const vector float zero_vec = { 0.0f, 0.0f, 0.0f, 0.0f};
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
{
vector signed short input = vec_ld(0, in);
vector signed int hi = vec_unpackh(input);
vector signed int lo = vec_unpackl(input);
vector float out_hi = vec_madd(vec_ctf(hi, 15), gain_vec, zero_vec);
vector float out_lo = vec_madd(vec_ctf(lo, 15), gain_vec, zero_vec);
vec_st(out_hi, 0, out);
vec_st(out_lo, 16, out);
}
samples_in -= i;
}
audio_convert_s16_to_float_C(out, in, samples_in, gain);
}
/**
* audio_convert_float_to_s16_altivec:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* AltiVec implementation callback function.
**/
void audio_convert_float_to_s16_altivec(int16_t *out,
const float *in, size_t samples)
{
int samples_in = samples;
/* Unaligned loads/store is a bit expensive,
* so we optimize for the good path (very likely). */
if (((uintptr_t)out & 15) + ((uintptr_t)in & 15) == 0)
{
size_t i;
for (i = 0; i + 8 <= samples; i += 8, in += 8, out += 8)
{
vector float input0 = vec_ld( 0, in);
vector float input1 = vec_ld(16, in);
vector signed int result0 = vec_cts(input0, 15);
vector signed int result1 = vec_cts(input1, 15);
vec_st(vec_packs(result0, result1), 0, out);
}
samples_in -= i;
}
audio_convert_float_to_s16_C(out, in, samples_in);
}
#elif defined(__ARM_NEON__) && !defined(VITA)
/* Avoid potential hard-float/soft-float ABI issues. */
void audio_convert_s16_float_asm(float *out, const int16_t *in,
size_t samples, const float *gain);
/**
* audio_convert_s16_to_float_neon:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* ARM NEON implementation callback function.
**/
static void audio_convert_s16_to_float_neon(float *out,
const int16_t *in, size_t samples, float gain)
{
size_t aligned_samples = samples & ~7;
if (aligned_samples)
audio_convert_s16_float_asm(out, in, aligned_samples, &gain);
/* Could do all conversion in ASM, but keep it simple for now. */
audio_convert_s16_to_float_C(out + aligned_samples, in + aligned_samples,
samples - aligned_samples, gain);
}
void audio_convert_float_s16_asm(int16_t *out, const float *in, size_t samples);
/**
* audio_convert_float_to_s16_neon:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* ARM NEON implementation callback function.
**/
static void audio_convert_float_to_s16_neon(int16_t *out,
const float *in, size_t samples)
{
size_t aligned_samples = samples & ~7;
if (aligned_samples)
audio_convert_float_s16_asm(out, in, aligned_samples);
audio_convert_float_to_s16_C(out + aligned_samples, in + aligned_samples,
samples - aligned_samples);
}
#elif defined(_MIPS_ARCH_ALLEGREX)
/**
* audio_convert_s16_to_float_ALLEGREX:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* MIPS ALLEGREX implementation callback function.
**/
void audio_convert_s16_to_float_ALLEGREX(float *out,
const int16_t *in, size_t samples, float gain)
{
#ifdef DEBUG
/* Make sure the buffer is 16 byte aligned, this should be the
* default behaviour of malloc in the PSPSDK.
* Only the output buffer can be assumed to be 16-byte aligned. */
retro_assert(((uintptr_t)out & 0xf) == 0);
#endif
size_t i;
gain = gain / 0x8000;
__asm__ (
".set push \n"
".set noreorder \n"
"mtv %0, s200 \n"
".set pop \n"
::"r"(gain));
for (i = 0; i + 16 <= samples; i += 16)
{
__asm__ (
".set push \n"
".set noreorder \n"
"lv.s s100, 0(%0) \n"
"lv.s s101, 4(%0) \n"
"lv.s s110, 8(%0) \n"
"lv.s s111, 12(%0) \n"
"lv.s s120, 16(%0) \n"
"lv.s s121, 20(%0) \n"
"lv.s s130, 24(%0) \n"
"lv.s s131, 28(%0) \n"
"vs2i.p c100, c100 \n"
"vs2i.p c110, c110 \n"
"vs2i.p c120, c120 \n"
"vs2i.p c130, c130 \n"
"vi2f.q c100, c100, 16 \n"
"vi2f.q c110, c110, 16 \n"
"vi2f.q c120, c120, 16 \n"
"vi2f.q c130, c130, 16 \n"
"vmscl.q e100, e100, s200 \n"
"sv.q c100, 0(%1) \n"
"sv.q c110, 16(%1) \n"
"sv.q c120, 32(%1) \n"
"sv.q c130, 48(%1) \n"
".set pop \n"
:: "r"(in + i), "r"(out + i));
}
for (; i < samples; i++)
out[i] = (float)in[i] * gain;
}
/**
* audio_convert_float_to_s16_ALLEGREX:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* MIPS ALLEGREX implementation callback function.
**/
void audio_convert_float_to_s16_ALLEGREX(int16_t *out,
const float *in, size_t samples)
{
size_t i;
#ifdef DEBUG
/* Make sure the buffers are 16 byte aligned, this should be
* the default behaviour of malloc in the PSPSDK.
* Both buffers are allocated by RetroArch, so can assume alignment. */
retro_assert(((uintptr_t)in & 0xf) == 0);
retro_assert(((uintptr_t)out & 0xf) == 0);
#endif
for (i = 0; i + 8 <= samples; i += 8)
{
__asm__ (
".set push \n"
".set noreorder \n"
"lv.q c100, 0(%0) \n"
"lv.q c110, 16(%0) \n"
"vf2in.q c100, c100, 31 \n"
"vf2in.q c110, c110, 31 \n"
"vi2s.q c100, c100 \n"
"vi2s.q c102, c110 \n"
"sv.q c100, 0(%1) \n"
".set pop \n"
:: "r"(in + i), "r"(out + i));
}
for (; i < samples; i++)
{
int32_t val = (int32_t)(in[i] * 0x8000);
out[i] = (val > 0x7FFF) ? 0x7FFF :
(val < -0x8000 ? -0x8000 : (int16_t)val);
}
}
#endif
#ifndef RARCH_INTERNAL
#ifdef __cplusplus
extern "C" {
#endif
retro_get_cpu_features_t perf_get_cpu_features_cb;
#ifdef __cplusplus
}
#endif
#endif
static unsigned audio_convert_get_cpu_features(void)
{
#ifdef RARCH_INTERNAL
return retro_get_cpu_features();
#else
return perf_get_cpu_features_cb();
#endif
}
/**
* audio_convert_init_simd:
*
* Sets up function pointers for audio conversion
* functions based on CPU features.
**/
void audio_convert_init_simd(void)
{
unsigned cpu = audio_convert_get_cpu_features();
(void)cpu;
#if defined(__ARM_NEON__) && !defined(VITA)
audio_convert_s16_to_float_arm = (cpu & RETRO_SIMD_NEON) ?
audio_convert_s16_to_float_neon : audio_convert_s16_to_float_C;
audio_convert_float_to_s16_arm = (cpu & RETRO_SIMD_NEON) ?
audio_convert_float_to_s16_neon : audio_convert_float_to_s16_C;
#endif
}
-184
View File
@@ -1,184 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
*
* 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 AUDIO_UTILS_H
#define AUDIO_UTILS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stddef.h>
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#if defined(__SSE2__)
#define audio_convert_s16_to_float audio_convert_s16_to_float_SSE2
#define audio_convert_float_to_s16 audio_convert_float_to_s16_SSE2
/**
* audio_convert_s16_to_float_SSE2:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* SSE2 implementation callback function.
**/
void audio_convert_s16_to_float_SSE2(float *out,
const int16_t *in, size_t samples, float gain);
/**
* audio_convert_float_to_s16_SSE2:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* SSE2 implementation callback function.
**/
void audio_convert_float_to_s16_SSE2(int16_t *out,
const float *in, size_t samples);
#elif defined(__ALTIVEC__)
#define audio_convert_s16_to_float audio_convert_s16_to_float_altivec
#define audio_convert_float_to_s16 audio_convert_float_to_s16_altivec
/**
* audio_convert_s16_to_float_altivec:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* AltiVec implementation callback function.
**/
void audio_convert_s16_to_float_altivec(float *out,
const int16_t *in, size_t samples, float gain);
/**
* audio_convert_float_to_s16_altivec:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* AltiVec implementation callback function.
**/
void audio_convert_float_to_s16_altivec(int16_t *out,
const float *in, size_t samples);
#elif defined(__ARM_NEON__) && !defined(VITA)
#define audio_convert_s16_to_float audio_convert_s16_to_float_arm
#define audio_convert_float_to_s16 audio_convert_float_to_s16_arm
void (*audio_convert_s16_to_float_arm)(float *out,
const int16_t *in, size_t samples, float gain);
void (*audio_convert_float_to_s16_arm)(int16_t *out,
const float *in, size_t samples);
#elif defined(_MIPS_ARCH_ALLEGREX)
#define audio_convert_s16_to_float audio_convert_s16_to_float_ALLEGREX
#define audio_convert_float_to_s16 audio_convert_float_to_s16_ALLEGREX
/**
* audio_convert_s16_to_float_ALLEGREX:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* MIPS ALLEGREX implementation callback function.
**/
void audio_convert_s16_to_float_ALLEGREX(float *out,
const int16_t *in, size_t samples, float gain);
/**
* audio_convert_float_to_s16_ALLEGREX:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* MIPS ALLEGREX implementation callback function.
**/
void audio_convert_float_to_s16_ALLEGREX(int16_t *out,
const float *in, size_t samples);
#else
#define audio_convert_s16_to_float audio_convert_s16_to_float_C
#define audio_convert_float_to_s16 audio_convert_float_to_s16_C
#endif
/**
* audio_convert_s16_to_float_C:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
* @gain : gain applied to the audio volume
*
* Converts audio samples from signed integer 16-bit
* to floating point.
*
* C implementation callback function.
**/
void audio_convert_s16_to_float_C(float *out,
const int16_t *in, size_t samples, float gain);
/**
* audio_convert_float_to_s16_C:
* @out : output buffer
* @in : input buffer
* @samples : size of samples to be converted
*
* Converts audio samples from floating point
* to signed integer 16-bit.
*
* C implementation callback function.
**/
void audio_convert_float_to_s16_C(int16_t *out,
const float *in, size_t samples);
/**
* audio_convert_init_simd:
*
* Sets up function pointers for audio conversion
* functions based on CPU features.
**/
void audio_convert_init_simd(void);
#ifdef __cplusplus
}
#endif
#endif
+5
View File
@@ -156,7 +156,10 @@ error:
if (alsa)
{
if (alsa->pcm)
{
snd_pcm_close(alsa->pcm);
snd_config_update_free_global();
}
free(alsa);
}
@@ -298,7 +301,9 @@ static void alsa_free(void *data)
{
snd_pcm_drop(alsa->pcm);
snd_pcm_close(alsa->pcm);
snd_config_update_free_global();
}
free(alsa);
}
}
+2
View File
@@ -132,7 +132,9 @@ static void alsa_thread_free(void *data)
{
if (alsa->worker_thread)
{
slock_lock(alsa->cond_lock);
alsa->thread_dead = true;
slock_unlock(alsa->cond_lock);
sthread_join(alsa->worker_thread);
}
if (alsa->buffer)
+4 -4
View File
@@ -18,7 +18,7 @@
#include "../audio_driver.h"
#include "../../configuration.h"
#include "../../performance.h"
#include "../../performance_counters.h"
#include "../../runloop.h"
typedef struct
@@ -169,8 +169,8 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size)
(void)samples_played;
(void)current_tick;
rarch_perf_init(&ctraudio_f, "ctraudio_f");
retro_perf_start(&ctraudio_f);
performance_counter_init(&ctraudio_f, "ctraudio_f");
performance_counter_start(&ctraudio_f);
ctr_csnd_audio_update_playpos(ctr);
@@ -202,7 +202,7 @@ static ssize_t ctr_csnd_audio_write(void *data, const void *buf, size_t size)
GSPGPU_FlushDataCache(ctr->l, CTR_CSND_AUDIO_SIZE);
GSPGPU_FlushDataCache(ctr->r, CTR_CSND_AUDIO_SIZE);
retro_perf_stop(&ctraudio_f);
performance_counter_stop(&ctraudio_f);
return size;
}
+4 -4
View File
@@ -18,7 +18,7 @@
#include "../audio_driver.h"
#include "../../configuration.h"
#include "../../performance.h"
#include "../../performance_counters.h"
#include "../../runloop.h"
#include "../../ctr/ctr_debug.h"
@@ -116,8 +116,8 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
}
}
rarch_perf_init(&ctraudio_dsp_f, "ctraudio_dsp_f");
retro_perf_start(&ctraudio_dsp_f);
performance_counter_init(&ctraudio_dsp_f, "ctraudio_dsp_f");
performance_counter_start(&ctraudio_dsp_f);
pos = ctr->pos << 2;
@@ -140,7 +140,7 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
ctr->pos += size >> 2;
ctr->pos &= CTR_DSP_AUDIO_COUNT_MASK;
retro_perf_stop(&ctraudio_dsp_f);
performance_counter_stop(&ctraudio_dsp_f);
return size;
}
+15
View File
@@ -41,8 +41,10 @@ typedef struct jack
bool nonblock;
bool is_paused;
#ifdef HAVE_THREADS
scond_t *cond;
slock_t *cond_lock;
#endif
size_t buffer_size;
} jack_t;
@@ -54,7 +56,9 @@ static int process_cb(jack_nframes_t nframes, void *data)
if (nframes <= 0)
{
#ifdef HAVE_THREADS
scond_signal(jd->cond);
#endif
return 0;
}
@@ -74,7 +78,9 @@ static int process_cb(jack_nframes_t nframes, void *data)
for (f = min_avail; f < nframes; f++)
out[f] = 0.0f;
}
#ifdef HAVE_THREADS
scond_signal(jd->cond);
#endif
return 0;
}
@@ -86,7 +92,9 @@ static void shutdown_cb(void *data)
return;
jd->shutdown = true;
#ifdef HAVE_THREADS
scond_signal(jd->cond);
#endif
}
static int parse_ports(char **dest_ports, const char **jports)
@@ -149,8 +157,10 @@ static void *ja_init(const char *device, unsigned rate, unsigned latency)
if (!jd)
return NULL;
#ifdef HAVE_THREADS
jd->cond = scond_new();
jd->cond_lock = slock_new();
#endif
jd->client = jack_client_open("RetroArch", JackNullOption, NULL);
if (jd->client == NULL)
@@ -216,6 +226,7 @@ static void *ja_init(const char *device, unsigned rate, unsigned latency)
error:
if (jports != NULL)
jack_free(jports);
free(jd);
return NULL;
}
@@ -258,12 +269,14 @@ static size_t write_buffer(jack_t *jd, const float *buf, size_t size)
}
written += write_frames;
}
#ifdef HAVE_THREADS
else
{
slock_lock(jd->cond_lock);
scond_wait(jd->cond, jd->cond_lock);
slock_unlock(jd->cond_lock);
}
#endif
if (jd->nonblock)
break;
@@ -327,10 +340,12 @@ static void ja_free(void *data)
if (jd->buffer[i] != NULL)
jack_ringbuffer_free(jd->buffer[i]);
#ifdef HAVE_THREADS
if (jd->cond_lock)
slock_free(jd->cond_lock);
if (jd->cond)
scond_free(jd->cond);
#endif
free(jd);
}
+3 -3
View File
@@ -49,7 +49,7 @@ typedef struct psp_audio
#define AUDIO_BUFFER_SIZE_MASK (AUDIO_BUFFER_SIZE-1)
#ifdef VITA
#define PSP_THREAD_STOPPED PSP2_THREAD_STOPPED
#define PSP_THREAD_STOPPED SCE_THREAD_STOPPED
#else
#define SceKernelThreadInfo SceKernelThreadRunStatus
#define sceKernelGetThreadInfo sceKernelReferThreadRunStatus
@@ -60,8 +60,8 @@ static int audioMainLoop(SceSize args, void* argp)
psp_audio_t* psp = *((psp_audio_t**)argp);
#ifdef VITA
int port = sceAudioOutOpenPort(PSP2_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
psp->rate, PSP2_AUDIO_OUT_MODE_STEREO);
int port = sceAudioOutOpenPort(SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
#else
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
#endif
+2
View File
@@ -24,11 +24,13 @@
#include "../audio_driver.h"
#include "../../configuration.h"
#include "../../verbosity.h"
typedef struct
{
roar_vs_t *vss;
bool nonblocking;
bool is_paused;
} roar_t;
static void *ra_init(const char *device, unsigned rate, unsigned latency)
+4 -11
View File
@@ -16,14 +16,6 @@
#ifndef __RSOUND_H
#define __RSOUND_H
#ifdef __cplusplus
extern "C" {
#endif
#if 0
#define STANDALONE
#endif
#include <sys/types.h>
#include <unistd.h>
#include <rthreads/rthreads.h>
@@ -32,8 +24,11 @@ extern "C" {
#include <stdint.h>
#include <stddef.h>
#include <retro_common_api.h>
#include <queues/fifo_queue.h>
RETRO_BEGIN_DECLS
#ifdef _WIN32
#define RSD_DEFAULT_HOST "127.0.0.1" /* Stupid Windows. */
#else
@@ -323,8 +318,6 @@ int rsd_pause (rsound_t *rd, int enable);
/* Frees an rsound_t struct. Make sure that the stream is properly closed down with rsd_stop() before calling rsd_free(). */
int rsd_free (rsound_t *rd);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+10
View File
@@ -35,8 +35,10 @@ typedef struct sdl_audio
bool nonblock;
bool is_paused;
#ifdef HAVE_THREADS
slock_t *lock;
scond_t *cond;
#endif
fifo_buffer_t *buffer;
} sdl_audio_t;
@@ -47,7 +49,9 @@ static void sdl_audio_cb(void *data, Uint8 *stream, int len)
size_t write_size = len > (int)avail ? avail : len;
fifo_read(sdl->buffer, stream, write_size);
#ifdef HAVE_THREADS
scond_signal(sdl->cond);
#endif
/* If underrun, fill rest with silence. */
memset(stream + write_size, 0, len - write_size);
@@ -109,8 +113,10 @@ static void *sdl_audio_init(const char *device,
settings->audio.out_rate = out.freq;
#ifdef HAVE_THREADS
sdl->lock = slock_new();
sdl->cond = scond_new();
#endif
RARCH_LOG("SDL audio: Requested %u ms latency, got %d ms\n",
latency, (int)(out.samples * 4 * 1000 / settings->audio.out_rate));
@@ -160,9 +166,11 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
if (avail == 0)
{
SDL_UnlockAudio();
#ifdef HAVE_THREADS
slock_lock(sdl->lock);
scond_wait(sdl->cond, sdl->lock);
slock_unlock(sdl->lock);
#endif
}
else
{
@@ -220,8 +228,10 @@ static void sdl_audio_free(void *data)
if (sdl)
{
fifo_free(sdl->buffer);
#ifdef HAVE_THREADS
slock_free(sdl->lock);
scond_free(sdl->cond);
#endif
}
free(sdl);
}
+2 -2
View File
@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
uniform = (2.0 * rand()) / RAND_MAX - 1.0;
rate_mod = 1.0 + ratio_max_deviation * uniform;
audio_convert_s16_to_float(input_f, input_i, 1024, 1.0f);
convert_s16_to_float(input_f, input_i, 1024, 1.0f);
data.data_in = input_f;
data.data_out = output_f;
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
output_samples = data.output_frames * 2;
audio_convert_float_to_s16(output_i, output_f, output_samples);
convert_float_to_s16(output_i, output_f, output_samples);
if (fwrite(output_i, sizeof(int16_t), output_samples, stdout) != output_samples)
break;
+11 -13
View File
@@ -17,34 +17,32 @@
#ifndef __RARCH_AUTOSAVE_H
#define __RARCH_AUTOSAVE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
typedef struct autosave autosave_t;
/**
* lock_autosave:
* autosave_lock:
*
* Lock autosave.
**/
void lock_autosave(void);
void autosave_lock(void);
/**
* unlock_autosave:
* autosave_unlock:
*
* Unlocks autosave.
**/
void unlock_autosave(void);
void autosave_unlock(void);
void autosave_event_init(void);
void autosave_init(void);
void autosave_event_deinit(void);
void autosave_deinit(void);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+1 -1
View File
@@ -153,7 +153,7 @@ bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data)
camera_driver = (const camera_driver_t*)camera_driver_find_handle(0);
if (!camera_driver)
retro_fail(1, "find_camera_driver()");
retroarch_fail(1, "find_camera_driver()");
}
}
break;
+6 -8
View File
@@ -18,12 +18,12 @@
#define __CAMERA_DRIVER__H
#include <stdint.h>
#include <boolean.h>
#include "../libretro.h"
#ifdef __cplusplus
extern "C" {
#endif
#include <boolean.h>
#include <retro_common_api.h>
#include <libretro.h>
RETRO_BEGIN_DECLS
enum rarch_camera_ctl_state
{
@@ -107,8 +107,6 @@ bool driver_camera_start(void);
bool camera_driver_ctl(enum rarch_camera_ctl_state state, void *data);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
+9 -9
View File
@@ -41,7 +41,7 @@
#include <compat/strl.h>
#include "../camera_driver.h"
#include "../../performance.h"
#include "../../performance_counters.h"
#include "../../verbosity.h"
struct buffer
@@ -70,10 +70,10 @@ static void process_image(video4linux_t *v4l, const uint8_t *buffer_yuv)
{
static struct retro_perf_counter yuv_convert_direct = {0};
rarch_perf_init(&yuv_convert_direct, "yuv_convert_direct");
retro_perf_start(&yuv_convert_direct);
performance_counter_init(&yuv_convert_direct, "yuv_convert_direct");
performance_counter_start(&yuv_convert_direct);
scaler_ctx_scale(&v4l->scaler, v4l->buffer_output, buffer_yuv);
retro_perf_stop(&yuv_convert_direct);
performance_counter_stop(&yuv_convert_direct);
}
static int xioctl(int fd, int request, void *args)
@@ -95,8 +95,8 @@ static bool init_mmap(void *data)
memset(&req, 0, sizeof(req));
req.count = 4;
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
req.count = 4;
req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
req.memory = V4L2_MEMORY_MMAP;
if (xioctl(v4l->fd, (uint8_t)VIDIOC_REQBUFS, &req) == -1)
@@ -249,9 +249,9 @@ static void v4l_stop(void *data)
static bool v4l_start(void *data)
{
video4linux_t *v4l = (video4linux_t*)data;
unsigned i;
enum v4l2_buf_type type;
video4linux_t *v4l = (video4linux_t*)data;
for (i = 0; i < v4l->n_buffers; i++)
{
@@ -259,9 +259,9 @@ static bool v4l_start(void *data)
memset(&buf, 0, sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = i;
buf.index = i;
if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1)
{
+499 -393
View File
File diff suppressed because it is too large. Load diff
+34 -22
View File
@@ -19,28 +19,9 @@
#include <stdint.h>
#include <stdlib.h>
enum cheevos_ctl_state
{
CHEEVOS_CTL_NONE = 0,
CHEEVOS_CTL_TEST,
CHEEVOS_CTL_LOAD,
#include <retro_common_api.h>
CHEEVOS_CTL_APPLY_CHEATS,
/* Unload the achievements from memory. */
CHEEVOS_CTL_UNLOAD,
/* Toggle Hardcore Mode */
CHEEVOS_CTL_TOGGLE_HARDCORE_MODE,
/* Load the achievements into memory if
* the game has content. */
CHEEVOS_CTL_SET_CHEATS,
CHEEVOS_CTL_GET_DESCRIPTION,
CHEEVOS_CTL_POPULATE_MENU
};
RETRO_BEGIN_DECLS
typedef struct cheevos_ctx_desc
{
@@ -49,6 +30,37 @@ typedef struct cheevos_ctx_desc
size_t len;
} cheevos_ctx_desc_t;
bool cheevos_ctl(enum cheevos_ctl_state state, void *data);
bool cheevos_load(const void *data);
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);
bool cheevos_test(void);
bool cheevos_set_cheats(void);
void cheevos_set_support_cheevos(bool state);
typedef struct
{
unsigned size;
unsigned type;
int bank_id;
unsigned value;
unsigned previous;
} cheevos_var_t;
void cheevos_parse_guest_addr(cheevos_var_t *var, unsigned value);
uint8_t *cheevos_get_memory(const cheevos_var_t *var);
RETRO_END_DECLS
#endif /* __RARCH_CHEEVOS_H */
+2148 -298
View File
File diff suppressed because it is too large. Load diff
+219 -26
View File
@@ -23,37 +23,230 @@
#include <stdint.h>
#include <boolean.h>
#include <retro_common_api.h>
#ifdef __cplusplus
extern "C" {
#endif
RETRO_BEGIN_DECLS
enum rarch_cmd_ctl_state
typedef struct command command_t;
typedef struct command_handle
{
RARCH_CMD_CTL_NONE = 0,
RARCH_CMD_CTL_GET,
RARCH_CMD_CTL_SET,
RARCH_CMD_CTL_POLL,
RARCH_CMD_CTL_NETWORK_SEND,
RARCH_CMD_CTL_FREE
command_t *handle;
unsigned id;
} command_handle_t;
enum event_command
{
CMD_EVENT_NONE = 0,
/* Resets RetroArch. */
CMD_EVENT_RESET,
CMD_EVENT_SET_PER_GAME_RESOLUTION,
CMD_EVENT_SET_FRAME_LIMIT,
/* Loads core. */
CMD_EVENT_LOAD_CORE_DEINIT,
CMD_EVENT_LOAD_CORE,
CMD_EVENT_LOAD_CORE_PERSIST,
CMD_EVENT_UNLOAD_CORE,
CMD_EVENT_LOAD_STATE,
/* Swaps the current state with what's on the undo load buffer */
CMD_EVENT_UNDO_LOAD_STATE,
/* Rewrites a savestate on disk */
CMD_EVENT_UNDO_SAVE_STATE,
CMD_EVENT_SAVE_STATE,
CMD_EVENT_SAVE_STATE_DECREMENT,
CMD_EVENT_SAVE_STATE_INCREMENT,
/* Takes screenshot. */
CMD_EVENT_TAKE_SCREENSHOT,
/* Quits RetroArch. */
CMD_EVENT_QUIT,
/* Reinitialize all drivers. */
CMD_EVENT_REINIT,
/* Toggles cheevos hardcore mode. */
CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE,
/* Deinitialize rewind. */
CMD_EVENT_REWIND_DEINIT,
/* Initializes rewind. */
CMD_EVENT_REWIND_INIT,
/* Toggles rewind. */
CMD_EVENT_REWIND_TOGGLE,
/* Deinitializes autosave. */
CMD_EVENT_AUTOSAVE_DEINIT,
/* Initializes autosave. */
CMD_EVENT_AUTOSAVE_INIT,
CMD_EVENT_AUTOSAVE_STATE,
/* Stops audio. */
CMD_EVENT_AUDIO_STOP,
/* Starts audio. */
CMD_EVENT_AUDIO_START,
/* Mutes audio. */
CMD_EVENT_AUDIO_MUTE_TOGGLE,
/* Initializes overlay. */
CMD_EVENT_OVERLAY_INIT,
/* Deinitializes overlay. */
CMD_EVENT_OVERLAY_DEINIT,
/* Sets current scale factor for overlay. */
CMD_EVENT_OVERLAY_SET_SCALE_FACTOR,
/* Sets current alpha modulation for overlay. */
CMD_EVENT_OVERLAY_SET_ALPHA_MOD,
/* Cycle to next overlay. */
CMD_EVENT_OVERLAY_NEXT,
/* Deinitializes overlay. */
CMD_EVENT_DSP_FILTER_INIT,
/* Deinitializes graphics filter. */
CMD_EVENT_DSP_FILTER_DEINIT,
/* Deinitializes GPU recoring. */
CMD_EVENT_GPU_RECORD_DEINIT,
/* Initializes recording system. */
CMD_EVENT_RECORD_INIT,
/* Deinitializes recording system. */
CMD_EVENT_RECORD_DEINIT,
/* Deinitializes history playlist. */
CMD_EVENT_HISTORY_DEINIT,
/* Initializes history playlist. */
CMD_EVENT_HISTORY_INIT,
/* Deinitializes core information. */
CMD_EVENT_CORE_INFO_DEINIT,
/* Initializes core information. */
CMD_EVENT_CORE_INFO_INIT,
/* Deinitializes core. */
CMD_EVENT_CORE_DEINIT,
/* Initializes core. */
CMD_EVENT_CORE_INIT,
/* Set audio blocking state. */
CMD_EVENT_AUDIO_SET_BLOCKING_STATE,
/* Set audio nonblocking state. */
CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE,
/* Apply video state changes. */
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES,
/* Set video blocking state. */
CMD_EVENT_VIDEO_SET_BLOCKING_STATE,
/* Set video nonblocking state. */
CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE,
/* Sets current aspect ratio index. */
CMD_EVENT_VIDEO_SET_ASPECT_RATIO,
CMD_EVENT_RESET_CONTEXT,
/* Restarts RetroArch. */
CMD_EVENT_RESTART_RETROARCH,
/* Shutdown the OS */
CMD_EVENT_SHUTDOWN,
/* Reboot the OS */
CMD_EVENT_REBOOT,
/* Resume RetroArch when in menu. */
CMD_EVENT_RESUME,
/* Toggles pause. */
CMD_EVENT_PAUSE_TOGGLE,
/* Pauses RetroArch. */
CMD_EVENT_UNPAUSE,
/* Unpauses retroArch. */
CMD_EVENT_PAUSE,
CMD_EVENT_PAUSE_CHECKS,
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
CMD_EVENT_MENU_SAVE_CONFIG,
CMD_EVENT_MENU_PAUSE_LIBRETRO,
/* Toggles menu on/off. */
CMD_EVENT_MENU_TOGGLE,
CMD_EVENT_MENU_REFRESH,
/* Applies shader changes. */
CMD_EVENT_SHADERS_APPLY_CHANGES,
/* Initializes shader directory. */
CMD_EVENT_SHADER_DIR_INIT,
/* Deinitializes shader directory. */
CMD_EVENT_SHADER_DIR_DEINIT,
/* Initializes controllers. */
CMD_EVENT_CONTROLLERS_INIT,
CMD_EVENT_SAVEFILES,
/* Initializes savefiles. */
CMD_EVENT_SAVEFILES_INIT,
/* Deinitializes savefiles. */
CMD_EVENT_SAVEFILES_DEINIT,
/* Initializes cheats. */
CMD_EVENT_CHEATS_INIT,
/* Deinitializes cheats. */
CMD_EVENT_CHEATS_DEINIT,
/* Apply cheats. */
CMD_EVENT_CHEATS_APPLY,
/* Deinitializes network system. */
CMD_EVENT_NETWORK_DEINIT,
/* Initializes network system. */
CMD_EVENT_NETWORK_INIT,
/* Initializes netplay system. */
CMD_EVENT_NETPLAY_INIT,
/* Deinitializes netplay system. */
CMD_EVENT_NETPLAY_DEINIT,
/* Flip netplay players. */
CMD_EVENT_NETPLAY_FLIP_PLAYERS,
/* Initializes BSV movie. */
CMD_EVENT_BSV_MOVIE_INIT,
/* Deinitializes BSV movie. */
CMD_EVENT_BSV_MOVIE_DEINIT,
/* Initializes command interface. */
CMD_EVENT_COMMAND_INIT,
/* Deinitialize command interface. */
CMD_EVENT_COMMAND_DEINIT,
/* Initializes remote gamepad interface. */
CMD_EVENT_REMOTE_INIT,
/* Deinitializes remote gamepad interface. */
CMD_EVENT_REMOTE_DEINIT,
/* Reinitializes audio driver. */
CMD_EVENT_AUDIO_REINIT,
/* Resizes windowed scale. Will reinitialize video driver. */
CMD_EVENT_RESIZE_WINDOWED_SCALE,
/* Deinitializes temporary content. */
CMD_EVENT_TEMPORARY_CONTENT_DEINIT,
CMD_EVENT_SUBSYSTEM_FULLPATHS_DEINIT,
CMD_EVENT_LOG_FILE_DEINIT,
/* Toggles disk eject. */
CMD_EVENT_DISK_EJECT_TOGGLE,
/* Cycle to next disk. */
CMD_EVENT_DISK_NEXT,
/* Cycle to previous disk. */
CMD_EVENT_DISK_PREV,
/* Appends disk image to disk image list. */
CMD_EVENT_DISK_APPEND_IMAGE,
/* Stops rumbling. */
CMD_EVENT_RUMBLE_STOP,
/* Toggles mouse grab. */
CMD_EVENT_GRAB_MOUSE_TOGGLE,
/* Toggles fullscreen mode. */
CMD_EVENT_FULLSCREEN_TOGGLE,
CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG,
CMD_EVENT_VOLUME_UP,
CMD_EVENT_VOLUME_DOWN,
CMD_EVENT_DISABLE_OVERRIDES
};
typedef struct rarch_cmd rarch_cmd_t;
typedef struct rarch_cmd_handle
{
rarch_cmd_t *handle;
unsigned id;
} rarch_cmd_handle_t;
rarch_cmd_t *rarch_cmd_new(bool stdin_enable,
bool network_enable, uint16_t port);
bool rarch_cmd_ctl(enum rarch_cmd_ctl_state state, void *data);
#ifdef __cplusplus
}
#ifdef HAVE_COMMAND
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
bool command_network_send(const char *cmd_);
#endif
#endif
#endif
bool command_network_new(
command_t *handle,
bool stdin_enable,
bool network_enable,
uint16_t port);
command_t *command_new(bool local_enable);
bool command_poll(command_t *handle);
bool command_get(command_handle_t *handle);
bool command_set(command_handle_t *handle);
bool command_free(command_t *handle);
/**
* command_event:
* @cmd : Command index.
*
* Performs RetroArch command with index @cmd.
*
* Returns: true (1) on success, otherwise false (0).
**/
bool command_event(enum event_command action, void *data);
RETRO_END_DECLS
#endif
-1723
View File
File diff suppressed because it is too large. Load diff
-225
View File
@@ -1,225 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - Daniel De Matteis
*
* 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 COMMAND_EVENT_H__
#define COMMAND_EVENT_H__
#include <stdint.h>
#include <boolean.h>
#ifdef __cplusplus
extern "C" {
#endif
enum event_command
{
EVENT_CMD_NONE = 0,
/* Resets RetroArch. */
EVENT_CMD_RESET,
/* Loads content file. */
EVENT_CMD_LOAD_CONTENT,
EVENT_CMD_LOAD_CONTENT_PERSIST,
#ifdef HAVE_FFMPEG
EVENT_CMD_LOAD_CONTENT_FFMPEG,
#endif
EVENT_CMD_LOAD_CONTENT_IMAGEVIEWER,
EVENT_CMD_SET_PER_GAME_RESOLUTION,
EVENT_CMD_SET_FRAME_LIMIT,
/* Loads core. */
EVENT_CMD_LOAD_CORE_DEINIT,
EVENT_CMD_LOAD_CORE,
EVENT_CMD_LOAD_CORE_PERSIST,
EVENT_CMD_UNLOAD_CORE,
EVENT_CMD_LOAD_STATE,
EVENT_CMD_SAVE_STATE,
EVENT_CMD_SAVE_STATE_DECREMENT,
EVENT_CMD_SAVE_STATE_INCREMENT,
/* Takes screenshot. */
EVENT_CMD_TAKE_SCREENSHOT,
/* Quits RetroArch. */
EVENT_CMD_QUIT,
/* Reinitialize all drivers. */
EVENT_CMD_REINIT,
/* Toggles cheevos hardcore mode. */
EVENT_CMD_CHEEVOS_HARDCORE_MODE_TOGGLE,
/* Deinitialize rewind. */
EVENT_CMD_REWIND_DEINIT,
/* Initializes rewind. */
EVENT_CMD_REWIND_INIT,
/* Toggles rewind. */
EVENT_CMD_REWIND_TOGGLE,
/* Deinitializes autosave. */
EVENT_CMD_AUTOSAVE_DEINIT,
/* Initializes autosave. */
EVENT_CMD_AUTOSAVE_INIT,
EVENT_CMD_AUTOSAVE_STATE,
/* Stops audio. */
EVENT_CMD_AUDIO_STOP,
/* Starts audio. */
EVENT_CMD_AUDIO_START,
/* Mutes audio. */
EVENT_CMD_AUDIO_MUTE_TOGGLE,
/* Initializes overlay. */
EVENT_CMD_OVERLAY_INIT,
/* Deinitializes overlay. */
EVENT_CMD_OVERLAY_DEINIT,
/* Sets current scale factor for overlay. */
EVENT_CMD_OVERLAY_SET_SCALE_FACTOR,
/* Sets current alpha modulation for overlay. */
EVENT_CMD_OVERLAY_SET_ALPHA_MOD,
/* Cycle to next overlay. */
EVENT_CMD_OVERLAY_NEXT,
/* Deinitializes overlay. */
EVENT_CMD_DSP_FILTER_INIT,
/* Deinitializes graphics filter. */
EVENT_CMD_DSP_FILTER_DEINIT,
/* Deinitializes GPU recoring. */
EVENT_CMD_GPU_RECORD_DEINIT,
/* Initializes recording system. */
EVENT_CMD_RECORD_INIT,
/* Deinitializes recording system. */
EVENT_CMD_RECORD_DEINIT,
/* Deinitializes history playlist. */
EVENT_CMD_HISTORY_DEINIT,
/* Initializes history playlist. */
EVENT_CMD_HISTORY_INIT,
/* Deinitializes core information. */
EVENT_CMD_CORE_INFO_DEINIT,
/* Initializes core information. */
EVENT_CMD_CORE_INFO_INIT,
/* Deinitializes core. */
EVENT_CMD_CORE_DEINIT,
/* Initializes core. */
EVENT_CMD_CORE_INIT,
/* Set audio blocking state. */
EVENT_CMD_AUDIO_SET_BLOCKING_STATE,
/* Set audio nonblocking state. */
EVENT_CMD_AUDIO_SET_NONBLOCKING_STATE,
/* Apply video state changes. */
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES,
/* Set video blocking state. */
EVENT_CMD_VIDEO_SET_BLOCKING_STATE,
/* Set video nonblocking state. */
EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE,
/* Sets current aspect ratio index. */
EVENT_CMD_VIDEO_SET_ASPECT_RATIO,
EVENT_CMD_RESET_CONTEXT,
/* Restarts RetroArch. */
EVENT_CMD_RESTART_RETROARCH,
/* Force-quit RetroArch. */
EVENT_CMD_QUIT_RETROARCH,
/* Shutdown the OS */
EVENT_CMD_SHUTDOWN,
/* Reboot the OS */
EVENT_CMD_REBOOT,
/* Resume RetroArch when in menu. */
EVENT_CMD_RESUME,
/* Toggles pause. */
EVENT_CMD_PAUSE_TOGGLE,
/* Pauses RetroArch. */
EVENT_CMD_UNPAUSE,
/* Unpauses retroArch. */
EVENT_CMD_PAUSE,
EVENT_CMD_PAUSE_CHECKS,
EVENT_CMD_MENU_SAVE_CURRENT_CONFIG,
EVENT_CMD_MENU_SAVE_CONFIG,
EVENT_CMD_MENU_PAUSE_LIBRETRO,
/* Toggles menu on/off. */
EVENT_CMD_MENU_TOGGLE,
EVENT_CMD_MENU_REFRESH,
/* Applies shader changes. */
EVENT_CMD_SHADERS_APPLY_CHANGES,
/* Initializes shader directory. */
EVENT_CMD_SHADER_DIR_INIT,
/* Deinitializes shader directory. */
EVENT_CMD_SHADER_DIR_DEINIT,
/* Initializes controllers. */
EVENT_CMD_CONTROLLERS_INIT,
EVENT_CMD_SAVEFILES,
/* Initializes savefiles. */
EVENT_CMD_SAVEFILES_INIT,
/* Deinitializes savefiles. */
EVENT_CMD_SAVEFILES_DEINIT,
/* Initializes cheats. */
EVENT_CMD_CHEATS_INIT,
/* Deinitializes cheats. */
EVENT_CMD_CHEATS_DEINIT,
/* Apply cheats. */
EVENT_CMD_CHEATS_APPLY,
/* Deinitializes network system. */
EVENT_CMD_NETWORK_DEINIT,
/* Initializes network system. */
EVENT_CMD_NETWORK_INIT,
/* Initializes netplay system. */
EVENT_CMD_NETPLAY_INIT,
/* Deinitializes netplay system. */
EVENT_CMD_NETPLAY_DEINIT,
/* Flip netplay players. */
EVENT_CMD_NETPLAY_FLIP_PLAYERS,
/* Initializes BSV movie. */
EVENT_CMD_BSV_MOVIE_INIT,
/* Deinitializes BSV movie. */
EVENT_CMD_BSV_MOVIE_DEINIT,
/* Initializes command interface. */
EVENT_CMD_COMMAND_INIT,
/* Deinitialize command interface. */
EVENT_CMD_COMMAND_DEINIT,
/* Initializes remote gamepad interface. */
EVENT_CMD_REMOTE_INIT,
/* Deinitializes remote gamepad interface. */
EVENT_CMD_REMOTE_DEINIT,
/* Reinitializes audio driver. */
EVENT_CMD_AUDIO_REINIT,
/* Resizes windowed scale. Will reinitialize video driver. */
EVENT_CMD_RESIZE_WINDOWED_SCALE,
/* Deinitializes temporary content. */
EVENT_CMD_TEMPORARY_CONTENT_DEINIT,
EVENT_CMD_SUBSYSTEM_FULLPATHS_DEINIT,
EVENT_CMD_LOG_FILE_DEINIT,
/* Toggles disk eject. */
EVENT_CMD_DISK_EJECT_TOGGLE,
/* Cycle to next disk. */
EVENT_CMD_DISK_NEXT,
/* Cycle to previous disk. */
EVENT_CMD_DISK_PREV,
/* Appends disk image to disk image list. */
EVENT_CMD_DISK_APPEND_IMAGE,
/* Stops rumbling. */
EVENT_CMD_RUMBLE_STOP,
/* Toggles mouse grab. */
EVENT_CMD_GRAB_MOUSE_TOGGLE,
/* Toggles fullscreen mode. */
EVENT_CMD_FULLSCREEN_TOGGLE,
EVENT_CMD_PERFCNT_REPORT_FRONTEND_LOG,
EVENT_CMD_VOLUME_UP,
EVENT_CMD_VOLUME_DOWN,
EVENT_CMD_EXEC
};
/**
* event_command:
* @cmd : Command index.
*
* Performs RetroArch command with index @cmd.
*
* Returns: true (1) on success, otherwise false (0).
**/
bool event_cmd_ctl(enum event_command action, void *data);
#ifdef __cplusplus
}
#endif
#endif
+22 -3
View File
@@ -29,6 +29,7 @@ enum
{
VIDEO_GL = 0,
VIDEO_VULKAN,
VIDEO_DRM,
VIDEO_XVIDEO,
VIDEO_SDL,
VIDEO_SDL2,
@@ -131,7 +132,9 @@ enum
RECORD_NULL
};
#ifdef GEKKO
#if defined(HW_RVL)
#define MAX_GAMMA_SETTING 30
#elif defined(GEKKO)
#define MAX_GAMMA_SETTING 2
#else
#define MAX_GAMMA_SETTING 1
@@ -321,7 +324,7 @@ enum
#if defined(HAVE_XUI)
#define MENU_DEFAULT_DRIVER MENU_XUI
#elif defined(IOS) || defined(ANDROID)
#elif defined(IOS) || defined(ANDROID) || defined(__QNX__)
#define MENU_DEFAULT_DRIVER MENU_MATERIALUI
#elif defined(__MACH__) && defined(HAVE_XMB) || defined(__CELLOS_LV2__)
#define MENU_DEFAULT_DRIVER MENU_XMB
@@ -409,6 +412,8 @@ static const bool disable_composition = false;
/* Video VSYNC (recommended) */
static const bool vsync = true;
static const unsigned max_swapchain_images = 3;
/* Attempts to hard-synchronize CPU and GPU.
* Can reduce latency at cost of performance. */
static const bool hard_sync = false;
@@ -507,11 +512,15 @@ static const bool default_overlay_enable = false;
static const bool overlay_hide_in_menu = true;
#ifdef HAVE_MENU
#include "menu/menu_display.h"
static bool default_block_config_read = true;
static unsigned xmb_scale_factor = 100;
static unsigned xmb_alpha_factor = 75;
static unsigned xmb_theme = 0;
static unsigned xmb_icon_theme = XMB_ICON_THEME_MONOCHROME;
static unsigned xmb_theme = XMB_THEME_ELECTRIC_BLUE;
#ifdef HAVE_LAKKA
static bool xmb_shadows_enable = false;
@@ -519,13 +528,21 @@ static bool xmb_shadows_enable = false;
static bool xmb_shadows_enable = true;
#endif
static float menu_wallpaper_opacity = 0.300;
static float menu_footer_opacity = 1.000;
static float menu_header_opacity = 1.000;
static unsigned menu_background_gradient = 4;
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) || defined(HAVE_VULKAN)
#if defined(HAVE_OPENGLES2) || defined(OSX_PPC)
static unsigned menu_shader_pipeline = 1;
#else
static unsigned menu_shader_pipeline = 2;
#endif
#endif
static bool show_advanced_settings = true;
static const uint32_t menu_entry_normal_color = 0xffffffff;
@@ -780,6 +797,8 @@ static const unsigned input_max_users = 5;
static const unsigned input_poll_type_behavior = 2;
static const unsigned input_bind_timeout = 5;
static const unsigned menu_thumbnails_default = 3;
#ifdef IOS
+20 -2
View File
@@ -32,7 +32,7 @@ static const bool _network_command_supp = true;
static const bool _network_command_supp = false;
#endif
#ifdef HAVE_NETWORK_GAMEPAD
#ifdef HAVE_NETWORKGAMEPAD
static const bool _network_gamepad_supp = true;
#else
static const bool _network_gamepad_supp = false;
@@ -80,7 +80,7 @@ static const bool _vulkan_supp = true;
static const bool _vulkan_supp = false;
#endif
#if defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3)
#if defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES2) || defined(HAVE_OPENGLES3) || defined(HAVE_OPENGLES_3_1) || defined(HAVE_OPENGLES_3_2)
static const bool _opengles_supp = true;
#else
static const bool _opengles_supp = false;
@@ -302,6 +302,24 @@ static const bool _rpng_supp = true;
static const bool _rpng_supp = false;
#endif
#ifdef HAVE_RJPEG
static const bool _rjpeg_supp = true;
#else
static const bool _rjpeg_supp = false;
#endif
#ifdef HAVE_RBMP
static const bool _rbmp_supp = true;
#else
static const bool _rbmp_supp = false;
#endif
#ifdef HAVE_RTGA
static const bool _rtga_supp = true;
#else
static const bool _rtga_supp = false;
#endif
#ifdef HAVE_CORETEXT
static const bool _coretext_supp = true;
#else
+56 -36
View File
@@ -25,36 +25,6 @@
#include "config_file_userdata.h"
#define get_array_setup() \
char key[2][256]; \
bool got; \
struct config_file_userdata *usr = (struct config_file_userdata*)userdata; \
char *str = NULL; \
fill_pathname_join_delim(key[0], usr->prefix[0], key_str, '_', sizeof(key[0])); \
fill_pathname_join_delim(key[1], usr->prefix[1], key_str, '_', sizeof(key[1])); \
got = config_get_string(usr->conf, key[0], &str); \
got = got || config_get_string(usr->conf, key[1], &str);
#define get_array_body(T) \
if (got) \
{ \
unsigned i; \
struct string_list *list = string_split(str, " "); \
*values = (T*)calloc(list->size, sizeof(T)); \
for (i = 0; i < list->size; i++) \
(*values)[i] = (T)strtod(list->elems[i].data, NULL); \
*out_num_values = list->size; \
string_list_free(list); \
return true; \
} \
else \
{ \
*values = (T*)calloc(num_default_values, sizeof(T)); \
memcpy(*values, default_values, sizeof(T) * num_default_values); \
*out_num_values = num_default_values; \
return false; \
}
int config_userdata_get_float(void *userdata, const char *key_str,
float *value, float default_value)
{
@@ -95,24 +65,74 @@ int config_userdata_get_float_array(void *userdata, const char *key_str,
float **values, unsigned *out_num_values,
const float *default_values, unsigned num_default_values)
{
get_array_setup()
get_array_body(float)
char key[2][256];
struct config_file_userdata *usr = (struct config_file_userdata*)userdata;
char *str = NULL;
fill_pathname_join_delim(key[0], usr->prefix[0], key_str, '_', sizeof(key[0]));
fill_pathname_join_delim(key[1], usr->prefix[1], key_str, '_', sizeof(key[1]));
if ( config_get_string(usr->conf, key[0], &str) ||
config_get_string(usr->conf, key[1], &str))
{
unsigned i;
struct string_list *list = string_split(str, " ");
*values = (float*)calloc(list->size, sizeof(float));
for (i = 0; i < list->size; i++)
(*values)[i] = (float)strtod(list->elems[i].data, NULL);
*out_num_values = list->size;
string_list_free(list);
free(str);
return true;
}
*values = (float*)calloc(num_default_values, sizeof(float));
memcpy(*values, default_values, sizeof(float) * num_default_values);
*out_num_values = num_default_values;
return false;
}
int config_userdata_get_int_array(void *userdata, const char *key_str,
int **values, unsigned *out_num_values,
const int *default_values, unsigned num_default_values)
{
get_array_setup()
get_array_body(int)
char key[2][256];
struct config_file_userdata *usr = (struct config_file_userdata*)userdata;
char *str = NULL;
fill_pathname_join_delim(key[0], usr->prefix[0], key_str, '_', sizeof(key[0]));
fill_pathname_join_delim(key[1], usr->prefix[1], key_str, '_', sizeof(key[1]));
if ( config_get_string(usr->conf, key[0], &str) ||
config_get_string(usr->conf, key[1], &str))
{
unsigned i;
struct string_list *list = string_split(str, " ");
*values = (int*)calloc(list->size, sizeof(int));
for (i = 0; i < list->size; i++)
(*values)[i] = (int)strtod(list->elems[i].data, NULL);
*out_num_values = list->size;
string_list_free(list);
free(str);
return true;
}
*values = (int*)calloc(num_default_values, sizeof(int));
memcpy(*values, default_values, sizeof(int) * num_default_values);
*out_num_values = num_default_values;
return false;
}
int config_userdata_get_string(void *userdata, const char *key_str,
char **output, const char *default_output)
{
get_array_setup()
char key[2][256];
struct config_file_userdata *usr = (struct config_file_userdata*)userdata;
char *str = NULL;
fill_pathname_join_delim(key[0], usr->prefix[0], key_str, '_', sizeof(key[0]));
fill_pathname_join_delim(key[1], usr->prefix[1], key_str, '_', sizeof(key[1]));
if (got)
if ( config_get_string(usr->conf, key[0], &str) ||
config_get_string(usr->conf, key[1], &str))
{
*output = str;
return true;
+637 -408
View File
File diff suppressed because it is too large. Load diff
+44 -14
View File
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <boolean.h>
#include <retro_common_api.h>
#include "gfx/video_driver.h"
#include "driver.h"
@@ -28,9 +29,7 @@
#define MAX_USERS 16
#endif
#ifdef __cplusplus
extern "C" {
#endif
RETRO_BEGIN_DECLS
/* All config related settings go here. */
@@ -56,6 +55,7 @@ typedef struct settings
bool vsync;
bool hard_sync;
bool black_frame_insertion;
unsigned max_swapchain_images;
unsigned swap_interval;
unsigned hard_sync_frames;
unsigned frame_delay;
@@ -121,6 +121,21 @@ typedef struct settings
unsigned thumbnails;
bool throttle;
struct
{
float opacity;
} wallpaper;
struct
{
float opacity;
} footer;
struct
{
float opacity;
} header;
struct
{
bool enable;
@@ -158,15 +173,24 @@ typedef struct settings
unsigned entry_normal_color;
unsigned entry_hover_color;
unsigned title_color;
unsigned xmb_scale_factor;
unsigned xmb_alpha_factor;
unsigned xmb_theme;
unsigned background_gradient;
bool xmb_shadows_enable;
unsigned shader_pipeline;
char xmb_font[PATH_MAX_LENGTH];
bool throttle_framerate;
bool linear_filter;
struct
{
unsigned shader_pipeline;
char font[PATH_MAX_LENGTH];
unsigned scale_factor;
unsigned alpha_factor;
unsigned theme;
unsigned menu_color_theme;
bool shadows_enable;
} xmb;
struct
{
unsigned menu_color_theme;
} materialui;
} menu;
#endif
@@ -249,6 +273,7 @@ typedef struct settings
float overlay_opacity;
float overlay_scale;
unsigned bind_timeout;
bool input_descriptor_label_show;
bool input_descriptor_hide_unbound;
@@ -405,7 +430,9 @@ typedef struct settings
unsigned menu_scroll_up_btn;
char username[32];
#ifdef HAVE_LANGEXTRA
unsigned int user_language;
#endif
bool config_save_on_exit;
@@ -560,14 +587,17 @@ bool config_save_autoconf_profile(const char *path, unsigned user);
**/
bool config_save_file(const char *path);
bool config_realloc(void);
/* Replaces currently loaded configuration file with
* another one. Will load a dummy core to flush state
* properly. */
bool config_replace(char *path);
bool config_init(void);
void config_free(void);
settings_t *config_get_ptr(void);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif
-1791
View File
File diff suppressed because it is too large. Load diff
+46 -67
View File
@@ -23,71 +23,13 @@
#include <sys/types.h>
#include <boolean.h>
#include <retro_common_api.h>
#include "frontend/frontend_driver.h"
#ifdef __cplusplus
extern "C" {
#endif
RETRO_BEGIN_DECLS
enum content_ctl_state
{
CONTENT_CTL_NONE = 0,
CONTENT_CTL_IS_INITED,
CONTENT_CTL_DOES_NOT_NEED_CONTENT,
CONTENT_CTL_SET_DOES_NOT_NEED_CONTENT,
CONTENT_CTL_UNSET_DOES_NOT_NEED_CONTENT,
/* Initializes and loads a content file for the currently
* selected libretro core. */
CONTENT_CTL_INIT,
CONTENT_CTL_DEINIT,
/* Loads content file and starts up RetroArch.
* If no content file can be loaded, will start up RetroArch
* as-is. */
CONTENT_CTL_LOAD,
CONTENT_CTL_GET_CRC,
/* Load a RAM state from disk to memory. */
CONTENT_CTL_LOAD_RAM_FILE,
/* Save a RAM state from memory to disk. */
CONTENT_CTL_SAVE_RAM_FILE,
/* Load a state from disk to memory. */
CONTENT_CTL_LOAD_STATE,
/* Save a state from memory to disk. */
CONTENT_CTL_SAVE_STATE,
/* Frees temporary content handle. */
CONTENT_CTL_TEMPORARY_FREE,
CONTENT_CTL_STREAM_INIT,
CONTENT_CTL_STREAM_CRC_CALCULATE
};
typedef struct ram_type
{
const char *path;
int type;
} ram_type_t;
typedef struct content_stream
{
uint32_t a;
const uint8_t *b;
size_t c;
uint32_t crc;
} content_stream_t;
typedef struct ram_type ram_type_t;
typedef struct content_ctx_info
{
@@ -97,13 +39,50 @@ typedef struct content_ctx_info
environment_get_t environ_get; /* Function passed for environment_get function */
} content_ctx_info_t;
void content_push_to_history_playlist(bool do_push,
const char *path, void *data);
/* Load a RAM state from disk to memory. */
bool content_load_ram_file(unsigned slot);
bool content_ctl(enum content_ctl_state state, void *data);
/* Save a RAM state from memory to disk. */
bool content_save_ram_file(unsigned slot);
#ifdef __cplusplus
}
#endif
/* Load a state from disk to memory. */
bool content_load_state(const char* path, bool load_to_backup_buffer);
/* Save a state from memory to disk. */
bool content_save_state(const char *path, bool save_to_disk);
/* Copy a save state. */
bool content_rename_state(const char *origin, const char *dest);
/* Undoes the last load state operation that was done */
bool content_undo_load_state(void);
/* Restores the last savestate file which was overwritten */
bool content_undo_save_state(void);
bool content_does_not_need_content(void);
void content_set_does_not_need_content(void);
void content_unset_does_not_need_content(void);
bool content_get_crc(uint32_t **content_crc_ptr);
bool content_is_inited(void);
void content_deinit(void);
/* Initializes and loads a content file for the currently
* selected libretro core. */
bool content_init(void);
/* Resets the state and savefile backup buffers */
bool content_reset_savestate_backups(void);
/* Checks if the buffers are empty */
bool content_undo_load_buf_is_empty(void);
bool content_undo_save_buf_is_empty(void);
RETRO_END_DECLS
#endif
+78 -88
View File
@@ -15,16 +15,16 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _RETRO_IMPLEMENTATION_V1_H
#define _RETRO_IMPLEMENTATION_V1_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _LIBRETRO_CORE_IMPL_H
#define _LIBRETRO_CORE_IMPL_H
#include <boolean.h>
#include <libretro.h>
#include <retro_common_api.h>
#include "libretro.h"
#include "core_type.h"
RETRO_BEGIN_DECLS
enum
{
@@ -40,83 +40,6 @@ enum
POLL_TYPE_LATE
};
enum core_ctl_state
{
CORE_CTL_NONE = 0,
CORE_CTL_INIT,
CORE_CTL_DEINIT,
CORE_CTL_SET_CBS,
CORE_CTL_SET_CBS_REWIND,
CORE_CTL_SET_POLL_TYPE,
/* Runs the core for one frame. */
CORE_CTL_RETRO_RUN,
CORE_CTL_RETRO_INIT,
CORE_CTL_RETRO_DEINIT,
CORE_CTL_RETRO_UNLOAD_GAME,
CORE_CTL_RETRO_RESET,
CORE_CTL_RETRO_GET_SYSTEM_AV_INFO,
CORE_CTL_RETRO_CTX_FRAME_CB,
CORE_CTL_RETRO_CTX_POLL_CB,
CORE_CTL_RETRO_SET_ENVIRONMENT,
CORE_CTL_RETRO_SERIALIZE_SIZE,
CORE_CTL_RETRO_SERIALIZE,
CORE_CTL_RETRO_UNSERIALIZE,
CORE_CTL_RETRO_SYMBOLS_INIT,
CORE_CTL_RETRO_CHEAT_SET,
CORE_CTL_RETRO_CHEAT_RESET,
CORE_CTL_RETRO_SET_INPUT_STATE,
CORE_CTL_RETRO_API_VERSION,
/* Compare libretro core API version against API version
* used by RetroArch.
*
* TODO - when libretro v2 gets added, allow for switching
* between libretro version backend dynamically.
*/
CORE_CTL_VERIFY_API_VERSION,
CORE_CTL_RETRO_GET_MEMORY,
/* Initialize system A/V information. */
CORE_CTL_INIT_SYSTEM_AV_INFO,
/* Get system A/V information. */
CORE_CTL_RETRO_GET_SYSTEM_INFO,
CORE_CTL_RETRO_LOAD_GAME,
CORE_CTL_RETRO_SET_CONTROLLER_PORT_DEVICE,
CORE_CTL_HAS_SET_INPUT_DESCRIPTORS,
CORE_CTL_SET_INPUT_DESCRIPTORS,
CORE_CTL_UNSET_INPUT_DESCRIPTORS
};
typedef struct retro_ctx_input_state_info
{
retro_input_state_t cb;
@@ -188,10 +111,77 @@ typedef struct retro_callbacks
retro_input_poll_t poll_cb;
} retro_callbacks_t;
bool core_ctl(enum core_ctl_state state, void *data);
bool core_load(void);
#ifdef __cplusplus
}
#endif
bool core_unload(void);
bool core_set_default_callbacks(void *data);
bool core_set_rewind_callbacks(void);
bool core_set_poll_type(unsigned *type);
/* Runs the core for one frame. */
bool core_run(void);
bool core_init(void);
bool core_deinit(void *data);
bool core_unload_game(void);
bool core_reset(void);
bool core_frame(retro_ctx_frame_info_t *info);
bool core_poll(void);
bool core_set_environment(retro_ctx_environ_info_t *info);
bool core_serialize_size(retro_ctx_size_info_t *info);
bool core_serialize(retro_ctx_serialize_info_t *info);
bool core_unserialize(retro_ctx_serialize_info_t *info);
bool core_init_symbols(enum rarch_core_type *type);
bool core_set_cheat(retro_ctx_cheat_info_t *info);
bool core_reset_cheat(void);
bool core_api_version(retro_ctx_api_info_t *api);
/* Compare libretro core API version against API version
* used by RetroArch.
*
* TODO - when libretro v2 gets added, allow for switching
* between libretro version backend dynamically.
*/
bool core_verify_api_version(void);
bool core_get_memory(retro_ctx_memory_info_t *info);
/* Initialize system A/V information. */
bool core_get_system_av_info(struct retro_system_av_info *av_info);
/* Get system A/V information. */
bool core_get_system_info(struct retro_system_info *system);
bool core_load_game(retro_ctx_load_content_info_t *load_info);
bool core_set_controller_port_device(retro_ctx_controller_info_t *pad);
bool core_has_set_input_descriptor(void);
void core_set_input_descriptors(void);
void core_unset_input_descriptors(void);
bool core_uninit_libretro_callbacks(void);
void core_set_input_state(retro_ctx_input_state_info_t *info);
RETRO_END_DECLS
#endif
+409
View File
@@ -0,0 +1,409 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2012-2015 - Michael Lelli
*
* 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <retro_inline.h>
#include <boolean.h>
#include <lists/string_list.h>
#include <libretro.h>
#include "dynamic.h"
#include "core.h"
#include "general.h"
#include "msg_hash.h"
#include "managers/state_manager.h"
#include "system.h"
#include "gfx/video_driver.h"
#include "audio/audio_driver.h"
#ifdef HAVE_NETPLAY
#include "network/netplay/netplay.h"
#endif
static struct retro_core_t core;
static unsigned core_poll_type;
static bool core_input_polled;
static bool core_has_set_input_descriptors = false;
static struct retro_callbacks retro_ctx;
static void core_input_state_poll_maybe(void)
{
if (core_poll_type == POLL_TYPE_NORMAL)
input_poll();
}
static int16_t core_input_state_poll(unsigned port,
unsigned device, unsigned idx, unsigned id)
{
if (core_poll_type == POLL_TYPE_LATE)
{
if (!core_input_polled)
input_poll();
core_input_polled = true;
}
return input_state(port, device, idx, id);
}
void core_set_input_state(retro_ctx_input_state_info_t *info)
{
core.retro_set_input_state(info->cb);
}
/**
* core_init_libretro_cbs:
* @data : pointer to retro_callbacks object
*
* Initializes libretro callbacks, and binds the libretro callbacks
* to default callback functions.
**/
static bool core_init_libretro_cbs(void *data)
{
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
#ifdef HAVE_NETPLAY
global_t *global = global_get_ptr();
#endif
if (!cbs)
return false;
core.retro_set_video_refresh(video_driver_frame);
core.retro_set_audio_sample(audio_driver_sample);
core.retro_set_audio_sample_batch(audio_driver_sample_batch);
core.retro_set_input_state(core_input_state_poll);
core.retro_set_input_poll(core_input_state_poll_maybe);
core_set_default_callbacks(cbs);
#ifdef HAVE_NETPLAY
if (!netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
return true;
/* Force normal poll type for netplay. */
core_poll_type = POLL_TYPE_NORMAL;
if (global->netplay.is_spectate)
{
core.retro_set_input_state(
(global->netplay.is_client ?
input_state_spectate_client : input_state_spectate)
);
}
else
{
core.retro_set_video_refresh(video_frame_net);
core.retro_set_audio_sample(audio_sample_net);
core.retro_set_audio_sample_batch(audio_sample_batch_net);
core.retro_set_input_state(input_state_net);
}
#endif
return true;
}
/**
* core_set_default_callbacks:
* @data : pointer to retro_callbacks object
*
* Binds the libretro callbacks to default callback functions.
**/
bool core_set_default_callbacks(void *data)
{
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
if (!cbs)
return false;
cbs->frame_cb = video_driver_frame;
cbs->sample_cb = audio_driver_sample;
cbs->sample_batch_cb = audio_driver_sample_batch;
cbs->state_cb = core_input_state_poll;
cbs->poll_cb = input_poll;
return true;
}
bool core_deinit(void *data)
{
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
if (!cbs)
return false;
cbs->frame_cb = NULL;
cbs->sample_cb = NULL;
cbs->sample_batch_cb = NULL;
cbs->state_cb = NULL;
cbs->poll_cb = NULL;
return true;
}
bool core_uninit_libretro_callbacks(void)
{
return core_deinit(&retro_ctx);
}
/**
* core_set_rewind_callbacks:
*
* Sets the audio sampling callbacks based on whether or not
* rewinding is currently activated.
**/
bool core_set_rewind_callbacks(void)
{
if (state_manager_frame_is_reversed())
{
core.retro_set_audio_sample(audio_driver_sample_rewind);
core.retro_set_audio_sample_batch(audio_driver_sample_batch_rewind);
}
else
{
core.retro_set_audio_sample(audio_driver_sample);
core.retro_set_audio_sample_batch(audio_driver_sample_batch);
}
return true;
}
bool core_set_cheat(retro_ctx_cheat_info_t *info)
{
core.retro_cheat_set(info->index, info->enabled, info->code);
return true;
}
bool core_reset_cheat(void)
{
core.retro_cheat_reset();
return true;
}
bool core_api_version(retro_ctx_api_info_t *api)
{
if (!api)
return false;
api->version = core.retro_api_version();
return true;
}
bool core_set_poll_type(unsigned *type)
{
core_poll_type = *type;
return true;
}
bool core_init_symbols(enum rarch_core_type *type)
{
if (!type)
return false;
init_libretro_sym(*type, &core);
return true;
}
bool core_set_controller_port_device(retro_ctx_controller_info_t *pad)
{
if (!pad)
return false;
core.retro_set_controller_port_device(pad->port, pad->device);
return true;
}
bool core_get_memory(retro_ctx_memory_info_t *info)
{
if (!info)
return false;
info->size = core.retro_get_memory_size(info->id);
info->data = core.retro_get_memory_data(info->id);
return true;
}
bool core_load_game(retro_ctx_load_content_info_t *load_info)
{
if (!load_info)
return false;
if (load_info->special)
return core.retro_load_game_special(load_info->special->id, load_info->info, load_info->content->size);
return core.retro_load_game(*load_info->content->elems[0].data ? load_info->info : NULL);
}
bool core_get_system_info(struct retro_system_info *system)
{
if (!system)
return false;
core.retro_get_system_info(system);
return true;
}
bool core_unserialize(retro_ctx_serialize_info_t *info)
{
if (!info)
return false;
if (!core.retro_unserialize(info->data_const, info->size))
return false;
return true;
}
bool core_serialize(retro_ctx_serialize_info_t *info)
{
if (!info)
return false;
if (!core.retro_serialize(info->data, info->size))
return false;
return true;
}
bool core_serialize_size(retro_ctx_size_info_t *info)
{
if (!info)
return false;
info->size = core.retro_serialize_size();
return true;
}
bool core_frame(retro_ctx_frame_info_t *info)
{
if (!info || !retro_ctx.frame_cb)
return false;
retro_ctx.frame_cb(
info->data, info->width, info->height, info->pitch);
return true;
}
bool core_poll(void)
{
if (!retro_ctx.poll_cb)
return false;
retro_ctx.poll_cb();
return true;
}
bool core_set_environment(retro_ctx_environ_info_t *info)
{
if (!info)
return false;
core.retro_set_environment(info->env);
return true;
}
bool core_get_system_av_info(struct retro_system_av_info *av_info)
{
if (!av_info)
return false;
core.retro_get_system_av_info(av_info);
return true;
}
bool core_reset(void)
{
core.retro_reset();
return true;
}
bool core_init(void)
{
core.retro_init();
return true;
}
bool core_unload(void)
{
core.retro_deinit();
uninit_libretro_sym(&core);
return true;
}
bool core_unload_game(void)
{
video_driver_deinit_hw_context();
audio_driver_stop();
core.retro_unload_game();
return true;
}
bool core_run(void)
{
switch (core_poll_type)
{
case POLL_TYPE_EARLY:
input_poll();
break;
case POLL_TYPE_LATE:
core_input_polled = false;
break;
}
if (core.retro_run)
core.retro_run();
if (core_poll_type == POLL_TYPE_LATE && !core_input_polled)
input_poll();
return true;
}
bool core_load(void)
{
settings_t *settings = config_get_ptr();
core_poll_type = settings->input.poll_type_behavior;
if (!core_verify_api_version())
return false;
if (!core_init_libretro_cbs(&retro_ctx))
return false;
core_get_system_av_info(video_viewport_get_system_av_info());
runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL);
return true;
}
bool core_verify_api_version(void)
{
unsigned api_version = core.retro_api_version();
RARCH_LOG("%s: %u\n",
msg_hash_to_str(MSG_VERSION_OF_LIBRETRO_API),
api_version);
RARCH_LOG("%s: %u\n",
msg_hash_to_str(MSG_COMPILED_AGAINST_API),
RETRO_API_VERSION);
if (api_version != RETRO_API_VERSION)
{
RARCH_WARN("%s\n", msg_hash_to_str(MSG_LIBRETRO_ABI_BREAK));
return false;
}
return true;
}
bool core_has_set_input_descriptor(void)
{
return core_has_set_input_descriptors;
}
void core_set_input_descriptors(void)
{
core_has_set_input_descriptors = true;
}
void core_unset_input_descriptors(void)
{
core_has_set_input_descriptors = false;
}
+291 -291
View File
@@ -24,6 +24,7 @@
#include "core_info.h"
#include "configuration.h"
#include "file_path_special.h"
#include "list_special.h"
#include "config.def.h"
@@ -31,8 +32,10 @@
#include "config.h"
#endif
static const char *core_info_tmp_path = NULL;
static const char *core_info_tmp_path = NULL;
static const struct string_list *core_info_tmp_list = NULL;
static core_info_t *core_info_current = NULL;
static core_info_list_t *core_info_curr_list = NULL;
static void core_info_list_resolve_all_extensions(
core_info_list_t *core_info_list)
@@ -81,7 +84,7 @@ static void core_info_list_resolve_all_firmware(
core_info_t *info = (core_info_t*)&core_info_list->list[i];
config_file_t *config = (config_file_t*)info->config_data;
if (!info || !config)
if (!config)
continue;
if (!config_get_uint(config, "firmware_count", &count))
@@ -101,7 +104,7 @@ static void core_info_list_resolve_all_firmware(
snprintf(path_key, sizeof(path_key), "firmware%u_path", c);
snprintf(desc_key, sizeof(desc_key), "firmware%u_desc", c);
snprintf(opt_key, sizeof(opt_key), "firmware%u_opt", c);
snprintf(opt_key, sizeof(opt_key), "firmware%u_opt", c);
config_get_string(config, path_key, &info->firmware[c].path);
config_get_string(config, desc_key, &info->firmware[c].desc);
@@ -121,9 +124,6 @@ static void core_info_list_free(core_info_list_t *core_info_list)
{
core_info_t *info = (core_info_t*)&core_info_list->list[i];
if (!info)
continue;
free(info->path);
free(info->core_name);
free(info->systemname);
@@ -162,16 +162,15 @@ static void core_info_list_free(core_info_list_t *core_info_list)
static config_file_t *core_info_list_iterate(
struct string_list *contents, size_t i)
{
char info_path_base[PATH_MAX_LENGTH];
char info_path[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
char info_path_base[PATH_MAX_LENGTH] = {0};
char info_path[PATH_MAX_LENGTH] = {0};
settings_t *settings = config_get_ptr();
if (!contents->elems[i].data)
return NULL;
fill_pathname_base(info_path_base, contents->elems[i].data,
fill_pathname_base_noext(info_path_base, contents->elems[i].data,
sizeof(info_path_base));
path_remove_extension(info_path_base);
#if defined(RARCH_MOBILE) || (defined(RARCH_CONSOLE) && !defined(PSP))
char *substr = strrchr(info_path_base, '_');
@@ -179,66 +178,18 @@ static config_file_t *core_info_list_iterate(
*substr = '\0';
#endif
strlcat(info_path_base, ".info", sizeof(info_path_base));
strlcat(info_path_base,
file_path_str(FILE_PATH_CORE_INFO_EXTENSION),
sizeof(info_path_base));
fill_pathname_join(info_path, (*settings->path.libretro_info) ?
fill_pathname_join(info_path,
(!string_is_empty(settings->path.libretro_info)) ?
settings->path.libretro_info : settings->directory.libretro,
info_path_base, sizeof(info_path));
return config_file_new(info_path);
}
void core_info_get_name(const char *path, char *s, size_t len)
{
size_t i;
core_info_t *core_info = NULL;
core_info_list_t *core_info_list = NULL;
struct string_list *contents = dir_list_new_special(
NULL, DIR_LIST_CORES, NULL);
if (!contents)
return;
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
if (!core_info_list)
goto error;
core_info = (core_info_t*)calloc(contents->size, sizeof(*core_info));
if (!core_info)
goto error;
core_info_list->list = core_info;
core_info_list->count = contents->size;
for (i = 0; i < contents->size; i++)
{
config_file_t *conf = NULL;
if (!string_is_equal(contents->elems[i].data, path))
continue;
conf = core_info_list_iterate(contents, i);
if (conf)
{
config_get_string(conf, "corename",
&core_info[i].core_name);
core_info[i].config_data = (void*)conf;
}
core_info[i].path = strdup(contents->elems[i].data);
strlcpy(s, core_info[i].core_name, len);
}
error:
if (contents)
dir_list_free(contents);
contents = NULL;
core_info_list_free(core_info_list);
}
static core_info_list_t *core_info_list_new(void)
{
size_t i;
@@ -267,6 +218,7 @@ static core_info_list_t *core_info_list_new(void)
if (conf)
{
bool tmp_bool = false;
unsigned count = 0;
config_get_string(conf, "display_name",
@@ -320,8 +272,9 @@ static core_info_list_t *core_info_list_new(void)
core_info[i].notes)
core_info[i].note_list = string_split(core_info[i].notes, "|");
config_get_bool(conf, "supports_no_game",
&core_info[i].supports_no_game);
if (config_get_bool(conf, "supports_no_game",
&tmp_bool))
core_info[i].supports_no_game = tmp_bool;
core_info[i].config_data = conf;
}
@@ -346,86 +299,6 @@ error:
return NULL;
}
size_t core_info_list_num_info_files(core_info_list_t *core_info_list)
{
size_t i, num = 0;
if (!core_info_list)
return 0;
for (i = 0; i < core_info_list->count; i++)
{
config_file_t *conf = (config_file_t*)
core_info_list->list[i].config_data;
num += !!conf;
}
return num;
}
bool core_info_list_get_display_name(core_info_list_t *core_info_list,
const char *path, char *s, size_t len)
{
size_t i;
if (!core_info_list)
return false;
for (i = 0; i < core_info_list->count; i++)
{
const core_info_t *info = &core_info_list->list[i];
if (string_is_equal(path_basename(info->path), path_basename(path))
&& info->display_name)
{
strlcpy(s, info->display_name, len);
return true;
}
}
return false;
}
bool core_info_get_display_name(const char *path, char *s, size_t len)
{
char *core_name = NULL;
char *display_name = NULL;
config_file_t *conf = NULL;
if (!path_file_exists(path))
return false;
conf = config_file_new(path);
if (!conf)
goto error;
config_get_string(conf, "corename",
&core_name);
config_get_string(conf, "display_name",
&display_name);
config_file_free(conf);
if (!core_name)
goto error;
if (!conf)
goto error;
snprintf(s, len,"%s",display_name);
free(core_name);
free(display_name);
return true;
error:
if (core_name)
free(core_name);
return false;
}
/* Shallow-copies internal state.
*
* Data in *info is invalidated when the
@@ -495,71 +368,8 @@ static int core_info_qsort_cmp(const void *a_, const void *b_)
return strcasecmp(a->display_name, b->display_name);
}
void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
const char *path, const core_info_t **infos, size_t *num_infos)
{
#ifdef HAVE_ZLIB
struct string_list *list = NULL;
#endif
size_t supported = 0, i;
if (!core_info_list)
return;
core_info_tmp_path = path;
#ifdef HAVE_ZLIB
if (string_is_equal_noncase(path_get_extension(path), "zip"))
list = file_archive_get_file_list(path, NULL);
core_info_tmp_list = list;
#endif
/* Let supported core come first in list so we can return
* a pointer to them. */
qsort(core_info_list->list, core_info_list->count,
sizeof(core_info_t), core_info_qsort_cmp);
for (i = 0; i < core_info_list->count; i++, supported++)
{
const core_info_t *core = &core_info_list->list[i];
if (!core)
continue;
if (core_info_does_support_file(core, path))
continue;
#ifdef HAVE_ZLIB
if (core_info_does_support_any_file(core, list))
continue;
#endif
break;
}
#ifdef HAVE_ZLIB
if (list)
string_list_free(list);
#endif
*infos = core_info_list->list;
*num_infos = supported;
}
core_info_t *core_info_get(core_info_list_t *list, size_t i)
{
core_info_t *info = NULL;
if (!list)
return NULL;
info = (core_info_t*)&list->list[i];
if (!info || !info->path)
return NULL;
return info;
}
static core_info_t *core_info_find(core_info_list_t *list,
static core_info_t *core_info_find_internal(
core_info_list_t *list,
const char *core)
{
size_t i;
@@ -577,10 +387,10 @@ static core_info_t *core_info_find(core_info_list_t *list,
return NULL;
}
static bool core_info_list_update_missing_firmware(
static bool core_info_list_update_missing_firmware_internal(
core_info_list_t *core_info_list,
const char *core, const char *systemdir)
const char *core,
const char *systemdir)
{
size_t i;
char path[PATH_MAX_LENGTH] = {0};
@@ -589,7 +399,7 @@ static bool core_info_list_update_missing_firmware(
if (!core_info_list || !core)
return false;
info = core_info_find(core_info_list, core);
info = core_info_find_internal(core_info_list, core);
if (!info)
return false;
@@ -636,7 +446,7 @@ static void core_info_list_get_missing_firmware(
*firmware = NULL;
*num_firmware = 0;
if (!(info = core_info_find(core_info_list, core)))
if (!(info = core_info_find_internal(core_info_list, core)))
return;
*firmware = info->firmware;
@@ -654,88 +464,278 @@ static void core_info_list_get_missing_firmware(
}
#endif
bool core_info_ctl(enum core_info_state state, void *data)
void core_info_free_current_core(void)
{
static core_info_t *core_info_current = NULL;
static core_info_list_t *core_info_curr_list = NULL;
if (core_info_current)
free(core_info_current);
core_info_current = NULL;
}
switch (state)
{
case CORE_INFO_CTL_CURRENT_CORE_FREE:
if (core_info_current)
free(core_info_current);
core_info_current = NULL;
break;
case CORE_INFO_CTL_CURRENT_CORE_INIT:
core_info_current = (core_info_t*)calloc(1, sizeof(core_info_t));
if (!core_info_current)
return false;
break;
case CORE_INFO_CTL_CURRENT_CORE_GET:
{
core_info_t **core = (core_info_t**)data;
if (!core)
return false;
*core = core_info_current;
}
break;
case CORE_INFO_CTL_LIST_DEINIT:
if (core_info_curr_list)
core_info_list_free(core_info_curr_list);
core_info_curr_list = NULL;
break;
case CORE_INFO_CTL_LIST_INIT:
core_info_curr_list = core_info_list_new();
break;
case CORE_INFO_CTL_LIST_GET:
{
core_info_list_t **core = (core_info_list_t**)data;
if (!core)
return false;
*core = core_info_curr_list;
}
break;
case CORE_INFO_CTL_LIST_UPDATE_MISSING_FIRMWARE:
{
core_info_ctx_firmware_t *info = (core_info_ctx_firmware_t*)data;
if (!info)
return false;
bool core_info_init_current_core(void)
{
core_info_current = (core_info_t*)calloc(1, sizeof(core_info_t));
if (!core_info_current)
return false;
return true;
}
return core_info_list_update_missing_firmware(core_info_curr_list,
info->path, info->directory.system);
}
case CORE_INFO_CTL_FIND:
{
core_info_ctx_find_t *info = (core_info_ctx_find_t*)data;
if (!info || !core_info_curr_list)
return false;
info->inf = core_info_find(core_info_curr_list, info->path);
if (!info->inf)
return false;
}
break;
case CORE_INFO_CTL_LOAD:
{
core_info_t *core_info = NULL;
core_info_ctx_find_t *info = (core_info_ctx_find_t*)data;
bool core_info_get_current_core(core_info_t **core)
{
if (!core)
return false;
*core = core_info_current;
return true;
}
if (!info)
return false;
void core_info_deinit_list(void)
{
if (core_info_curr_list)
core_info_list_free(core_info_curr_list);
core_info_curr_list = NULL;
}
core_info_ctl(CORE_INFO_CTL_CURRENT_CORE_GET, &core_info);
bool core_info_init_list(void)
{
core_info_curr_list = core_info_list_new();
if (!core_info_curr_list)
return false;
if (!core_info_curr_list)
return false;
return true;
}
if (!core_info_list_get_info(core_info_curr_list,
core_info, info->path))
return false;
}
break;
case CORE_INFO_CTL_NONE:
default:
break;
}
bool core_info_get_list(core_info_list_t **core)
{
if (!core)
return false;
*core = core_info_curr_list;
return true;
}
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info)
{
if (!info)
return false;
return core_info_list_update_missing_firmware_internal(
core_info_curr_list,
info->path, info->directory.system);
}
bool core_info_load(core_info_ctx_find_t *info)
{
core_info_t *core_info = NULL;
if (!info)
return false;
core_info_get_current_core(&core_info);
if (!core_info_curr_list)
return false;
if (!core_info_list_get_info(core_info_curr_list,
core_info, info->path))
return false;
return true;
}
bool core_info_find(core_info_ctx_find_t *info, const char *core_path)
{
if (!info || !core_info_curr_list)
return false;
info->inf = core_info_find_internal(core_info_curr_list, core_path);
if (!info->inf)
return false;
return true;
}
core_info_t *core_info_get(core_info_list_t *list, size_t i)
{
core_info_t *info = NULL;
if (!list)
return NULL;
info = (core_info_t*)&list->list[i];
if (!info || !info->path)
return NULL;
return info;
}
void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
const char *path, const core_info_t **infos, size_t *num_infos)
{
#ifdef HAVE_ZLIB
struct string_list *list = NULL;
#endif
size_t supported = 0, i;
if (!core_info_list)
return;
core_info_tmp_path = path;
#ifdef HAVE_ZLIB
if (string_is_equal_noncase(path_get_extension(path), "zip"))
list = file_archive_get_file_list(path, NULL);
core_info_tmp_list = list;
#endif
/* Let supported core come first in list so we can return
* a pointer to them. */
qsort(core_info_list->list, core_info_list->count,
sizeof(core_info_t), core_info_qsort_cmp);
for (i = 0; i < core_info_list->count; i++, supported++)
{
const core_info_t *core = &core_info_list->list[i];
if (core_info_does_support_file(core, path))
continue;
#ifdef HAVE_ZLIB
if (core_info_does_support_any_file(core, list))
continue;
#endif
break;
}
#ifdef HAVE_ZLIB
if (list)
string_list_free(list);
#endif
*infos = core_info_list->list;
*num_infos = supported;
}
void core_info_get_name(const char *path, char *s, size_t len)
{
size_t i;
core_info_t *core_info = NULL;
core_info_list_t *core_info_list = NULL;
struct string_list *contents = dir_list_new_special(
NULL, DIR_LIST_CORES, NULL);
if (!contents)
return;
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
if (!core_info_list)
goto error;
core_info = (core_info_t*)calloc(contents->size, sizeof(*core_info));
if (!core_info)
goto error;
core_info_list->list = core_info;
core_info_list->count = contents->size;
for (i = 0; i < contents->size; i++)
{
config_file_t *conf = NULL;
if (!string_is_equal(contents->elems[i].data, path))
continue;
conf = core_info_list_iterate(contents, i);
if (conf)
{
config_get_string(conf, "corename",
&core_info[i].core_name);
core_info[i].config_data = (void*)conf;
}
core_info[i].path = strdup(contents->elems[i].data);
strlcpy(s, core_info[i].core_name, len);
}
error:
if (contents)
dir_list_free(contents);
contents = NULL;
core_info_list_free(core_info_list);
}
size_t core_info_list_num_info_files(core_info_list_t *core_info_list)
{
size_t i, num = 0;
if (!core_info_list)
return 0;
for (i = 0; i < core_info_list->count; i++)
{
config_file_t *conf = (config_file_t*)
core_info_list->list[i].config_data;
num += !!conf;
}
return num;
}
bool core_info_list_get_display_name(core_info_list_t *core_info_list,
const char *path, char *s, size_t len)
{
size_t i;
if (!core_info_list)
return false;
for (i = 0; i < core_info_list->count; i++)
{
const core_info_t *info = &core_info_list->list[i];
if (string_is_equal(path_basename(info->path), path_basename(path))
&& info->display_name)
{
strlcpy(s, info->display_name, len);
return true;
}
}
return false;
}
bool core_info_get_display_name(const char *path, char *s, size_t len)
{
char *core_name = NULL;
char *display_name = NULL;
config_file_t *conf = NULL;
if (!path_file_exists(path))
return false;
conf = config_file_new(path);
if (!conf)
return false;
config_get_string(conf, "corename",
&core_name);
config_get_string(conf, "display_name",
&display_name);
if (!core_name || !display_name)
goto error;
config_file_free(conf);
snprintf(s, len,"%s",display_name);
free(core_name);
free(display_name);
return true;
error:
config_file_free(conf);
if (core_name)
free(core_name);
if (display_name)
free(display_name);
return false;
}
+20 -21
View File
@@ -21,24 +21,9 @@
#include <stddef.h>
#include <lists/string_list.h>
#include <retro_common_api.h>
#ifdef __cplusplus
extern "C" {
#endif
enum core_info_state
{
CORE_INFO_CTL_NONE = 0,
CORE_INFO_CTL_LIST_DEINIT,
CORE_INFO_CTL_LIST_INIT,
CORE_INFO_CTL_LIST_GET,
CORE_INFO_CTL_LIST_UPDATE_MISSING_FIRMWARE,
CORE_INFO_CTL_CURRENT_CORE_FREE,
CORE_INFO_CTL_CURRENT_CORE_INIT,
CORE_INFO_CTL_CURRENT_CORE_GET,
CORE_INFO_CTL_LOAD,
CORE_INFO_CTL_FIND
};
RETRO_BEGIN_DECLS
typedef struct
{
@@ -116,10 +101,24 @@ void core_info_get_name(const char *path, char *s, size_t len);
core_info_t *core_info_get(core_info_list_t *list, size_t i);
bool core_info_ctl(enum core_info_state action, void *data);
void core_info_free_current_core(void);
#ifdef __cplusplus
}
#endif
bool core_info_init_current_core(void);
bool core_info_get_current_core(core_info_t **core);
void core_info_deinit_list(void);
bool core_info_init_list(void);
bool core_info_get_list(core_info_list_t **core);
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info);
bool core_info_find(core_info_ctx_find_t *info, const char *name);
bool core_info_load(core_info_ctx_find_t *info);
RETRO_END_DECLS
#endif /* CORE_INFO_H_ */
+2 -1
View File
@@ -21,7 +21,8 @@ enum rarch_core_type
CORE_TYPE_PLAIN = 0,
CORE_TYPE_DUMMY,
CORE_TYPE_FFMPEG,
CORE_TYPE_IMAGEVIEWER
CORE_TYPE_IMAGEVIEWER,
CORE_TYPE_NETRETROPAD
};
#endif
+2 -1
View File
@@ -19,8 +19,9 @@
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include "internal_cores.h"
#include "../libretro.h"
static uint16_t *frame_buf;
+57 -1
View File
@@ -19,7 +19,7 @@
#define INTERNAL_CORES_H__
#include <boolean.h>
#include "../libretro.h"
#include <libretro.h>
void libretro_dummy_retro_init(void);
@@ -184,4 +184,60 @@ size_t libretro_imageviewer_retro_get_memory_size(unsigned id);
#endif
#if defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETPLAY)
/* Internal networked retropad core. */
void libretro_netretropad_retro_init(void);
void libretro_netretropad_retro_deinit(void);
unsigned libretro_netretropad_retro_api_version(void);
void libretro_netretropad_retro_get_system_info(struct retro_system_info *info);
void libretro_netretropad_retro_get_system_av_info(struct retro_system_av_info *info);
void libretro_netretropad_retro_set_environment(retro_environment_t cb);
void libretro_netretropad_retro_set_video_refresh(retro_video_refresh_t cb);
void libretro_netretropad_retro_set_audio_sample(retro_audio_sample_t cb);
void libretro_netretropad_retro_set_audio_sample_batch(retro_audio_sample_batch_t cb);
void libretro_netretropad_retro_set_input_poll(retro_input_poll_t cb);
void libretro_netretropad_retro_set_input_state(retro_input_state_t cb);
void libretro_netretropad_retro_set_controller_port_device(unsigned port, unsigned device);
void libretro_netretropad_retro_reset(void);
void libretro_netretropad_retro_run(void);
size_t libretro_netretropad_retro_serialize_size(void);
bool libretro_netretropad_retro_serialize(void *data, size_t size);
bool libretro_netretropad_retro_unserialize(const void *data, size_t size);
void libretro_netretropad_retro_cheat_reset(void);
void libretro_netretropad_retro_cheat_set(unsigned index, bool enabled, const char *code);
bool libretro_netretropad_retro_load_game(const struct retro_game_info *game);
bool libretro_netretropad_retro_load_game_special(unsigned game_type,
const struct retro_game_info *info, size_t num_info);
void libretro_netretropad_retro_unload_game(void);
unsigned libretro_netretropad_retro_get_region(void);
void *libretro_netretropad_retro_get_memory_data(unsigned id);
size_t libretro_netretropad_retro_get_memory_size(unsigned id);
#endif
#endif
+3 -2
View File
@@ -232,12 +232,13 @@ ifeq ($(HAVE_SSA), 1)
endif
LIBRETROCOMM_DIR := ../../libretro-common
DEPS_DIR := ../../deps
LIBAVCODEC_SOURCE :=
LIBAVFORMAT_SOURCE :=
LIBAVUTIL_SOURCE :=
LIBRETRO_SOURCE := ffmpeg_core.c \
$(LIBRETROCOMM_DIR)/queues/fifo_buffer.c \
$(LIBRETROCOMM_DIR)/queues/fifo_queue.c \
$(LIBRETROCOMM_DIR)/rthreads/rthreads.c
DEPS_SOURCE :=
@@ -2165,7 +2166,7 @@ else
CFLAGS += -DHAVE_INTRINSICS_NEON=0
endif
CFLAGS += -Ilibretro-common/include
CFLAGS += -I$(LIBRETROCOMM_DIR)/include -I$(DEPS_DIR)
OBJECTS := $(DEPS_SOURCE:.c=.o) $(LIBRETRO_SOURCE:.c=.o) $(FFT_SOURCE:.cpp=.o) $(LIBAVUTIL_SOURCE:.c=.o) $(LIBAVFORMAT_SOURCE:.c=.o) $(LIBSWSCALE_SOURCE:.c=.o) $(LIBAVCODEC_SOURCE:.c=.o) $(LIBSWRESAMPLE_SOURCE:.c=.o)
+8 -3
View File
@@ -42,7 +42,7 @@ extern "C" {
#include <rthreads/rthreads.h>
#include <queues/fifo_queue.h>
#include "libretro.h"
#include <libretro.h>
#ifdef RARCH_INTERNAL
#include "internal_cores.h"
#define CORE_PREFIX(s) libretro_ffmpeg_##s
@@ -181,9 +181,14 @@ static struct
#ifdef HAVE_SSA
static void ass_msg_cb(int level, const char *fmt, va_list args, void *data)
{
char buffer[4096];
(void)data;
if (level < 6)
log_cb(RETRO_LOG_INFO, fmt);
{
vsnprintf(buffer, sizeof(buffer), fmt, args);
log_cb(RETRO_LOG_INFO, "%s\n", buffer);
}
}
#endif
@@ -1247,7 +1252,7 @@ static void decode_thread(void *data)
decoded_size = frame_size + sizeof(pts);
slock_lock(fifo_lock);
while (!decode_thread_dead
while (!decode_thread_dead && (video_decode_fifo != NULL)
&& fifo_write_avail(video_decode_fifo) < decoded_size)
{
if (!main_sleeping)
+735
View File
@@ -0,0 +1,735 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <glsym/glsym.h>
#include <libretro.h>
#include <retro_miscellaneous.h>
#include <filters.h>
#include <math/complex.h>
#define GLM_SWIZZLE
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
using namespace glm;
#define GL_DEBUG 0
#if GL_DEBUG
#define GL_CHECK_ERROR() do { \
if (glGetError() != GL_NO_ERROR) \
{ \
log_cb(RETRO_LOG_ERROR, "GL error at line: %d\n", __LINE__); \
abort(); \
} \
} while(0)
#else
#define GL_CHECK_ERROR()
#endif
#ifndef M_HALF_PI
#define M_HALF_PI 1.57079632679489661923132169163975144
#endif
extern retro_log_printf_t log_cb;
struct target
{
GLuint tex;
GLuint fbo;
};
struct Pass
{
struct target target;
GLuint parameter_tex;
};
typedef struct GLFFT
{
GLuint ms_rb_color;
GLuint ms_rb_ds;
GLuint ms_fbo;
Pass *passes;
unsigned passes_size;
GLuint input_tex;
GLuint window_tex;
GLuint prog_real;
GLuint prog_complex;
GLuint prog_resolve;
GLuint prog_blur;
GLuint quad;
GLuint vao;
unsigned output_ptr;
struct target output, resolve, blur;
struct Block
{
GLuint prog;
GLuint vao;
GLuint vbo;
GLuint ibo;
unsigned elems;
} block;
GLuint pbo;
GLshort *sliding;
unsigned sliding_size;
unsigned steps;
unsigned size;
unsigned block_size;
unsigned depth;
} glfft_t;
#include "gl_shaders/fft_heightmap.glsl.vert.h"
#include "gl_shaders/fft_heightmap.glsl.frag.h"
#include "gl_shaders/fft_vertex_program.glsl.vert.h"
#include "gl_shaders/fft_fragment_program_resolve.glsl.frag.h"
#include "gl_shaders/fft_fragment_program_real.glsl.frag.h"
#include "gl_shaders/fft_fragment_program_complex.glsl.frag.h"
#include "gl_shaders/fft_fragment_program_blur.glsl.frag.h"
static GLuint fft_compile_shader(glfft_t *fft, GLenum type, const char *source)
{
GLint status = 0;
GLuint shader = glCreateShader(type);
glShaderSource(shader, 1, (const GLchar**)&source, NULL);
glCompileShader(shader);
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
if (!status)
{
char log_info[8 * 1024];
GLsizei log_len;
log_cb(RETRO_LOG_ERROR, "Failed to compile.\n");
glGetShaderInfoLog(shader, sizeof(log_info), &log_len, log_info);
log_cb(RETRO_LOG_ERROR, "ERROR: %s\n", log_info);
return 0;
}
return shader;
}
static GLuint fft_compile_program(glfft_t *fft,
const char *vertex_source, const char *fragment_source)
{
GLint status = 0;
GLuint prog = glCreateProgram();
GLuint vert = fft_compile_shader(fft, GL_VERTEX_SHADER, vertex_source);
GLuint frag = fft_compile_shader(fft, GL_FRAGMENT_SHADER, fragment_source);
glAttachShader(prog, vert);
glAttachShader(prog, frag);
glLinkProgram(prog);
glGetProgramiv(prog, GL_LINK_STATUS, &status);
if (!status)
{
char log_info[8 * 1024];
GLsizei log_len;
log_cb(RETRO_LOG_ERROR, "Failed to link.\n");
glGetProgramInfoLog(prog, sizeof(log_info), &log_len, log_info);
log_cb(RETRO_LOG_ERROR, "ERROR: %s\n", log_info);
}
glDeleteShader(vert);
glDeleteShader(frag);
return prog;
}
static void fft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned height)
{
mat4 mvp;
/* Render scene. */
glBindFramebuffer(GL_FRAMEBUFFER, fft->ms_fbo ? fft->ms_fbo : backbuffer);
glViewport(0, 0, width, height);
glClearColor(0.1f, 0.15f, 0.1f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
vec3 eye(0, 80, -60);
mvp = perspective((float)M_HALF_PI, (float)width / height, 1.0f, 500.0f) *
lookAt(eye, eye + vec3(0.0f, 0.0f, 1.0f), vec3(0.0f, 1.0f, 0.0f));
glUseProgram(fft->block.prog);
glUniformMatrix4fv(glGetUniformLocation(fft->block.prog, "uMVP"),
1, GL_FALSE, value_ptr(mvp));
glUniform2i(glGetUniformLocation(fft->block.prog, "uOffset"),
(-int(fft->block_size) + 1) / 2, fft->output_ptr);
glUniform4f(glGetUniformLocation(fft->block.prog, "uHeightmapParams"),
-(fft->block_size - 1.0f) / 2.0f, 0.0f, 3.0f, 2.0f);
glUniform1f(glGetUniformLocation(fft->block.prog, "uAngleScale"),
M_PI / ((fft->block_size - 1) / 2));
glBindVertexArray(fft->block.vao);
glBindTexture(GL_TEXTURE_2D, fft->blur.tex);
glDrawElements(GL_TRIANGLE_STRIP, fft->block.elems, GL_UNSIGNED_INT, NULL);
glBindVertexArray(0);
glUseProgram(0);
if (fft->ms_fbo)
{
glBindFramebuffer(GL_READ_FRAMEBUFFER, fft->ms_fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, backbuffer);
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
static const GLenum attachments[] = { GL_COLOR_ATTACHMENT0, GL_DEPTH_STENCIL_ATTACHMENT };
glBindFramebuffer(GL_FRAMEBUFFER, fft->ms_fbo);
glInvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
GL_CHECK_ERROR();
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
GL_CHECK_ERROR();
}
static void fft_step(glfft_t *fft,
const GLshort *audio_buffer, unsigned frames)
{
unsigned i;
GLshort *buffer = NULL;
GLshort *slide = (GLshort*)&fft->sliding[0];
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glBindVertexArray(fft->vao);
glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, fft->window_tex);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, fft->input_tex);
glUseProgram(fft->prog_real);
memmove(slide, slide + frames * 2,
(fft->sliding_size - 2 * frames) * sizeof(GLshort));
memcpy(slide + fft->sliding_size - frames * 2, audio_buffer,
2 * frames * sizeof(GLshort));
/* Upload audio data to GPU. */
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, fft->pbo);
buffer = (GLshort*)(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0,
2 * fft->size * sizeof(GLshort),
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT));
if (buffer)
{
memcpy(buffer, slide, fft->sliding_size * sizeof(GLshort));
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
}
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, fft->size, 1,
GL_RG_INTEGER, GL_SHORT, NULL);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
/* Perform FFT of new block. */
glViewport(0, 0, fft->size, 1);
for (i = 0; i < fft->steps; i++)
{
if (i == fft->steps - 1)
{
glBindFramebuffer(GL_FRAMEBUFFER, fft->output.fbo);
glUniform1i(glGetUniformLocation(i == 0
? fft->prog_real : fft->prog_complex, "uViewportOffset"),
fft->output_ptr);
glViewport(0, fft->output_ptr, fft->size, 1);
}
else
{
glUniform1i(glGetUniformLocation(i == 0
? fft->prog_real : fft->prog_complex, "uViewportOffset"), 0);
glBindFramebuffer(GL_FRAMEBUFFER, fft->passes[i].target.fbo);
glClear(GL_COLOR_BUFFER_BIT);
}
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, fft->passes[i].parameter_tex);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, fft->passes[i].target.tex);
if (i == 0)
glUseProgram(fft->prog_complex);
}
glActiveTexture(GL_TEXTURE0);
/* Resolve new chunk to heightmap. */
glViewport(0, fft->output_ptr, fft->size, 1);
glUseProgram(fft->prog_resolve);
glBindFramebuffer(GL_FRAMEBUFFER, fft->resolve.fbo);
const GLfloat resolve_offset[] = { 0.0f, float(fft->output_ptr) / fft->depth,
1.0f, 1.0f / fft->depth };
glUniform4fv(glGetUniformLocation(fft->prog_resolve, "uOffsetScale"),
1, resolve_offset);
glBindTexture(GL_TEXTURE_2D, fft->output.tex);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
/* Re-blur damaged regions of heightmap. */
glUseProgram(fft->prog_blur);
glBindTexture(GL_TEXTURE_2D, fft->resolve.tex);
glBindFramebuffer(GL_FRAMEBUFFER, fft->blur.fbo);
glUniform4fv(glGetUniformLocation(fft->prog_blur, "uOffsetScale"),
1, resolve_offset);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
/* Mipmap the heightmap. */
glBindTexture(GL_TEXTURE_2D, fft->blur.tex);
glGenerateMipmap(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);
fft->output_ptr++;
fft->output_ptr &= fft->depth - 1;
glBindVertexArray(0);
glUseProgram(0);
GL_CHECK_ERROR();
}
static inline unsigned log2i(unsigned x)
{
if (x==0) return 0; // shouldn't happen
unsigned res;
for (res = 0; x; x >>= 1)
res++;
return res - 1;
}
static inline unsigned bitinverse(unsigned x, unsigned size)
{
unsigned i;
unsigned size_log2 = log2i(size);
unsigned ret = 0;
for (i = 0; i < size_log2; i++)
ret |= ((x >> i) & 0x1) << (size_log2 - 1 - i);
return ret;
}
static fft_complex_t exp_imag(float phase)
{
fft_complex_t out = { cosf(phase), sinf(phase) };
return out;
}
void fft_build_params(glfft_t *fft, GLuint *buffer,
unsigned step, unsigned size)
{
unsigned i, j;
unsigned step_size = 1 << step;
for (i = 0; i < size; i += step_size << 1)
{
for (j = i; j < i + step_size; j++)
{
int s = j - i;
float phase = -1.0f * (float)s / step_size;
unsigned a = j;
unsigned b = j + step_size;
fft_complex_t twiddle = exp_imag(M_PI * phase);
unsigned read_a = (step == 0) ? bitinverse(a, size) : a;
unsigned read_b = (step == 0) ? bitinverse(b, size) : b;
vec2 tmp = vec2(twiddle.real, twiddle.imag);
buffer[2 * a + 0] = (read_a << 16) | read_b;
buffer[2 * a + 1] = packHalf2x16(tmp);
buffer[2 * b + 0] = (read_a << 16) | read_b;
buffer[2 * b + 1] = packHalf2x16(-tmp);
}
}
}
static void fft_init_quad_vao(glfft_t *fft)
{
static const GLbyte quad_buffer[] = {
-1, -1, 1, -1, -1, 1, 1, 1,
0, 0, 1, 0, 0, 1, 1, 1,
};
glGenBuffers(1, &fft->quad);
glBindBuffer(GL_ARRAY_BUFFER, fft->quad);
glBufferData(GL_ARRAY_BUFFER,
sizeof(quad_buffer), quad_buffer, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glGenVertexArrays(1, &fft->vao);
glBindVertexArray(fft->vao);
glBindBuffer(GL_ARRAY_BUFFER, fft->quad);
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(0, 2, GL_BYTE, GL_FALSE, 0, 0);
glVertexAttribPointer(1, 2, GL_BYTE, GL_FALSE, 0,
reinterpret_cast<const GLvoid*>(uintptr_t(8)));
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
static void fft_init_texture(glfft_t *fft, GLuint *tex, GLenum format,
unsigned width, unsigned height, unsigned levels, GLenum mag, GLenum min)
{
glGenTextures(1, tex);
glBindTexture(GL_TEXTURE_2D, *tex);
glTexStorage2D(GL_TEXTURE_2D, levels, format, width, height);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, mag);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min);
glBindTexture(GL_TEXTURE_2D, 0);
}
static void fft_init_target(glfft_t *fft, struct target *target, GLenum format,
unsigned width, unsigned height, unsigned levels, GLenum mag, GLenum min)
{
fft_init_texture(fft, &target->tex, format, width, height, levels, mag, min);
glGenFramebuffers(1, &target->fbo);
glBindFramebuffer(GL_FRAMEBUFFER, target->fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
target->tex, 0);
if (format == GL_RGBA8)
{
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
}
else if (format == GL_RG16I)
{
static const GLint v[] = { 0, 0, 0, 0 };
glClearBufferiv(GL_COLOR, 0, v);
}
else
{
static const GLuint v[] = { 0, 0, 0, 0 };
glClearBufferuiv(GL_COLOR, 0, v);
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
#define KAISER_BETA 12.0
static void fft_init(glfft_t *fft)
{
unsigned i;
double window_mod;
GLushort *window;
static const GLfloat unity[] = { 0.0f, 0.0f, 1.0f, 1.0f };
fft->prog_real = fft_compile_program(fft, fft_vertex_program, fft_fragment_program_real);
fft->prog_complex = fft_compile_program(fft, fft_vertex_program, fft_fragment_program_complex);
fft->prog_resolve = fft_compile_program(fft, fft_vertex_program, fft_fragment_program_resolve);
fft->prog_blur = fft_compile_program(fft, fft_vertex_program, fft_fragment_program_blur);
GL_CHECK_ERROR();
glUseProgram(fft->prog_real);
glUniform1i(glGetUniformLocation(fft->prog_real, "sTexture"), 0);
glUniform1i(glGetUniformLocation(fft->prog_real, "sParameterTexture"), 1);
glUniform1i(glGetUniformLocation(fft->prog_real, "sWindow"), 2);
glUniform4fv(glGetUniformLocation(fft->prog_real, "uOffsetScale"), 1, unity);
glUseProgram(fft->prog_complex);
glUniform1i(glGetUniformLocation(fft->prog_complex, "sTexture"), 0);
glUniform1i(glGetUniformLocation(fft->prog_complex, "sParameterTexture"), 1);
glUniform4fv(glGetUniformLocation(fft->prog_complex, "uOffsetScale"), 1, unity);
glUseProgram(fft->prog_resolve);
glUniform1i(glGetUniformLocation(fft->prog_resolve, "sFFT"), 0);
glUniform4fv(glGetUniformLocation(fft->prog_resolve, "uOffsetScale"), 1, unity);
glUseProgram(fft->prog_blur);
glUniform1i(glGetUniformLocation(fft->prog_blur, "sHeight"), 0);
glUniform4fv(glGetUniformLocation(fft->prog_blur, "uOffsetScale"), 1, unity);
GL_CHECK_ERROR();
fft_init_texture(fft, &fft->window_tex, GL_R16UI,
fft->size, 1, 1, GL_NEAREST, GL_NEAREST);
GL_CHECK_ERROR();
window = (GLushort*)calloc(fft->size, sizeof(GLushort));
window_mod = 1.0 / kaiser_window_function(0.0, KAISER_BETA);
for (i = 0; i < fft->size; i++)
{
double phase = (double)(i - int(fft->size) / 2) / (int(fft->size) / 2);
double w = kaiser_window_function(phase, KAISER_BETA);
window[i] = round(0xffff * w * window_mod);
}
glBindTexture(GL_TEXTURE_2D, fft->window_tex);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
fft->size, 1, GL_RED_INTEGER, GL_UNSIGNED_SHORT, &window[0]);
glBindTexture(GL_TEXTURE_2D, 0);
GL_CHECK_ERROR();
fft_init_texture(fft, &fft->input_tex, GL_RG16I,
fft->size, 1, 1, GL_NEAREST, GL_NEAREST);
fft_init_target(fft, &fft->output, GL_RG32UI,
fft->size, fft->depth, 1, GL_NEAREST, GL_NEAREST);
fft_init_target(fft, &fft->resolve, GL_RGBA8,
fft->size, fft->depth, 1, GL_NEAREST, GL_NEAREST);
fft_init_target(fft, &fft->blur, GL_RGBA8,
fft->size, fft->depth,
log2i(MAX(fft->size, fft->depth)) + 1,
GL_NEAREST, GL_LINEAR_MIPMAP_LINEAR);
GL_CHECK_ERROR();
for (i = 0; i < fft->steps; i++)
{
GLuint *param_buffer = NULL;
fft_init_target(fft, &fft->passes[i].target,
GL_RG32UI, fft->size, 1, 1, GL_NEAREST, GL_NEAREST);
fft_init_texture(fft, &fft->passes[i].parameter_tex,
GL_RG32UI, fft->size, 1, 1, GL_NEAREST, GL_NEAREST);
param_buffer = (GLuint*)calloc(2 * fft->size, sizeof(GLuint));
fft_build_params(fft, &param_buffer[0], i, fft->size);
glBindTexture(GL_TEXTURE_2D, fft->passes[i].parameter_tex);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
fft->size, 1, GL_RG_INTEGER, GL_UNSIGNED_INT, &param_buffer[0]);
glBindTexture(GL_TEXTURE_2D, 0);
free(param_buffer);
}
GL_CHECK_ERROR();
glGenBuffers(1, &fft->pbo);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, fft->pbo);
glBufferData(GL_PIXEL_UNPACK_BUFFER,
fft->size * 2 * sizeof(GLshort), 0, GL_DYNAMIC_DRAW);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
free(window);
}
static void fft_init_block(glfft_t *fft)
{
unsigned x, y;
GLuint *bp;
GLushort *block_vertices;
GLuint *block_indices;
unsigned block_vertices_size;
unsigned block_indices_size;
int pos = 0;
fft->block.prog = fft_compile_program(fft,
fft_vertex_program_heightmap, fft_fragment_program_heightmap);
glUseProgram(fft->block.prog);
glUniform1i(glGetUniformLocation(fft->block.prog, "sHeight"), 0);
block_vertices_size = 2 * fft->block_size * fft->depth;
block_vertices = (GLushort*)calloc(block_vertices_size, sizeof(GLushort));
for (y = 0; y < fft->depth; y++)
{
for (x = 0; x < fft->block_size; x++)
{
block_vertices[2 * (y * fft->block_size + x) + 0] = x;
block_vertices[2 * (y * fft->block_size + x) + 1] = y;
}
}
glGenBuffers(1, &fft->block.vbo);
glBindBuffer(GL_ARRAY_BUFFER, fft->block.vbo);
glBufferData(GL_ARRAY_BUFFER,
block_vertices_size * sizeof(GLushort),
&block_vertices[0], GL_STATIC_DRAW);
fft->block.elems = (2 * fft->block_size - 1) * (fft->depth - 1) + 1;
block_indices_size = fft->block.elems;
block_indices = (GLuint*)calloc(block_indices_size, sizeof(GLuint));
bp = &block_indices[0];
for (y = 0; y < fft->depth - 1; y++)
{
int x;
int step_odd = -int(fft->block_size) + ((y & 1) ? -1 : 1);
int step_even = fft->block_size;
for (x = 0; x < 2 * int(fft->block_size) - 1; x++)
{
*bp++ = pos;
pos += (x & 1) ? step_odd : step_even;
}
}
*bp++ = pos;
glGenVertexArrays(1, &fft->block.vao);
glBindVertexArray(fft->block.vao);
glGenBuffers(1, &fft->block.ibo);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, fft->block.ibo);
glBufferData(GL_ELEMENT_ARRAY_BUFFER,
block_indices_size * sizeof(GLuint),
&block_indices[0], GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 2, GL_UNSIGNED_SHORT, GL_FALSE, 0, 0);
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
free(block_vertices);
free(block_indices);
}
static bool fft_context_reset(glfft_t *fft, unsigned fft_steps,
rglgen_proc_address_t proc, unsigned fft_depth)
{
rglgen_resolve_symbols(proc);
fft->steps = fft_steps;
fft->depth = fft_depth;
fft->size = 1 << fft_steps;
fft->block_size = fft->size / 4 + 1;
fft->passes_size = fft_steps;
fft->passes = (Pass*)calloc(fft->passes_size, sizeof(Pass));
if (!fft->passes)
return false;
fft->sliding_size = 2 * fft->size;
fft->sliding = (GLshort*)calloc(fft->sliding_size, sizeof(GLshort));
if (!fft->sliding)
return false;
GL_CHECK_ERROR();
fft_init_quad_vao(fft);
GL_CHECK_ERROR();
fft_init(fft);
GL_CHECK_ERROR();
fft_init_block(fft);
GL_CHECK_ERROR();
return true;
}
/* GLFFT requires either GLES3 or
* desktop GL with ES3_compat (supported by MESA on Linux) extension. */
extern "C" glfft_t *glfft_new(unsigned fft_steps, rglgen_proc_address_t proc)
{
#ifdef HAVE_OPENGLES3
const char *ver = (const char*)(glGetString(GL_VERSION));
if (ver)
{
unsigned major, minor;
if (sscanf(ver, "OpenGL ES %u.%u", &major, &minor) != 2 || major < 3)
return NULL;
}
else
return NULL;
#else
const char *exts = (const char*)(glGetString(GL_EXTENSIONS));
if (!exts || !strstr(exts, "ARB_ES3_compatibility"))
return NULL;
#endif
glfft_t *fft = (glfft_t*)calloc(1, sizeof(*fft));
if (!fft)
return NULL;
if (!fft_context_reset(fft, fft_steps, proc, 256))
goto error;
return fft;
error:
if (fft)
free(fft);
return NULL;
}
extern "C" void glfft_init_multisample(glfft_t *fft,
unsigned width, unsigned height, unsigned samples)
{
if (fft->ms_rb_color)
glDeleteRenderbuffers(1, &fft->ms_rb_color);
fft->ms_rb_color = 0;
if (fft->ms_rb_ds)
glDeleteRenderbuffers(1, &fft->ms_rb_ds);
fft->ms_rb_ds = 0;
if (fft->ms_fbo)
glDeleteFramebuffers(1, &fft->ms_fbo);
fft->ms_fbo = 0;
if (samples > 1)
{
glGenRenderbuffers(1, &fft->ms_rb_color);
glGenRenderbuffers(1, &fft->ms_rb_ds);
glGenFramebuffers (1, &fft->ms_fbo);
glBindRenderbuffer(GL_RENDERBUFFER, fft->ms_rb_color);
glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
GL_RGBA8, width, height);
glBindRenderbuffer(GL_RENDERBUFFER, fft->ms_rb_ds);
glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
GL_DEPTH24_STENCIL8, width, height);
glBindRenderbuffer(GL_RENDERBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, fft->ms_fbo);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_RENDERBUFFER, fft->ms_rb_color);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
GL_RENDERBUFFER, fft->ms_rb_ds);
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
glfft_init_multisample(fft, 0, 0, 0);
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
static void fft_context_destroy(glfft_t *fft)
{
glfft_init_multisample(fft, 0, 0, 0);
if (fft->passes)
free(fft->passes);
fft->passes = NULL;
if (fft->sliding)
free(fft->sliding);
fft->sliding = NULL;
}
extern "C" void glfft_free(glfft_t *fft)
{
if (!fft)
return;
fft_context_destroy(fft);
if (fft)
free(fft);
fft = NULL;
}
extern "C" void glfft_step_fft(glfft_t *fft,
const GLshort *buffer, unsigned frames)
{
fft_step(fft, buffer, frames);
}
extern "C" void glfft_render(glfft_t *fft, GLuint backbuffer,
unsigned width, unsigned height)
{
fft_render(fft, backbuffer, width, height);
}
+26
View File
@@ -0,0 +1,26 @@
#ifndef FFT_H__
#define FFT_H__
#include <glsym/glsym.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct glfft glfft_t;
glfft_t *glfft_new(unsigned fft_steps, rglgen_proc_address_t proc);
void glfft_free(glfft_t *fft);
void glfft_init_multisample(glfft_t *fft, unsigned width, unsigned height, unsigned samples);
void glfft_step_fft(glfft_t *fft, const GLshort *buffer, unsigned frames);
void glfft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned height);
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,28 @@
#include "shaders_common.h"
static const char *fft_fragment_program_blur = GLSL_300(
precision mediump float;
precision highp int;
precision highp usampler2D;
precision highp isampler2D;
in vec2 vTex;
out vec4 FragColor;
uniform sampler2D sHeight;
void main() {
float k = 0.0;
float t;
vec4 res = vec4(0.0);
\n#define kernel(x, y) t = exp(-0.35 * float((x) * (x) + (y) * (y))); k += t; res += t * textureLodOffset(sHeight, vTex, 0.0, ivec2(x, y))\n
kernel(-1, -2);
kernel(-1, -1);
kernel(-1, 0);
kernel( 0, -2);
kernel( 0, -1);
kernel( 0, 0);
kernel( 1, -2);
kernel( 1, -1);
kernel( 1, 0);
FragColor = res / k;
}
);
@@ -0,0 +1,33 @@
#include "shaders_common.h"
static const char *fft_fragment_program_complex = GLSL_300(
precision mediump float;
precision highp int;
precision highp usampler2D;
precision highp isampler2D;
in vec2 vTex;
uniform usampler2D sTexture;
uniform usampler2D sParameterTexture;
uniform int uViewportOffset;
out uvec2 FragColor;
vec2 compMul(vec2 a, vec2 b) { return vec2(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); }
void main() {
uvec2 params = texture(sParameterTexture, vec2(vTex.x, 0.5)).rg;
uvec2 coord = uvec2((params.x >> 16u) & 0xffffu, params.x & 0xffffu);
int ycoord = int(gl_FragCoord.y) - uViewportOffset;
vec2 twiddle = unpackHalf2x16(params.y);
uvec2 x = texelFetch(sTexture, ivec2(int(coord.x), ycoord), 0).rg;
uvec2 y = texelFetch(sTexture, ivec2(int(coord.y), ycoord), 0).rg;
vec4 a = vec4(unpackHalf2x16(x.x), unpackHalf2x16(x.y));
vec4 b = vec4(unpackHalf2x16(y.x), unpackHalf2x16(y.y));
b.xy = compMul(b.xy, twiddle);
b.zw = compMul(b.zw, twiddle);
vec4 res = a + b;
FragColor = uvec2(packHalf2x16(res.xy), packHalf2x16(res.zw));
}
);
@@ -0,0 +1,40 @@
#include "shaders_common.h"
static const char *fft_fragment_program_real = GLSL_300(
precision mediump float;
precision highp int;
precision highp usampler2D;
precision highp isampler2D;
in vec2 vTex;
uniform isampler2D sTexture;
uniform usampler2D sParameterTexture;
uniform usampler2D sWindow;
uniform int uViewportOffset;
out uvec2 FragColor;
vec2 compMul(vec2 a, vec2 b) { return vec2(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); }
void main() {
uvec2 params = texture(sParameterTexture, vec2(vTex.x, 0.5)).rg;
uvec2 coord = uvec2((params.x >> 16u) & 0xffffu, params.x & 0xffffu);
int ycoord = int(gl_FragCoord.y) - uViewportOffset;
vec2 twiddle = unpackHalf2x16(params.y);
float window_a = float(texelFetch(sWindow, ivec2(coord.x, 0), 0).r) / float(0x10000);
float window_b = float(texelFetch(sWindow, ivec2(coord.y, 0), 0).r) / float(0x10000);
vec2 a = window_a * vec2(texelFetch(sTexture, ivec2(int(coord.x), ycoord), 0).rg) / vec2(0x8000);
vec2 a_l = vec2(a.x, 0.0);
vec2 a_r = vec2(a.y, 0.0);
vec2 b = window_b * vec2(texelFetch(sTexture, ivec2(int(coord.y), ycoord), 0).rg) / vec2(0x8000);
vec2 b_l = vec2(b.x, 0.0);
vec2 b_r = vec2(b.y, 0.0);
b_l = compMul(b_l, twiddle);
b_r = compMul(b_r, twiddle);
vec2 res_l = a_l + b_l;
vec2 res_r = a_r + b_r;
FragColor = uvec2(packHalf2x16(res_l), packHalf2x16(res_r));
}
);
@@ -0,0 +1,30 @@
#include "shaders_common.h"
static const char *fft_fragment_program_resolve = GLSL_300(
precision mediump float;
precision highp int;
precision highp usampler2D;
precision highp isampler2D;
in vec2 vTex;
out vec4 FragColor;
uniform usampler2D sFFT;
vec4 get_heights(highp uvec2 h) {
vec2 l = unpackHalf2x16(h.x);
vec2 r = unpackHalf2x16(h.y);
vec2 channels[4] = vec2[4](
l, 0.5 * (l + r), r, 0.5 * (l - r));
vec4 amps;
for (int i = 0; i < 4; i++)
amps[i] = dot(channels[i], channels[i]);
return 9.0 * log(amps + 0.0001) - 22.0;
}
void main() {
uvec2 h = textureLod(sFFT, vTex, 0.0).rg;
vec4 height = get_heights(h);
height = (height + 40.0) / 80.0;
FragColor = height;
}
);
@@ -0,0 +1,18 @@
#include "shaders_common.h"
static const char *fft_fragment_program_heightmap = GLSL_300(
precision mediump float;
out vec4 FragColor;
in vec3 vWorldPos;
in vec3 vHeight;
vec3 colormap(vec3 height) {
return 1.0 / (1.0 + exp(-0.08 * height));
}
void main() {
vec3 color = mix(vec3(1.0, 0.7, 0.7) * colormap(vHeight), vec3(0.1, 0.15, 0.1), clamp(vWorldPos.z / 400.0, 0.0, 1.0));
color = mix(color, vec3(0.1, 0.15, 0.1), clamp(1.0 - vWorldPos.z / 2.0, 0.0, 1.0));
FragColor = vec4(color, 1.0);
}
);
@@ -0,0 +1,43 @@
#include "shaders_common.h"
static const char *fft_vertex_program_heightmap = GLSL_300(
layout(location = 0) in vec2 aVertex;
uniform sampler2D sHeight;
uniform mat4 uMVP;
uniform ivec2 uOffset;
uniform vec4 uHeightmapParams;
uniform float uAngleScale;
out vec3 vWorldPos;
out vec3 vHeight;
void main() {
vec2 tex_coord = vec2(aVertex.x + float(uOffset.x) + 0.5, -aVertex.y + float(uOffset.y) + 0.5) / vec2(textureSize(sHeight, 0));
vec3 world_pos = vec3(aVertex.x, 0.0, aVertex.y);
world_pos.xz += uHeightmapParams.xy;
float angle = world_pos.x * uAngleScale;
world_pos.xz *= uHeightmapParams.zw;
float lod = log2(world_pos.z + 1.0) - 6.0;
vec4 heights = textureLod(sHeight, tex_coord, lod);
float cangle = cos(angle);
float sangle = sin(angle);
int c = int(-sign(world_pos.x) + 1.0);
float height = mix(heights[c], heights[1], abs(angle) / 3.141592653);
height = height * 80.0 - 40.0;
vec3 up = vec3(-sangle, cangle, 0.0);
float base_y = 80.0 - 80.0 * cangle;
float base_x = 80.0 * sangle;
world_pos.xy = vec2(base_x, base_y);
world_pos += up * height;
vWorldPos = world_pos;
vHeight = vec3(height, heights.yw * 80.0 - 40.0);
gl_Position = uMVP * vec4(world_pos, 1.0);
}
);
@@ -0,0 +1,13 @@
#include "shaders_common.h"
static const char *fft_vertex_program = GLSL_300(
precision mediump float;
layout(location = 0) in vec2 aVertex;
layout(location = 1) in vec2 aTexCoord;
uniform vec4 uOffsetScale;
out vec2 vTex;
void main() {
vTex = uOffsetScale.xy + aTexCoord * uOffsetScale.zw;
gl_Position = vec4(aVertex, 0.0, 1.0);
}
);
@@ -0,0 +1,14 @@
#ifndef _SHADERS_COMMON
#define _SHADERS_COMMON
#if defined(HAVE_OPENGLES)
#define CG(src) "" #src
#define GLSL(src) "precision mediump float;\n" #src
#define GLSL_300(src) "#version 300 es\n" #src
#else
#define CG(src) "" #src
#define GLSL(src) "" #src
#define GLSL_300(src) "#version 300 es\n" #src
#endif
#endif
-1
View File
@@ -1 +0,0 @@
#include "../../libretro.h"
+84 -28
View File
@@ -9,25 +9,37 @@
#include <file/file_path.h>
#include <compat/strl.h>
#if 0
#define HAVE_STB_IMAGE
#endif
#ifdef HAVE_STB_IMAGE
#define STB_IMAGE_IMPLEMENTATION
#ifdef RARCH_INTERNAL
#if 0
#define STBI_NO_PSD
#define STBI_NO_GIF
#define STBI_NO_HDR
#define STBI_NO_PIC
#define STBI_NO_PNM
#endif
#define STBI_SUPPORT_ZLIB
#ifdef RARCH_INTERNAL
#include "../../deps/stb/stb_image.h"
#else
#include <stb_image.h>
#endif
#else
#include <formats/image.h>
#endif
#include "../../deps/stb/stb_image.h"
#include <libretro.h>
#ifdef RARCH_INTERNAL
#include "internal_cores.h"
#include "../../libretro.h"
#define IMAGE_CORE_PREFIX(s) libretro_imageviewer_##s
#else
#include "libretro.h"
#define IMAGE_CORE_PREFIX(s) s
#endif
@@ -40,6 +52,9 @@ static retro_environment_t IMAGE_CORE_PREFIX(environ_cb);
static bool process_new_image;
static uint32_t* image_buffer;
#ifndef HAVE_STB_IMAGE
static struct texture_image image_texture;
#endif
static int image_width;
static int image_height;
static bool image_uploaded;
@@ -50,10 +65,10 @@ struct string_list *file_list;
#define DUPE_TEST
#endif
#ifdef RARCH_INTERNAL
static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|tga";
#else
#ifdef HAVE_STB_IMAGE
static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|psd|tga|gif|hdr|pic|ppm|pgm";
#else
static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|tga";
#endif
void IMAGE_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)
@@ -76,6 +91,13 @@ void IMAGE_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *in
info->timing.sample_rate = 44100.0;
}
static void imageviewer_reset(void)
{
image_buffer = NULL;
image_width = 0;
image_height = 0;
}
void IMAGE_CORE_PREFIX(retro_init)(void)
{
struct retro_log_callback log;
@@ -85,19 +107,25 @@ void IMAGE_CORE_PREFIX(retro_init)(void)
else
IMAGE_CORE_PREFIX(log_cb) = NULL;
image_buffer = NULL;
image_width = 0;
image_height = 0;
imageviewer_reset();
}
static void imageviewer_free_image(void)
{
#ifdef HAVE_STB_IMAGE
if (image_buffer)
free(image_buffer);
#else
image_texture_free(&image_texture);
#endif
image_buffer = NULL;
}
void IMAGE_CORE_PREFIX(retro_deinit)(void)
{
if (image_buffer)
free(image_buffer);
image_buffer = NULL;
image_width = 0;
image_height = 0;
imageviewer_free_image();
imageviewer_reset();
}
void IMAGE_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
@@ -174,16 +202,24 @@ void IMAGE_CORE_PREFIX(retro_cheat_set)(unsigned a, bool b, const char * c)
static bool imageviewer_load(const char *path, int image_index)
{
int comp;
if (image_buffer)
free(image_buffer);
imageviewer_free_image();
(void)comp;
#ifdef HAVE_STB_IMAGE
image_buffer = (uint32_t*)stbi_load(
path,
&image_width,
&image_height,
&comp,
4);
#else
if (!image_texture_load(&image_texture, path))
return false;
image_buffer = (uint32_t*)image_texture.pixels;
image_width = image_texture.width;
image_height = image_texture.height;
#endif
if (!image_buffer)
return false;
@@ -226,11 +262,10 @@ bool IMAGE_CORE_PREFIX(retro_load_game_special)(unsigned a, const struct retro_g
return false;
}
void IMAGE_CORE_PREFIX(retro_unload_game)(void)
{
if (image_buffer)
free(image_buffer);
image_buffer = NULL;
imageviewer_free_image();
image_width = 0;
image_height = 0;
}
@@ -360,15 +395,36 @@ void IMAGE_CORE_PREFIX(retro_run)(void)
{
/* RGBA > XRGB8888 */
struct retro_system_av_info info;
uint32_t *buf = &image_buffer[0];
uint32_t *end = buf + (image_width*image_height*sizeof(uint32_t))/4;
while(buf < end)
#ifdef HAVE_STB_IMAGE
int x, y;
uint32_t *buf = &image_buffer[0];
for (y = 0; y < image_height; y++)
{
uint32_t pixel = *buf;
*buf = (pixel & 0xff00ff00) | ((pixel << 16) & 0x00ff0000) | ((pixel >> 16) & 0xff);
buf++;
for (x = 0; x < image_width; x++, buf++)
{
uint32_t pixel = *buf;
uint32_t a = pixel >> 24;
if (a == 255)
*buf = (pixel & 0x0000ff00) | ((pixel << 16) & 0x00ff0000) | ((pixel >> 16) & 0x000000ff);
else
{
uint32_t r = pixel & 0x0000ff;
uint32_t g = (pixel & 0x00ff00) >> 8;
uint32_t b = (pixel & 0xff0000) >> 16;
uint32_t bg = ((x & 8) ^ (y & 8)) ? 0x66 : 0x99;
r = a * r / 255 + (255 - a) * bg / 255;
g = a * g / 255 + (255 - a) * bg / 255;
b = a * b / 255 + (255 - a) * bg / 255;
*buf = r << 16 | g << 8 | b;
}
}
}
#endif
IMAGE_CORE_PREFIX(retro_get_system_av_info)(&info);
@@ -116,7 +116,10 @@ else
CFLAGS += -O3
endif
OBJECTS := ../../libretro-common/net/net_compat.o ../../libretro-common/net/net_socket.o retropad.o
OBJECTS := ../../libretro-common/net/net_compat.o \
../../libretro-common/net/net_socket.o \
net_retropad_core.o
CFLAGS += -I../../libretro-common/include -Wall -pedantic $(fpic)
ifneq (,$(findstring qnx,$(platform)))
@@ -0,0 +1 @@
#include "../internal_cores.h"
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,323 @@
/*
* To-do:
* - Analog support
* - Some sort of connection control, it only sends packets
* but there is no acknoledgement of a connection o keepalives
* - Send player name
* - Render something on-screen maybe a gui to configure IP and port
instead of the ridiculously long strings we're using now
* - Allow changing IP address and port in runtime
* - Support other platforms
* - Input recording / Combos
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <net/net_compat.h>
#include <net/net_socket.h>
#include <retro_miscellaneous.h>
#include <libretro.h>
#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif
#ifdef RARCH_INTERNAL
#include "internal_cores.h"
#define NETRETROPAD_CORE_PREFIX(s) libretro_netretropad_##s
#else
#define NETRETROPAD_CORE_PREFIX(s) s
#endif
static int s;
static int port;
static char server[64];
static struct sockaddr_in si_other;
static struct retro_log_callback logger;
static retro_log_printf_t NETRETROPAD_CORE_PREFIX(log_cb);
static retro_video_refresh_t NETRETROPAD_CORE_PREFIX(video_cb);
static retro_audio_sample_t NETRETROPAD_CORE_PREFIX(audio_cb);
static retro_audio_sample_batch_t NETRETROPAD_CORE_PREFIX(audio_batch_cb);
static retro_environment_t NETRETROPAD_CORE_PREFIX(environ_cb);
static retro_input_poll_t NETRETROPAD_CORE_PREFIX(input_poll_cb);
static retro_input_state_t NETRETROPAD_CORE_PREFIX(input_state_cb);
static uint16_t *frame_buf;
void NETRETROPAD_CORE_PREFIX(retro_init)(void)
{
frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Initialising sockets...\n");
network_init();
}
void NETRETROPAD_CORE_PREFIX(retro_deinit)(void)
{
if (frame_buf)
free(frame_buf);
frame_buf = NULL;
}
unsigned NETRETROPAD_CORE_PREFIX(retro_api_version)(void)
{
return RETRO_API_VERSION;
}
void NETRETROPAD_CORE_PREFIX(retro_set_controller_port_device)(
unsigned port, unsigned device)
{
(void)port;
(void)device;
}
void NETRETROPAD_CORE_PREFIX(retro_get_system_info)(
struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "RetroPad Remote";
info->library_version = "0.01";
info->need_fullpath = false;
info->valid_extensions = ""; /* Nothing. */
}
void NETRETROPAD_CORE_PREFIX(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 unsigned retropad_update_input(void)
{
unsigned value = 0;
NETRETROPAD_CORE_PREFIX(input_poll_cb)();
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B))
value += 1;
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y))
value += 2;
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT))
value += pow(2, 2);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START))
value += pow(2, 3);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP))
value += pow(2, 4);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN))
value += pow(2, 5);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT))
value += pow(2, 6);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT))
value += pow(2, 7);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A))
value += pow(2, 8);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X))
value += pow(2, 9);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L))
value += pow(2, 10);
if (NETRETROPAD_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R))
value += pow(2, 11);
return value;
}
void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{
static const struct retro_variable vars[] = {
{ "net_retropad_port", "Port; 55400|55401|55402|55403|55404|55405|55406|55407|55408|55409|55410|55411|55412|55413|55414|55415|55416|55417|55418|55419|55420" },
{ "net_retropad_ip_octet1", "IP address part 1; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_ip_octet2", "IP address part 2; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_ip_octet3", "IP address part 3; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "net_retropad_ip_octet4", "IP address part 4; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ NULL, NULL },
};
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
NETRETROPAD_CORE_PREFIX(environ_cb) = cb;
bool no_content = true;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt);
if (cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logger))
NETRETROPAD_CORE_PREFIX(log_cb) = logger.log;
}
static void netretropad_check_variables(void)
{
struct retro_variable var, var2, var3, var4, port_var;
var.key = "net_retropad_ip_octet1";
var2.key = "net_retropad_ip_octet2";
var3.key = "net_retropad_ip_octet3";
var4.key = "net_retropad_ip_octet4";
port_var.key = "net_retropad_port";
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var2);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var3);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &var4);
NETRETROPAD_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_VARIABLE, &port_var);
snprintf(server, sizeof(server), "%s.%s.%s.%s", var.value, var2.value, var3.value, var4.value);
port = atoi(port_var.value);
}
void NETRETROPAD_CORE_PREFIX(retro_set_audio_sample)(retro_audio_sample_t cb)
{
NETRETROPAD_CORE_PREFIX(audio_cb) = cb;
}
void NETRETROPAD_CORE_PREFIX(retro_set_audio_sample_batch)(
retro_audio_sample_batch_t cb)
{
NETRETROPAD_CORE_PREFIX(audio_batch_cb) = cb;
}
void NETRETROPAD_CORE_PREFIX(retro_set_input_poll)(retro_input_poll_t cb)
{
NETRETROPAD_CORE_PREFIX(input_poll_cb) = cb;
}
void NETRETROPAD_CORE_PREFIX(retro_set_input_state)(retro_input_state_t cb)
{
NETRETROPAD_CORE_PREFIX(input_state_cb) = cb;
}
void NETRETROPAD_CORE_PREFIX(retro_set_video_refresh)(retro_video_refresh_t cb)
{
NETRETROPAD_CORE_PREFIX(video_cb) = cb;
}
void NETRETROPAD_CORE_PREFIX(retro_reset)(void)
{}
void NETRETROPAD_CORE_PREFIX(retro_run)(void)
{
unsigned i;
char message[64];
unsigned input_state = retropad_update_input();
if (input_state > 0)
{
snprintf(message, sizeof(message), "%d", input_state);
/* send the message */
if (sendto(s, message, strlen(message) , 0 , (struct sockaddr *) &si_other, sizeof(si_other))==-1)
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Error sending data\n");
}
for (i = 0; i < 320 * 240; i++)
frame_buf[i] = 4 << 5;
NETRETROPAD_CORE_PREFIX(video_cb)(frame_buf, 320, 240, 640);
retro_sleep(4);
}
bool NETRETROPAD_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
{
socket_target_t in_target;
netretropad_check_variables();
s = socket_create(
"retropad",
SOCKET_DOMAIN_INET,
SOCKET_TYPE_DATAGRAM,
SOCKET_PROTOCOL_UDP);
if (s == SOCKET_ERROR)
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "socket failed");
/* setup address structure */
memset((char *) &si_other, 0, sizeof(si_other));
in_target.port = port;
in_target.server = server;
in_target.domain = SOCKET_DOMAIN_INET;
socket_set_target(&si_other, &in_target);
NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Server IP Address: %s\n" , server);
return true;
}
void NETRETROPAD_CORE_PREFIX(retro_unload_game)(void)
{}
unsigned NETRETROPAD_CORE_PREFIX(retro_get_region)(void)
{
return RETRO_REGION_NTSC;
}
bool NETRETROPAD_CORE_PREFIX(retro_load_game_special)(unsigned type,
const struct retro_game_info *info, size_t num)
{
(void)type;
(void)info;
(void)num;
return false;
}
size_t NETRETROPAD_CORE_PREFIX(retro_serialize_size)(void)
{
return 0;
}
bool NETRETROPAD_CORE_PREFIX(retro_serialize)(void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
bool NETRETROPAD_CORE_PREFIX(retro_unserialize)(const void *data,
size_t size)
{
(void)data;
(void)size;
return false;
}
void *NETRETROPAD_CORE_PREFIX(retro_get_memory_data)(unsigned id)
{
(void)id;
return NULL;
}
size_t NETRETROPAD_CORE_PREFIX(retro_get_memory_size)(unsigned id)
{
(void)id;
return 0;
}
void NETRETROPAD_CORE_PREFIX(retro_cheat_reset)(void)
{}
void NETRETROPAD_CORE_PREFIX(retro_cheat_set)(unsigned idx,
bool enabled, const char *code)
{
(void)idx;
(void)enabled;
(void)code;
}
@@ -6,7 +6,7 @@
#include <glsym/glsym.h>
#include "../../libretro.h"
#include <libretro.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static struct retro_hw_render_callback hw_render;
+1 -1
View File
@@ -6,7 +6,7 @@
#include <glsym/glsym.h>
#include "../../libretro.h"
#include <libretro.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static struct retro_hw_render_callback hw_render;
@@ -0,0 +1,62 @@
ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
arch = intel
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
endif
# system platform
system_platform = unix
ifeq ($(shell uname -a),)
EXE_EXT = .exe
system_platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
TARGET_NAME = testvulkan_async_compute
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
else
CC = gcc
TARGET := $(TARGET_NAME)_libretro.dll
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined
CFLAGS += -I..
endif
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
else
CFLAGS += -O3
endif
CFLAGS += -std=gnu99 -I../../gfx/include
OBJECTS := libretro-test.o ../../libretro-common/vulkan/vulkan_symbol_wrapper.o
CFLAGS += -Wall -pedantic $(fpic)
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) $(LIBS) -lm
%.o: %.c
$(CC) -I../../libretro-common/include $(CFLAGS) -c -o $@ $<
clean:
rm -f $(OBJECTS) $(TARGET)
.PHONY: clean
@@ -0,0 +1,805 @@
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vulkan/vulkan_symbol_wrapper.h>
#include <libretro_vulkan.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static struct retro_hw_render_callback hw_render;
static const struct retro_hw_render_interface_vulkan *vulkan;
static unsigned frame_count;
static VkQueue async_queue;
static uint32_t async_queue_index;
#define BASE_WIDTH 640
#define BASE_HEIGHT 360
#define MAX_SYNC 8
struct buffer
{
VkBuffer buffer;
VkDeviceMemory memory;
};
struct vulkan_data
{
unsigned index;
unsigned num_swapchain_images;
uint32_t swapchain_mask;
VkPhysicalDeviceMemoryProperties memory_properties;
VkPhysicalDeviceProperties gpu_properties;
VkDescriptorSetLayout set_layout;
VkDescriptorPool desc_pool;
VkDescriptorSet desc_set[MAX_SYNC];
VkPipelineCache pipeline_cache;
VkPipelineLayout pipeline_layout;
VkPipeline pipeline;
struct retro_vulkan_image images[MAX_SYNC];
VkDeviceMemory image_memory[MAX_SYNC];
VkCommandPool cmd_pool[MAX_SYNC];
VkCommandBuffer cmd[MAX_SYNC];
VkSemaphore acquire_semaphores[MAX_SYNC];
bool need_acquire[MAX_SYNC];
};
static struct vulkan_data vk;
void retro_init(void)
{}
void retro_deinit(void)
{}
unsigned retro_api_version(void)
{
return RETRO_API_VERSION;
}
void retro_set_controller_port_device(unsigned port, unsigned device)
{
(void)port;
(void)device;
}
void retro_get_system_info(struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "TestCore Async Compute Vulkan";
info->library_version = "v1";
info->need_fullpath = false;
info->valid_extensions = NULL; // Anything is fine, we don't care.
}
void retro_get_system_av_info(struct retro_system_av_info *info)
{
info->timing = (struct retro_system_timing) {
.fps = 60.0,
.sample_rate = 30000.0,
};
info->geometry = (struct retro_game_geometry) {
.base_width = BASE_WIDTH,
.base_height = BASE_HEIGHT,
.max_width = BASE_WIDTH,
.max_height = BASE_HEIGHT,
.aspect_ratio = (float)BASE_WIDTH / (float)BASE_HEIGHT,
};
}
static retro_video_refresh_t video_cb;
static retro_audio_sample_t audio_cb;
static retro_audio_sample_batch_t audio_batch_cb;
static retro_environment_t environ_cb;
static retro_input_poll_t input_poll_cb;
static retro_input_state_t input_state_cb;
void retro_set_environment(retro_environment_t cb)
{
environ_cb = cb;
bool no_rom = true;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_rom);
}
void retro_set_audio_sample(retro_audio_sample_t cb)
{
audio_cb = cb;
}
void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb)
{
audio_batch_cb = cb;
}
void retro_set_input_poll(retro_input_poll_t cb)
{
input_poll_cb = cb;
}
void retro_set_input_state(retro_input_state_t cb)
{
input_state_cb = cb;
}
void retro_set_video_refresh(retro_video_refresh_t cb)
{
video_cb = cb;
}
static uint32_t find_memory_type_from_requirements(
uint32_t device_requirements, uint32_t host_requirements)
{
const VkPhysicalDeviceMemoryProperties *props = &vk.memory_properties;
for (uint32_t i = 0; i < VK_MAX_MEMORY_TYPES; i++)
{
if (device_requirements & (1u << i))
{
if ((props->memoryTypes[i].propertyFlags & host_requirements) == host_requirements)
{
return i;
}
}
}
return 0;
}
static void vulkan_test_render(void)
{
VkCommandBuffer cmd = vk.cmd[vk.index];
VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO };
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
vkResetCommandBuffer(cmd, 0);
vkBeginCommandBuffer(cmd, &begin_info);
VkImageMemoryBarrier prepare_rendering = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
prepare_rendering.srcAccessMask = 0;
prepare_rendering.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
prepare_rendering.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
prepare_rendering.newLayout = VK_IMAGE_LAYOUT_GENERAL;
if (vk.need_acquire[vk.index])
{
prepare_rendering.srcQueueFamilyIndex = vulkan->queue_index;
prepare_rendering.dstQueueFamilyIndex = async_queue_index;
}
else
{
prepare_rendering.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
prepare_rendering.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
}
prepare_rendering.image = vk.images[vk.index].create_info.image;
prepare_rendering.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
prepare_rendering.subresourceRange.levelCount = 1;
prepare_rendering.subresourceRange.layerCount = 1;
vkCmdPipelineBarrier(cmd,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
false,
0, NULL,
0, NULL,
1, &prepare_rendering);
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, vk.pipeline);
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_COMPUTE,
vk.pipeline_layout, 0,
1, &vk.desc_set[vk.index], 0, NULL);
const float constants[4] = {
1.0f / BASE_WIDTH,
1.0f / BASE_HEIGHT,
(float)frame_count++,
0.0f,
};
vkCmdPushConstants(cmd, vk.pipeline_layout,
VK_SHADER_STAGE_COMPUTE_BIT,
0, 16, constants);
vkCmdDispatch(cmd, BASE_WIDTH / 8, BASE_HEIGHT / 8, 1);
VkImageMemoryBarrier prepare_presentation = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
prepare_presentation.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
prepare_presentation.dstAccessMask = 0;
prepare_presentation.oldLayout = VK_IMAGE_LAYOUT_GENERAL;
prepare_presentation.newLayout = VK_IMAGE_LAYOUT_GENERAL;
if (async_queue && vulkan->queue_index != async_queue_index)
{
prepare_presentation.srcQueueFamilyIndex = async_queue_index;
prepare_presentation.dstQueueFamilyIndex = vulkan->queue_index;
vk.need_acquire[vk.index] = true;
}
else
{
prepare_presentation.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
prepare_presentation.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
vk.need_acquire[vk.index] = false;
}
prepare_presentation.image = vk.images[vk.index].create_info.image;
prepare_presentation.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
prepare_presentation.subresourceRange.levelCount = 1;
prepare_presentation.subresourceRange.layerCount = 1;
vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
false,
0, NULL,
0, NULL,
1, &prepare_presentation);
vkEndCommandBuffer(cmd);
if (!async_queue)
vulkan->lock_queue(vulkan->handle);
VkSubmitInfo submit = { VK_STRUCTURE_TYPE_SUBMIT_INFO };
submit.commandBufferCount = 1;
submit.pCommandBuffers = &cmd;
submit.signalSemaphoreCount = 1;
submit.pSignalSemaphores = &vk.acquire_semaphores[vk.index];
vkQueueSubmit(async_queue != VK_NULL_HANDLE ? async_queue : vulkan->queue,
1, &submit, VK_NULL_HANDLE);
if (!async_queue)
vulkan->unlock_queue(vulkan->handle);
}
static VkShaderModule create_shader_module(const uint32_t *data, size_t size)
{
VkShaderModuleCreateInfo module_info = { VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
VkShaderModule module;
module_info.codeSize = size;
module_info.pCode = data;
vkCreateShaderModule(vulkan->device, &module_info, NULL, &module);
return module;
}
static void init_descriptor(void)
{
VkDevice device = vulkan->device;
VkDescriptorSetLayoutBinding binding = {0};
binding.binding = 0;
binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
binding.descriptorCount = 1;
binding.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
binding.pImmutableSamplers = NULL;
const VkDescriptorPoolSize pool_sizes[1] = {
{ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, vk.num_swapchain_images },
};
const VkPushConstantRange range = {
VK_SHADER_STAGE_COMPUTE_BIT,
0, 16,
};
VkDescriptorSetLayoutCreateInfo set_layout_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
set_layout_info.bindingCount = 1;
set_layout_info.pBindings = &binding;
vkCreateDescriptorSetLayout(device, &set_layout_info, NULL, &vk.set_layout);
VkPipelineLayoutCreateInfo layout_info = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
layout_info.setLayoutCount = 1;
layout_info.pSetLayouts = &vk.set_layout;
layout_info.pushConstantRangeCount = 1;
layout_info.pPushConstantRanges = &range;
vkCreatePipelineLayout(device, &layout_info, NULL, &vk.pipeline_layout);
VkDescriptorPoolCreateInfo pool_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
pool_info.maxSets = vk.num_swapchain_images;
pool_info.poolSizeCount = 1;
pool_info.pPoolSizes = pool_sizes;
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
vkCreateDescriptorPool(device, &pool_info, NULL, &vk.desc_pool);
VkDescriptorSetAllocateInfo alloc_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
alloc_info.descriptorPool = vk.desc_pool;
alloc_info.descriptorSetCount = 1;
alloc_info.pSetLayouts = &vk.set_layout;
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
vkAllocateDescriptorSets(device, &alloc_info, &vk.desc_set[i]);
VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
VkDescriptorImageInfo image_info;
write.dstSet = vk.desc_set[i];
write.dstBinding = 0;
write.descriptorCount = 1;
write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
write.pImageInfo = &image_info;
image_info.imageView = vk.images[i].image_view;
image_info.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
image_info.sampler = VK_NULL_HANDLE;
vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
}
}
static void init_pipeline(void)
{
VkDevice device = vulkan->device;
static const uint32_t raymarch_comp[] =
#include "shaders/raymarch.comp.inc"
;
VkComputePipelineCreateInfo pipe = { VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO };
pipe.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
pipe.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
pipe.stage.module = create_shader_module(raymarch_comp, sizeof(raymarch_comp));
pipe.stage.pName = "main";
pipe.layout = vk.pipeline_layout;
vkCreateComputePipelines(vulkan->device, vk.pipeline_cache, 1, &pipe, NULL, &vk.pipeline);
vkDestroyShaderModule(device, pipe.stage.module, NULL);
}
static void init_swapchain(void)
{
VkDevice device = vulkan->device;
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
VkImageCreateInfo image = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };
image.imageType = VK_IMAGE_TYPE_2D;
image.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
image.format = VK_FORMAT_R8G8B8A8_UNORM;
image.extent.width = BASE_WIDTH;
image.extent.height = BASE_HEIGHT;
image.extent.depth = 1;
image.samples = VK_SAMPLE_COUNT_1_BIT;
image.tiling = VK_IMAGE_TILING_OPTIMAL;
image.usage =
VK_IMAGE_USAGE_STORAGE_BIT |
VK_IMAGE_USAGE_SAMPLED_BIT |
VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
image.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
image.mipLevels = 1;
image.arrayLayers = 1;
uint32_t share_queues[] = { async_queue_index, vulkan->queue_index };
if (async_queue && async_queue_index != vulkan->queue_index)
{
image.queueFamilyIndexCount = 2;
image.pQueueFamilyIndices = share_queues;
}
vkCreateImage(device, &image, NULL, &vk.images[i].create_info.image);
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
VkMemoryRequirements mem_reqs;
vkGetImageMemoryRequirements(device, vk.images[i].create_info.image, &mem_reqs);
alloc.allocationSize = mem_reqs.size;
alloc.memoryTypeIndex = find_memory_type_from_requirements(
mem_reqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
vkAllocateMemory(device, &alloc, NULL, &vk.image_memory[i]);
vkBindImageMemory(device, vk.images[i].create_info.image, vk.image_memory[i], 0);
vk.images[i].create_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
vk.images[i].create_info.viewType = VK_IMAGE_VIEW_TYPE_2D;
vk.images[i].create_info.format = VK_FORMAT_R8G8B8A8_UNORM;
vk.images[i].create_info.subresourceRange.baseMipLevel = 0;
vk.images[i].create_info.subresourceRange.baseArrayLayer = 0;
vk.images[i].create_info.subresourceRange.levelCount = 1;
vk.images[i].create_info.subresourceRange.layerCount = 1;
vk.images[i].create_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
vk.images[i].create_info.components.r = VK_COMPONENT_SWIZZLE_R;
vk.images[i].create_info.components.g = VK_COMPONENT_SWIZZLE_G;
vk.images[i].create_info.components.b = VK_COMPONENT_SWIZZLE_B;
vk.images[i].create_info.components.a = VK_COMPONENT_SWIZZLE_A;
vkCreateImageView(device, &vk.images[i].create_info,
NULL, &vk.images[i].image_view);
vk.images[i].image_layout = VK_IMAGE_LAYOUT_GENERAL;
VkSemaphoreCreateInfo sem_info = { VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO };
vkCreateSemaphore(device, &sem_info, NULL, &vk.acquire_semaphores[i]);
}
}
static void init_command(void)
{
VkCommandPoolCreateInfo pool_info = { VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO };
VkCommandBufferAllocateInfo info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO };
pool_info.queueFamilyIndex = async_queue != VK_NULL_HANDLE ?
async_queue_index : vulkan->queue_index;
pool_info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
vkCreateCommandPool(vulkan->device, &pool_info, NULL, &vk.cmd_pool[i]);
info.commandPool = vk.cmd_pool[i];
info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
info.commandBufferCount = 1;
vkAllocateCommandBuffers(vulkan->device, &info, &vk.cmd[i]);
}
}
static void vulkan_test_init(void)
{
vkGetPhysicalDeviceProperties(vulkan->gpu, &vk.gpu_properties);
vkGetPhysicalDeviceMemoryProperties(vulkan->gpu, &vk.memory_properties);
unsigned num_images = 0;
uint32_t mask = vulkan->get_sync_index_mask(vulkan->handle);
for (unsigned i = 0; i < 32; i++)
if (mask & (1u << i))
num_images = i + 1;
vk.num_swapchain_images = num_images;
vk.swapchain_mask = mask;
init_command();
init_swapchain();
init_descriptor();
VkPipelineCacheCreateInfo pipeline_cache_info = { VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
vkCreatePipelineCache(vulkan->device, &pipeline_cache_info,
NULL, &vk.pipeline_cache);
init_pipeline();
}
static void vulkan_test_deinit(void)
{
if (!vulkan)
return;
VkDevice device = vulkan->device;
vkDeviceWaitIdle(device);
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
vkDestroyImageView(device, vk.images[i].image_view, NULL);
vkFreeMemory(device, vk.image_memory[i], NULL);
vkDestroyImage(device, vk.images[i].create_info.image, NULL);
vkDestroySemaphore(device, vk.acquire_semaphores[i], NULL);
}
vkFreeDescriptorSets(device, vk.desc_pool, vk.num_swapchain_images, vk.desc_set);
vkDestroyDescriptorPool(device, vk.desc_pool, NULL);
vkDestroyPipeline(device, vk.pipeline, NULL);
vkDestroyDescriptorSetLayout(device, vk.set_layout, NULL);
vkDestroyPipelineLayout(device, vk.pipeline_layout, NULL);
vkDestroyPipelineCache(device, vk.pipeline_cache, NULL);
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
vkFreeCommandBuffers(device, vk.cmd_pool[i], 1, &vk.cmd[i]);
vkDestroyCommandPool(device, vk.cmd_pool[i], NULL);
}
memset(&vk, 0, sizeof(vk));
}
void retro_run(void)
{
input_poll_cb();
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP))
{
}
/* Very lazy way to do this. */
if (vulkan->get_sync_index_mask(vulkan->handle) != vk.swapchain_mask)
{
vulkan_test_deinit();
vulkan_test_init();
}
vulkan->wait_sync_index(vulkan->handle);
vk.index = vulkan->get_sync_index(vulkan->handle);
vulkan_test_render();
vulkan->set_image(vulkan->handle, &vk.images[vk.index],
1, &vk.acquire_semaphores[vk.index],
async_queue && async_queue_index != vulkan->queue_index ?
async_queue_index : VK_QUEUE_FAMILY_IGNORED);
video_cb(RETRO_HW_FRAME_BUFFER_VALID, BASE_WIDTH, BASE_HEIGHT, 0);
}
static void context_reset(void)
{
fprintf(stderr, "Context reset!\n");
if (!environ_cb(RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE, (void**)&vulkan) || !vulkan)
{
fprintf(stderr, "Failed to get HW rendering interface!\n");
return;
}
if (vulkan->interface_version != RETRO_HW_RENDER_INTERFACE_VULKAN_VERSION)
{
fprintf(stderr, "HW render interface mismatch, expected %u, got %u!\n",
RETRO_HW_RENDER_INTERFACE_VULKAN_VERSION, vulkan->interface_version);
vulkan = NULL;
return;
}
vulkan_symbol_wrapper_init(vulkan->get_instance_proc_addr);
vulkan_symbol_wrapper_load_core_instance_symbols(vulkan->instance);
vulkan_symbol_wrapper_load_core_device_symbols(vulkan->device);
vulkan_test_init();
}
static void context_destroy(void)
{
fprintf(stderr, "Context destroy!\n");
vulkan_test_deinit();
vulkan = NULL;
memset(&vk, 0, sizeof(vk));
}
static const VkApplicationInfo *get_application_info(void)
{
static const VkApplicationInfo info = {
VK_STRUCTURE_TYPE_APPLICATION_INFO,
NULL,
"libretro-test-vulkan-async-compute",
0,
"libretro-test-vulkan-async-compute",
0,
VK_MAKE_VERSION(1, 0, 18),
};
return &info;
}
static bool create_device(struct retro_vulkan_context *context,
VkInstance instance,
VkPhysicalDevice gpu,
VkSurfaceKHR surface,
PFN_vkGetInstanceProcAddr get_instance_proc_addr,
const char **required_device_extensions,
unsigned num_required_device_extensions,
const char **required_device_layers,
unsigned num_required_device_layers,
const VkPhysicalDeviceFeatures *required_features)
{
async_queue = VK_NULL_HANDLE;
vulkan_symbol_wrapper_init(get_instance_proc_addr);
vulkan_symbol_wrapper_load_core_symbols(instance);
if (gpu == VK_NULL_HANDLE)
{
uint32_t gpu_count;
vkEnumeratePhysicalDevices(instance, &gpu_count, NULL);
if (!gpu_count)
return false;
VkPhysicalDevice *gpus = calloc(gpu_count, sizeof(*gpus));
if (!gpus)
return false;
vkEnumeratePhysicalDevices(instance, &gpu_count, gpus);
gpu = gpus[0];
free(gpus);
}
context->gpu = gpu;
uint32_t queue_count;
VkQueueFamilyProperties *queue_properties = NULL;
vkGetPhysicalDeviceQueueFamilyProperties(gpu, &queue_count, NULL);
if (queue_count < 1)
return false;
queue_properties = calloc(queue_count, sizeof(*queue_properties));
if (!queue_properties)
return false;
vkGetPhysicalDeviceQueueFamilyProperties(gpu, &queue_count, queue_properties);
if (surface != VK_NULL_HANDLE)
{
VULKAN_SYMBOL_WRAPPER_LOAD_INSTANCE_EXTENSION_SYMBOL(instance,
vkGetPhysicalDeviceSurfaceSupportKHR);
}
bool found_queue = false;
for (uint32_t i = 0; i < queue_count; i++)
{
VkBool32 supported = surface == VK_NULL_HANDLE;
if (surface != VK_NULL_HANDLE)
{
vkGetPhysicalDeviceSurfaceSupportKHR(
gpu, i, surface, &supported);
}
VkQueueFlags required = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT;
if (supported && ((queue_properties[i].queueFlags & required) == required))
{
context->queue_family_index = i;
found_queue = true;
break;
}
}
if (!found_queue)
{
free(queue_properties);
return false;
}
bool same_queue_async = false;
if (queue_properties[context->queue_family_index].queueCount >= 2)
same_queue_async = true;
if (!same_queue_async)
{
found_queue = false;
for (uint32_t i = 0; i < queue_count; i++)
{
if (i == context->queue_family_index)
continue;
VkQueueFlags required = VK_QUEUE_COMPUTE_BIT;
if ((queue_properties[i].queueFlags & required) == required)
{
async_queue_index = i;
found_queue = true;
break;
}
}
}
else
async_queue_index = context->queue_family_index;
free(queue_properties);
if (!found_queue)
return false;
const float prios[] = { 0.5f, 0.5f };
VkDeviceQueueCreateInfo queues[2] = {
{ VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO },
{ VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO },
};
if (same_queue_async)
{
queues[0].queueFamilyIndex = context->queue_family_index;
queues[0].queueCount = 2;
queues[0].pQueuePriorities = prios;
}
else
{
queues[0].queueFamilyIndex = context->queue_family_index;
queues[0].queueCount = 1;
queues[0].pQueuePriorities = &prios[0];
queues[1].queueFamilyIndex = async_queue_index;
queues[1].queueCount = 1;
queues[1].pQueuePriorities = &prios[1];
}
VkDeviceCreateInfo device_info = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO };
device_info.enabledExtensionCount = num_required_device_extensions;
device_info.ppEnabledExtensionNames = required_device_extensions;
device_info.enabledLayerCount = num_required_device_layers;
device_info.ppEnabledLayerNames = required_device_layers;
device_info.queueCreateInfoCount = same_queue_async ? 1 : 2;
device_info.pQueueCreateInfos = queues;
if (vkCreateDevice(gpu, &device_info, NULL, &context->device) != VK_SUCCESS)
return false;
vkGetDeviceQueue(context->device, context->queue_family_index, 0, &context->queue);
if (same_queue_async)
vkGetDeviceQueue(context->device, context->queue_family_index, 1, &async_queue);
else
vkGetDeviceQueue(context->device, async_queue_index, 0, &async_queue);
context->presentation_queue = context->queue;
context->presentation_queue_family_index = context->queue_family_index;
return true;
}
static bool retro_init_hw_context(void)
{
hw_render.context_type = RETRO_HW_CONTEXT_VULKAN;
hw_render.version_major = VK_MAKE_VERSION(1, 0, 18);
hw_render.version_minor = 0;
hw_render.context_reset = context_reset;
hw_render.context_destroy = context_destroy;
hw_render.cache_context = false;
if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
return false;
static const struct retro_hw_render_context_negotiation_interface_vulkan iface = {
RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN,
RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION,
get_application_info,
create_device,
};
environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE, (void*)&iface);
return true;
}
bool retro_load_game(const struct retro_game_info *info)
{
if (!retro_init_hw_context())
{
fprintf(stderr, "HW Context could not be initialized, exiting...\n");
return false;
}
fprintf(stderr, "Loaded game!\n");
(void)info;
frame_count = 0;
return true;
}
void retro_unload_game(void)
{}
unsigned retro_get_region(void)
{
return RETRO_REGION_NTSC;
}
bool retro_load_game_special(unsigned type, const struct retro_game_info *info, size_t num)
{
(void)type;
(void)info;
(void)num;
return false;
}
size_t retro_serialize_size(void)
{
return 0;
}
bool retro_serialize(void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
bool retro_unserialize(const void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
void *retro_get_memory_data(unsigned id)
{
(void)id;
return NULL;
}
size_t retro_get_memory_size(unsigned id)
{
(void)id;
return 0;
}
void retro_reset(void)
{}
void retro_cheat_reset(void)
{}
void retro_cheat_set(unsigned index, bool enabled, const char *code)
{
(void)index;
(void)enabled;
(void)code;
}
@@ -0,0 +1,5 @@
{
global: retro_*;
local: *;
};
@@ -0,0 +1,15 @@
COMP_SHADERS := $(wildcard *.comp)
SPIRV := $(COMP_SHADERS:.comp=.comp.inc)
GLSLANG := glslc
GLSLFLAGS := -mfmt=c
all: $(SPIRV)
%.comp.inc: %.comp
$(GLSLANG) $(GLSLFLAGS) -o $@ $<
clean:
rm -f $(SPIRV)
.PHONY: clean
@@ -0,0 +1,18 @@
#version 310 es
layout(local_size_x = 8, local_size_y = 8) in;
layout(rgba8, set = 0, binding = 0) uniform writeonly mediump image2D uImage;
layout(push_constant, std430) uniform PushConstants
{
vec2 inv_resolution;
float frame;
float dummy;
} constants;
void main()
{
vec2 uv = (vec2(gl_GlobalInvocationID.xy) + 0.5) * constants.inv_resolution;
vec4 color = vec4(sin(uv.x * 50.0 + constants.frame * 0.1) + 0.5, cos(uv.y * 55.0 + constants.frame * 0.2), 0.2, 1.0);
imageStore(uImage, ivec2(gl_GlobalInvocationID.xy), color);
}
@@ -0,0 +1,117 @@
{0x07230203,0x00010000,0x00080001,0x00000048,
0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,
0x00000000,0x0003000e,0x00000000,0x00000001,
0x0006000f,0x00000005,0x00000004,0x6e69616d,
0x00000000,0x0000000d,0x00060010,0x00000004,
0x00000011,0x00000008,0x00000008,0x00000001,
0x00030003,0x00000001,0x00000136,0x000a0004,
0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,
0x5f656c79,0x656e696c,0x7269645f,0x69746365,
0x00006576,0x00080004,0x475f4c47,0x4c474f4f,
0x6e695f45,0x64756c63,0x69645f65,0x74636572,
0x00657669,0x00040005,0x00000004,0x6e69616d,
0x00000000,0x00030005,0x00000009,0x00007675,
0x00080005,0x0000000d,0x475f6c67,0x61626f6c,
0x766e496c,0x7461636f,0x496e6f69,0x00000044,
0x00060005,0x00000015,0x68737550,0x736e6f43,
0x746e6174,0x00000073,0x00070006,0x00000015,
0x00000000,0x5f766e69,0x6f736572,0x6974756c,
0x00006e6f,0x00050006,0x00000015,0x00000001,
0x6d617266,0x00000065,0x00050006,0x00000015,
0x00000002,0x6d6d7564,0x00000079,0x00050005,
0x00000017,0x736e6f63,0x746e6174,0x00000073,
0x00040005,0x00000020,0x6f6c6f63,0x00000072,
0x00040005,0x0000003f,0x616d4975,0x00006567,
0x00040047,0x0000000d,0x0000000b,0x0000001c,
0x00050048,0x00000015,0x00000000,0x00000023,
0x00000000,0x00050048,0x00000015,0x00000001,
0x00000023,0x00000008,0x00050048,0x00000015,
0x00000002,0x00000023,0x0000000c,0x00030047,
0x00000015,0x00000002,0x00030047,0x0000003f,
0x00000000,0x00040047,0x0000003f,0x00000022,
0x00000000,0x00040047,0x0000003f,0x00000021,
0x00000000,0x00030047,0x0000003f,0x00000019,
0x00030047,0x00000040,0x00000000,0x00040047,
0x00000047,0x0000000b,0x00000019,0x00020013,
0x00000002,0x00030021,0x00000003,0x00000002,
0x00030016,0x00000006,0x00000020,0x00040017,
0x00000007,0x00000006,0x00000002,0x00040020,
0x00000008,0x00000007,0x00000007,0x00040015,
0x0000000a,0x00000020,0x00000000,0x00040017,
0x0000000b,0x0000000a,0x00000003,0x00040020,
0x0000000c,0x00000001,0x0000000b,0x0004003b,
0x0000000c,0x0000000d,0x00000001,0x00040017,
0x0000000e,0x0000000a,0x00000002,0x0004002b,
0x00000006,0x00000012,0x3f000000,0x0005001e,
0x00000015,0x00000007,0x00000006,0x00000006,
0x00040020,0x00000016,0x00000009,0x00000015,
0x0004003b,0x00000016,0x00000017,0x00000009,
0x00040015,0x00000018,0x00000020,0x00000001,
0x0004002b,0x00000018,0x00000019,0x00000000,
0x00040020,0x0000001a,0x00000009,0x00000007,
0x00040017,0x0000001e,0x00000006,0x00000004,
0x00040020,0x0000001f,0x00000007,0x0000001e,
0x0004002b,0x0000000a,0x00000021,0x00000000,
0x00040020,0x00000022,0x00000007,0x00000006,
0x0004002b,0x00000006,0x00000025,0x42480000,
0x0004002b,0x00000018,0x00000027,0x00000001,
0x00040020,0x00000028,0x00000009,0x00000006,
0x0004002b,0x00000006,0x0000002b,0x3dcccccd,
0x0004002b,0x0000000a,0x00000030,0x00000001,
0x0004002b,0x00000006,0x00000033,0x425c0000,
0x0004002b,0x00000006,0x00000037,0x3e4ccccd,
0x0004002b,0x00000006,0x0000003b,0x3f800000,
0x00090019,0x0000003d,0x00000006,0x00000001,
0x00000000,0x00000000,0x00000000,0x00000002,
0x00000004,0x00040020,0x0000003e,0x00000000,
0x0000003d,0x0004003b,0x0000003e,0x0000003f,
0x00000000,0x00040017,0x00000043,0x00000018,
0x00000002,0x0004002b,0x0000000a,0x00000046,
0x00000008,0x0006002c,0x0000000b,0x00000047,
0x00000046,0x00000046,0x00000030,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,
0x000200f8,0x00000005,0x0004003b,0x00000008,
0x00000009,0x00000007,0x0004003b,0x0000001f,
0x00000020,0x00000007,0x0004003d,0x0000000b,
0x0000000f,0x0000000d,0x0007004f,0x0000000e,
0x00000010,0x0000000f,0x0000000f,0x00000000,
0x00000001,0x00040070,0x00000007,0x00000011,
0x00000010,0x00050050,0x00000007,0x00000013,
0x00000012,0x00000012,0x00050081,0x00000007,
0x00000014,0x00000011,0x00000013,0x00050041,
0x0000001a,0x0000001b,0x00000017,0x00000019,
0x0004003d,0x00000007,0x0000001c,0x0000001b,
0x00050085,0x00000007,0x0000001d,0x00000014,
0x0000001c,0x0003003e,0x00000009,0x0000001d,
0x00050041,0x00000022,0x00000023,0x00000009,
0x00000021,0x0004003d,0x00000006,0x00000024,
0x00000023,0x00050085,0x00000006,0x00000026,
0x00000024,0x00000025,0x00050041,0x00000028,
0x00000029,0x00000017,0x00000027,0x0004003d,
0x00000006,0x0000002a,0x00000029,0x00050085,
0x00000006,0x0000002c,0x0000002a,0x0000002b,
0x00050081,0x00000006,0x0000002d,0x00000026,
0x0000002c,0x0006000c,0x00000006,0x0000002e,
0x00000001,0x0000000d,0x0000002d,0x00050081,
0x00000006,0x0000002f,0x0000002e,0x00000012,
0x00050041,0x00000022,0x00000031,0x00000009,
0x00000030,0x0004003d,0x00000006,0x00000032,
0x00000031,0x00050085,0x00000006,0x00000034,
0x00000032,0x00000033,0x00050041,0x00000028,
0x00000035,0x00000017,0x00000027,0x0004003d,
0x00000006,0x00000036,0x00000035,0x00050085,
0x00000006,0x00000038,0x00000036,0x00000037,
0x00050081,0x00000006,0x00000039,0x00000034,
0x00000038,0x0006000c,0x00000006,0x0000003a,
0x00000001,0x0000000e,0x00000039,0x00070050,
0x0000001e,0x0000003c,0x0000002f,0x0000003a,
0x00000037,0x0000003b,0x0003003e,0x00000020,
0x0000003c,0x0004003d,0x0000003d,0x00000040,
0x0000003f,0x0004003d,0x0000000b,0x00000041,
0x0000000d,0x0007004f,0x0000000e,0x00000042,
0x00000041,0x00000041,0x00000000,0x00000001,
0x0004007c,0x00000043,0x00000044,0x00000042,
0x0004003d,0x0000001e,0x00000045,0x00000020,
0x00040063,0x00000040,0x00000044,0x00000045,
0x000100fd,0x00010038}
+2 -2
View File
@@ -43,8 +43,8 @@ else
CFLAGS += -O3
endif
CFLAGS += -std=gnu99
OBJECTS := libretro-test.o
CFLAGS += -std=gnu99 -I../../gfx/include
OBJECTS := libretro-test.o ../../libretro-common/vulkan/vulkan_symbol_wrapper.o
CFLAGS += -Wall -pedantic $(fpic)
all: $(TARGET)
+103 -357
View File
@@ -4,9 +4,8 @@
#include <string.h>
#include <math.h>
#include "../../libretro_vulkan.h"
#include "shaders/triangle.vert.inc"
#include "shaders/triangle.frag.inc"
#include "vulkan/vulkan_symbol_wrapper.h"
#include <libretro_vulkan.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static struct retro_hw_render_callback hw_render;
@@ -16,294 +15,6 @@ static const struct retro_hw_render_interface_vulkan *vulkan;
#define BASE_HEIGHT 240
#define MAX_SYNC 8
/* We'll probably want a libretro common solution for this, but this will do for now. */
#define VK_GET_DEVICE_PROC_ADDR(entrypoint) do { \
vkcfp.vk##entrypoint = (PFN_vk##entrypoint) vulkan->get_device_proc_addr(vulkan->device, \
"vk" #entrypoint); \
} while(0)
#define VK_GET_INSTANCE_PROC_ADDR(entrypoint) do { \
vkcfp.vk##entrypoint = (PFN_vk##entrypoint) vulkan->get_instance_proc_addr(vulkan->instance, \
"vk" #entrypoint); \
} while(0)
typedef struct vulkan_context_fp
{
/* Device */
PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
/* Device Memory */
PFN_vkAllocateMemory vkAllocateMemory;
PFN_vkFreeMemory vkFreeMemory;
/* Command Function Pointers */
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr;
/* Buffers */
PFN_vkCreateBuffer vkCreateBuffer;
PFN_vkDestroyBuffer vkDestroyBuffer;
/* Fences */
PFN_vkCreateFence vkCreateFence;
PFN_vkDestroyFence vkDestroyFence;
PFN_vkResetFences vkResetFences;
PFN_vkWaitForFences vkWaitForFences;
/* Semaphores */
PFN_vkCreateSemaphore vkCreateSemaphore;
PFN_vkDestroySemaphore vkDestroySemaphore;
/* Images */
PFN_vkCreateImage vkCreateImage;
PFN_vkDestroyImage vkDestroyImage;
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
/* Images (Resource Memory Association) */
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
PFN_vkBindBufferMemory vkBindBufferMemory;
PFN_vkBindImageMemory vkBindImageMemory;
/* Image Views */
PFN_vkCreateImageView vkCreateImageView;
PFN_vkDestroyImageView vkDestroyImageView;
/* Image Views (Resource Memory Association) */
PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
/* Queues */
PFN_vkGetDeviceQueue vkGetDeviceQueue;
PFN_vkQueueWaitIdle vkQueueWaitIdle;
/* Pipelines */
PFN_vkDestroyPipeline vkDestroyPipeline;
PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
/* Pipeline Layouts */
PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
/* Pipeline Cache */
PFN_vkCreatePipelineCache vkCreatePipelineCache;
PFN_vkDestroyPipelineCache vkDestroyPipelineCache;
/* Pipeline Barriers */
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
/* Descriptor pools */
PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
/* Descriptor sets */
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
PFN_vkFreeDescriptorSets vkFreeDescriptorSets;
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
/* Descriptor Set Layout */
PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
/* Command Buffers */
PFN_vkCreateCommandPool vkCreateCommandPool;
PFN_vkDestroyCommandPool vkDestroyCommandPool;
PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
PFN_vkEndCommandBuffer vkEndCommandBuffer;
PFN_vkResetCommandBuffer vkResetCommandBuffer;
PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
/* Command Buffer Submission */
PFN_vkQueueSubmit vkQueueSubmit;
/* Framebuffers */
PFN_vkCreateFramebuffer vkCreateFramebuffer;
PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
/* Memory allocation */
PFN_vkMapMemory vkMapMemory;
PFN_vkUnmapMemory vkUnmapMemory;
/* Samplers */
PFN_vkCreateSampler vkCreateSampler;
PFN_vkDestroySampler vkDestroySampler;
/* Render Passes */
PFN_vkCreateRenderPass vkCreateRenderPass;
PFN_vkDestroyRenderPass vkDestroyRenderPass;
/* Image commands */
PFN_vkCmdCopyImage vkCmdCopyImage;
PFN_vkCmdClearColorImage vkCmdClearColorImage;
/* Pipeline commands */
PFN_vkCmdBindPipeline vkCmdBindPipeline;
/* Vertex input descriptions */
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
/* Render Pass commands */
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
/* Clear commands */
PFN_vkCmdClearAttachments vkCmdClearAttachments;
/* Drawing commands */
PFN_vkCmdDraw vkCmdDraw;
/* Fragment operations */
PFN_vkCmdSetScissor vkCmdSetScissor;
/* Fixed-function vertex postprocessing */
PFN_vkCmdSetViewport vkCmdSetViewport;
/* Shaders */
PFN_vkCreateShaderModule vkCreateShaderModule;
PFN_vkDestroyShaderModule vkDestroyShaderModule;
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
} vulkan_context_fp_t;
static vulkan_context_fp_t vkcfp;
#define VKFUNC(sym) (vkcfp.sym)
static void load_device_symbols(void)
{
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceProperties);
VK_GET_INSTANCE_PROC_ADDR(GetPhysicalDeviceMemoryProperties);
/* Memory */
VK_GET_DEVICE_PROC_ADDR(AllocateMemory);
VK_GET_DEVICE_PROC_ADDR(FreeMemory);
/* Waiting */
VK_GET_DEVICE_PROC_ADDR(DeviceWaitIdle);
/* Queues */
VK_GET_DEVICE_PROC_ADDR(GetDeviceQueue);
VK_GET_DEVICE_PROC_ADDR(QueueWaitIdle);
VK_GET_DEVICE_PROC_ADDR(QueueSubmit);
/* Semaphores */
VK_GET_DEVICE_PROC_ADDR(CreateSemaphore);
VK_GET_DEVICE_PROC_ADDR(DestroySemaphore);
/* Buffers */
VK_GET_DEVICE_PROC_ADDR(CreateBuffer);
VK_GET_DEVICE_PROC_ADDR(DestroyBuffer);
/* Fences */
VK_GET_DEVICE_PROC_ADDR(CreateFence);
VK_GET_DEVICE_PROC_ADDR(DestroyFence);
VK_GET_DEVICE_PROC_ADDR(ResetFences);
VK_GET_DEVICE_PROC_ADDR(WaitForFences);
/* Images */
VK_GET_DEVICE_PROC_ADDR(CreateImage);
VK_GET_DEVICE_PROC_ADDR(DestroyImage);
VK_GET_DEVICE_PROC_ADDR(GetImageSubresourceLayout);
/* Images (Resource Memory Association) */
VK_GET_DEVICE_PROC_ADDR(GetBufferMemoryRequirements);
VK_GET_DEVICE_PROC_ADDR(BindBufferMemory);
VK_GET_DEVICE_PROC_ADDR(BindImageMemory);
/* Image Views */
VK_GET_DEVICE_PROC_ADDR(CreateImageView);
VK_GET_DEVICE_PROC_ADDR(DestroyImageView);
/* Resource Memory Associations */
VK_GET_DEVICE_PROC_ADDR(GetImageMemoryRequirements);
/* Descriptor pools */
VK_GET_DEVICE_PROC_ADDR(CreateDescriptorPool);
VK_GET_DEVICE_PROC_ADDR(DestroyDescriptorPool);
/* Descriptor sets */
VK_GET_DEVICE_PROC_ADDR(AllocateDescriptorSets);
VK_GET_DEVICE_PROC_ADDR(FreeDescriptorSets);
VK_GET_DEVICE_PROC_ADDR(UpdateDescriptorSets);
/* Descriptor Set Layout */
VK_GET_DEVICE_PROC_ADDR(CreateDescriptorSetLayout);
VK_GET_DEVICE_PROC_ADDR(DestroyDescriptorSetLayout);
/* Framebuffers */
VK_GET_DEVICE_PROC_ADDR(CreateFramebuffer);
VK_GET_DEVICE_PROC_ADDR(DestroyFramebuffer);
VK_GET_DEVICE_PROC_ADDR(AllocateCommandBuffers);
VK_GET_DEVICE_PROC_ADDR(FreeCommandBuffers);
/* Memory allocation */
VK_GET_DEVICE_PROC_ADDR(MapMemory);
VK_GET_DEVICE_PROC_ADDR(UnmapMemory);
/* Render Passes */
VK_GET_DEVICE_PROC_ADDR(CreateRenderPass);
VK_GET_DEVICE_PROC_ADDR(DestroyRenderPass);
/* Pipelines */
VK_GET_DEVICE_PROC_ADDR(DestroyPipeline);
VK_GET_DEVICE_PROC_ADDR(CreateGraphicsPipelines);
/* Shaders */
VK_GET_DEVICE_PROC_ADDR(CreateShaderModule);
VK_GET_DEVICE_PROC_ADDR(DestroyShaderModule);
/* Pipeline Layouts */
VK_GET_DEVICE_PROC_ADDR(CreatePipelineLayout);
VK_GET_DEVICE_PROC_ADDR(DestroyPipelineLayout);
/* Pipeline Cache */
VK_GET_DEVICE_PROC_ADDR(CreatePipelineCache);
VK_GET_DEVICE_PROC_ADDR(DestroyPipelineCache);
/* Command buffers */
VK_GET_DEVICE_PROC_ADDR(CreateCommandPool);
VK_GET_DEVICE_PROC_ADDR(DestroyCommandPool);
VK_GET_DEVICE_PROC_ADDR(BeginCommandBuffer);
VK_GET_DEVICE_PROC_ADDR(ResetCommandBuffer);
VK_GET_DEVICE_PROC_ADDR(EndCommandBuffer);
/* Image commands */
VK_GET_DEVICE_PROC_ADDR(CmdCopyImage);
VK_GET_DEVICE_PROC_ADDR(CmdClearColorImage);
/* Vertex input descriptions */
VK_GET_DEVICE_PROC_ADDR(CmdBindVertexBuffers);
/* Descriptor Set commands */
VK_GET_DEVICE_PROC_ADDR(CmdBindDescriptorSets);
/* Fragment operations */
VK_GET_DEVICE_PROC_ADDR(CmdSetScissor);
/* Render Pass commands */
VK_GET_DEVICE_PROC_ADDR(CmdBeginRenderPass);
VK_GET_DEVICE_PROC_ADDR(CmdEndRenderPass);
/* Samplers */
VK_GET_DEVICE_PROC_ADDR(CreateSampler);
VK_GET_DEVICE_PROC_ADDR(DestroySampler);
/* Fixed-function vertex postprocessing */
VK_GET_DEVICE_PROC_ADDR(CmdSetViewport);
/* Clear commands */
VK_GET_DEVICE_PROC_ADDR(CmdClearAttachments);
/* Pipeline */
VK_GET_DEVICE_PROC_ADDR(CmdBindPipeline);
/* Pipeline Barriers */
VK_GET_DEVICE_PROC_ADDR(CmdPipelineBarrier);
/* Drawing commands */
VK_GET_DEVICE_PROC_ADDR(CmdDraw);
}
struct buffer
{
VkBuffer buffer;
@@ -454,10 +165,10 @@ static void update_ubo(void)
tmp[15] = 1.0f;
float *mvp = NULL;
VKFUNC(vkMapMemory)(vulkan->device, vk.ubo[vk.index].memory,
vkMapMemory(vulkan->device, vk.ubo[vk.index].memory,
0, 16 * sizeof(float), 0, (void**)&mvp);
memcpy(mvp, tmp, sizeof(tmp));
VKFUNC(vkUnmapMemory)(vulkan->device, vk.ubo[vk.index].memory);
vkUnmapMemory(vulkan->device, vk.ubo[vk.index].memory);
}
static void vulkan_test_render(void)
@@ -468,8 +179,8 @@ static void vulkan_test_render(void)
VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO };
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
VKFUNC(vkResetCommandBuffer)(cmd, 0);
VKFUNC(vkBeginCommandBuffer)(cmd, &begin_info);
vkResetCommandBuffer(cmd, 0);
vkBeginCommandBuffer(cmd, &begin_info);
VkImageMemoryBarrier prepare_rendering = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
prepare_rendering.srcAccessMask = 0;
@@ -482,7 +193,7 @@ static void vulkan_test_render(void)
prepare_rendering.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
prepare_rendering.subresourceRange.levelCount = 1;
prepare_rendering.subresourceRange.layerCount = 1;
VKFUNC(vkCmdPipelineBarrier)(cmd,
vkCmdPipelineBarrier(cmd,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
false,
0, NULL,
@@ -502,10 +213,10 @@ static void vulkan_test_render(void)
rp_begin.renderArea.extent.height = BASE_HEIGHT;
rp_begin.clearValueCount = 1;
rp_begin.pClearValues = &clear_value;
VKFUNC(vkCmdBeginRenderPass)(cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBeginRenderPass(cmd, &rp_begin, VK_SUBPASS_CONTENTS_INLINE);
VKFUNC(vkCmdBindPipeline)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, vk.pipeline);
VKFUNC(vkCmdBindDescriptorSets)(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, vk.pipeline);
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
vk.pipeline_layout, 0,
1, &vk.desc_set[vk.index], 0, NULL);
@@ -516,20 +227,20 @@ static void vulkan_test_render(void)
vp.height = BASE_HEIGHT;
vp.minDepth = 0.0f;
vp.maxDepth = 1.0f;
VKFUNC(vkCmdSetViewport)(cmd, 0, 1, &vp);
vkCmdSetViewport(cmd, 0, 1, &vp);
VkRect2D scissor;
memset(&scissor, 0, sizeof(scissor));
scissor.extent.width = BASE_WIDTH;
scissor.extent.height = BASE_HEIGHT;
VKFUNC(vkCmdSetScissor)(cmd, 0, 1, &scissor);
vkCmdSetScissor(cmd, 0, 1, &scissor);
VkDeviceSize offset = 0;
VKFUNC(vkCmdBindVertexBuffers)(cmd, 0, 1, &vk.vbo.buffer, &offset);
vkCmdBindVertexBuffers(cmd, 0, 1, &vk.vbo.buffer, &offset);
VKFUNC(vkCmdDraw)(cmd, 3, 1, 0, 0);
vkCmdDraw(cmd, 3, 1, 0, 0);
VKFUNC(vkCmdEndRenderPass)(cmd);
vkCmdEndRenderPass(cmd);
VkImageMemoryBarrier prepare_presentation = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER };
prepare_presentation.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
@@ -543,14 +254,14 @@ static void vulkan_test_render(void)
prepare_presentation.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
prepare_presentation.subresourceRange.levelCount = 1;
prepare_presentation.subresourceRange.layerCount = 1;
VKFUNC(vkCmdPipelineBarrier)(cmd, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
vkCmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
false,
0, NULL,
0, NULL,
1, &prepare_presentation);
VKFUNC(vkEndCommandBuffer)(cmd);
vkEndCommandBuffer(cmd);
}
static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsageFlags usage)
@@ -562,10 +273,10 @@ static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsa
info.usage = usage;
info.size = size;
VKFUNC(vkCreateBuffer)(device, &info, NULL, &buffer.buffer);
vkCreateBuffer(device, &info, NULL, &buffer.buffer);
VkMemoryRequirements mem_reqs;
VKFUNC(vkGetBufferMemoryRequirements)(device, buffer.buffer, &mem_reqs);
vkGetBufferMemoryRequirements(device, buffer.buffer, &mem_reqs);
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
alloc.allocationSize = mem_reqs.size;
@@ -573,15 +284,15 @@ static struct buffer create_buffer(const void *initial, size_t size, VkBufferUsa
alloc.memoryTypeIndex = find_memory_type_from_requirements(mem_reqs.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
VKFUNC(vkAllocateMemory)(device, &alloc, NULL, &buffer.memory);
VKFUNC(vkBindBufferMemory)(device, buffer.buffer, buffer.memory, 0);
vkAllocateMemory(device, &alloc, NULL, &buffer.memory);
vkBindBufferMemory(device, buffer.buffer, buffer.memory, 0);
if (initial)
{
void *ptr;
VKFUNC(vkMapMemory)(device, buffer.memory, 0, size, 0, &ptr);
vkMapMemory(device, buffer.memory, 0, size, 0, &ptr);
memcpy(ptr, initial, size);
VKFUNC(vkUnmapMemory)(device, buffer.memory);
vkUnmapMemory(device, buffer.memory);
}
return buffer;
@@ -607,13 +318,13 @@ static void init_uniform_buffer(void)
}
}
static VkShaderModule create_shader_module(const uint8_t *data, size_t size)
static VkShaderModule create_shader_module(const uint32_t *data, size_t size)
{
VkShaderModuleCreateInfo module_info = { VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO };
VkShaderModule module;
module_info.codeSize = size;
module_info.pCode = (const uint32_t*)data;
VKFUNC(vkCreateShaderModule)(vulkan->device, &module_info, NULL, &module);
module_info.pCode = data;
vkCreateShaderModule(vulkan->device, &module_info, NULL, &module);
return module;
}
@@ -635,19 +346,19 @@ static void init_descriptor(void)
VkDescriptorSetLayoutCreateInfo set_layout_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO };
set_layout_info.bindingCount = 1;
set_layout_info.pBindings = &binding;
VKFUNC(vkCreateDescriptorSetLayout)(device, &set_layout_info, NULL, &vk.set_layout);
vkCreateDescriptorSetLayout(device, &set_layout_info, NULL, &vk.set_layout);
VkPipelineLayoutCreateInfo layout_info = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
layout_info.setLayoutCount = 1;
layout_info.pSetLayouts = &vk.set_layout;
VKFUNC(vkCreatePipelineLayout)(device, &layout_info, NULL, &vk.pipeline_layout);
vkCreatePipelineLayout(device, &layout_info, NULL, &vk.pipeline_layout);
VkDescriptorPoolCreateInfo pool_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
pool_info.maxSets = vk.num_swapchain_images;
pool_info.poolSizeCount = 1;
pool_info.pPoolSizes = pool_sizes;
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
VKFUNC(vkCreateDescriptorPool)(device, &pool_info, NULL, &vk.desc_pool);
vkCreateDescriptorPool(device, &pool_info, NULL, &vk.desc_pool);
VkDescriptorSetAllocateInfo alloc_info = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
alloc_info.descriptorPool = vk.desc_pool;
@@ -655,7 +366,7 @@ static void init_descriptor(void)
alloc_info.pSetLayouts = &vk.set_layout;
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
VKFUNC(vkAllocateDescriptorSets)(device, &alloc_info, &vk.desc_set[i]);
vkAllocateDescriptorSets(device, &alloc_info, &vk.desc_set[i]);
VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET };
VkDescriptorBufferInfo buffer_info;
@@ -670,7 +381,7 @@ static void init_descriptor(void)
buffer_info.offset = 0;
buffer_info.range = 16 * sizeof(float);
VKFUNC(vkUpdateDescriptorSets)(device, 1, &write, 0, NULL);
vkUpdateDescriptorSets(device, 1, &write, 0, NULL);
}
}
@@ -745,11 +456,19 @@ static void init_pipeline(void)
{ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO },
};
static const uint32_t triangle_vert[] =
#include "shaders/triangle.vert.inc"
;
static const uint32_t triangle_frag[] =
#include "shaders/triangle.frag.inc"
;
shader_stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
shader_stages[0].module = create_shader_module(triangle_vert_spv, triangle_vert_spv_len);
shader_stages[0].module = create_shader_module(triangle_vert, sizeof(triangle_vert));
shader_stages[0].pName = "main";
shader_stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
shader_stages[1].module = create_shader_module(triangle_frag_spv, triangle_frag_spv_len);
shader_stages[1].module = create_shader_module(triangle_frag, sizeof(triangle_frag));
shader_stages[1].pName = "main";
VkGraphicsPipelineCreateInfo pipe = { VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO };
@@ -766,10 +485,10 @@ static void init_pipeline(void)
pipe.renderPass = vk.render_pass;
pipe.layout = vk.pipeline_layout;
VKFUNC(vkCreateGraphicsPipelines)(vulkan->device, vk.pipeline_cache, 1, &pipe, NULL, &vk.pipeline);
vkCreateGraphicsPipelines(vulkan->device, vk.pipeline_cache, 1, &pipe, NULL, &vk.pipeline);
VKFUNC(vkDestroyShaderModule)(device, shader_stages[0].module, NULL);
VKFUNC(vkDestroyShaderModule)(device, shader_stages[1].module, NULL);
vkDestroyShaderModule(device, shader_stages[0].module, NULL);
vkDestroyShaderModule(device, shader_stages[1].module, NULL);
}
static void init_render_pass(VkFormat format)
@@ -796,7 +515,7 @@ static void init_render_pass(VkFormat format)
rp_info.pAttachments = &attachment;
rp_info.subpassCount = 1;
rp_info.pSubpasses = &subpass;
VKFUNC(vkCreateRenderPass)(vulkan->device, &rp_info, NULL, &vk.render_pass);
vkCreateRenderPass(vulkan->device, &rp_info, NULL, &vk.render_pass);
}
static void init_swapchain(void)
@@ -823,17 +542,17 @@ static void init_swapchain(void)
image.mipLevels = 1;
image.arrayLayers = 1;
VKFUNC(vkCreateImage)(device, &image, NULL, &vk.images[i].create_info.image);
vkCreateImage(device, &image, NULL, &vk.images[i].create_info.image);
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
VkMemoryRequirements mem_reqs;
VKFUNC(vkGetImageMemoryRequirements)(device, vk.images[i].create_info.image, &mem_reqs);
vkGetImageMemoryRequirements(device, vk.images[i].create_info.image, &mem_reqs);
alloc.allocationSize = mem_reqs.size;
alloc.memoryTypeIndex = find_memory_type_from_requirements(
mem_reqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
VKFUNC(vkAllocateMemory)(device, &alloc, NULL, &vk.image_memory[i]);
VKFUNC(vkBindImageMemory)(device, vk.images[i].create_info.image, vk.image_memory[i], 0);
vkAllocateMemory(device, &alloc, NULL, &vk.image_memory[i]);
vkBindImageMemory(device, vk.images[i].create_info.image, vk.image_memory[i], 0);
vk.images[i].create_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
vk.images[i].create_info.viewType = VK_IMAGE_VIEW_TYPE_2D;
@@ -848,7 +567,7 @@ static void init_swapchain(void)
vk.images[i].create_info.components.b = VK_COMPONENT_SWIZZLE_B;
vk.images[i].create_info.components.a = VK_COMPONENT_SWIZZLE_A;
VKFUNC(vkCreateImageView)(device, &vk.images[i].create_info,
vkCreateImageView(device, &vk.images[i].create_info,
NULL, &vk.images[i].image_view);
vk.images[i].image_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
@@ -860,7 +579,7 @@ static void init_swapchain(void)
fb_info.height = BASE_HEIGHT;
fb_info.layers = 1;
VKFUNC(vkCreateFramebuffer)(device, &fb_info, NULL, &vk.framebuffers[i]);
vkCreateFramebuffer(device, &fb_info, NULL, &vk.framebuffers[i]);
}
}
@@ -874,18 +593,18 @@ static void init_command(void)
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
VKFUNC(vkCreateCommandPool)(vulkan->device, &pool_info, NULL, &vk.cmd_pool[i]);
vkCreateCommandPool(vulkan->device, &pool_info, NULL, &vk.cmd_pool[i]);
info.commandPool = vk.cmd_pool[i];
info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
info.commandBufferCount = 1;
VKFUNC(vkAllocateCommandBuffers)(vulkan->device, &info, &vk.cmd[i]);
vkAllocateCommandBuffers(vulkan->device, &info, &vk.cmd[i]);
}
}
static void vulkan_test_init(void)
{
VKFUNC(vkGetPhysicalDeviceProperties)(vulkan->gpu, &vk.gpu_properties);
VKFUNC(vkGetPhysicalDeviceMemoryProperties)(vulkan->gpu, &vk.memory_properties);
vkGetPhysicalDeviceProperties(vulkan->gpu, &vk.gpu_properties);
vkGetPhysicalDeviceMemoryProperties(vulkan->gpu, &vk.memory_properties);
unsigned num_images = 0;
uint32_t mask = vulkan->get_sync_index_mask(vulkan->handle);
@@ -901,7 +620,7 @@ static void vulkan_test_init(void)
init_descriptor();
VkPipelineCacheCreateInfo pipeline_cache_info = { VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
VKFUNC(vkCreatePipelineCache)(vulkan->device, &pipeline_cache_info,
vkCreatePipelineCache(vulkan->device, &pipeline_cache_info,
NULL, &vk.pipeline_cache);
init_render_pass(VK_FORMAT_R8G8B8A8_UNORM);
@@ -915,34 +634,35 @@ static void vulkan_test_deinit(void)
return;
VkDevice device = vulkan->device;
VKFUNC(vkDeviceWaitIdle)(device);
vkDeviceWaitIdle(device);
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
VKFUNC(vkDestroyFramebuffer)(device, vk.framebuffers[i], NULL);
VKFUNC(vkDestroyImageView)(device, vk.images[i].image_view, NULL);
VKFUNC(vkFreeMemory)(device, vk.image_memory[i], NULL);
VKFUNC(vkDestroyImage)(device, vk.images[i].create_info.image, NULL);
vkDestroyFramebuffer(device, vk.framebuffers[i], NULL);
vkDestroyImageView(device, vk.images[i].image_view, NULL);
vkFreeMemory(device, vk.image_memory[i], NULL);
vkDestroyImage(device, vk.images[i].create_info.image, NULL);
VKFUNC(vkFreeMemory)(device, vk.ubo[i].memory, NULL);
VKFUNC(vkDestroyBuffer)(device, vk.ubo[i].buffer, NULL);
vkFreeMemory(device, vk.ubo[i].memory, NULL);
vkDestroyBuffer(device, vk.ubo[i].buffer, NULL);
}
VKFUNC(vkFreeDescriptorSets)(device, vk.desc_pool, vk.num_swapchain_images, vk.desc_set);
VKFUNC(vkDestroyDescriptorPool)(device, vk.desc_pool, NULL);
vkFreeDescriptorSets(device, vk.desc_pool, vk.num_swapchain_images, vk.desc_set);
vkDestroyDescriptorPool(device, vk.desc_pool, NULL);
VKFUNC(vkDestroyRenderPass)(device, vk.render_pass, NULL);
VKFUNC(vkDestroyPipeline)(device, vk.pipeline, NULL);
VKFUNC(vkDestroyPipelineLayout)(device, vk.pipeline_layout, NULL);
vkDestroyRenderPass(device, vk.render_pass, NULL);
vkDestroyPipeline(device, vk.pipeline, NULL);
vkDestroyDescriptorSetLayout(device, vk.set_layout, NULL);
vkDestroyPipelineLayout(device, vk.pipeline_layout, NULL);
VKFUNC(vkFreeMemory)(device, vk.vbo.memory, NULL);
VKFUNC(vkDestroyBuffer)(device, vk.vbo.buffer, NULL);
VKFUNC(vkDestroyPipelineCache)(device, vk.pipeline_cache, NULL);
vkFreeMemory(device, vk.vbo.memory, NULL);
vkDestroyBuffer(device, vk.vbo.buffer, NULL);
vkDestroyPipelineCache(device, vk.pipeline_cache, NULL);
for (unsigned i = 0; i < vk.num_swapchain_images; i++)
{
VKFUNC(vkFreeCommandBuffers)(device, vk.cmd_pool[i], 1, &vk.cmd[i]);
VKFUNC(vkDestroyCommandPool)(device, vk.cmd_pool[i], NULL);
vkFreeCommandBuffers(device, vk.cmd_pool[i], 1, &vk.cmd[i]);
vkDestroyCommandPool(device, vk.cmd_pool[i], NULL);
}
memset(&vk, 0, sizeof(vk));
@@ -967,7 +687,7 @@ void retro_run(void)
vk.index = vulkan->get_sync_index(vulkan->handle);
vulkan_test_render();
vulkan->set_image(vulkan->handle, &vk.images[vk.index], 0, NULL);
vulkan->set_image(vulkan->handle, &vk.images[vk.index], 0, NULL, VK_QUEUE_FAMILY_IGNORED);
vulkan->set_command_buffers(vulkan->handle, 1, &vk.cmd[vk.index]);
video_cb(RETRO_HW_FRAME_BUFFER_VALID, BASE_WIDTH, BASE_HEIGHT, 0);
}
@@ -989,7 +709,9 @@ static void context_reset(void)
return;
}
load_device_symbols();
vulkan_symbol_wrapper_init(vulkan->get_instance_proc_addr);
vulkan_symbol_wrapper_load_core_instance_symbols(vulkan->instance);
vulkan_symbol_wrapper_load_core_device_symbols(vulkan->device);
vulkan_test_init();
}
@@ -1001,10 +723,24 @@ static void context_destroy(void)
memset(&vk, 0, sizeof(vk));
}
static const VkApplicationInfo *get_application_info(void)
{
static const VkApplicationInfo info = {
VK_STRUCTURE_TYPE_APPLICATION_INFO,
NULL,
"libretro-test-vulkan",
0,
"libretro-test-vulkan",
0,
VK_MAKE_VERSION(1, 0, 18),
};
return &info;
}
static bool retro_init_hw_context(void)
{
hw_render.context_type = RETRO_HW_CONTEXT_VULKAN;
hw_render.version_major = VK_MAKE_VERSION(1, 0, 6);
hw_render.version_major = VK_MAKE_VERSION(1, 0, 18);
hw_render.version_minor = 0;
hw_render.context_reset = context_reset;
hw_render.context_destroy = context_destroy;
@@ -1012,6 +748,16 @@ static bool retro_init_hw_context(void)
if (!environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER, &hw_render))
return false;
static const struct retro_hw_render_context_negotiation_interface_vulkan iface = {
RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN,
RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION,
get_application_info,
NULL,
};
environ_cb(RETRO_ENVIRONMENT_SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE, (void*)&iface);
return true;
}
+8 -12
View File
@@ -1,23 +1,19 @@
VERT_SHADERS := $(wildcard *.vert)
FRAG_SHADERS := $(wildcard *.frag)
SPIRV := $(VERT_SHADERS:.vert=.vert.spv) $(FRAG_SHADERS:.frag=.frag.spv)
INCLUDES := $(SPIRV:.spv=.inc)
SPIRV := $(VERT_SHADERS:.vert=.vert.inc) $(FRAG_SHADERS:.frag=.frag.inc)
GLSLANG := glslangValidator
GLSLANG := glslc
GLSLFLAGS := -mfmt=c
all: $(INCLUDES)
all: $(SPIRV)
%.frag.spv: %.frag
$(GLSLANG) -V -o $@ $<
%.frag.inc: %.frag
$(GLSLANG) $(GLSLFLAGS) -o $@ $<
%.vert.spv: %.vert
$(GLSLANG) -V -o $@ $<
%.inc: %.spv
xxd -i $< $@
%.vert.inc: %.vert
$(GLSLANG) $(GLSLFLAGS) -o $@ $<
clean:
rm -f $(INCLUDES)
rm -f $(SPIRV)
.PHONY: clean
@@ -1,38 +1,31 @@
unsigned char triangle_frag_spv[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00,
0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00,
0x01, 0x00, 0x00, 0x00, 0x36, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67,
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x76, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00,
0x47, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00,
0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00,
0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00,
0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,
0x38, 0x00, 0x01, 0x00
};
unsigned int triangle_frag_spv_len = 412;
{0x07230203,0x00010000,0x00080001,0x0000000d,
0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,
0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,
0x00000000,0x00000009,0x0000000b,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000001,
0x00000136,0x000a0004,0x475f4c47,0x4c474f4f,
0x70635f45,0x74735f70,0x5f656c79,0x656e696c,
0x7269645f,0x69746365,0x00006576,0x00080004,
0x475f4c47,0x4c474f4f,0x6e695f45,0x64756c63,
0x69645f65,0x74636572,0x00657669,0x00040005,
0x00000004,0x6e69616d,0x00000000,0x00050005,
0x00000009,0x67617246,0x6f6c6f43,0x00000072,
0x00040005,0x0000000b,0x6c6f4376,0x0000726f,
0x00030047,0x00000009,0x00000000,0x00040047,
0x00000009,0x0000001e,0x00000000,0x00030047,
0x0000000b,0x00000000,0x00040047,0x0000000b,
0x0000001e,0x00000000,0x00030047,0x0000000c,
0x00000000,0x00020013,0x00000002,0x00030021,
0x00000003,0x00000002,0x00030016,0x00000006,
0x00000020,0x00040017,0x00000007,0x00000006,
0x00000004,0x00040020,0x00000008,0x00000003,
0x00000007,0x0004003b,0x00000008,0x00000009,
0x00000003,0x00040020,0x0000000a,0x00000001,
0x00000007,0x0004003b,0x0000000a,0x0000000b,
0x00000001,0x00050036,0x00000002,0x00000004,
0x00000000,0x00000003,0x000200f8,0x00000005,
0x0004003d,0x00000007,0x0000000c,0x0000000b,
0x0003003e,0x00000009,0x0000000c,0x000100fd,
0x00010038}
@@ -1,83 +1,65 @@
unsigned char triangle_vert_spv[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00,
0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
0x1b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
0x36, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00,
0x08, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x65, 0x72, 0x56, 0x65,
0x72, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50,
0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x07, 0x00,
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50,
0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x03, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x55, 0x42, 0x4f, 0x00,
0x06, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4d, 0x56, 0x50, 0x00, 0x05, 0x00, 0x03, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x15, 0x00, 0x00, 0x00,
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x76, 0x43, 0x6f, 0x6c,
0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00,
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x47, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x48, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x48, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x10, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x15, 0x00, 0x00, 0x00,
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x1a, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x3b, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x20, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x20, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00,
0x1a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
0x14, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00,
0x05, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x11, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00,
0x07, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00,
0x19, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x3e, 0x00, 0x03, 0x00, 0x19, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x1b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1a, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00
};
unsigned int triangle_vert_spv_len = 960;
{0x07230203,0x00010000,0x00080001,0x0000001d,
0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,
0x00000000,0x0003000e,0x00000000,0x00000001,
0x0009000f,0x00000000,0x00000004,0x6e69616d,
0x00000000,0x0000000a,0x00000015,0x0000001a,
0x0000001b,0x00030003,0x00000001,0x00000136,
0x000a0004,0x475f4c47,0x4c474f4f,0x70635f45,
0x74735f70,0x5f656c79,0x656e696c,0x7269645f,
0x69746365,0x00006576,0x00080004,0x475f4c47,
0x4c474f4f,0x6e695f45,0x64756c63,0x69645f65,
0x74636572,0x00657669,0x00040005,0x00000004,
0x6e69616d,0x00000000,0x00060005,0x00000008,
0x505f6c67,0x65567265,0x78657472,0x00000000,
0x00060006,0x00000008,0x00000000,0x505f6c67,
0x7469736f,0x006e6f69,0x00070006,0x00000008,
0x00000001,0x505f6c67,0x746e696f,0x657a6953,
0x00000000,0x00030005,0x0000000a,0x00000000,
0x00030005,0x0000000e,0x004f4255,0x00040006,
0x0000000e,0x00000000,0x0050564d,0x00030005,
0x00000010,0x00000000,0x00050005,0x00000015,
0x69736f50,0x6e6f6974,0x00000000,0x00040005,
0x0000001a,0x6c6f4376,0x0000726f,0x00040005,
0x0000001b,0x6f6c6f43,0x00000072,0x00050048,
0x00000008,0x00000000,0x0000000b,0x00000000,
0x00050048,0x00000008,0x00000001,0x0000000b,
0x00000001,0x00030047,0x00000008,0x00000002,
0x00040048,0x0000000e,0x00000000,0x00000005,
0x00050048,0x0000000e,0x00000000,0x00000023,
0x00000000,0x00050048,0x0000000e,0x00000000,
0x00000007,0x00000010,0x00030047,0x0000000e,
0x00000002,0x00040047,0x00000010,0x00000022,
0x00000000,0x00040047,0x00000010,0x00000021,
0x00000000,0x00040047,0x00000015,0x0000001e,
0x00000000,0x00040047,0x0000001a,0x0000001e,
0x00000000,0x00040047,0x0000001b,0x0000001e,
0x00000001,0x00020013,0x00000002,0x00030021,
0x00000003,0x00000002,0x00030016,0x00000006,
0x00000020,0x00040017,0x00000007,0x00000006,
0x00000004,0x0004001e,0x00000008,0x00000007,
0x00000006,0x00040020,0x00000009,0x00000003,
0x00000008,0x0004003b,0x00000009,0x0000000a,
0x00000003,0x00040015,0x0000000b,0x00000020,
0x00000001,0x0004002b,0x0000000b,0x0000000c,
0x00000000,0x00040018,0x0000000d,0x00000007,
0x00000004,0x0003001e,0x0000000e,0x0000000d,
0x00040020,0x0000000f,0x00000002,0x0000000e,
0x0004003b,0x0000000f,0x00000010,0x00000002,
0x00040020,0x00000011,0x00000002,0x0000000d,
0x00040020,0x00000014,0x00000001,0x00000007,
0x0004003b,0x00000014,0x00000015,0x00000001,
0x00040020,0x00000018,0x00000003,0x00000007,
0x0004003b,0x00000018,0x0000001a,0x00000003,
0x0004003b,0x00000014,0x0000001b,0x00000001,
0x00050036,0x00000002,0x00000004,0x00000000,
0x00000003,0x000200f8,0x00000005,0x00050041,
0x00000011,0x00000012,0x00000010,0x0000000c,
0x0004003d,0x0000000d,0x00000013,0x00000012,
0x0004003d,0x00000007,0x00000016,0x00000015,
0x00050091,0x00000007,0x00000017,0x00000013,
0x00000016,0x00050041,0x00000018,0x00000019,
0x0000000a,0x0000000c,0x0003003e,0x00000019,
0x00000017,0x0004003d,0x00000007,0x0000001c,
0x0000001b,0x0003003e,0x0000001a,0x0000001c,
0x000100fd,0x00010038}
+1 -1
View File
@@ -7,7 +7,7 @@
#include <retro_miscellaneous.h>
#include "../../libretro.h"
#include <libretro.h>
static uint32_t *frame_buf;
static struct retro_log_callback logging;
-327
View File
@@ -1,327 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2015 - Daniel De Matteis
* Copyright (C) 2016 - Andrés Suárez
*
* 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/>.
*/
/*
* To-do:
* - Analog support
* - Some sort of connection control, it only sends packets
* but there is no acknoledgement of a connection o keepalives
* - Send player name
* - Render something on-screen maybe a gui to configure IP and port
instead of the ridiculously long strings we're using now
* - Allow changing IP address and port in runtime
* - Support other platforms
* - Input recording / Combos
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <net/net_compat.h>
#include <net/net_socket.h>
#include <retro_miscellaneous.h>
#include "../../libretro.h"
#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif
struct retro_log_callback logger;
retro_log_printf_t log_cb;
static uint16_t *frame_buf;
struct sockaddr_in si_other;
int s, slen=sizeof(si_other);
char message[64];
char server[64];
int port;
int input_state = 0;
void retro_init(void)
{
frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
log_cb(RETRO_LOG_INFO, "Initialising sockets...\n");
network_init();
}
void retro_deinit(void)
{
if (frame_buf)
free(frame_buf);
frame_buf = NULL;
}
unsigned retro_api_version(void)
{
return RETRO_API_VERSION;
}
void retro_set_controller_port_device(
unsigned port, unsigned device)
{
(void)port;
(void)device;
}
void retro_get_system_info(
struct retro_system_info *info)
{
memset(info, 0, sizeof(*info));
info->library_name = "RetroPad Remote";
info->library_version = "0.01";
info->need_fullpath = false;
info->valid_extensions = ""; /* Nothing. */
}
void 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 video_cb;
static retro_audio_sample_t audio_cb;
static retro_audio_sample_batch_t audio_batch_cb;
static retro_environment_t environ_cb;
static retro_input_poll_t input_poll_cb;
static retro_input_state_t input_state_cb;
void update_input()
{
input_state = 0;
input_poll_cb();
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B))
input_state += 1;
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A))
input_state += 2;
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT))
input_state += pow(2, 2);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START))
input_state += pow(2, 3);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP))
input_state += pow(2, 4);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN))
input_state += pow(2, 5);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT))
input_state += pow(2, 6);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT))
input_state += pow(2, 7);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y))
input_state += pow(2, 8);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X))
input_state += pow(2, 9);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L))
input_state += pow(2, 10);
if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R))
input_state += pow(2, 11);
}
void retro_set_environment(retro_environment_t cb)
{
static const struct retro_variable vars[] = {
{ "port", "Port; 55400|55401|55402|55403|55404|55405|55406|55407|55408|55409|55410|55411|55412|55413|55414|55415|55416|55417|55418|55419|55420" },
{ "ip_octet1", "IP address part 1; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|35|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|135|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|235|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "ip_octet2", "IP address part 2; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|35|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|135|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|235|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "ip_octet3", "IP address part 3; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|35|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|135|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|235|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ "ip_octet4", "IP address part 4; 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|35|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|135|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|235|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255" },
{ NULL, NULL },
};
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
environ_cb = cb;
bool no_content = true;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content);
environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt);
if (cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logger))
log_cb = logger.log;
}
static void check_variables(void)
{
struct retro_variable var, var2, var3, var4, port_var;
var.key = "ip_octet1";
var2.key = "ip_octet2";
var3.key = "ip_octet3";
var4.key = "ip_octet4";
port_var.key = "port";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var2);
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var3);
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var4);
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &port_var);
snprintf(server, sizeof(server), "%s.%s.%s.%s", var.value, var2.value, var3.value, var4.value);
port = atoi(port_var.value);
}
void retro_set_audio_sample(retro_audio_sample_t cb)
{
audio_cb = cb;
}
void retro_set_audio_sample_batch(
retro_audio_sample_batch_t cb)
{
audio_batch_cb = cb;
}
void retro_set_input_poll(retro_input_poll_t cb)
{
input_poll_cb = cb;
}
void retro_set_input_state(retro_input_state_t cb)
{
input_state_cb = cb;
}
void retro_set_video_refresh(retro_video_refresh_t cb)
{
video_cb = cb;
}
void retro_reset(void)
{}
void retro_run(void)
{
unsigned i;
update_input();
snprintf(message, sizeof(message), "%d", input_state);
/* send the message */
if (sendto(s, message, strlen(message) , 0 , (struct sockaddr *) &si_other, slen)==-1)
log_cb(RETRO_LOG_INFO, "Error sending data\n");
for (i = 0; i < 320 * 240; i++)
frame_buf[i] = 4 << 5;
video_cb(frame_buf, 320, 240, 640);
}
bool retro_load_game(const struct retro_game_info *info)
{
(void)info;
check_variables();
s = socket_create(
"retropad",
SOCKET_DOMAIN_INET,
SOCKET_TYPE_DATAGRAM,
SOCKET_PROTOCOL_UDP);
if (s == SOCKET_ERROR)
log_cb(RETRO_LOG_INFO, "socket failed");
/* setup address structure */
memset((char *) &si_other, 0, sizeof(si_other));
si_other.sin_family = AF_INET;
si_other.sin_port = htons(port);
#if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY)
si_other.sin_addr.S_un.S_addr = inet_addr(server);
#else
si_other.sin_addr.s_addr = inet_addr(server);
inet_aton(server , &si_other.sin_addr);
#endif
log_cb(RETRO_LOG_INFO, "Server IP Address: %s\n" , server);
return true;
}
void retro_unload_game(void)
{}
unsigned retro_get_region(void)
{
return RETRO_REGION_NTSC;
}
bool retro_load_game_special(unsigned type,
const struct retro_game_info *info, size_t num)
{
(void)type;
(void)info;
(void)num;
return false;
}
size_t retro_serialize_size(void)
{
return 0;
}
bool retro_serialize(void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
bool retro_unserialize(const void *data,
size_t size)
{
(void)data;
(void)size;
return false;
}
void *retro_get_memory_data(unsigned id)
{
(void)id;
return NULL;
}
size_t retro_get_memory_size(unsigned id)
{
(void)id;
return 0;
}
void retro_cheat_reset(void)
{}
void retro_cheat_set(unsigned idx,
bool enabled, const char *code)
{
(void)idx;
(void)enabled;
(void)code;
}
+5 -8
View File
@@ -501,9 +501,6 @@ database_info_list_t *database_info_list_new(
database_info = new_ptr;
db_ptr = &database_info[k];
if (!db_ptr)
continue;
memcpy(db_ptr, &db_info, sizeof(*db_ptr));
k++;
@@ -514,10 +511,11 @@ database_info_list_t *database_info_list_new(
database_info_list->count = k;
end:
database_cursor_close(db, cur);
if (db)
{
database_cursor_close(db, cur);
libretrodb_free(db);
}
if (cur)
libretrodb_cursor_free(cur);
@@ -535,15 +533,14 @@ void database_info_list_free(database_info_list_t *database_info_list)
{
database_info_t *info = &database_info_list->list[i];
if (!info)
continue;
if (info->name)
free(info->name);
if (info->rom_name)
free(info->rom_name);
if (info->serial)
free(info->serial);
if (info->genre)
free(info->genre);
if (info->description)
free(info->description);
if (info->publisher)
+4 -6
View File
@@ -22,12 +22,11 @@
#include <stddef.h>
#include <file/archive_file.h>
#include <retro_common_api.h>
#include "libretro-db/libretrodb.h"
#ifdef __cplusplus
extern "C" {
#endif
RETRO_BEGIN_DECLS
enum database_status
{
@@ -44,6 +43,7 @@ enum database_type
DATABASE_TYPE_NONE = 0,
DATABASE_TYPE_ITERATE,
DATABASE_TYPE_ITERATE_ZIP,
DATABASE_TYPE_ITERATE_LUTRO,
DATABASE_TYPE_SERIAL_LOOKUP,
DATABASE_TYPE_CRC_LOOKUP
};
@@ -120,8 +120,6 @@ int database_info_build_query(
* memory after it is no longer required. */
char *bin_to_hex_alloc(const uint8_t *data, size_t len);
#ifdef __cplusplus
}
#endif
RETRO_END_DECLS
#endif /* CORE_INFO_H_ */
+1 -1
View File
@@ -72,7 +72,7 @@ struct defaults
} settings;
#ifndef IS_SALAMANDER
content_playlist_t *history;
playlist_t *history;
#endif
};
+14 -14
View File
@@ -32,7 +32,7 @@
#if defined(SN_TARGET_PSP2) || defined(VITA)
#ifdef VITA
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (PSP2_DISPLAY_PIXELFORMAT_A8B8G8R8)
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
#else
#define PSP_DISPLAY_PIXEL_FORMAT_8888 (SCE_DISPLAY_PIXELFORMAT_A8B8G8R8)
#endif
@@ -67,20 +67,20 @@
#define STATE_ANALOGRY(state) ((state).ry)
#if defined(VITA)
#define DEFAULT_SAMPLING_MODE (PSP2_CTRL_MODE_ANALOG)
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_ANALOG)
#define PSP_CTRL_LEFT PSP2_CTRL_LEFT
#define PSP_CTRL_DOWN PSP2_CTRL_DOWN
#define PSP_CTRL_RIGHT PSP2_CTRL_RIGHT
#define PSP_CTRL_UP PSP2_CTRL_UP
#define PSP_CTRL_START PSP2_CTRL_START
#define PSP_CTRL_SELECT PSP2_CTRL_SELECT
#define PSP_CTRL_TRIANGLE PSP2_CTRL_TRIANGLE
#define PSP_CTRL_SQUARE PSP2_CTRL_SQUARE
#define PSP_CTRL_CROSS PSP2_CTRL_CROSS
#define PSP_CTRL_CIRCLE PSP2_CTRL_CIRCLE
#define PSP_CTRL_L PSP2_CTRL_LTRIGGER
#define PSP_CTRL_R PSP2_CTRL_RTRIGGER
#define PSP_CTRL_LEFT SCE_CTRL_LEFT
#define PSP_CTRL_DOWN SCE_CTRL_DOWN
#define PSP_CTRL_RIGHT SCE_CTRL_RIGHT
#define PSP_CTRL_UP SCE_CTRL_UP
#define PSP_CTRL_START SCE_CTRL_START
#define PSP_CTRL_SELECT SCE_CTRL_SELECT
#define PSP_CTRL_TRIANGLE SCE_CTRL_TRIANGLE
#define PSP_CTRL_SQUARE SCE_CTRL_SQUARE
#define PSP_CTRL_CROSS SCE_CTRL_CROSS
#define PSP_CTRL_CIRCLE SCE_CTRL_CIRCLE
#define PSP_CTRL_L SCE_CTRL_LTRIGGER
#define PSP_CTRL_R SCE_CTRL_RTRIGGER
#else
#define DEFAULT_SAMPLING_MODE (SCE_CTRL_MODE_DIGITALANALOG)
Loaded 100 of 851 files, more files were not shown because too many files have changed in this diff. Show more