Compare commits

...
426 Commits
Author SHA1 Message Date
twinaphex 589b92cc99 (Wii) Bump up to version 1.2.2 2015-07-19 11:50:27 +02:00
twinaphex e223821c22 (Android) Bump up APK version code; bump up version 2015-07-19 11:50:00 +02:00
Twinaphex f073739970 (OSX) Bump up to version 1.2.2 2015-07-19 00:14:31 +02:00
twinaphex 0bbb0d6913 (Darwin) Cleanups 2015-07-18 23:49:58 +02:00
twinaphex c56f1403e5 (Darwin) Setup default shader dir 2015-07-18 23:41:42 +02:00
twinaphex 1fab41ad63 Cleanup 2015-07-18 23:32:23 +02:00
twinaphex f3f238381f Take out -Wno-invalid-encoding - GCC doesn't support this, and
too much of a pain to selectively take it out
2015-07-18 22:48:45 +02:00
radius 49931f4df7 build fix 2015-07-18 15:45:58 -05:00
Twinaphex d06bd1870e Move Quick Menu to the top 2015-07-18 22:11:59 +02:00
twinaphex 2f36994f67 Finally linked openCore 2015-07-18 21:02:31 +02:00
twinaphex 5cd9fb1da2 (es) Buildfix 2015-07-18 20:59:42 +02:00
twinaphex 99e1a9b297 Get rid of builtin_bswap16/bswap32 - breaks on OSX 10.8 2015-07-18 20:56:47 +02:00
Twinaphex 60f681f5f8 Merge pull request #1991 from sergiobenrocha2/master
Fix portuguese string.
2015-07-18 20:41:40 +02:00
Twinaphex b886f7ab96 Merge pull request #1990 from IlDucci/patch-3
Update menu_hash_es.c
2015-07-18 20:40:58 +02:00
Twinaphex 727e71d206 Merge pull request #1992 from vanfanel/master
VIDEO/SUNXI: fixed compilation because of a couple of small errors co…
2015-07-18 20:40:27 +02:00
vanfanel 824c647377 VIDEO/SUNXI: fixed compilation because of a couple of small errors coming from cleanups. 2015-07-18 20:33:07 +02:00
twinaphex 5c258a52f5 Revert "(MainMenu.xib) Try to add IBConnectionRecord"
This reverts commit 0bc2a86fb5.
2015-07-18 20:32:14 +02:00
twinaphex 0bc2a86fb5 (MainMenu.xib) Try to add IBConnectionRecord 2015-07-18 20:31:50 +02:00
sergiobenrocha2 8ee4fd9c15 Fix portuguese string. 2015-07-18 15:15:54 -03:00
twinaphex cb9deedbf2 Remove showCores dialog 2015-07-18 20:06:31 +02:00
Twinaphex 8bf42618d9 (OSX) Fix IBAction openCores 2015-07-18 19:24:14 +02:00
IlDucci cf915d6524 Update menu_hash_es.c
Started with help screens. Spanish translation incomplete.
2015-07-18 19:07:17 +02:00
Twinaphex 0961446b19 Merge pull request #1988 from IlDucci/patch-2
Update msg_hash_es.c
2015-07-18 18:38:25 +02:00
IlDucci 09b9683e26 Update msg_hash_es.c
Starting a Spanish translation.
2015-07-18 18:34:59 +02:00
twinaphex 88caa51a5e (ES) Fix some labels 2015-07-18 18:32:24 +02:00
Twinaphex eba3506b55 Merge pull request #1987 from IlDucci/patch-1
Update menu_hash_es.c
2015-07-18 18:30:12 +02:00
IlDucci 5a324c1dac Update menu_hash_es.c
Starting a Spanish translation.
2015-07-18 18:21:49 +02:00
Twinaphex 6cb42bde29 Set all paths to bundle dirs when RELEASE_BUILD is defined 2015-07-18 17:36:30 +02:00
twinaphex d9a72d9b5c (OSX) Set XMB driver as menu default driver from OSX 10.6 and up 2015-07-18 16:15:54 +02:00
twinaphex fd33f2153a Update openCore 2015-07-18 16:01:39 +02:00
twinaphex e35fab5dc8 (OSX) Add HAVE_CORETEXT 2015-07-18 15:55:35 +02:00
twinaphex f02f1ebc8f (OSX) setWantsBestResolutionOpenGLSurface - OSX 10.7 and up 2015-07-18 15:46:48 +02:00
twinaphex 5bc03fb3a8 backingScaleFactor OSX 10.7 and up 2015-07-18 15:41:14 +02:00
twinaphex edac6e0afc Remove no-invalid-source-encoding - GCC on OSX can't handle this 2015-07-18 15:39:26 +02:00
twinaphex 7ad1beeb81 Some robustness checks 2015-07-18 15:26:31 +02:00
Twinaphex a54a4d6cbe (Menu) Cleanup unused variable 2015-07-18 15:25:42 +02:00
twinaphex ffc075166e (OSX) Add 'openCore' 2015-07-18 15:24:45 +02:00
Twinaphex 34c2791fa4 Revert "(OSX) Add default dirs for Pictures and Downloads"
This reverts commit b9831cdc14.
2015-07-18 15:16:56 +02:00
twinaphex b9831cdc14 (OSX) Add default dirs for Pictures and Downloads 2015-07-18 15:14:40 +02:00
Twinaphex 09ee27337c (OSX) Fix crash at exit 2015-07-18 15:07:16 +02:00
twinaphex 67c5d14900 (OSX) Fix some paths 2015-07-18 15:05:22 +02:00
twinaphex 31e76e4329 Fix 'What Is A core' entry 2015-07-18 15:00:38 +02:00
twinaphex b3bb7def66 Small nit 2015-07-18 14:58:14 +02:00
twinaphex a86e4304b4 Add 'Scanning For Content' help 2015-07-18 14:57:20 +02:00
twinaphex a919c26b81 Add 'Change Virtual Gamepad' help 2015-07-18 14:01:37 +02:00
Alcaro b45c8bf916 Fix saying 'several ways' and only listing one way if net is off. 2015-07-18 11:34:50 +02:00
twinaphex 280fab6cab Cleanup 2015-07-18 11:31:54 +02:00
twinaphex ef1b066b64 Add 'What Is A Core?' to Help 2015-07-18 11:29:37 +02:00
twinaphex d3b1eef196 Add MENU_LABEL_VALUE_MENU_CONTROLS_PROLOG 2015-07-18 08:39:52 +02:00
twinaphex 34be1b9c9c Cleanup 2015-07-18 07:27:22 +02:00
twinaphex 6636fbaf15 (Help) Add 'Loading Content' 2015-07-17 22:11:24 +02:00
twinaphex f48c31cf68 Update 'Basic Menu Controls' 2015-07-17 21:50:51 +02:00
twinaphex ac9d54032f Start creating Menu Help list 2015-07-17 20:33:09 +02:00
Twinaphex d725ff9738 Merge pull request #1983 from heuripedes/master
(stb.c) Fix growth conditional and limit growth to 2048x2048
2015-07-17 18:53:01 +02:00
Higor Eurípedes ab55ed7908 (stb.c) Fix growth conditional and limit growth to 2048x2048 2015-07-17 13:38:24 -03:00
twinaphex 7f3424ab15 (Menu) More translatable strings 2015-07-17 18:22:59 +02:00
twinaphex 40541d60c9 Add more translatable strings 2015-07-17 15:53:02 +02:00
twinaphex 673e2ba57d Add "Welcome to RetroArch" to translatable strings 2015-07-17 15:25:58 +02:00
twinaphex 4e64eac514 Add welcome start screen and make it have a 3-second timeout 2015-07-17 15:03:17 +02:00
twinaphex 3222351ef0 Remove jsoup 2015-07-17 11:24:51 +02:00
twinaphex 11c3e3f4ff Update stb_truetype 2015-07-17 11:15:04 +02:00
twinaphex f7a443b4e9 (Android) (Nvidia Shield Portable) Some kind of edge case happens
on Shield Portable that causes it to keep allocating for a long
time until it simply fails and falls back to the bitmap font
renderer. Currently seems to be happening on character 160.
Quick hack until we fix the real underlying issue.
2015-07-17 11:03:15 +02:00
radius a06dd9c3a2 fix system dir resetting on each startup 2015-07-17 02:53:59 -05:00
twinaphex 450c665619 Create meta_key_pressed 2015-07-17 03:31:51 +02:00
twinaphex 8162b77bae Whitelist menu_toggle key 2015-07-17 03:12:52 +02:00
twinaphex a2af5252c1 Get rid of input_driver_key_pressed 2015-07-17 03:09:12 +02:00
twinaphex f1d8f98c90 Refinement on earlier revert 2015-07-17 02:59:03 +02:00
twinaphex 63582f83b1 Revert "Optimize input_driver_keys_pressed and make it possible to"
This reverts commit 5d87c697bb.
2015-07-17 02:58:26 +02:00
twinaphex 95da20190a Take out stb_truetype hack 2015-07-17 02:24:23 +02:00
Twinaphex eeeba3f343 Merge pull request #1981 from heuripedes/master
stb.c fixes
2015-07-16 23:41:23 +02:00
Higor Eurípedes e4da044c99 (stb.c) Resize atlas when printable characters dont fit 2015-07-16 11:37:08 -03:00
Higor Eurípedes d10bb24328 (stb.c) Add CutiveMono.ttf path and replace DroidSansFallback with DroidSans 2015-07-16 11:19:06 -03:00
twinaphex f938c75e0b When 'Hide In Menu' is enabled, overlay should reappear now when we
select 'Resume Content', 'Load State', or 'Save State'
2015-07-16 11:57:50 +02:00
twinaphex b298b2d4f0 platform_android.h - cleanup 2015-07-16 10:54:59 +02:00
twinaphex a5f5e34e21 Bump up to 1.2.2 2015-07-16 10:12:31 +02:00
twinaphex f5566cbe3b Cleanup warnings 2015-07-16 10:11:28 +02:00
twinaphex a73f91e68a (Android) Add hack/workaround for DPI larger than 500 with
HAVE_STB_FONT
2015-07-16 10:09:26 +02:00
twinaphex bad3238ac7 (GX) Default to rate control off for GX now 2015-07-16 09:35:27 +02:00
Twinaphex badf8bdaad Merge pull request #1979 from fr500/master
Various fixes
2015-07-16 09:25:06 +02:00
radius 2a1f2b81c2 disable per-core states with <content dir> savestates 2015-07-16 02:23:18 -05:00
fr500 ca682d38eb better shield portable hack 2015-07-16 03:22:28 -04:00
radius b717828cf0 fix setting and clearing system directory when using content dir 2015-07-16 01:46:11 -05:00
Twinaphex 637c977b45 Merge pull request #1976 from lakkatv/glui
(GLUI) Improve tickering limit
2015-07-16 03:44:15 +02:00
Jean-André Santoni 5ffd48217c (GLUI) Improve tickering limit 2015-07-16 03:38:07 +02:00
Twinaphex 0cdde16e2d Merge pull request #1975 from heuripedes/glui-improvements
GLUI improvements
2015-07-16 01:58:53 +02:00
Higor Eurípedes ec00f709f7 (GLUI) Give more room to labels when possible 2015-07-15 20:56:31 -03:00
Higor Eurípedes b217bbad24 (menu_animation) Create menu_animation_ticker_generic 2015-07-15 20:56:25 -03:00
Higor Eurípedes 06838d044f (GLUI) Create glui_render_label_value() 2015-07-15 20:55:53 -03:00
Higor Eurípedes 615b8b39f1 (GLUI) Cleanup glui_render_menu_list() 2015-07-15 20:55:53 -03:00
Higor Eurípedes 9b019dbc1e (GLUI) Always query dpi 2015-07-15 20:55:53 -03:00
Higor Eurípedes eb406c7a91 (GLUI) Add more appropriate glui->ticker_limit calculation 2015-07-15 20:55:53 -03:00
Higor Eurípedes f43be22e2d (GLUI) Turn font loading failure into an error 2015-07-15 20:55:53 -03:00
Twinaphex 0e6ec34255 Merge pull request #1971 from Oggom/master
Remove (hint) from Menubar entries
2015-07-15 22:46:09 +02:00
Oggom 16c8fc35eb Remove (hint) from Menubar entries 2015-07-15 22:30:28 +02:00
twinaphex b3a66c9e7f Some manifest cleanups 2015-07-15 12:24:25 +02:00
twinaphex 7ecbb3ee05 Bump up manifest to 1.2.1 2015-07-15 06:58:00 +02:00
twinaphex cd81a91d30 Revert "(GLUI) No need to double tap more" - Needs more
polishment before we can merge this

This reverts commit 24840c8918.
2015-07-15 06:28:54 +02:00
twinaphex 56f273b0b5 Put in the Nvidia Shield hack back in for Shield Portable
explicitly
2015-07-15 06:26:32 +02:00
twinaphex a065ef18d1 Should fix representation in menu_entries_get 2015-07-15 05:56:42 +02:00
radius 9992a22e10 create dirs in the internal sd too 2015-07-14 22:38:55 -05:00
twinaphex fedc1b4337 (GLUI) Faster ticker speed 2015-07-15 04:55:57 +02:00
Twinaphex 4785264967 Merge pull request #1966 from lakkatv/glui
(GLUI) No need to double tap more
2015-07-15 03:41:17 +02:00
Jean-André Santoni 24840c8918 (GLUI) No need to double tap more 2015-07-15 03:39:23 +02:00
Andrés 8bf2b8a309 Fix cleanup of test dir 2015-07-14 20:36:38 -05:00
twinaphex 8b791c64a1 (kivutar) Add inertia 2015-07-15 03:04:44 +02:00
twinaphex f8bf5d1827 (kivutar) Somewhat better touch support 2015-07-15 02:41:10 +02:00
twinaphex f69fdbc1f4 Merge branch 'master' of https://github.com/libretro/RetroArch 2015-07-15 02:35:01 +02:00
twinaphex 5e6294bb8f Be able to scroll left and right with MENU_FILE_IN_CARCHIVE 2015-07-15 02:31:11 +02:00
twinaphex 1d1249fbd3 Merge branch 'master' of https://github.com/libretro/RetroArch 2015-07-15 02:25:59 +02:00
twinaphex 0764550c8e (MSVC) Define HAVE_STB_FONT 2015-07-15 02:25:30 +02:00
twinaphex 833e8164ee Use UINT32_C 2015-07-15 02:24:11 +02:00
twinaphex beb3cb5cc5 Use UINT32_C 2015-07-15 02:22:11 +02:00
twinaphex 793e7483ad (platform_ps3.c) Cleanups 2015-07-15 02:09:05 +02:00
twinaphex 7545af9721 (PS3) Compile in HAVE_STB_FONT - remove <memory.h> dependency 2015-07-14 17:21:11 +02:00
twinaphex 58e894f0c9 (Android) Add HAVE_STB_FONT 2015-07-14 17:18:10 +02:00
Twinaphex a0e794d690 Merge pull request #1961 from heuripedes/stb-truetype
Some stb improvements
2015-07-14 17:15:05 +02:00
Higor Eurípedes 6e3e7ecc30 Wrap stb include in griffin 2015-07-14 12:05:08 -03:00
Higor Eurípedes 42320c9726 Make stb font support optional 2015-07-14 12:00:28 -03:00
Higor Eurípedes 09c67e3cf9 Get rid of warnings and declare STBTT_STATIC 2015-07-14 11:47:09 -03:00
twinaphex 7d9530c83a (Griffin) Add font renderer stb to Griffin 2015-07-14 16:44:46 +02:00
Twinaphex 418506ee09 Merge pull request #1960 from heuripedes/stb-truetype
Add stb_truetype based font backend
2015-07-14 16:35:51 +02:00
twinaphex 59cf91980c (PS3) Make GLUI the default menu driver now 2015-07-14 16:21:08 +02:00
Higor Eurípedes 911dc7f083 Add stb_truetype based font backend 2015-07-14 10:55:14 -03:00
twinaphex c02983bb9a (PS3) Don't bake in HAVE_LIDBGFONT either 2015-07-14 15:46:01 +02:00
twinaphex 65930421ba No longer use RMenu for PS3 2015-07-14 13:32:41 +02:00
Twinaphex 29de6895e9 remove unused variables 2015-07-14 12:52:34 +02:00
twinaphex 1f01d62386 (Menu) Refactor zip file handling to be list-based 2015-07-14 12:49:54 +02:00
twinaphex a6bbc31f95 (GX) Header buildfix 2015-07-14 06:14:13 +02:00
Twinaphex f2ee781e92 Merge pull request #1959 from netux79/master
Fixed nunchuk controller support, it was not correctly detected.
2015-07-14 06:03:34 +02:00
Jose Ernesto Ramirez Ramirez 09f3c3ca77 Fixed nunchuk controller support, it was not correctly detected.
Fixed classic controller's analogs, were not working at all.
Restored sixaxis controller support, now with completely rewroten library.
Changed detection order (GC, Sixaxis, Wiimote/Nunchuck/Classic, left wiimote at the end, otherwise we needed to disconnect it to be able to use GC controller or sixaxis controller.
2015-07-13 22:58:01 -05:00
twinaphex bca0789d35 (GLUI) Seems to take care of glitch that would sometimes happen when
trying to 'wrap' from the last entry to the first
2015-07-14 03:21:00 +02:00
twinaphex 3bc88f3298 menu_navigation_increment - use menu_navigation_set_last 2015-07-14 03:06:51 +02:00
twinaphex e85de903b8 (GLUI) Enygmata GLUI improvements 2015-07-14 00:38:16 +02:00
twinaphex 80c498c38c (Freetype) Move variables to top 2015-07-14 00:35:21 +02:00
Twinaphex f016f866b4 Merge pull request #1958 from miguelpinheiro/master
Updated xcode project and deleted legacy build steps
2015-07-13 23:53:59 +02:00
miguelpinheiro fd1e556292 Update project.pbxproj 2015-07-13 22:28:25 +01:00
miguelpinheiro 413c2bc35f Delete RetroArch.xccheckout 2015-07-13 22:20:39 +01:00
miguelpinheiro b6863dcc4a Updated xcode project and deleted legacy build steps
Updated the xcode project to the recomended settings by the software
and deleted steps in the build which no longer applied and caused the
build to fail.
2015-07-13 21:53:42 +01:00
Twinaphex d6d6f080c7 Merge pull request #1955 from libretro/revert-1953-master
Revert "(GLUI) Fix scrolling"
2015-07-13 20:05:31 +02:00
Twinaphex ce18d5b099 Revert "(GLUI) Fix scrolling" 2015-07-13 22:05:14 +02:00
twinaphex 89be56a9ae (Android) Some build fixes 2015-07-13 19:50:21 +02:00
Twinaphex 313f015fcd Merge pull request #1954 from fr500/master
Add SD status to info
2015-07-13 03:19:16 +02:00
fr500 6f645f2cf9 make sure internal dirs are created too 2015-07-12 21:19:10 -04:00
fr500 22b3bc3243 add internal sd status to system info 2015-07-12 20:55:44 -04:00
Twinaphex 526e6845d0 Merge pull request #1953 from heuripedes/master
(GLUI) Fix scrolling
2015-07-13 02:14:33 +02:00
Higor Eurípedes 8d284624ce (GLUI) Fix scrolling 2015-07-12 21:10:34 -03:00
twinaphex ce569438a7 (NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels(NL) Update some labels 2015-07-13 01:57:07 +02:00
twinaphex 50d820f790 Shorten settings names 2015-07-13 01:56:12 +02:00
fr500 39fb39f5f6 improve debug logging 2015-07-12 18:48:32 -04:00
radius 39e15c983b Merge branch 'master' of github.com:libretro/RetroArch 2015-07-12 15:30:09 -05:00
radius 82feadd350 fix vid/pid saving for dinput, need to add it to other drivers 2015-07-12 15:29:49 -05:00
twinaphex 5ac2ac62a3 Add dot to message end 2015-07-12 21:55:21 +02:00
twinaphex 8d04b1fbda Get rid of unnecessary update autoconfig profiles HID option 2015-07-12 21:53:41 +02:00
radius a480ad285b simplify the OSD message a bit more 2015-07-12 14:28:39 -05:00
twinaphex 777040107d Rename Browser Dir to File Browser Dir 2015-07-12 21:19:02 +02:00
twinaphex e8d1970789 move positioning of system/bios dir 2015-07-12 21:17:42 +02:00
twinaphex 5705c30b95 Pointers set by config_get_string need to be freed 2015-07-12 21:14:41 +02:00
Twinaphex 1ff9f89e7d Merge pull request #1952 from fr500/master
Proposals
2015-07-12 21:13:01 +02:00
twinaphex 64a68d4e09 Add BIOS to 'System Dir' label 2015-07-12 21:11:37 +02:00
radius 6f9467817e Shield Fix 2015-07-12 13:56:34 -05:00
radius 26b7ccead9 add a display_name field if available so the user can know which autoconf was used 2015-07-12 13:45:17 -05:00
twinaphex 6001d6bacd (runloop_t) Refactor more continuous pointer grabbing 2015-07-12 19:17:57 +02:00
twinaphex b50f6a02ed (runloop.c) Minimize pointers grabbed 2015-07-12 19:06:24 +02:00
twinaphex 9fbaf0ad28 Hide SRGB Force-disable setting if video driver not set to GL 2015-07-12 18:44:48 +02:00
twinaphex f70070cd16 Turn threaded data runloop off for single-core consoles 2015-07-12 18:23:03 +02:00
Alcaro f323b3ef8c C source isn't executable. Nor is that bitmap. 2015-07-12 12:51:52 +02:00
twinaphex 2aac64552d Cut down on some more superfluous wrapper functions 2015-07-12 11:28:19 +02:00
twinaphex 19542d4f00 Get rid of some superfluous wrapper functions 2015-07-12 11:21:05 +02:00
twinaphex 117fd48f15 Get rid of some superfluous wrapper functions 2015-07-12 11:14:41 +02:00
twinaphex 7fb1265227 (PSP/CTR) Should fix lifecycle state menu toggling 2015-07-12 10:46:20 +02:00
twinaphex 23348f41ac (GX) Menu button toggle should work again 2015-07-12 10:41:49 +02:00
radius 0708e585e3 change to display name only, looks like the core picker, needs to be ordered by name though 2015-07-12 03:22:11 -05:00
radius b7e2755e2b change to display name, looks better 2015-07-12 03:18:24 -05:00
radius b77353e348 add system name to core updater list 2015-07-12 03:15:42 -05:00
radius 01ce2eaf31 shaders go in a subfolder now 2015-07-12 03:53:09 -04:00
Twinaphex 7f9bd9bd8a Merge pull request #1950 from fr500/master
fix a few issues with savestate sorting and system dir
2015-07-12 09:39:40 +02:00
radius 48068f147a same as the previous commit but when the user exits without unloading content 2015-07-12 02:35:28 -05:00
radius 06f656004b make system directory restore correctly when closing content in case it was set to content dir 2015-07-12 02:35:27 -05:00
twinaphex b908b1083b (input_driver.c) small micro-opts 2015-07-12 09:28:24 +02:00
twinaphex 5d87c697bb Optimize input_driver_keys_pressed and make it possible to
pass more 'keys' to the input key pressed callback than just
the standard buttons
2015-07-12 09:08:27 +02:00
twinaphex 2a881d64be Name some functions the same across drivers 2015-07-12 08:51:13 +02:00
twinaphex fbc504acfe Turn one C++ comment into C 2015-07-12 08:46:41 +02:00
twinaphex 32b3aa6b00 (Cocoa) cocoa_input.c - Simplifications 2015-07-12 08:45:12 +02:00
twinaphex c2c9ace028 Input driver's 'input_key_pressed' implementation does not
have to query for overlay state - this is done in an upper-level
function already
2015-07-12 08:39:34 +02:00
twinaphex 33b7388a9e (menu_input.c) Remove unused variables 2015-07-12 08:15:29 +02:00
twinaphex bbc63f7e99 Fix CXX_BUILD 2015-07-12 08:08:27 +02:00
twinaphex 135ee2f503 Use UINT64_C(1) everywhere instead of 1ULL 2015-07-12 07:53:46 +02:00
twinaphex ae14d8c78a (input_overlay.c) Cleanups 2015-07-12 07:42:14 +02:00
twinaphex b3e054a946 (input_overlay.c) Turn more functions static 2015-07-12 07:32:51 +02:00
twinaphex a0b2e4881a (input_overlay.c) Some more simplifications 2015-07-12 07:28:28 +02:00
twinaphex c9814c9b12 (Overlay) Don't expose input overlay handle to outside 2015-07-12 07:22:52 +02:00
twinaphex 2dbc3c4b56 (Overlays) Cleanups 2015-07-12 07:12:33 +02:00
twinaphex 599ed62849 (Overlay) Refactor some more code 2015-07-12 07:03:39 +02:00
twinaphex 86e7f34666 Create input_overlay_key_pressed 2015-07-12 06:54:35 +02:00
twinaphex 1a4954ce55 Move more code to input_overlay.c 2015-07-12 06:47:39 +02:00
twinaphex fd56d5c1b8 (Android) Fix 'Back as Menu Toggle Enable' 2015-07-12 06:28:57 +02:00
twinaphex 108a6b9e21 Cleanups 2015-07-12 06:20:53 +02:00
twinaphex 723fee32e1 (menu_video.c) Start using video_common.h typedefs here too 2015-07-12 06:16:30 +02:00
twinaphex 5a5e3951ff Use custom typedefs for glui too, and move typedefs to gfx/video_common.h 2015-07-12 06:14:01 +02:00
twinaphex ccafdf8cc4 (XMB) Start using custom typedefs instead of GL ones for menu drivers 2015-07-12 06:12:39 +02:00
twinaphex c697923eb6 Create video_common.c 2015-07-12 05:30:04 +02:00
twinaphex 38fd0592f5 Create video_common.h 2015-07-12 04:23:27 +02:00
twinaphex b46f3c9c29 (gl_common.h) Cleanups 2015-07-12 04:20:48 +02:00
twinaphex 4b8e65322c Rename gl_tex_info to gfx_tex_info 2015-07-12 04:16:40 +02:00
twinaphex a687ca54d8 (gl_common.c) Refactors 2015-07-12 04:11:26 +02:00
twinaphex 6bb0d87d87 Rename gl_font_raster_block to gfx_font_raster_block 2015-07-12 04:07:06 +02:00
twinaphex 4c1562fb70 Rename gl_fbo_rect to gfx_fbo_rect 2015-07-12 04:04:56 +02:00
twinaphex c5f2b7e8a1 rename gl_mut_coords to gfx_mut_coords 2015-07-12 04:01:22 +02:00
twinaphex 55054f257a Rename gl_ortho to gfx_ortho 2015-07-12 04:00:25 +02:00
twinaphex 41e28460fa Rename gl_coord_array to gfx_coord_array 2015-07-12 03:58:53 +02:00
twinaphex 527c0c29d4 Rename gl_coords to gfx_coords 2015-07-12 03:57:06 +02:00
twinaphex af752ba24b (PS3) ps3_input.c - cleanup 2015-07-12 02:55:29 +02:00
twinaphex 9e61a5ebf4 (udev_input.c) Cleanup add_device 2015-07-12 02:44:53 +02:00
twinaphex 7e46058362 Set system->shutdown to false when loading dummy core 2015-07-12 02:20:45 +02:00
twinaphex 0107be2485 (GX) Refactor controls 2015-07-12 01:58:43 +02:00
twinaphex 2bdce53651 (PSP) Refactor input code 2015-07-12 01:55:51 +02:00
twinaphex 69a406809e (CTR) Refactor code 2015-07-12 01:53:32 +02:00
twinaphex a11f8419fe Move overlays over to single threaded 2015-07-12 01:36:03 +02:00
twinaphex 028c9b5e3c (input_overlay.c) Some more safety checks 2015-07-12 01:33:14 +02:00
twinaphex f58c171428 (task_overlay.c) Cleanups 2015-07-12 01:19:58 +02:00
twinaphex 01415528c6 (libusb) Update 2015-07-12 01:08:53 +02:00
twinaphex 2121f7a813 Create overlay->alive 2015-07-11 23:45:23 +02:00
twinaphex 10c8c0198b (platform_android.c) Style nits 2015-07-11 23:02:22 +02:00
Twinaphex d1786210ac Merge pull request #1947 from fr500/master
make android defaults smarter
2015-07-11 23:00:09 +02:00
twinaphex 5749d5e034 Rename overlay_state_ptr to overlay_st_ptr 2015-07-11 22:45:02 +02:00
radius d9b125a645 if using app dir and paths do not exist, create them 2015-07-11 16:32:48 -04:00
Twinaphex 97d6b4e3fd Merge pull request #1948 from heuripedes/master
Improve error handling in some image loading functions
2015-07-11 22:21:36 +02:00
Higor Eurípedes 405ac5ebe5 Improve error handling in some image loading functions 2015-07-11 17:18:16 -03:00
twinaphex 396b08513a input_overlay_free_overlay - prevent 'free' on not malloced pointer 2015-07-11 22:07:05 +02:00
twinaphex 17024c4056 (input_overlay.c) Attemp to simplify input_overlay_load_texture_image 2015-07-11 22:03:21 +02:00
radius 5bd889ac02 create directories that do not exist and add savestate dir 2015-07-11 15:25:56 -04:00
radius a1ffbfdec9 make android defaults smarter 2015-07-11 15:16:04 -04:00
twinaphex 5fd65afae1 Have to call config_file_new at the start of every overlay function
and config_file_free at the end of every function
2015-07-11 20:49:04 +02:00
twinaphex 6e63f562ea (D3D) Buildfix 2015-07-11 19:47:20 +02:00
Twinaphex 70607acb6b Turn overlay_state_ptr into non-pointer 2015-07-11 18:22:23 +02:00
twinaphex c3f5ea0fcc Make input_overlay.h no longer depend on RPNG image 2015-07-11 08:14:39 +02:00
twinaphex 1b163e6a5a Cleanup input_overlay.c 2015-07-11 08:07:14 +02:00
twinaphex 70b423cc3e Move config_file.h dependency out of input_overlay.h 2015-07-11 07:51:34 +02:00
radius 88c4b2415d print osd messages on save 2015-07-10 23:13:37 -05:00
radius 51d8051f58 fix some nits 2015-07-10 23:12:48 -05:00
radius dd174e4fab Remove testing function, shouldn't have commited this.. 2015-07-10 23:12:19 -05:00
radius b698e434f5 make it prefer the drivername subdir if it exists when saving 2015-07-10 23:07:44 -05:00
radius 25d2f2a45f cleanup some duplicate code and make it prefer the drivername subdir if it exists 2015-07-10 22:58:42 -05:00
radius da7a75f0fb cleanup some duplicate code and make it prefer the drivername subdir if it exists 2015-07-10 22:56:44 -05:00
radius 63ce5ee4c0 make the first match work too 2015-07-10 22:36:28 -05:00
twinaphex d21e9c002d (Menu) 'save autoconfig' - label should be distinct from other label 2015-07-11 05:11:35 +02:00
twinaphex 0ad4df7308 Implement 'User # Save Autoconfig' menu settings 2015-07-11 05:06:14 +02:00
radius 3a90d38464 make the funciton return tru on success 2015-07-10 21:20:19 -05:00
twinaphex 4a2ddc92c9 configuration.c - cleanup 2015-07-11 03:40:15 +02:00
Twinaphex 512e73f263 Merge pull request #1943 from fr500/master
add a function to save controller profiles
2015-07-11 03:38:20 +02:00
twinaphex 77fd0ef994 (RARCH_MOBILE) Make it not possible to turn off touch support
for the menu
2015-07-11 03:28:50 +02:00
radius 5dffca10fa fix nit 2015-07-10 20:16:32 -05:00
radius 0ea522585d add a function to save controller profiles 2015-07-10 20:15:14 -05:00
twinaphex 6f99b4d381 (Android) Implement 'Back As Menu Toggle Enable' setting 2015-07-11 03:13:38 +02:00
twinaphex 2ec593f3b4 (omap_gfx.c) Can't have global state dependencies in video drivers 2015-07-10 19:55:34 +02:00
twinaphex 0189fa2c59 (audio_utils.c) Cleanups 2015-07-10 19:51:09 +02:00
twinaphex 33feed8aa7 (resamplers) Turn some 1-line inline functions into macros 2015-07-10 19:46:52 +02:00
twinaphex 7bcd4dd04d (Menu) Get rid of some dependencies on global state in menu drivers 2015-07-10 19:21:20 +02:00
twinaphex 4c9077568d Shorten some variables 2015-07-10 19:17:26 +02:00
twinaphex 2f9e8b44e3 (input) Get rid of remaining unused global pointers 2015-07-10 19:08:58 +02:00
twinaphex 403e32ca5f Get rid of lifecycle_state in runloop struct 2015-07-10 18:54:58 +02:00
twinaphex f50751909c (QNX) Don't depend on global state for input driver 2015-07-10 18:52:23 +02:00
twinaphex 2eab572773 (CTR) Don't depend on global state in input driver 2015-07-10 18:51:04 +02:00
twinaphex 2698d4622a (PSP) Don't depend on global state in input driver 2015-07-10 18:47:56 +02:00
twinaphex 25ffeb1ed9 (Xenon) Don't depend on global state in input driver 2015-07-10 18:45:22 +02:00
twinaphex e2d510e4f6 (GX) No longer depend on global pointer in input driver 2015-07-10 18:44:11 +02:00
twinaphex b6609d576b Build fixes when HAVE_OVERLAY is not defined 2015-07-10 18:37:25 +02:00
twinaphex 8fc5c85589 Move keymaps to input drivers 2015-07-10 09:55:29 +02:00
twinaphex b501e19dc4 input_autodetect.c - cleanup 2015-07-10 09:15:55 +02:00
twinaphex 5e634a48ce (input_autodetect.c) Some C89/C90 build fixes 2015-07-10 09:06:00 +02:00
twinaphex a2c1a3e82b Buildfix 2015-07-10 07:16:21 +02:00
twinaphex feb661754b Make it look at the joypad driver's name for subdirectory instead of
the input driver's name
2015-07-10 07:05:36 +02:00
twinaphex 84066d569c Put #if 0 around unused function 2015-07-10 06:59:14 +02:00
Twinaphex d80915fab8 Merge pull request #1940 from fr500/master
Refactor autoconfig
2015-07-10 06:56:42 +02:00
radius 7b45800ff9 make it look in the top level directory first, if no profiles look in the driver name subdir 2015-07-09 23:51:39 -05:00
radius b79f81a595 remove per platform autoconf profiles, use the global one for now on 2015-07-09 23:17:01 -05:00
radius 15a3aa134a make it look under autoconf\drivername 2015-07-09 23:12:35 -05:00
radius 2f26eac396 declare variables on top 2015-07-09 22:54:49 -05:00
radius cec1f3408f declare variables on top 2015-07-09 22:52:52 -05:00
radius 9d268aba54 refactor input autoconfiguration to use a score system 2015-07-09 22:46:28 -05:00
radius c604b44672 add vid/pid to dinput 2015-07-09 20:39:43 -05:00
Twinaphex 5d6ae90ab9 Merge pull request #1937 from heuripedes/master
(menu_displaylist.c) Add null check to sorting function
2015-07-10 01:30:18 +02:00
Higor Eurípedes a014591dfe (menu_displaylist.c) Add null check to sorting function 2015-07-09 19:43:55 -03:00
twinaphex e99a23a5e2 (Android) More cleanups 2015-07-10 00:36:46 +02:00
twinaphex dc96b4820f (Android) Cleanup android_input.c 2015-07-10 00:27:05 +02:00
twinaphex 2ae9758ead Align some values 2015-07-09 22:24:48 +02:00
twinaphex 34414b5919 Menu toggle should be properly saved now with custom bind - the
forced hack broke all sorts of behavior
2015-07-09 22:16:27 +02:00
twinaphex d7db50e4eb (Android) Cleanups 2015-07-09 21:50:48 +02:00
twinaphex ab604524dc (Android) Get rid of some more hardcoded stuff 2015-07-09 21:39:47 +02:00
Twinaphex ea9d5b56bf Merge pull request #1936 from joolswills/indentation
cosmetic - fix incorrect tab indentation introduced by 141dbabe3d
2015-07-09 21:08:07 +02:00
Jools Wills 9fb753410e cosmetic - fix incorrect tab indentation introduced by 141dbabe3d 2015-07-09 20:03:36 +01:00
twinaphex 80899d45d2 Cleanup some other small leaks to do with config_get_string 2015-07-09 20:16:30 +02:00
twinaphex c82ca15c91 (input_common.c) Fix two small leaks 2015-07-09 19:54:46 +02:00
twinaphex 7867c3ee74 (dinput_joypad.c) Cleanup 2015-07-09 18:45:48 +02:00
Twinaphex b91f310b60 Merge pull request #1934 from fr500/master
Add VID/PID to the joypad struct
2015-07-09 18:44:46 +02:00
twinaphex 14b6a6636b Create menu_video.c 2015-07-09 18:39:40 +02:00
radius af978297e2 fix nits 2015-07-09 11:31:05 -05:00
radius 141dbabe3d add VID/PID to the dinput_joypad struct 2015-07-09 11:29:04 -05:00
twinaphex aa8c8dbaa6 (XMB) Cleanup 2015-07-09 18:28:03 +02:00
twinaphex 8c1a918899 (Android) Cleanup 2015-07-09 18:11:53 +02:00
twinaphex 63c7104ab1 (Android) android_input.c - cleanups 2015-07-09 18:09:45 +02:00
twinaphex d104a878f1 (Android) Code cleanups 2015-07-09 17:55:52 +02:00
twinaphex 7a4f6bcb2d (PS3) Silence some warnings 2015-07-09 08:28:08 +02:00
twinaphex 425948c706 (udev_joypad.c) Alcaro might have inadvertently broken compute_axis
here - see https://github.com/libretro/RetroArch/issues/1900
2015-07-09 07:59:16 +02:00
twinaphex abf7a80f27 (Android) Buildfixes and remove unused variable warnings 2015-07-09 07:48:56 +02:00
twinaphex 954121b99c Kill off some console-only hacks to do with lifecycle state 2015-07-09 06:35:18 +02:00
twinaphex c09cc19cfe Add Menu Toggle Joypad Combo 2015-07-09 06:27:17 +02:00
twinaphex 4cb5d57ede Add 'Hide Overlay In Menu' option 2015-07-09 04:05:59 +02:00
twinaphex 46cdc34b9b Set up groundwork for new mobile-friendly setting 2015-07-09 03:47:07 +02:00
twinaphex 0c11148273 Hide windowed modes based on video_driver_has_windowed true or false 2015-07-09 02:45:37 +02:00
twinaphex 51137d5351 Set pending_scan_finished to false in rarch_main_data_db_uninit 2015-07-09 02:33:46 +02:00
twinaphex 1c406bc098 Add rarch_main_data_pending_scan_finished and other mechanisms
so that the call to menu_environment_cb gets made on main thread
2015-07-09 02:31:46 +02:00
twinaphex 12ca517cf7 (libusb) Cleanups 2015-07-09 01:51:44 +02:00
twinaphex 701b5609d4 (task_overlay.c) Using rarch_main_is_idle here is not thread-safe 2015-07-09 01:16:03 +02:00
twinaphex cdf3ce309e Decouple 'overlay' state from driver_t 2015-07-09 01:10:30 +02:00
twinaphex 387d687ef9 (MSVC) Some MSVC buildfixes 2015-07-09 00:24:10 +02:00
twinaphex 68f400bd9f (runloop_data.c) Cleanup 2015-07-09 00:18:40 +02:00
twinaphex c6fc3eaafd (runloop_data.c) Some refactors 2015-07-09 00:17:20 +02:00
twinaphex 370970e78f Bump default max users up to 5 2015-07-09 00:10:44 +02:00
twinaphex e23499d2b2 (runloop_data.c) Cleanups 2015-07-09 00:01:55 +02:00
twinaphex 51e2a128c5 (runloop data) Don't have to pass around runloop pointer anymore 2015-07-08 23:01:11 +02:00
twinaphex c90072df55 Move lock to task_overlay.c 2015-07-08 22:42:45 +02:00
twinaphex 04b98bebd9 Cut down on header includes 2015-07-08 22:14:31 +02:00
twinaphex 000f9650d7 (task_http.c) Get rid of header include 2015-07-08 22:11:45 +02:00
twinaphex 6f4e53e454 Remove unused variables 2015-07-08 22:04:37 +02:00
twinaphex 52e2fd1689 Refactor task_database.c 2015-07-08 22:03:23 +02:00
twinaphex c84ddb53fa (task_databse.c) Refactors 2015-07-08 21:48:58 +02:00
twinaphex 3605b97c80 Create rarch_main_data_http_uninit 2015-07-08 21:38:22 +02:00
twinaphex dcd5a4fdcc Refactor task_http.c 2015-07-08 21:35:24 +02:00
twinaphex 74627d1497 (task_http.c) Some refactors 2015-07-08 21:18:34 +02:00
twinaphex 82f645ce51 Simplify rarch_main_data_active 2015-07-08 21:13:04 +02:00
twinaphex 84066e1a5d Move all sorts of structs over to task_file_transfer.c 2015-07-08 20:12:20 +02:00
twinaphex 664592b354 Use rarch_main_data_nbio_get_handle and rarch_main_data_nbio_image_get_handle 2015-07-08 20:10:18 +02:00
twinaphex a1a4bc4057 task_file_transfer.c - decouple 'nbio' state from runloop data struct 2015-07-08 20:04:16 +02:00
twinaphex 3aff5a3ee2 Set audio callback function pointers to NULL during uninit_audio -
should fix Dinothawr crash when selecting 'Close Content'
2015-07-08 19:08:43 +02:00
twinaphex c6992b3a6a Make audio_driver_callback and audio_driver_callback_set_state
more robust
2015-07-08 18:57:34 +02:00
twinaphex 4ac38a738f (audio_driver.c) Some cleanups 2015-07-08 18:38:46 +02:00
twinaphex 3de05cbbbb Ability to scroll left/right at 'Scan This Directory' entry 2015-07-08 17:29:46 +02:00
twinaphex f2d20786a4 (RGUI) Indenting nits 2015-07-08 17:27:34 +02:00
twinaphex 54e6048cd2 (GLUI) Indenting nits 2015-07-08 17:26:51 +02:00
twinaphex 82cd8263dc (XMB) Indenting nits (again) in xmb.c 2015-07-08 17:26:23 +02:00
twinaphex c4617f0f6b (libretro_version_1.c) Style nits 2015-07-08 17:22:35 +02:00
twinaphex 1cc1f6d782 (video_driver.c) Style nits 2015-07-08 17:19:14 +02:00
twinaphex 66ac83cfed Set max users by default to 4 2015-07-08 17:13:59 +02:00
twinaphex 21ea7c74e9 Make audio latency go up in steps of 16 2015-07-08 17:04:59 +02:00
twinaphex 08b56582b2 (task_file_transfer.c) Add workaround for bogus file transfer requests 2015-07-08 16:52:40 +02:00
twinaphex cbc79e0d67 Start adding preliminary bundle extraction code 2015-07-08 16:45:04 +02:00
twinaphex e3661c1e3d menu_init - Set help_screen_type to default 2015-07-08 05:48:03 +02:00
twinaphex bfb996dbcd Start refactoring action_iterate_help 2015-07-08 05:45:43 +02:00
twinaphex a59fd029b1 Send APK path as param too 2015-07-08 02:42:19 +02:00
Twinaphex b6760e27fb Merge pull request #1927 from micechal/patch-3
Added Polish translation
2015-07-08 01:06:09 +02:00
twinaphex 039ba91c48 Add mechanism so that task_database informs the menu driver that
we need to refresh the horizontal list. Kivutar; make the icons
work again after we do a horizontal list refresh
2015-07-08 01:01:41 +02:00
twinaphex f2a608b131 Create menu_environ callback 2015-07-08 00:37:44 +02:00
Michał Durak 5292c80e59 Added Polish translation 2015-07-08 00:16:38 +02:00
Twinaphex 908eafa604 Merge pull request #1925 from fr500/master
add functions to look for certain extra folders that may be useful to…
2015-07-07 22:59:06 +02:00
twinaphex f97965f43b Remove some dead code now 2015-07-07 22:46:32 +02:00
radius 610d316852 path had been changed to app_dir 2015-07-07 15:38:00 -05:00
radius 5cb8a0793c make screenshots save in the pictures folder 2015-07-07 15:36:37 -05:00
twinaphex 648b9cf341 (Android) Remove some now-obsolete content icons 2015-07-07 22:24:49 +02:00
twinaphex 6a6b419ddb (Android) Add screenshot dir default dir 2015-07-07 22:04:25 +02:00
radius cccc221e8c fix search & replace error 2015-07-07 14:56:01 -05:00
radius 3c5fe79df8 rename a few variables 2015-07-07 14:48:09 -05:00
radius 57ee3c0c33 rename a few variables 2015-07-07 14:38:39 -05:00
twinaphex 7921d1d1e9 Remove some code in UserPreferences.java 2015-07-07 21:36:09 +02:00
twinaphex 0350e0a495 (Android) Kill off more Java code 2015-07-07 21:26:12 +02:00
twinaphex f6abb8360f (Java) Remove more code 2015-07-07 21:14:59 +02:00
radius 6801a0de28 move variable declaration 2015-07-07 13:58:15 -05:00
radius 161a7166c5 set default downloads path to internal sdcard Downloads folder if available 2015-07-07 13:54:32 -05:00
radius 6eca7858fc fix nits 2015-07-07 13:33:02 -05:00
radius 3d348edcb3 add functions to look for certain extra folders that may be useful to set sane defaults 2015-07-07 13:31:59 -05:00
twinaphex a07c8cd551 Remove unused variable 2015-07-07 20:13:22 +02:00
Twinaphex ff06f20251 Merge pull request #1922 from lakkatv/glui
(GLUI) Use dpi on mobile platforms only. For desktop, remain proporti…
2015-07-07 20:09:51 +02:00
twinaphex c06defe102 (Android) Remove some more no longer used files 2015-07-07 20:09:13 +02:00
Jean-André Santoni be51f54ab5 (GLUI) remove that reference to 1920, and use a ratio such as the font size will be 32px on a 1920x1080 display like on XMB 2015-07-08 01:01:28 +07:00
twinaphex c0a7d10ec0 (Android) Start throwing away most Java-based code 2015-07-07 19:55:42 +02:00
Twinaphex 08760b626b Merge pull request #1918 from lakkatv/xmb
(XMB) Refresh horizontal menu
2015-07-07 18:30:42 +02:00
Twinaphex bab4760794 Merge pull request #1919 from jeapostrophe/master
(iOS) Menu animations
2015-07-07 18:30:34 +02:00
Jay McCarthy 2b3ff002bd add menu transition animations 2015-07-07 11:16:58 -04:00
Jay McCarthy 231a5ea250 protect against crash in ios simulator (presumably because display is off) 2015-07-07 11:16:48 -04:00
Jean-André Santoni 142941d950 (XMB) Refresh horizontal menu 2015-07-07 17:04:03 +07:00
twinaphex 39772de535 Add Polish (ISO-8859-2) 2015-07-07 02:56:27 +02:00
radius d3fb5cc3ee save sorting: prevent corename getting added over and over when loading game-less cores 2015-07-06 18:29:05 -05:00
Twinaphex 1a4127abad Merge pull request #1916 from heuripedes/master
(XMB) Remove playlist extension from title
2015-07-07 00:54:00 +02:00
Higor Eurípedes 41a77639e3 (XMB) Remove playlist extension from title 2015-07-06 19:52:04 -03:00
Twinaphex 7f6ec7ce16 Merge pull request #1915 from heuripedes/master
(GLUI) Remove early return in glui_frame()
2015-07-07 00:42:09 +02:00
Higor Eurípedes 08c759a16e (GLUI) Remove early return in glui_frame()
This is not needed anymore as CPU usage has been greatly reduced by
changes introduced in the last 4-6 weeks.
2015-07-06 19:33:28 -03:00
twinaphex 8aa383463a Cleanup action_start_video_resolution 2015-07-07 00:30:34 +02:00
twinaphex 0fa61b3ade Fix menu_cbs_start.c warning 2015-07-07 00:28:22 +02:00
radius 2aa7c46e78 change the approach to wii resolution changing, this is more stable 2015-07-06 16:07:33 -05:00
Jean-André Santoni 457ffd3dd8 (GLUI) Use dpi on mobile platforms only. For desktop, remain proportional to screen width like XMB. 2015-07-07 01:36:53 +07:00
Twinaphex eadaad57da Merge pull request #1913 from lakkatv/xmb
(XMB) Smarter tickering
2015-07-06 15:57:56 +02:00
Jean-André Santoni aec9bbc9f5 (XMB) Smarter tickering 2015-07-06 20:34:28 +07:00
Twinaphex cb226e5611 Merge pull request #1912 from lakkatv/glui
(GLUI) Scale all widgets to the screen width in windowed mode. Re-lay…
2015-07-06 15:31:32 +02:00
Jean-André Santoni b45441d4c9 (GLUI) Scale all widgets to the screen width in windowed mode. Re-layout in context reset. 2015-07-06 19:38:34 +07:00
Twinaphex f149db6173 Merge pull request #1905 from heuripedes/master
(string_list.c) Initialize data after realloc()ing the list
2015-07-06 11:27:47 +02:00
Twinaphex 1caa441dbf Merge pull request #1911 from fr500/master
Implement wii custom resolution saving
2015-07-06 11:26:43 +02:00
radius 8a0f47f6d1 make start reset to the default resolution 2015-07-06 00:50:11 -05:00
radius c71c93efbd fix typo 2015-07-06 00:46:27 -05:00
radius 56b71a8d82 make start reset to the default resolution 2015-07-06 00:44:49 -05:00
radius 84fe1b0376 remove function we won't be using 2015-07-06 00:31:40 -05:00
radius d09490789a implement wii resolution saving 2015-07-06 00:29:51 -05:00
Higor Eurípedes 8c9c1df64b (string_list.c) Initialize data after realloc()ing the list 2015-07-05 20:13:26 -03:00
twinaphex 49e35a5bcf ToadKing's 'cooldown' hack causes too many problems - try
different way of guarding against button A/B reacting too
quickly
2015-07-06 00:49:24 +02:00
Twinaphex 044ef3d3f4 Merge pull request #1902 from fr500/master
change it so it can be changed at runtime instead of a compile time o…
2015-07-06 00:15:46 +02:00
Twinaphex 792ee4459c Merge pull request #1904 from heuripedes/master
Fix #1899
2015-07-05 21:55:14 +02:00
Higor Eurípedes 4bc2941c99 (command_event.c) Fix noncompliant behavior on core initialization 2015-07-05 16:49:08 -03:00
Higor Eurípedes 67448cafaf (command_event.c) No need to call rarch_environment_cb during core deinit 2015-07-05 16:38:56 -03:00
Higor Eurípedes 9ab86c64ba (dynamic) Set retro function pointers to NULL on uninit 2015-07-05 16:32:30 -03:00
radius af916ccab7 change it so it can be changed at runtime instead of a compile time option 2015-07-05 14:13:22 -05:00
Twinaphex 4e59fe67d0 Merge pull request #1898 from fr500/master
Hide recording stuff on targets that do not have FFMPEG
2015-07-05 20:56:37 +02:00
radius 3b53633e5b Merge branch 'master' of github.com:fr500/RetroArch 2015-07-05 14:54:24 -04:00
radius 827f32b2d1 make saving to <content dir> possible again 2015-07-05 14:54:15 -04:00
Twinaphex 4d4f56ec9a Merge pull request #1901 from heuripedes/master
Fix  #1894
2015-07-05 15:59:54 +02:00
Higor Eurípedes a3aab2f98e (task_database) Dont call zlib_parse_file_iterate_stop so much 2015-07-05 10:40:51 -03:00
Higor Eurípedes 3cc6e07174 (task_database) Fix leaks when scanning zip files 2015-07-05 10:23:21 -03:00
Higor Eurípedes b133499071 (qb) Add toggle for MMAP support 2015-07-05 09:39:06 -03:00
radius 671c49d970 hide ffmpeg directory settings if ffmpeg support is not compiled in 2015-07-05 00:08:09 -05:00
radius 4e0b93f445 hide recording settings if ffmpeg support is not compiled in 2015-07-05 00:05:01 -05:00
Toad King fea509a643 disable debugging 2015-07-04 19:34:01 -05:00
twinaphex a9f398c0c4 (Android) Change default autoconfig dir to 'autoconfig' 2015-07-05 02:30:49 +02:00
Toad King ed756f279f [Android] only need sdk v21 2015-07-04 18:27:56 -05:00
Toad King 4d56dd000e [Android] bump sdk versions 2015-07-04 18:26:13 -05:00
radius ef3d6ffaae Merge branch 'master' of github.com:libretro/RetroArch 2015-07-04 18:13:18 -05:00
radius 394cdf9c7c psp buildfix 2015-07-04 18:11:48 -05:00
Toad King 2c3373ddea [Android] SDK bump needed for android tv banner 2015-07-04 18:06:11 -05:00
Toad King 6405c9b3ed android tv additions 2015-07-04 17:59:35 -05:00
237 changed files with 13482 additions and 6715 deletions

No files matched your search

+8 -4
View File
@@ -120,6 +120,7 @@ OBJ += frontend/frontend.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 \
@@ -140,6 +141,7 @@ OBJ += frontend/frontend.o \
audio/audio_driver.o \
input/input_driver.o \
input/input_hid_driver.o \
gfx/video_common.o \
gfx/video_driver.o \
gfx/video_pixel_converter.o \
gfx/video_viewport.o \
@@ -249,10 +251,6 @@ ifeq ($(HAVE_PYTHON), 1)
endif
endif
ifeq ($(OSX), 1)
DEFINES += -Wno-invalid-source-encoding
endif
ifeq ($(HAVE_EMSCRIPTEN), 1)
OBJ += frontend/drivers/platform_emscripten.o \
input/drivers/rwebinput_input.o \
@@ -398,6 +396,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
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.o \
menu/menu_input.o \
@@ -406,6 +405,7 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/menu_navigation.o \
menu/menu_setting.o \
menu/menu_shader.o \
menu/menu_video.o \
menu/menu_cbs.o \
menu/cbs/menu_cbs_ok.o \
menu/cbs/menu_cbs_cancel.o \
@@ -430,6 +430,10 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/drivers/null.o
endif
ifeq ($(HAVE_STB_FONT), 1)
OBJ += gfx/drivers_font_renderer/stb.o
endif
ifeq ($(HAVE_FREETYPE), 1)
OBJ += gfx/drivers_font_renderer/freetype.o
LIBS += $(FREETYPE_LIBS)
+1 -1
View File
@@ -122,7 +122,7 @@ HAVE_7ZIP := 1
HAVE_RPNG := 1
HAVE_RPNG := 1
HAVE_OVERLAY := 1
HAVE_LIBSICKSAXIS := 0
HAVE_LIBSICKSAXIS := 1
HAVE_BUILTIN_AUTOCONFIG := 1
else ifeq ($(platform), psp1)
CC = psp-gcc$(EXE_EXT)
+3 -3
View File
@@ -68,7 +68,7 @@ ifeq ($(HAVE_RLAUNCH), 1)
DEFINES += -DHAVE_RLAUNCH
endif
DEFINES += -DHAVE_RMENU -DHAVE_MENU -DHAVE_RGUI -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_GLUI -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_STB_FONT
ifeq ($(HAVE_GCMGL), 1)
DEFINES += -DHAVE_GCMGL
@@ -81,8 +81,8 @@ ifeq ($(HAVE_FREETYPE), 1)
DEFINES += -DHAVE_FREETYPE
FONT_LIBS := -lfontFT_stub -lfreetype_stub
else
DEFINES += -DHAVE_LIBDBGFONT
FONT_LIBS := -ldbgfont
#DEFINES += -DHAVE_LIBDBGFONT
#FONT_LIBS := -ldbgfont
endif
ifeq ($(CELL_BUILD_TOOLS), SNC)
+1
View File
@@ -27,6 +27,7 @@ HAVE_SDL2 := 0
HAVE_RSOUND := 0
HAVE_PYTHON := 0
HAVE_STB_FONT := 1
HAVE_FREETYPE := 1
HAVE_FFMPEG := 0
-1
View File
@@ -5,6 +5,5 @@
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="lib" path="libs/jsoup-1.8.1.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
+10 -11
View File
@@ -1,26 +1,30 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.retroarch"
android:versionCode="37"
android:versionName="1.2" android:installLocation="preferExternal">
android:versionCode="42"
android:versionName="1.2.2"
android:installLocation="preferExternal">
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.gamepad" android:required="false"/>
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:hasCode="true">
android:hasCode="true"
android:banner="@drawable/banner"
android:debuggable="false">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<activity android:name="com.retroarch.browser.DisplayRefreshRateTest"/>
<activity android:name="com.retroarch.browser.mainmenu.MainMenuActivity" android:exported="true" android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -29,11 +33,6 @@
<category android:name="tv.ouya.intent.category.GAME" />
</intent-filter>
</activity>
<activity android:name="com.retroarch.browser.FileWrapper"/>
<activity android:name="com.retroarch.browser.preferences.PreferenceActivity" android:theme="@style/Theme.AppCompat" />
<activity android:name="com.retroarch.browser.coremanager.CoreManagerActivity" android:theme="@style/Theme.AppCompat"/>
<activity android:name="com.retroarch.browser.retroactivity.RetroActivityFuture" android:exported="true" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:launchMode="singleInstance">
<meta-data android:name="android.app.lib_name" android:value="retroarch-activity" />
<meta-data android:name="android.app.func_name" android:value="ANativeActivity_onCreate" />
+1 -1
View File
@@ -58,7 +58,7 @@ else
endif
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -fno-stack-protector -funroll-loops -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_GLUI -DHAVE_XMB -std=gnu99 -DHAVE_LIBRETRODB
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -fno-stack-protector -funroll-loops -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_GLUI -DHAVE_XMB -std=gnu99 -DHAVE_LIBRETRODB -DHAVE_STB_FONT
LOCAL_CFLAGS += -DHAVE_7ZIP
ifeq ($(NDK_DEBUG),1)
@@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
target=android-21
android.library=true
@@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
target=android-21
android.library=true
Binary file not shown.
+1 -1
View File
@@ -11,7 +11,7 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
target=android-21
android.library.reference.1=libs/appcompat
android.library=false
android.library.reference.2=libs/googleplay
Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

-56
View File
@@ -7,62 +7,6 @@
android:key="resumeContentPref"
android:title="@string/resume_content"/>
<!-- Load Core -->
<Preference
android:key="loadCorePref"
android:title="@string/load_core"/>
<!-- Load Content -->
<Preference
android:key="loadContentPref"
android:title="@string/load_content"/>
<!-- Load Content (Auto) -->
<Preference
android:key="loadContentAutoPref"
android:title="@string/load_content_auto"/>
<!-- Settings -->
<Preference android:title="@string/settings">
<intent
android:targetClass="com.retroarch.browser.preferences.PreferenceActivity"
android:targetPackage="com.retroarch" />
</Preference>
<!-- About -->
<PreferenceScreen android:title="@string/about">
<PreferenceCategory android:title="@string/websites">
<Preference android:title="@string/retro_website"
android:summary="@string/retro_website_desc">
<intent
android:action="android.intent.action.VIEW"
android:data="http://www.libretro.com" />
</Preference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/manuals">
<Preference android:title="@string/retroarch_guide"
android:summary="@string/retroarch_guide_desc">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/libretro/libretro.github.com/blob/master/tex/retroarch-enduserguide.pdf" />
</Preference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/development">
<Preference android:title="@string/libretro_guide"
android:summary="@string/libretro_guide_desc">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/libretro/libretro.github.com/blob/master/tex/retroarch-enduserguide.pdf" />
</Preference>
<Preference android:title="@string/overlay_guide"
android:summary="@string/overlay_guide_desc">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/libretro/libretro.github.com/blob/master/documents/overlay.pdf" />
</Preference>
</PreferenceCategory>
</PreferenceScreen>
<!-- Quit RetroArch -->
<Preference
android:key="quitRetroArch"
@@ -1,107 +0,0 @@
package com.retroarch.browser;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import com.retroarch.R;
import com.retroarch.browser.mainmenu.MainMenuActivity;
import com.retroarch.browser.preferences.util.UserPreferences;
/**
* {@link ListFragment} subclass that displays the list
* of selectable cores for emulating games.
*/
public final class CoreSelection extends DialogFragment
{
private IconAdapter<ModuleWrapper> adapter;
/**
* Creates a statically instantiated instance of CoreSelection.
*
* @return a statically instantiated instance of CoreSelection.
*/
public static CoreSelection newInstance()
{
return new CoreSelection();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Inflate the ListView we're using.
final ListView coreList = (ListView) inflater.inflate(R.layout.line_list, container, false);
coreList.setOnItemClickListener(onClickListener);
// Set the title of the dialog
getDialog().setTitle(R.string.select_libretro_core);
final String cpuInfo = UserPreferences.readCPUInfo();
final boolean cpuIsNeon = cpuInfo.contains("neon");
// Populate the list
final List<ModuleWrapper> cores = new ArrayList<ModuleWrapper>();
final File[] libs = new File(getActivity().getApplicationInfo().dataDir, "cores").listFiles();
for (final File lib : libs) {
String libName = lib.getName();
// Never append a NEON lib if we don't have NEON.
if (libName.contains("neon") && !cpuIsNeon)
continue;
// If we have a NEON version with NEON capable CPU,
// never append a non-NEON version.
if (cpuIsNeon && !libName.contains("neon"))
{
boolean hasNeonVersion = false;
for (final File lib_ : libs)
{
String otherName = lib_.getName();
String baseName = libName.replace(".so", "");
if (otherName.contains("neon") && otherName.startsWith(baseName))
{
hasNeonVersion = true;
break;
}
}
if (hasNeonVersion)
continue;
}
cores.add(new ModuleWrapper(getActivity(), lib));
}
// Sort the list of cores alphabetically
Collections.sort(cores);
// Initialize the IconAdapter with the list of cores.
adapter = new IconAdapter<ModuleWrapper>(getActivity(), R.layout.line_list_item, cores);
coreList.setAdapter(adapter);
return coreList;
}
private final OnItemClickListener onClickListener = new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> listView, View view, int position, long id)
{
final ModuleWrapper item = adapter.getItem(position);
((MainMenuActivity)getActivity()).setModule(item.getUnderlyingFile().getAbsolutePath(), item.getText());
UserPreferences.updateConfigFile(getActivity());
dismiss();
}
};
}
@@ -1,129 +0,0 @@
package com.retroarch.browser;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import com.retroarch.R;
import com.retroarch.browser.preferences.util.UserPreferences;
import android.app.Activity;
import android.content.SharedPreferences;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.util.Log;
import android.view.WindowManager;
import android.widget.Toast;
/**
* {@link Activity} subclass that provides the functionality
* for the refresh rate testing for device displays.
*/
public final class DisplayRefreshRateTest extends Activity {
private class Renderer implements GLSurfaceView.Renderer {
private static final String TAG = "GLESRenderer";
private static final double WARMUP_SECONDS = 2.0;
private static final double TEST_SECONDS = 10.0;
// Test states
private static final int STATE_START = 0;
private static final int STATE_WARMUP = 1;
private static final int STATE_TEST = 2;
private static final int STATE_DONE = 3;
private static final int STATE_DEAD = 4;
private int mState = STATE_START;
private double mStartTime = 0.0;
private int mNumFrames = 0;
private Activity activity;
public Renderer(Activity activity) {
this.activity = activity;
}
private void setFPSSetting(double fps) {
SharedPreferences prefs = UserPreferences.getPreferences(DisplayRefreshRateTest.this);
SharedPreferences.Editor edit = prefs.edit();
edit.putString("video_refresh_rate", Double.toString(fps));
edit.apply();
}
@Override
public void onDrawFrame(GL10 gl) {
double t = System.nanoTime() * 1.0e-9;
switch (mState) {
case STATE_START:
mStartTime = t;
mState = STATE_WARMUP;
break;
case STATE_WARMUP:
if ((t - mStartTime) >= WARMUP_SECONDS) {
mStartTime = t;
mNumFrames = 0;
mState = STATE_TEST;
}
break;
case STATE_TEST:
mNumFrames++;
double elapsed = t - mStartTime;
if (elapsed >= TEST_SECONDS) {
double fps = (double)mNumFrames / elapsed;
Log.i(TAG, "Measured FPS to: " + fps);
setFPSSetting(fps);
mState = STATE_DONE;
}
break;
case STATE_DONE:
activity.runOnUiThread(new Runnable() {
public void run() {
finish();
}
});
mState = STATE_DEAD;
break;
case STATE_DEAD:
break;
}
float luma = (float)Math.sin((double)mNumFrames * 0.10);
luma *= 0.2f;
luma += 0.5f;
GLES20.glClearColor(luma, luma, luma, 1.0f);
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
}
@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
// TODO Auto-generated method stub
}
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
// TODO Auto-generated method stub
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Toast.makeText(this, R.string.touch_screen_with_fingers, Toast.LENGTH_LONG).show();
final GLSurfaceView surfaceView = new GLSurfaceView(this);
surfaceView.setEGLContextClientVersion(2);
surfaceView.setRenderer(new Renderer(this));
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setTitle(R.string.refresh_rate_calibration);
setContentView(surfaceView);
}
@Override
protected void onDestroy() {
SharedPreferences prefs = UserPreferences.getPreferences(this);
String fps = prefs.getString("video_refresh_rate", "ERROR");
Toast.makeText(this, String.format(getString(R.string.refresh_rate_measured_to), fps), Toast.LENGTH_LONG).show();
super.onDestroy();
}
}
@@ -1,111 +0,0 @@
package com.retroarch.browser;
import java.io.File;
import com.retroarch.R;
import android.graphics.drawable.Drawable;
public final class FileWrapper implements IconAdapterItem, Comparable<FileWrapper> {
public static final int DIRSELECT = 0;
public static final int PARENT = 1;
public static final int FILE = 2;
private final File file;
private final boolean parentItem;
private final boolean dirSelectItem;
private final boolean enabled;
private final int typeIndex;
public FileWrapper(File file, int type, boolean isEnabled) {
this.file = file;
this.parentItem = (type == PARENT);
this.dirSelectItem = (type == DIRSELECT);
this.typeIndex = (type == FILE) ? (FILE + (file.isDirectory() ? 0 : 1)) : type;
this.enabled = parentItem || dirSelectItem || isEnabled;
}
@Override
public boolean isEnabled() {
return enabled;
}
@Override
public String getText() {
if (dirSelectItem)
return "[[Use this directory]]";
else if (parentItem)
return "[Parent Directory]";
else
return file.getName();
}
@Override
public String getSubText() {
return null;
}
@Override
public int getIconResourceId() {
if (!parentItem && !dirSelectItem) {
return file.isFile() ? R.drawable.ic_file : R.drawable.ic_dir;
} else {
return R.drawable.ic_dir;
}
}
@Override
public Drawable getIconDrawable() {
return null;
}
/**
* Checks whether or not the wrapped {@link File} is
* the "Parent Directory" item in the file browser.
*
* @return true if the wrapped {@link File} is the "Parent Directory"
* item in the file browser; false otherwise.
*/
public boolean isParentItem() {
return parentItem;
}
/**
* Checks whether or not the wrapped {@link File}
* is the "use this directory" item.
*
* @return true if the wrapped {@link File} is the "Use this directory"
* item in the file browser; false otherwise.
*/
public boolean isDirSelectItem() {
return dirSelectItem;
}
/**
* Gets the file wrapped by this FileWrapper.
*
* @return the file wrapped by this FileWrapper.
*/
public File getFile() {
return file;
}
@Override
public int compareTo(FileWrapper other) {
if (other != null) {
// Who says ternary is hard to follow
if (isEnabled() == other.isEnabled()) {
return (typeIndex == other.typeIndex) ? file
.compareTo(other.file)
: ((typeIndex < other.typeIndex) ? -1 : 1);
} else {
return isEnabled() ? -1 : 1;
}
}
return -1;
}
}
@@ -1,152 +0,0 @@
package com.retroarch.browser;
import java.util.List;
import com.retroarch.R;
import android.content.*;
import android.graphics.drawable.*;
import android.view.*;
import android.widget.*;
/**
* Represents an item that is capable
* of being within an {@link IconAdapter}.
*/
interface IconAdapterItem {
/**
* Gets whether or not this item is
* enabled within the adapter.
* <p>
* This can be used for deciding whether or
* not to enable an item in a {@link ListView}
* if an IconAdapter is backing it.
*
* @return true if this item is enabled; false otherwise.
*/
public boolean isEnabled();
/**
* Gets the title text of this IconAdapterItem.
*
* @return the title text of this IconAdapterItem.
*/
public String getText();
/**
* Gets the subtitle text of this IconAdapterItem.
*
* @return the subtitle text of this IconAdapterItem.
*/
public String getSubText();
/**
* Gets the resource ID of the icon to display
* alongside the text in this IconAdapterItem.
* <p>
* Returning zero means no icon is to be displayed.
*
* @return the resource ID of this IconAdapterItem's icon.
*/
public int getIconResourceId();
/**
* Gets the actual {@link Drawable} object that represents
* the icon that is displayed with this IconAdapterItem.
* <p>
* Returning null means no icon is to be displayed.
*
* @return the actual {@link Drawable} of this IconAdapterItem's icon.
*/
public Drawable getIconDrawable();
}
/**
* An {@link ArrayAdapter} derivative that can back a {@link View}
* that accepts ArrayAdapters. Items within this ArrayAdapter derivative
* must implement the {@link IconAdapterItem} interface.
*
* @param <T> The type of the item that will be within this IconAdapter.
* This type must implement the {@link IconAdapterItem} interface.
*/
public final class IconAdapter<T extends IconAdapterItem> extends ArrayAdapter<T> {
private final int resourceId;
private final Context context;
/**
* Constructor
*
* @param context The current {@link Context}.
* @param resourceId The resource ID for a layout file containing a layout to use when instantiating views.
*/
public IconAdapter(Context context, int resourceId) {
super(context, resourceId);
this.context = context;
this.resourceId = resourceId;
}
/**
* Constructor
*
* @param context The current {@link Context}.
* @param resourceId The resource ID for a layout file containing a layout to use when instantiating views.
* @param items The list of items to store within this IconAdapter.
*/
public IconAdapter(Context context, int resourceId, List<T> items) {
super(context, resourceId, items);
this.context = context;
this.resourceId = resourceId;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// Build the view
if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(context);
convertView = inflater.inflate(resourceId, parent, false);
}
// Fill the view
IconAdapterItem item = getItem(position);
final boolean enabled = item.isEnabled();
TextView title = (TextView) convertView.findViewById(R.id.name);
if (title != null) {
title.setText(item.getText());
title.setEnabled(enabled);
}
TextView subtitle = (TextView) convertView.findViewById(R.id.sub_name);
if (subtitle != null) {
String subText = item.getSubText();
if (subText != null) {
subtitle.setVisibility(View.VISIBLE);
subtitle.setEnabled(item.isEnabled());
subtitle.setText(subText);
}
}
ImageView imageView = (ImageView) convertView.findViewById(R.id.icon);
if (imageView != null) {
if (enabled) {
final int id = item.getIconResourceId();
if (id != 0) {
imageView.setImageResource(id);
} else {
imageView.setImageDrawable(item.getIconDrawable());
}
} else {
imageView.setImageDrawable(null);
}
}
return convertView;
}
@Override
public boolean isEnabled(int aPosition) {
return getItem(aPosition).isEnabled();
}
}
@@ -1,261 +0,0 @@
package com.retroarch.browser;
import com.retroarch.browser.preferences.util.ConfigFile;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import android.content.Context;
import android.graphics.drawable.Drawable;
/**
* Wrapper class that encapsulates a libretro core
* along with information about said core.
*/
public final class ModuleWrapper implements IconAdapterItem, Comparable<ModuleWrapper>
{
private final File file;
private final String displayName;
private final String coreName;
private final String manufacturer;
private final String systemName;
private final String license;
private final List<String> authors;
private final List<String> supportedExtensions;
private final List<String> permissions;
/**
* Constructor
*
* @param context The current {@link Context}.
* @param file The {@link File} instance of the core being wrapped.
*/
public ModuleWrapper(Context context, File file)
{
this.file = file;
// Attempt to get the core's info file.
// Basically this is dataDir/info/[core name].info
// So first, since the core name will have a platform-specific identifier at the end of its name, we trim this.
// If it turns out we have an invalid core name, simply assign the core name as the full name of the file.
final boolean isValidCoreName = (file.getName().lastIndexOf("_libretro.so") != -1);
final String coreName = (isValidCoreName) ? file.getName().substring(0, file.getName().lastIndexOf(".so"))
: file.getName();
// Now get the directory where all of the info files are kept (dataDir/info)
final String infoFileDir = context.getApplicationInfo().dataDir + File.separator + "info";
// Now, based off of the trimmed core name, we can get the core info file.
// and attempt to read it as a config file (since it has the same key-value layout).
final String infoFilePath = infoFileDir + File.separator + coreName + ".info";
if (new File(infoFilePath).exists())
{
final ConfigFile infoFile = new ConfigFile(infoFilePath);
// Now read info out of the info file. Make them an empty string if the key doesn't exist.
this.displayName = (infoFile.keyExists("display_name")) ? infoFile.getString("display_name") : "N/A";
this.coreName = (infoFile.keyExists("corename")) ? infoFile.getString("corename") : "N/A";
this.systemName = (infoFile.keyExists("systemname")) ? infoFile.getString("systemname") : "N/A";
this.manufacturer = (infoFile.keyExists("manufacturer")) ? infoFile.getString("manufacturer") : "N/A";
this.license = (infoFile.keyExists("license")) ? infoFile.getString("license") : "N/A";
// Getting supported extensions and authors is a little different.
// We need to split at every '|' character, since it is
// the delimiter for a new extension that the core supports.
//
// Cores that don't have multiple extensions supported
// don't contain the '|' delimiter, so we just create a String list
// and just directly assign the retrieved extensions to it.
final String supportedExts = infoFile.getString("supported_extensions");
if (supportedExts != null && supportedExts.contains("|"))
{
this.supportedExtensions = new ArrayList<String>(Arrays.asList(supportedExts.split("\\|")));
}
else
{
this.supportedExtensions = new ArrayList<String>();
this.supportedExtensions.add(supportedExts);
}
final String emuAuthors = infoFile.getString("authors");
if (emuAuthors != null && emuAuthors.contains("|"))
{
this.authors = new ArrayList<String>(Arrays.asList(emuAuthors.split("\\|")));
}
else
{
this.authors = new ArrayList<String>();
this.authors.add(emuAuthors);
}
final String permissions = infoFile.getString("permissions");
if (permissions != null && permissions.contains("|"))
{
this.permissions = new ArrayList<String>(Arrays.asList(permissions.split("\\|")));
}
else
{
this.permissions = new ArrayList<String>();
this.permissions.add(permissions);
}
}
else // No info file.
{
this.displayName = "N/A";
this.systemName = "N/A";
this.manufacturer = "N/A";
this.license = "N/A";
this.authors = new ArrayList<String>();
this.supportedExtensions = new ArrayList<String>();
this.coreName = coreName;
this.permissions = new ArrayList<String>();
}
}
/**
* Same as the original constructor, but allows for string paths.
*
* @param context The current {@link Context}.
* @param path Path to the file to encapsulate.
*/
public ModuleWrapper(Context context, String path)
{
this(context, new File(path));
}
/**
* Gets the underlying {@link File} instance for this ModuleWrapper.
*
* @return the underlying {@link File} instance for this ModuleWrapper.
*/
public File getUnderlyingFile()
{
return file;
}
/**
* Gets the display name for this wrapped core.
*
* @return the display name for this wrapped core.
*/
public String getDisplayName()
{
return displayName;
}
/**
* Gets the internal core name for this wrapped core.
*
* @return the internal core name for this wrapped core.
*/
public String getInternalName()
{
return coreName;
}
/**
* Gets the name of the system that is emulated by this wrapped core.
* (optional - in case core is an emulator)
*
* @return the name of the system that is emulated by this wrapped core.
*/
public String getEmulatedSystemName()
{
return systemName;
}
/**
* Gets the license that this core is protected under.
*
* @return the license that this core is protected under.
*/
public String getCoreLicense()
{
return license;
}
/**
* Gets the name of the manufacturer of the console that
* this core emulates. (optional - in case core is an
* emulator)
*
* @return the name of the manufacturer of the console that
* this core emulates. (optional)
*/
public String getManufacturer()
{
return manufacturer;
}
/**
* Gets the list of authors of this core.
*
* @return the list of authors of this core.
*/
public List<String> getAuthors()
{
return authors;
}
/**
* Gets the list of permissions of this core.
*
* @return the list of authors of this core.
*/
public List<String> getPermissions()
{
return permissions;
}
/**
* Gets the List of supported extensions for this core.
*
* @return the List of supported extensions for this core.
*/
public List<String> getSupportedExtensions()
{
return supportedExtensions;
}
@Override
public boolean isEnabled()
{
return true;
}
@Override
public String getText()
{
return coreName;
}
@Override
public String getSubText()
{
return systemName;
}
@Override
public int getIconResourceId()
{
return 0;
}
@Override
public Drawable getIconDrawable()
{
return null;
}
@Override
public int compareTo(ModuleWrapper other)
{
if(coreName != null)
return coreName.toLowerCase().compareTo(other.coreName.toLowerCase());
else
throw new NullPointerException("The name of this ModuleWrapper is null");
}
}
@@ -1,346 +0,0 @@
package com.retroarch.browser.dirfragment;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.Settings;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.retroarch.R;
import com.retroarch.browser.FileWrapper;
import com.retroarch.browser.IconAdapter;
import com.retroarch.browser.ModuleWrapper;
import com.retroarch.browser.mainmenu.MainMenuFragment;
import com.retroarch.browser.preferences.util.UserPreferences;
import com.retroarch.browser.retroactivity.RetroActivityFuture;
import com.retroarch.browser.retroactivity.RetroActivityPast;
/**
* {@link DirectoryFragment} that implements core autodetect.
* <p>
* Basically, how it works is the user selects a file.
* Then, we iterate over all the cores and check what their supported extensions are.
* Then, if any cores contain the supported extension, they are added to a list and
* displayed to the user to choose from.
* <p>
* The only exception is if only one core matches the extension of the chosen file.
* In this case, we just attempt to launch the core with that file directly.
*/
// TODO: This is ugly as hell. Clean this up sometime.
// For example, maybe breaking this out into two fragments
// to handle the behavior would be better. One for browsing,
// one for handling the list of selectable cores.
public final class DetectCoreDirectoryFragment extends DirectoryFragment
{
private ListView backingListView = null;
private boolean inFileBrowser = true;
private ArrayList<String> supportedCorePaths = new ArrayList<String>();
/**
* Retrieves a new instance of a DetectCoreDirectoryFragment
* with a title specified by the given resource ID.
*
* @param titleResId String resource ID for the title
* of this DetectCoreDirectoryFragment.
*
* @return A new instance of a DetectCoreDirectoryFragment.
*/
public static DetectCoreDirectoryFragment newInstance(int titleResId)
{
final DetectCoreDirectoryFragment dFrag = new DetectCoreDirectoryFragment();
final Bundle bundle = new Bundle();
bundle.putInt("titleResId", titleResId);
dFrag.setArguments(bundle);
return dFrag;
}
/**
* Returns everything after the last ‘.’ of the given file name or path.
*/
private static String getFileExt(String filePath)
{
int i = filePath.lastIndexOf('.');
if (i >= 0)
return filePath.substring(i+1).toLowerCase();
return ""; // No extension
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
backingListView = (ListView) inflater.inflate(R.layout.line_list, container, false);
backingListView.setOnItemClickListener(onItemClickListener);
// Get whether or not we were in the file browser prior to recreation.
if (savedInstanceState != null)
{
inFileBrowser = savedInstanceState.getBoolean("inFileBrowser");
if (inFileBrowser)
backStack = savedInstanceState.getParcelableArrayList("BACKSTACK");
}
// Set the dialog title.
if (inFileBrowser)
getDialog().setTitle(getArguments().getInt("titleResId"));
else
getDialog().setTitle(R.string.multiple_cores_detected);
// If we're in the file browser, reinitialize the file list adapter.
if (savedInstanceState == null || inFileBrowser)
{
// Setup the list
adapter = new IconAdapter<FileWrapper>(getActivity(), R.layout.line_list_item);
backingListView.setAdapter(adapter);
}
if (inFileBrowser)
{
if (backStack == null || backStack.isEmpty())
{
backStack = new ArrayList<BackStackItem>();
String startPath = (startDirectory == null || startDirectory.isEmpty()) ? Environment
.getExternalStorageDirectory().getPath() : startDirectory;
backStack.add(new BackStackItem(startPath, false));
}
wrapFiles();
}
else // Rebuild the core adapter.
{
supportedCorePaths = savedInstanceState.getStringArrayList("coreFilePaths");
CoreSelectionAdapter adapter = new CoreSelectionAdapter(getActivity(), android.R.layout.simple_list_item_2);
for (String path : supportedCorePaths)
{
ModuleWrapper mw = new ModuleWrapper(getActivity(), path);
adapter.add(new CoreItem(mw.getInternalName(), mw.getEmulatedSystemName()));
}
backingListView.setAdapter(adapter);
}
return backingListView;
}
@Override
public void onSaveInstanceState(Bundle outState)
{
// Save whether or not we're in core selection or the file browser.
outState.putBoolean("inFileBrowser", inFileBrowser);
if (!inFileBrowser)
outState.putStringArrayList("coreFilePaths", supportedCorePaths);
}
private File chosenFile = null;
private final OnItemClickListener onItemClickListener = new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
final FileWrapper item = adapter.getItem(position);
if (inFileBrowser && item.isParentItem() && backStack.get(backStack.size() - 1).parentIsBack)
{
backStack.remove(backStack.size() - 1);
wrapFiles();
return;
}
final File selected = item.isParentItem() ? listedDirectory.getParentFile() : item.getFile();
if (inFileBrowser && selected.isDirectory())
{
Log.d("DirectoryFrag", "Is Directory.");
backStack.add(new BackStackItem(selected.getAbsolutePath(), !item.isParentItem()));
wrapFiles();
return;
}
else if (inFileBrowser && selected.isFile())
{
String filePath = selected.getAbsolutePath();
chosenFile = selected;
// Attempt to get the file extension.
String fileExt = getFileExt(filePath);
if (fileExt.equals("zip"))
{
try
{
ZipFile zipFile = new ZipFile(chosenFile);
Enumeration<? extends ZipEntry> entries = zipFile.entries();
// Try to handle the case of small text files bundles with content.
long largestEntry = Long.MIN_VALUE;
while (entries.hasMoreElements())
{
ZipEntry zipEntry = entries.nextElement();
if (zipEntry.getCompressedSize() >= largestEntry)
{
largestEntry = zipEntry.getCompressedSize();
fileExt = getFileExt(zipEntry.getName());
}
}
zipFile.close();
}
catch(IOException e)
{
e.printStackTrace();
}
}
// Enumerate the cores and check for the extension
File coreDir = new File(getActivity().getApplicationInfo().dataDir + File.separator + "cores");
File[] coreFiles = coreDir.listFiles();
List<ModuleWrapper>supportedCores = new ArrayList<ModuleWrapper>();
for (File core : coreFiles)
{
ModuleWrapper mw = new ModuleWrapper(getActivity(), core);
if (mw.getSupportedExtensions().contains(fileExt))
{
supportedCores.add(mw);
supportedCorePaths.add(mw.getUnderlyingFile().getAbsolutePath());
}
}
// Display a toast if no cores are detected.
if (supportedCores.isEmpty())
{
Toast.makeText(getActivity(), R.string.no_cores_detected, Toast.LENGTH_SHORT).show();
}
// If only one core is supported, launch the content directly.
else if (supportedCores.size() == 1)
{
launchCore(selected.getPath(), supportedCores.get(0).getUnderlyingFile().getPath());
}
// Otherwise build the list for the user to choose from.
else if (supportedCores.size() > 1)
{
// Not in the file browser any more.
inFileBrowser = false;
// Modify the title to notify of multiple cores.
getDialog().setTitle(R.string.multiple_cores_detected);
// Add all the cores to the adapter and swap it with the one in the ListView.
final CoreSelectionAdapter csa = new CoreSelectionAdapter(getActivity(), android.R.layout.simple_list_item_2);
for (ModuleWrapper core : supportedCores)
{
csa.add(new CoreItem(core.getInternalName(), core.getEmulatedSystemName()));
}
backingListView.setAdapter(csa);
}
}
else // Selection made
{
launchCore(chosenFile.getPath(), DetectCoreDirectoryFragment.this.supportedCorePaths.get(position));
}
}
};
private void launchCore(String contentPath, String corePath)
{
Intent retro;
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB))
retro = new Intent(getActivity(), RetroActivityFuture.class);
else
retro = new Intent(getActivity(), RetroActivityPast.class);
UserPreferences.updateConfigFile(getActivity());
MainMenuFragment.startRetroActivity(
retro,
contentPath,
corePath,
UserPreferences.getDefaultConfigPath(getActivity()),
Settings.Secure.getString(getActivity().getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD),
getActivity().getApplicationInfo().dataDir);
startActivity(retro);
dismiss();
}
// Used to represent data in the ListView after the user chooses an item.
private static final class CoreItem
{
public final String Title;
public final String Subtitle;
public CoreItem(String title, String subtitle)
{
this.Title = title;
this.Subtitle = subtitle;
}
}
// Adapter that the ListView is flipped to after choosing a file to launch.
private static final class CoreSelectionAdapter extends ArrayAdapter<CoreItem>
{
private final int resourceId;
/**
* Constructor
*
* @param context The current {@link Context}.
* @param resourceId The resource ID for a layout file.
*/
public CoreSelectionAdapter(Context context, int resourceId)
{
super(context, resourceId);
this.resourceId = resourceId;
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
if (convertView == null)
{
LayoutInflater inflater = LayoutInflater.from(getContext());
convertView = inflater.inflate(resourceId, parent, false);
}
final CoreItem core = getItem(position);
if (core != null)
{
final TextView title = (TextView) convertView.findViewById(android.R.id.text1);
final TextView subtitle = (TextView) convertView.findViewById(android.R.id.text2);
if (title != null)
title.setText(core.Title);
if (subtitle != null)
subtitle.setText(core.Subtitle);
}
return convertView;
}
}
}
@@ -1,396 +0,0 @@
package com.retroarch.browser.dirfragment;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import com.retroarch.R;
import com.retroarch.browser.FileWrapper;
import com.retroarch.browser.IconAdapter;
import com.retroarch.browser.preferences.util.UserPreferences;
import java.util.*;
import java.io.*;
/**
* {@link DialogFragment} subclass that provides a file-browser
* like UI for browsing for specific files.
* <p>
* This file browser also allows for custom filtering
* depending on the type of class that inherits it.
* <p>
* This file browser also uses an implementation of a
* backstack for remembering previously browsed folders
* within this DirectoryFragment.
* <p>
* To instantiate a new instance of this class
* you must use the {@code newInstance} method.
*/
public class DirectoryFragment extends DialogFragment
{
protected IconAdapter<FileWrapper> adapter;
protected File listedDirectory;
public static final class BackStackItem implements Parcelable
{
protected final String path;
protected boolean parentIsBack;
public BackStackItem(String path, boolean parentIsBack)
{
this.path = path;
this.parentIsBack = parentIsBack;
}
private BackStackItem(Parcel in)
{
this.path = in.readString();
this.parentIsBack = in.readInt() != 0;
}
public int describeContents()
{
return 0;
}
public void writeToParcel(Parcel out, int flags)
{
out.writeString(path);
out.writeInt(parentIsBack ? 1 : 0);
}
public static final Parcelable.Creator<BackStackItem> CREATOR = new Parcelable.Creator<BackStackItem>()
{
public BackStackItem createFromParcel(Parcel in)
{
return new BackStackItem(in);
}
public BackStackItem[] newArray(int size)
{
return new BackStackItem[size];
}
};
}
/**
* Listener interface for executing content or performing
* other things upon the DirectoryFragment instance closing.
*/
public interface OnDirectoryFragmentClosedListener
{
/**
* Performs some arbitrary action after the
* {@link DirectoryFragment} closes.
*
* @param path The path to the file chosen within the {@link DirectoryFragment}
*/
void onDirectoryFragmentClosed(String path);
}
protected ArrayList<BackStackItem> backStack;
protected String startDirectory;
protected String pathSettingKey;
protected boolean isDirectoryTarget;
protected OnDirectoryFragmentClosedListener onClosedListener;
/**
* Sets the starting directory for this DirectoryFragment
* when it is shown to the user.
*
* @param path the initial directory to show to the user
* when this DirectoryFragment is shown.
*/
public void setStartDirectory(String path)
{
startDirectory = path;
}
/**
* Sets the key to save the selected item in the DialogFragment
* into the application SharedPreferences at.
*
* @param key the key to save the selected item's path to in
* the application's SharedPreferences.
*/
public void setPathSettingKey(String key)
{
pathSettingKey = key;
}
/**
* Sets whether or not we are browsing for a specific
* directory or not. If enabled, it will allow the user
* to select a specific directory, rather than a file.
*
* @param enable Whether or not to enable this.
*/
public void setIsDirectoryTarget(boolean enable)
{
isDirectoryTarget = enable;
}
/**
* Sets the listener for an action to perform upon the
* closing of this DirectoryFragment.
*
* @param onClosedListener the OnDirectoryFragmentClosedListener to set.
*/
public void setOnDirectoryFragmentClosedListener(OnDirectoryFragmentClosedListener onClosedListener)
{
this.onClosedListener = onClosedListener;
}
/**
* Retrieves a new instance of a DirectoryFragment
* with a title specified by the given resource ID.
*
* @param titleResId String resource ID for the title
* of this DirectoryFragment.
*
* @return A new instance of a DirectoryFragment.
*/
public static DirectoryFragment newInstance(int titleResId)
{
final DirectoryFragment dFrag = new DirectoryFragment();
final Bundle bundle = new Bundle();
bundle.putInt("titleResId", titleResId);
dFrag.setArguments(bundle);
return dFrag;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
ListView rootView = (ListView) inflater.inflate(R.layout.line_list, container, false);
rootView.setOnItemClickListener(onItemClickListener);
// Set the dialog title.
getDialog().setTitle(getArguments().getInt("titleResId"));
// Setup the list
adapter = new IconAdapter<FileWrapper>(getActivity(), R.layout.line_list_item);
rootView.setAdapter(adapter);
// Load Directory
if (savedInstanceState != null)
{
backStack = savedInstanceState.getParcelableArrayList("BACKSTACK");
}
if (backStack == null || backStack.isEmpty())
{
backStack = new ArrayList<BackStackItem>();
String startPath = (startDirectory == null || startDirectory.isEmpty()) ? Environment
.getExternalStorageDirectory().getPath() : startDirectory;
backStack.add(new BackStackItem(startPath, false));
}
wrapFiles();
return rootView;
}
private final OnItemClickListener onItemClickListener = new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
final FileWrapper item = adapter.getItem(position);
if (item.isParentItem() && backStack.get(backStack.size() - 1).parentIsBack)
{
backStack.remove(backStack.size() - 1);
wrapFiles();
return;
}
else if (item.isDirSelectItem())
{
finishWithPath(listedDirectory.getAbsolutePath());
return;
}
final File selected = item.isParentItem() ? listedDirectory.getParentFile() : item.getFile();
if (selected.isDirectory())
{
backStack.add(new BackStackItem(selected.getAbsolutePath(), !item.isParentItem()));
wrapFiles();
}
else
{
String filePath = selected.getAbsolutePath();
finishWithPath(filePath);
}
}
};
@Override
public void onSaveInstanceState(Bundle outState)
{
super.onSaveInstanceState(outState);
outState.putParcelableArrayList("BACKSTACK", backStack);
}
private void finishWithPath(String path)
{
if (pathSettingKey != null && !pathSettingKey.isEmpty())
{
SharedPreferences settings = UserPreferences.getPreferences(getActivity());
SharedPreferences.Editor editor = settings.edit();
editor.putString(pathSettingKey, path);
editor.apply();
}
if (onClosedListener != null)
{
onClosedListener.onDirectoryFragmentClosed(path);
}
dismiss();
}
// TODO: Hook this up to a callable interface (if backstack is desirable).
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_BACK)
{
if (backStack.size() > 1)
{
backStack.remove(backStack.size() - 1);
wrapFiles();
}
return true;
}
return false;
}
private ArrayList<String> allowedExt;
private ArrayList<String> disallowedExt;
private boolean filterPath(String path)
{
if (disallowedExt != null)
{
for (String ext : disallowedExt)
{
if (path.endsWith(ext))
return false;
}
}
if (allowedExt != null)
{
for (String ext : allowedExt)
{
if (path.endsWith(ext))
return true;
}
return false;
}
return true;
}
/**
* Allows specifying an allowed file extension.
* <p>
* Any files that contain this file extension will be shown
* within the DirectoryFragment file browser. Those that don't
* contain this extension will not be shows.
* <p>
* It is possible to specify more than one allowed extension by
* simply calling this method with a different file extension specified.
*
* @param exts The file extension(s) to allow being shown in this DirectoryFragment.
*/
public void addAllowedExts(String... exts)
{
if (allowedExt == null)
allowedExt = new ArrayList<String>();
allowedExt.addAll(Arrays.asList(exts));
}
/**
* Allows specifying a disallowed file extension.
* <p>
* Any files that contain this file extension will not be shown
* within the DirectoryFragment file browser.
* <p>
* It is possible to specify more than one disallowed extension by
* simply calling this method with a different file extension specified.
*
* @param exts The file extension(s) to hide from being shown in this DirectoryFragment.
*/
public void addDisallowedExts(String... exts)
{
if (disallowedExt == null)
disallowedExt = new ArrayList<String>();
disallowedExt.addAll(Arrays.asList(exts));
}
protected void wrapFiles()
{
listedDirectory = new File(backStack.get(backStack.size() - 1).path);
if (!listedDirectory.isDirectory())
{
throw new IllegalArgumentException("Directory is not valid.");
}
adapter.clear();
if (isDirectoryTarget)
adapter.add(new FileWrapper(null, FileWrapper.DIRSELECT, true));
if (listedDirectory.getParentFile() != null)
adapter.add(new FileWrapper(null, FileWrapper.PARENT, true));
// Copy new items
final File[] files = listedDirectory.listFiles();
if (files != null)
{
for (File file : files)
{
String path = file.getName();
boolean allowFile = file.isDirectory() || (filterPath(path) && !isDirectoryTarget);
if (allowFile)
{
adapter.add(new FileWrapper(file, FileWrapper.FILE, true));
}
}
}
// Sort items
adapter.sort(new Comparator<FileWrapper>()
{
@Override
public int compare(FileWrapper left, FileWrapper right)
{
return left.compareTo(right);
};
});
// Update
adapter.notifyDataSetChanged();
}
}
@@ -49,20 +49,6 @@ public final class MainMenuActivity extends FragmentActivity
setVolumeControlStream(AudioManager.STREAM_MUSIC);
}
public void setModule(String core_path, String core_name)
{
UserPreferences.updateConfigFile(this);
SharedPreferences prefs = UserPreferences.getPreferences(this);
SharedPreferences.Editor edit = prefs.edit();
edit.putString("libretro_path", core_path);
edit.putString("libretro_name", core_name);
edit.apply();
// Set the title section to contain the name of the selected core.
setCoreTitle(core_name);
}
public void setCoreTitle(String core_name)
{
setTitle("RetroArch : " + core_name);
@@ -83,4 +69,4 @@ public final class MainMenuActivity extends FragmentActivity
setTitle(savedInstanceState.getCharSequence("title"));
}
}
}
@@ -22,13 +22,11 @@ import android.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Log;
import android.widget.Toast;
import android.os.Environment;
import android.content.Context;
import com.retroarch.R;
import com.retroarch.browser.CoreSelection;
import com.retroarch.browser.NativeInterface;
import com.retroarch.browser.dirfragment.DetectCoreDirectoryFragment;
import com.retroarch.browser.dirfragment.DirectoryFragment;
import com.retroarch.browser.dirfragment.DirectoryFragment.OnDirectoryFragmentClosedListener;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import com.retroarch.browser.preferences.util.UserPreferences;
import com.retroarch.browser.retroactivity.RetroActivityFuture;
@@ -37,7 +35,7 @@ import com.retroarch.browser.retroactivity.RetroActivityPast;
/**
* Represents the fragment that handles the layout of the main menu.
*/
public final class MainMenuFragment extends PreferenceListFragment implements OnPreferenceClickListener, OnDirectoryFragmentClosedListener
public final class MainMenuFragment extends PreferenceListFragment implements OnPreferenceClickListener
{
private static final String TAG = "MainMenuFragment";
private Context ctx;
@@ -64,27 +62,10 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
// Set the listeners for the menu items
findPreference("resumeContentPref").setOnPreferenceClickListener(this);
findPreference("loadCorePref").setOnPreferenceClickListener(this);
findPreference("loadContentAutoPref").setOnPreferenceClickListener(this);
findPreference("loadContentPref").setOnPreferenceClickListener(this);
findPreference("quitRetroArch").setOnPreferenceClickListener(this);
// Extract assets.
extractAssets();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
if (!prefs.getBoolean("first_time_refreshrate_calculate", false))
{
prefs.edit().putBoolean("first_time_refreshrate_calculate", true).apply();
AlertDialog.Builder alert = new AlertDialog.Builder(ctx)
.setTitle(R.string.welcome_to_retroarch)
.setMessage(R.string.welcome_to_retroarch_desc)
.setPositiveButton(R.string.ok, null);
alert.show();
UserPreferences.updateConfigFile(ctx);
}
}
private void extractAssets()
@@ -213,50 +194,10 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
prefs.getString("libretro_path", ctx.getApplicationInfo().dataDir + "/cores/"),
UserPreferences.getDefaultConfigPath(ctx),
Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD),
ctx.getApplicationInfo().dataDir);
ctx.getApplicationInfo().dataDir,
ctx.getApplicationInfo().sourceDir);
startActivity(retro);
}
// Load Core Preference
else if (prefKey.equals("loadCorePref"))
{
CoreSelection.newInstance().show(getFragmentManager(), "core_selection");
}
// Load ROM Preference
else if (prefKey.equals("loadContentPref"))
{
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
final String libretro_path = prefs.getString("libretro_path", ctx.getApplicationInfo().dataDir + "/cores");
if (!new File(libretro_path).isDirectory())
{
final DirectoryFragment contentBrowser = DirectoryFragment.newInstance(R.string.load_content);
contentBrowser.addDisallowedExts(".state", ".srm", ".state.auto", ".rtc");
contentBrowser.setOnDirectoryFragmentClosedListener(this);
final String startPath = prefs.getString("rgui_browser_directory", "");
if (!startPath.isEmpty() && new File(startPath).exists())
contentBrowser.setStartDirectory(startPath);
contentBrowser.show(getFragmentManager(), "contentBrowser");
}
else
{
Toast.makeText(ctx, R.string.load_a_core_first, Toast.LENGTH_SHORT).show();
}
}
else if (prefKey.equals("loadContentAutoPref"))
{
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
final DetectCoreDirectoryFragment contentBrowser = DetectCoreDirectoryFragment.newInstance(R.string.load_content_auto);
contentBrowser.addDisallowedExts(".state", ".srm", ".state.auto", ".rtc");
contentBrowser.setOnDirectoryFragmentClosedListener(this);
final String startPath = prefs.getString("rgui_browser_directory", "");
if (!startPath.isEmpty() && new File(startPath).exists())
contentBrowser.setStartDirectory(startPath);
contentBrowser.show(getFragmentManager(), "contentBrowser");
}
// Quit RetroArch preference
else if (prefKey.equals("quitRetroArch"))
{
@@ -268,26 +209,8 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
return true;
}
@Override
public void onDirectoryFragmentClosed(String path)
{
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
UserPreferences.updateConfigFile(ctx);
Toast.makeText(ctx, String.format(getString(R.string.loading_data), path), Toast.LENGTH_SHORT).show();
Intent retro = getRetroActivity();
MainMenuFragment.startRetroActivity(
retro,
path,
prefs.getString("libretro_path", ""),
UserPreferences.getDefaultConfigPath(ctx),
Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD),
ctx.getApplicationInfo().dataDir);
startActivity(retro);
}
public static void startRetroActivity(Intent retro, String contentPath, String corePath,
String configFilePath, String imePath, String dataDirPath)
String configFilePath, String imePath, String dataDirPath, String dataSourcePath)
{
if (contentPath != null) {
retro.putExtra("ROM", contentPath);
@@ -296,5 +219,14 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
retro.putExtra("CONFIGFILE", configFilePath);
retro.putExtra("IME", imePath);
retro.putExtra("DATADIR", dataDirPath);
retro.putExtra("APK", dataSourcePath);
retro.putExtra("SDCARD", Environment.getExternalStorageDirectory().getAbsolutePath());
retro.putExtra("DOWNLOADS", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
retro.putExtra("SCREENSHOTS", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
String external = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/com.retroarch/files";
retro.putExtra("EXTERNAL", external);
}
}
@@ -1,115 +0,0 @@
package com.retroarch.browser.preferences;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
import com.retroarch.R;
import com.retroarch.browser.preferences.fragments.AudioPreferenceFragment;
import com.retroarch.browser.preferences.fragments.GeneralPreferenceFragment;
import com.retroarch.browser.preferences.fragments.InputPreferenceFragment;
import com.retroarch.browser.preferences.fragments.PathPreferenceFragment;
import com.retroarch.browser.preferences.fragments.VideoPreferenceFragment;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import com.retroarch.browser.preferences.util.UserPreferences;
/**
* {@link ActionBarActivity} responsible for handling all of the {@link PreferenceListFragment}s.
* <p>
* This class can be considered the central activity for the settings, as this class
* provides the backbone for the {@link ViewPager} that handles all of the fragments being used.
*/
public final class PreferenceActivity extends ActionBarActivity implements OnSharedPreferenceChangeListener
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set the ViewPager.
setContentView(R.layout.preference_viewpager);
// Initialize the ViewPager.
final ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
viewPager.setAdapter(new PreferencesAdapter(getSupportFragmentManager()));
// Register the preference change listener.
final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(this);
sPrefs.registerOnSharedPreferenceChangeListener(this);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
{
// Update the config file immediately when a preference has changed.
UserPreferences.updateConfigFile(this);
}
/**
* The {@link FragmentPagerAdapter} that will back
* the view pager of this {@link PreferenceActivity}.
*/
private final class PreferencesAdapter extends FragmentPagerAdapter
{
private final String[] pageTitles = {
getString(R.string.general_options),
getString(R.string.audio_options),
getString(R.string.input_options),
getString(R.string.video_options),
getString(R.string.path_options)
};
/**
* Constructor
*
* @param fm the {@link FragmentManager} for this adapter.
*/
public PreferencesAdapter(FragmentManager fm)
{
super(fm);
}
@Override
public Fragment getItem(int fragmentId)
{
switch (fragmentId)
{
case 0:
return new GeneralPreferenceFragment();
case 1:
return new AudioPreferenceFragment();
case 2:
return new InputPreferenceFragment();
case 3:
return new VideoPreferenceFragment();
case 4:
return new PathPreferenceFragment();
default: // Should never happen
return null;
}
}
@Override
public CharSequence getPageTitle(int position)
{
return pageTitles[position];
}
@Override
public int getCount()
{
return 5;
}
}
}
@@ -1,21 +0,0 @@
package com.retroarch.browser.preferences.fragments;
import com.retroarch.R;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import android.os.Bundle;
/**
* A {@link PreferenceListFragment} responsible for handling the audio preferences.
*/
public final class AudioPreferenceFragment extends PreferenceListFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Add audio preferences from the XML.
addPreferencesFromResource(R.xml.audio_preferences);
}
}
@@ -1,37 +0,0 @@
package com.retroarch.browser.preferences.fragments;
import com.retroarch.R;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import com.retroarch.browser.preferences.util.UserPreferences;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
/**
* A {@link PreferenceListFragment} that handles the general settings.
*/
public final class GeneralPreferenceFragment extends PreferenceListFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Add general preferences from the XML.
addPreferencesFromResource(R.xml.general_preferences);
// Set a listener for the global configuration checkbox.
final CheckBoxPreference usingGlobalConfig = (CheckBoxPreference) findPreference("global_config_enable");
usingGlobalConfig.setOnPreferenceClickListener(new OnPreferenceClickListener(){
@Override
public boolean onPreferenceClick(Preference preference)
{
UserPreferences.updateConfigFile(getActivity());
UserPreferences.readbackConfigFile(getActivity());
return true;
}
});
}
}
@@ -1,75 +0,0 @@
package com.retroarch.browser.preferences.fragments;
import java.io.File;
import com.retroarch.R;
import com.retroarch.browser.dirfragment.DirectoryFragment;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.provider.Settings;
import android.view.inputmethod.InputMethodManager;
/**
* A {@link PreferenceListFragment} responsible for handling the input preferences.
*/
public final class InputPreferenceFragment extends PreferenceListFragment implements OnPreferenceClickListener
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Add input preferences from the XML.
addPreferencesFromResource(R.xml.input_preferences);
// Set preference listeners
findPreference("set_ime_pref").setOnPreferenceClickListener(this);
findPreference("report_ime_pref").setOnPreferenceClickListener(this);
findPreference("inputOverlayDirPref").setOnPreferenceClickListener(this);
}
@Override
public boolean onPreferenceClick(Preference preference)
{
final String prefKey = preference.getKey();
// Set Input Method preference
if (prefKey.equals("set_ime_pref"))
{
// Show an IME picker so the user can change their set IME.
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
}
// Report IME preference
else if (prefKey.equals("report_ime_pref"))
{
final String currentIme = Settings.Secure.getString(getActivity().getContentResolver(),
Settings.Secure.DEFAULT_INPUT_METHOD);
AlertDialog.Builder reportImeDialog = new AlertDialog.Builder(getActivity());
reportImeDialog.setTitle(R.string.current_ime);
reportImeDialog.setMessage(currentIme);
reportImeDialog.setNegativeButton(R.string.close, null);
reportImeDialog.show();
}
// Input Overlay selection
else if (prefKey.equals("inputOverlayDirPref"))
{
final DirectoryFragment overlayBrowser = DirectoryFragment.newInstance(R.string.input_overlay_select);
File overlayDir = new File(getActivity().getApplicationInfo().dataDir, "overlays");
if (overlayDir.exists())
overlayBrowser.setStartDirectory(overlayDir.getAbsolutePath());
overlayBrowser.addAllowedExts(".cfg");
overlayBrowser.setPathSettingKey("input_overlay");
overlayBrowser.show(getFragmentManager(), "overlayBrowser");
}
return true;
}
}
@@ -1,71 +0,0 @@
package com.retroarch.browser.preferences.fragments;
import com.retroarch.R;
import com.retroarch.browser.dirfragment.DirectoryFragment;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
/**
* A {@link PreferenceListFragment} that handles the path preferences.
*/
public final class PathPreferenceFragment extends PreferenceListFragment implements OnPreferenceClickListener
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Add path preferences from the XML.
addPreferencesFromResource(R.xml.path_preferences);
// Set preference click listeners
findPreference("romDirPref").setOnPreferenceClickListener(this);
findPreference("srmDirPref").setOnPreferenceClickListener(this);
findPreference("saveStateDirPref").setOnPreferenceClickListener(this);
findPreference("systemDirPref").setOnPreferenceClickListener(this);
}
@Override
public boolean onPreferenceClick(Preference preference)
{
final String prefKey = preference.getKey();
// Custom ROM directory
if (prefKey.equals("romDirPref"))
{
final DirectoryFragment romDirBrowser = DirectoryFragment.newInstance(R.string.rom_directory_select);
romDirBrowser.setPathSettingKey("rgui_browser_directory");
romDirBrowser.setIsDirectoryTarget(true);
romDirBrowser.show(getFragmentManager(), "romDirBrowser");
}
// Custom savefile directory
else if (prefKey.equals("srmDirPref"))
{
final DirectoryFragment srmDirBrowser = DirectoryFragment.newInstance(R.string.savefile_directory_select);
srmDirBrowser.setPathSettingKey("savefile_directory");
srmDirBrowser.setIsDirectoryTarget(true);
srmDirBrowser.show(getFragmentManager(), "srmDirBrowser");
}
// Custom save state directory
else if (prefKey.equals("saveStateDirPref"))
{
final DirectoryFragment saveStateDirBrowser = DirectoryFragment.newInstance(R.string.save_state_directory_select);
saveStateDirBrowser.setPathSettingKey("savestate_directory");
saveStateDirBrowser.setIsDirectoryTarget(true);
saveStateDirBrowser.show(getFragmentManager(), "saveStateDirBrowser");
}
// Custom system directory
else if (prefKey.equals("systemDirPref"))
{
final DirectoryFragment systemDirBrowser = DirectoryFragment.newInstance(R.string.system_directory_select);
systemDirBrowser.setPathSettingKey("system_directory");
systemDirBrowser.setIsDirectoryTarget(true);
systemDirBrowser.show(getFragmentManager(), "systemDirBrowser");
}
return true;
}
}
@@ -1,54 +0,0 @@
package com.retroarch.browser.preferences.fragments;
import com.retroarch.R;
import com.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.Preference.OnPreferenceClickListener;
import android.view.Display;
import android.view.WindowManager;
import android.widget.Toast;
/**
* A {@link PreferenceListFragment} responsible for handling the video preferences.
*/
public final class VideoPreferenceFragment extends PreferenceListFragment implements OnPreferenceClickListener
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Add preferences from the resources
addPreferencesFromResource(R.xml.video_preferences);
// Set preference click listeners
findPreference("set_os_reported_ref_rate_pref").setOnPreferenceClickListener(this);
}
@Override
public boolean onPreferenceClick(Preference preference)
{
final String prefKey = preference.getKey();
// Set OS-reported refresh rate preference.
if (prefKey.equals("set_os_reported_ref_rate_pref"))
{
final WindowManager wm = getActivity().getWindowManager();
final Display display = wm.getDefaultDisplay();
final double rate = display.getRefreshRate();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
final SharedPreferences.Editor edit = prefs.edit();
edit.putString("video_refresh_rate", Double.toString(rate));
edit.apply();
Toast.makeText(getActivity(), String.format(getString(R.string.using_os_reported_refresh_rate), rate), Toast.LENGTH_LONG).show();
}
return true;
}
}
@@ -1,67 +0,0 @@
package com.retroarch.browser.preferences.util;
import com.retroarch.R;
import android.content.Context;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.SeekBar;
import android.widget.TextView;
public final class SeekbarPreference extends DialogPreference implements SeekBar.OnSeekBarChangeListener {
private float seek_value;
private SeekBar bar;
private TextView text;
private final Context context;
public SeekbarPreference(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
}
@Override
protected View onCreateDialogView()
{
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.seek_dialog, null);
this.bar = (SeekBar) view.findViewById(R.id.seekbar_bar);
this.text = (TextView) view.findViewById(R.id.seekbar_text);
this.seek_value = getPersistedFloat(1.0f);
// Set initial progress for seek bar and set the listener.
int prog = (int) (seek_value * 100);
this.bar.setProgress(prog);
this.text.setText(prog + "%");
this.bar.setOnSeekBarChangeListener(this);
return view;
}
@Override
protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if (positiveResult) {
persistFloat(seek_value);
}
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
seek_value = (float) progress / 100.0f;
text.setText((int) (seek_value * 100) + "%");
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
}
@@ -9,7 +9,6 @@ import java.io.InputStreamReader;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
//import android.content.pm.PackageManager;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.os.Build;
@@ -121,48 +120,6 @@ public final class UserPreferences
*/
public static void readbackConfigFile(Context ctx)
{
String path = getDefaultConfigPath(ctx);
ConfigFile config = new ConfigFile(path);
Log.i(TAG, "Config readback from: " + path);
SharedPreferences prefs = getPreferences(ctx);
SharedPreferences.Editor edit = prefs.edit();
// General Settings
readbackBool(config, edit, "rewind_enable");
readbackString(config, edit, "rewind_granularity");
readbackBool(config, edit, "savestate_auto_load");
readbackBool(config, edit, "savestate_auto_save");
// Audio Settings.
// TODO: Other audio settings
readbackBool(config, edit, "audio_rate_control");
readbackBool(config, edit, "audio_enable");
// Input Settings
readbackString(config, edit, "input_overlay");
readbackBool(config, edit, "input_overlay_enable");
readbackDouble(config, edit, "input_overlay_opacity");
readbackBool(config, edit, "input_autodetect_enable");
// Video Settings
readbackBool(config, edit, "video_scale_integer");
readbackBool(config, edit, "video_smooth");
readbackBool(config, edit, "video_threaded");
readbackBool(config, edit, "video_allow_rotate");
readbackBool(config, edit, "video_font_enable");
readbackBool(config, edit, "video_vsync");
readbackString(config, edit, "video_refresh_rate");
// Path settings
readbackString(config, edit, "rgui_browser_directory");
readbackString(config, edit, "savefile_directory");
readbackString(config, edit, "savestate_directory");
readbackBool(config, edit, "savefile_directory_enable"); // Ignored by RetroArch
readbackBool(config, edit, "savestate_directory_enable"); // Ignored by RetroArch
edit.apply();
}
/**
@@ -183,10 +140,7 @@ public final class UserPreferences
final SharedPreferences prefs = getPreferences(ctx);
config.setString("libretro_path", prefs.getString("libretro_path", coreDir));
config.setString("libretro_directory", coreDir);
config.setString("rgui_browser_directory", prefs.getString("rgui_browser_directory", ""));
config.setBoolean("audio_rate_control", prefs.getBoolean("audio_rate_control", true));
config.setInt("audio_out_rate", getOptimalSamplingRate(ctx));
// Refactor this entire mess and make this usable for per-core config
@@ -195,66 +149,6 @@ public final class UserPreferences
config.setInt("audio_block_frames", getLowLatencyBufferSize(ctx));
}
config.setBoolean("audio_enable", prefs.getBoolean("audio_enable", true));
config.setBoolean("video_smooth", prefs.getBoolean("video_smooth", true));
config.setBoolean("video_allow_rotate", prefs.getBoolean("video_allow_rotate", true));
config.setBoolean("savestate_auto_load", prefs.getBoolean("savestate_auto_load", true));
config.setBoolean("savestate_auto_save", prefs.getBoolean("savestate_auto_save", false));
config.setBoolean("rewind_enable", prefs.getBoolean("rewind_enable", false));
config.setInt("rewind_granularity", Integer.parseInt(prefs.getString("rewind_granularity", "1")));
config.setBoolean("video_vsync", prefs.getBoolean("video_vsync", true));
config.setBoolean("input_autodetect_enable", prefs.getBoolean("input_autodetect_enable", true));
config.setString("video_refresh_rate", prefs.getString("video_refresh_rate", ""));
config.setBoolean("video_threaded", prefs.getBoolean("video_threaded", true));
// Refactor these weird values - 'full', 'auto', 'square', whatever -
// go by what we have in the menu - makes maintaining state easier too
String aspect = prefs.getString("video_aspect_ratio", "auto");
if (aspect.equals("full"))
{
config.setBoolean("video_force_aspect", false);
}
else if (aspect.equals("auto"))
{
config.setBoolean("video_force_aspect", true);
config.setBoolean("video_force_aspect_auto", true);
config.setDouble("video_aspect_ratio", -1.0);
}
else if (aspect.equals("square"))
{
config.setBoolean("video_force_aspect", true);
config.setBoolean("video_force_aspect_auto", false);
config.setDouble("video_aspect_ratio", -1.0);
}
else
{
double aspect_ratio = Double.parseDouble(aspect);
config.setBoolean("video_force_aspect", true);
config.setDouble("video_aspect_ratio", aspect_ratio);
}
config.setBoolean("video_scale_integer", prefs.getBoolean("video_scale_integer", false));
if (prefs.contains("input_overlay_enable"))
config.setBoolean("input_overlay_enable", prefs.getBoolean("input_overlay_enable", true));
config.setString("input_overlay", prefs.getString("input_overlay", ""));
if (prefs.getBoolean("savefile_directory_enable", false))
{
config.setString("savefile_directory", prefs.getString("savefile_directory", ""));
}
if (prefs.getBoolean("savestate_directory_enable", false))
{
config.setString("savestate_directory", prefs.getString("savestate_directory", ""));
}
if (prefs.getBoolean("system_directory_enable", false))
{
config.setString("system_directory", prefs.getString("system_directory", ""));
}
config.setBoolean("video_font_enable", prefs.getBoolean("video_font_enable", true));
config.setString("content_history_path", dataDir + "/content_history.rpl");
try
{
config.write(path);
@@ -7,6 +7,7 @@ import android.util.Log;
public class RetroActivityIntent extends RetroActivityCommon {
private Intent pendingIntent = null;
private static final String TAG = "RetroArch";
@Override
public void onBackPressed()
@@ -56,6 +57,21 @@ public class RetroActivityIntent extends RetroActivityCommon {
return pendingIntent.getStringExtra("CONFIGFILE");
}
public String getPendingIntentStorageLocation()
{
return pendingIntent.getStringExtra("SDCARD");
}
public String getPendingIntentDownloadLocation()
{
return pendingIntent.getStringExtra("DOWNLOADS");
}
public String getPendingIntentScreenshotsLocation()
{
return pendingIntent.getStringExtra("SCREENSHOTS");
}
/**
* Gets the specified IME in the pending intent.
*
+4 -4
View File
@@ -30,20 +30,20 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<string>1.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1</string>
<string>1.2.2</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 RetroArch. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>RApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
+179 -356
View File
@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9L31a</string>
<string key="IBDocument.InterfaceBuilderVersion">680</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<string key="IBDocument.SystemVersion">12F45</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.40</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">3084</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="57"/>
<string>NSCustomObject</string>
<string>NSMenu</string>
<string>NSMenuItem</string>
<string>NSView</string>
<string>NSWindowTemplate</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -16,7 +24,7 @@
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0" id="9"/>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -652,201 +660,49 @@
<string key="NSWindowTitle">RetroArch</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="439893737">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{480, 360}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSCustomObject" id="976324537">
<string key="NSClassName">RetroArch</string>
</object>
<object class="NSWindowTemplate" id="361653618">
<int key="NSWindowStyleMask">31</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{272, 172}, {276, 89}}</string>
<int key="NSWTFlags">-1535638528</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="327272550">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="981013832">
<reference key="NSNextResponder" ref="327272550"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 72}, {240, 17}}</string>
<reference key="NSSuperview" ref="327272550"/>
<reference key="NSNextKeyView" ref="481701893"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="45342161">
<int key="NSCellFlags">68157504</int>
<int key="NSCellFlags2">138413056</int>
<string key="NSContents">Select Core</string>
<object class="NSFont" key="NSSupport" id="698260743">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">1.300000e+01</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="981013832"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor" id="962906968">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="1062340437">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSComboBox" id="481701893">
<reference key="NSNextResponder" ref="327272550"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{21, 45}, {239, 26}}</string>
<reference key="NSSuperview" ref="327272550"/>
<reference key="NSNextKeyView" ref="59737118"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="50876060">
<int key="NSCellFlags">74448961</int>
<int key="NSCellFlags2">268436480</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="698260743"/>
<reference key="NSControlView" ref="481701893"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textBackgroundColor</string>
<object class="NSColor" key="NSColor" id="67566624">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
</object>
<reference key="NSTextColor" ref="1062340437"/>
<int key="NSVisibleItemCount">5</int>
<bool key="NSHasVerticalScroller">YES</bool>
<reference key="NSDelegate" ref="481701893"/>
<object class="NSComboTableView" key="NSTableView" id="845451530">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{15, 0}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn">
<double key="NSWidth">1.200000e+01</double>
<double key="NSMinWidth">1.000000e+01</double>
<double key="NSMaxWidth">1.000000e+03</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
<int key="NSCellFlags">75497472</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">1.200000e+01</double>
<int key="NSfFlags">16</int>
</object>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
</object>
<reference key="NSTextColor" ref="67566624"/>
</object>
<object class="NSTextFieldCell" key="NSDataCell">
<int key="NSCellFlags">338690112</int>
<int key="NSCellFlags2">268436480</int>
<reference key="NSSupport" ref="698260743"/>
<reference key="NSControlView" ref="845451530"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="170588361">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlBackgroundColor</string>
<reference key="NSColor" ref="962906968"/>
</object>
<reference key="NSTextColor" ref="1062340437"/>
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
<reference key="NSTableView" ref="845451530"/>
</object>
</object>
<double key="NSIntercellSpacingWidth">3.000000e+00</double>
<double key="NSIntercellSpacingHeight">2.000000e+00</double>
<reference key="NSBackgroundColor" ref="170588361"/>
<object class="NSColor" key="NSGridColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">gridColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
</object>
<double key="NSRowHeight">1.900000e+01</double>
<string key="NSAction">tableViewAction:</string>
<int key="NSTvFlags">-767524864</int>
<reference key="NSDelegate" ref="50876060"/>
<reference key="NSDataSource" ref="50876060"/>
<reference key="NSTarget" ref="50876060"/>
<int key="NSColumnAutoresizingStyle">1</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">YES</bool>
</object>
</object>
</object>
<object class="NSButton" id="59737118">
<reference key="NSNextResponder" ref="327272550"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{180, 13}, {82, 32}}</string>
<reference key="NSSuperview" ref="327272550"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="404714727">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<reference key="NSSupport" ref="698260743"/>
<reference key="NSControlView" ref="59737118"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{276, 89}</string>
<reference key="NSNextKeyView" ref="981013832"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">terminate:</string>
<reference key="source" ref="1050"/>
<reference key="destination" ref="632727374"/>
</object>
<int key="connectionID">449</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">orderFrontStandardAboutPanel:</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">142</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="976324537"/>
</object>
<int key="connectionID">495</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performMiniaturize:</string>
@@ -871,14 +727,6 @@
</object>
<int key="connectionID">127</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">orderFrontStandardAboutPanel:</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">142</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performClose:</string>
@@ -919,14 +767,6 @@
</object>
<int key="connectionID">370</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">terminate:</string>
<reference key="source" ref="1050"/>
<reference key="destination" ref="632727374"/>
</object>
<int key="connectionID">449</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showHelp:</string>
@@ -936,12 +776,20 @@
<int key="connectionID">493</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="976324537"/>
<object class="IBActionConnection" key="connection">
<string key="label">toggleFullScreen:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="1065388702"/>
</object>
<int key="connectionID">495</int>
<int key="connectionID">593</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">openDocument:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="733060596"/>
</object>
<int key="connectionID">657</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
@@ -975,14 +823,6 @@
</object>
<int key="connectionID">591</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleFullScreen:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="1065388702"/>
</object>
<int key="connectionID">593</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">basicEvent:</string>
@@ -1127,14 +967,6 @@
</object>
<int key="connectionID">655</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">openDocument:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="733060596"/>
</object>
<int key="connectionID">657</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">basicEvent:</string>
@@ -1151,6 +983,14 @@
</object>
<int key="connectionID">664</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">openCore:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="722745758"/>
</object>
<int key="connectionID">665</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1167,7 +1007,7 @@
<int key="objectID">-2</int>
<reference key="object" ref="1021"/>
<reference key="parent" ref="0"/>
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
@@ -1227,11 +1067,11 @@
<reference key="object" ref="720053764"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="722745758"/>
<reference ref="1025936716"/>
<reference ref="776162233"/>
<reference ref="425164168"/>
<reference ref="733060596"/>
<reference ref="722745758"/>
</object>
<reference key="parent" ref="379814623"/>
</object>
@@ -1411,68 +1251,6 @@
</object>
<reference key="parent" ref="265357942"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">557</int>
<reference key="object" ref="361653618"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="327272550"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">558</int>
<reference key="object" ref="327272550"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="981013832"/>
<reference ref="59737118"/>
<reference ref="481701893"/>
</object>
<reference key="parent" ref="361653618"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">559</int>
<reference key="object" ref="481701893"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="50876060"/>
</object>
<reference key="parent" ref="327272550"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">560</int>
<reference key="object" ref="981013832"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="45342161"/>
</object>
<reference key="parent" ref="327272550"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">567</int>
<reference key="object" ref="45342161"/>
<reference key="parent" ref="981013832"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">568</int>
<reference key="object" ref="50876060"/>
<reference key="parent" ref="481701893"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">570</int>
<reference key="object" ref="59737118"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="404714727"/>
</object>
<reference key="parent" ref="327272550"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">571</int>
<reference key="object" ref="404714727"/>
<reference key="parent" ref="59737118"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">585</int>
<reference key="object" ref="1225315"/>
@@ -1757,13 +1535,12 @@
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>124.IBPluginDependency</string>
<string>125.IBEditorWindowLastContentRect</string>
<string>125.IBPluginDependency</string>
<string>126.IBPluginDependency</string>
<string>130.IBPluginDependency</string>
@@ -1778,50 +1555,34 @@
<string>23.IBPluginDependency</string>
<string>236.IBPluginDependency</string>
<string>239.IBPluginDependency</string>
<string>24.IBEditorWindowLastContentRect</string>
<string>24.IBPluginDependency</string>
<string>29.IBEditorWindowLastContentRect</string>
<string>29.IBPluginDependency</string>
<string>371.IBEditorWindowLastContentRect</string>
<string>371.IBPluginDependency</string>
<string>371.IBWindowTemplateEditedContentRect</string>
<string>371.NSWindowTemplate.visibleAtLaunch</string>
<string>372.IBPluginDependency</string>
<string>490.IBPluginDependency</string>
<string>491.IBEditorWindowLastContentRect</string>
<string>491.IBPluginDependency</string>
<string>492.IBPluginDependency</string>
<string>494.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>545.IBPluginDependency</string>
<string>546.IBEditorWindowLastContentRect</string>
<string>546.IBPluginDependency</string>
<string>549.IBPluginDependency</string>
<string>551.IBPluginDependency</string>
<string>557.IBEditorWindowLastContentRect</string>
<string>557.IBPluginDependency</string>
<string>557.IBWindowTemplateEditedContentRect</string>
<string>557.NSWindowTemplate.visibleAtLaunch</string>
<string>558.IBPluginDependency</string>
<string>559.IBPluginDependency</string>
<string>559.IBViewBoundsToFrameTransform</string>
<string>56.IBPluginDependency</string>
<string>560.IBPluginDependency</string>
<string>567.IBPluginDependency</string>
<string>568.IBPluginDependency</string>
<string>57.IBEditorWindowLastContentRect</string>
<string>57.IBPluginDependency</string>
<string>570.IBPluginDependency</string>
<string>571.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>585.IBPluginDependency</string>
<string>586.IBEditorWindowLastContentRect</string>
<string>586.IBPluginDependency</string>
<string>587.IBPluginDependency</string>
<string>592.IBPluginDependency</string>
<string>598.IBEditorWindowLastContentRect</string>
<string>603.IBEditorWindowLastContentRect</string>
<string>613.IBEditorWindowLastContentRect</string>
<string>597.IBPluginDependency</string>
<string>598.IBPluginDependency</string>
<string>602.IBPluginDependency</string>
<string>603.IBPluginDependency</string>
<string>612.IBPluginDependency</string>
<string>613.IBPluginDependency</string>
<string>614.IBPluginDependency</string>
<string>616.IBPluginDependency</string>
<string>618.IBPluginDependency</string>
@@ -1829,7 +1590,8 @@
<string>622.IBPluginDependency</string>
<string>624.IBPluginDependency</string>
<string>626.IBPluginDependency</string>
<string>630.IBEditorWindowLastContentRect</string>
<string>629.IBPluginDependency</string>
<string>630.IBPluginDependency</string>
<string>633.IBPluginDependency</string>
<string>635.IBPluginDependency</string>
<string>637.IBPluginDependency</string>
@@ -1844,24 +1606,21 @@
<string>656.IBPluginDependency</string>
<string>658.IBPluginDependency</string>
<string>660.IBPluginDependency</string>
<string>661.IBEditorWindowLastContentRect</string>
<string>661.IBPluginDependency</string>
<string>663.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>73.IBPluginDependency</string>
<string>79.IBPluginDependency</string>
<string>81.IBEditorWindowLastContentRect</string>
<string>81.IBPluginDependency</string>
<string>83.IBPluginDependency</string>
<string>92.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{782, 496}, {143, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1876,52 +1635,36 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{785, 425}, {284, 133}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{497, 558}, {420, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{507, 199}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{507, 199}, {480, 360}}</string>
<reference ref="9"/>
<string>{{438, 199}, {480, 360}}</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{856, 535}, {174, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{642, 395}, {192, 163}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{329, 640}, {276, 89}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{329, 640}, {276, 89}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwooAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{509, 405}, {206, 153}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{730, 535}, {151, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{834, 455}, {144, 63}}</string>
<string>{{834, 495}, {185, 23}}</string>
<string>{{834, 455}, {123, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1929,7 +1672,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{907, 316}, {79, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1944,13 +1686,11 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{834, 535}, {137, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{600, 465}, {182, 93}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1958,29 +1698,112 @@
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">664</int>
<int key="maxID">665</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">RetroArch</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>basicEvent:</string>
<string>openCore:</string>
<string>showCoresDirectory:</string>
<string>showPreferences:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>basicEvent:</string>
<string>openCore:</string>
<string>showCoresDirectory:</string>
<string>showPreferences:</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">basicEvent:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">openCore:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">showCoresDirectory:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">showPreferences:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">window</string>
<string key="NS.object.0">NSWindow</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">window</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">window</string>
<string key="candidateClassName">NSWindow</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/RetroArch.h</string>
</object>
</object>
</object>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.LastKnownRelativeProjectPath">../RetroArch.xcodeproj</string>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1050" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{11, 11}</string>
<string>{10, 3}</string>
</object>
</object>
</data>
</archive>
+6 -42
View File
@@ -11,13 +11,6 @@
5061C8A41AE47E510080AE14 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5061C8A31AE47E510080AE14 /* libz.dylib */; };
509F0C9D1AA23AFC00619ECC /* griffin_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 509F0C9C1AA23AFC00619ECC /* griffin_objc.m */; };
840222FC1A889EE2009AB261 /* griffin.c in Sources */ = {isa = PBXBuildFile; fileRef = 840222FB1A889EE2009AB261 /* griffin.c */; };
841CBB881A8A343E0066E9F1 /* rdb in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB7F1A8A31650066E9F1 /* rdb */; };
841CBB891A8A34420066E9F1 /* cursors in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB7D1A8A314F0066E9F1 /* cursors */; };
841CBB8A1A8A34470066E9F1 /* cht in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB7B1A8A31370066E9F1 /* cht */; };
841CBB8B1A8A347C0066E9F1 /* shaders_cg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB791A8A311C0066E9F1 /* shaders_cg */; };
841CBB8C1A8A34810066E9F1 /* overlays in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB771A8A30F00066E9F1 /* overlays */; };
841CBB8D1A8A348B0066E9F1 /* autoconfig in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB751A8A30CC0066E9F1 /* autoconfig */; };
841CBB8E1A8A34920066E9F1 /* assets in CopyFiles */ = {isa = PBXBuildFile; fileRef = 841CBB731A8A308C0066E9F1 /* assets */; };
84DD5E9F1A88E45B007336C1 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5E9E1A88E45B007336C1 /* CoreVideo.framework */; };
84DD5EA31A89E2AA007336C1 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
84DD5EA71A89E406007336C1 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DD5EA61A89E406007336C1 /* CoreLocation.framework */; };
@@ -37,10 +30,6 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
841CBB8E1A8A34920066E9F1 /* assets in CopyFiles */,
841CBB8D1A8A348B0066E9F1 /* autoconfig in CopyFiles */,
841CBB8C1A8A34810066E9F1 /* overlays in CopyFiles */,
841CBB8B1A8A347C0066E9F1 /* shaders_cg in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -50,9 +39,6 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
841CBB8A1A8A34470066E9F1 /* cht in CopyFiles */,
841CBB891A8A34420066E9F1 /* cursors in CopyFiles */,
841CBB881A8A343E0066E9F1 /* rdb in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -65,13 +51,6 @@
5061C8A31AE47E510080AE14 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
509F0C9C1AA23AFC00619ECC /* griffin_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = griffin_objc.m; path = ../griffin/griffin_objc.m; sourceTree = "<group>"; };
840222FB1A889EE2009AB261 /* griffin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = griffin.c; path = ../griffin/griffin.c; sourceTree = SOURCE_ROOT; };
841CBB731A8A308C0066E9F1 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../media/assets; sourceTree = "<group>"; };
841CBB751A8A30CC0066E9F1 /* autoconfig */ = {isa = PBXFileReference; lastKnownFileType = folder; name = autoconfig; path = ../media/autoconfig; sourceTree = "<group>"; };
841CBB771A8A30F00066E9F1 /* overlays */ = {isa = PBXFileReference; lastKnownFileType = folder; name = overlays; path = ../media/overlays; sourceTree = "<group>"; };
841CBB791A8A311C0066E9F1 /* shaders_cg */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shaders_cg; path = ../media/shaders_cg; sourceTree = "<group>"; };
841CBB7B1A8A31370066E9F1 /* cht */ = {isa = PBXFileReference; lastKnownFileType = folder; name = cht; path = ../media/libretrodb/cht; sourceTree = "<group>"; };
841CBB7D1A8A314F0066E9F1 /* cursors */ = {isa = PBXFileReference; lastKnownFileType = folder; name = cursors; path = ../media/libretrodb/cursors; sourceTree = "<group>"; };
841CBB7F1A8A31650066E9F1 /* rdb */ = {isa = PBXFileReference; lastKnownFileType = folder; name = rdb; path = ../media/libretrodb/rdb; sourceTree = "<group>"; };
84DD5E9E1A88E45B007336C1 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; };
84DD5EA61A89E406007336C1 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = /System/Library/Frameworks/CoreLocation.framework; sourceTree = "<absolute>"; };
84DD5EA81A89E4BE007336C1 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
@@ -195,24 +174,9 @@
name = Core;
sourceTree = "<group>";
};
841CBB811A8A33640066E9F1 /* libretrodb */ = {
isa = PBXGroup;
children = (
841CBB7B1A8A31370066E9F1 /* cht */,
841CBB7D1A8A314F0066E9F1 /* cursors */,
841CBB7F1A8A31650066E9F1 /* rdb */,
);
name = libretrodb;
sourceTree = "<group>";
};
841CBB821A8A33810066E9F1 /* Assets */ = {
isa = PBXGroup;
children = (
841CBB731A8A308C0066E9F1 /* assets */,
841CBB751A8A30CC0066E9F1 /* autoconfig */,
841CBB771A8A30F00066E9F1 /* overlays */,
841CBB791A8A311C0066E9F1 /* shaders_cg */,
841CBB811A8A33640066E9F1 /* libretrodb */,
);
name = Assets;
sourceTree = "<group>";
@@ -246,6 +210,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0640;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RetroArch" */;
compatibilityVersion = "Xcode 3.1";
@@ -312,6 +277,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -331,7 +297,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_CORETEXT",
"-DHAVE_IOHIDMANAGER",
"-DHAVE_CORELOCATION",
@@ -366,7 +332,6 @@
);
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
PRODUCT_NAME = RetroArch;
WARNING_CFLAGS = "-Wno-invalid-source-encoding";
};
name = Debug;
};
@@ -374,6 +339,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -391,8 +357,9 @@
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_IMAGEVIEWER",
"-DHAVE_IOHIDMANAGER",
"-DHAVE_CORETEXT",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
@@ -425,14 +392,12 @@
);
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
PRODUCT_NAME = RetroArch;
WARNING_CFLAGS = "-Wno-invalid-source-encoding";
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -447,7 +412,6 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -28,17 +28,17 @@
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>6B9F0B13E5864452B91F13C09B7ED9EB989E82AD</key>
<string>../../../../media/autoconfig</string>
<string>../../../..media/autoconfig</string>
<key>76200F0D6584D865E96F58DE862E738E88B23A3C</key>
<string>../../../../..</string>
<key>A267D9543F572B4C32EC6E1B876E3B9BFE4DE8F6</key>
<string>../../../../media/assets</string>
<string>../../../..media/assets</string>
<key>C3AEE01BDA902108663DB5DB9CD7916436919463</key>
<string>../../../../media/libretrodb</string>
<string>../../../..media/libretrodb</string>
<key>C7C12374C7051F8843B3EFA1ACCAF2907102CCF7</key>
<string>../../../..</string>
<key>EF363D58F01B3FB341FA6C851870E60E4F080E97</key>
<string>../../../../media/overlays</string>
<string>../../../..media/overlays</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/libretro/RetroArch.git</string>
+35 -40
View File
@@ -250,13 +250,13 @@ const char* config_get_audio_driver_options(void)
if (!options)
{
string_list_free(options_l);
options_l = NULL;
return NULL;
options = NULL;
goto end;
}
string_list_join_concat(options, options_len, options_l, "|");
end:
string_list_free(options_l);
options_l = NULL;
@@ -297,11 +297,13 @@ void uninit_audio(void)
if (driver->audio_data && driver->audio)
driver->audio->free(driver->audio_data);
free(audio_data.conv_outsamples);
if (audio_data.conv_outsamples)
free(audio_data.conv_outsamples);
audio_data.conv_outsamples = NULL;
audio_data.data_ptr = 0;
free(audio_data.rewind_buf);
if (audio_data.rewind_buf)
free(audio_data.rewind_buf);
audio_data.rewind_buf = NULL;
if (!settings->audio.enable)
@@ -313,10 +315,18 @@ void uninit_audio(void)
rarch_resampler_freep(&driver->resampler,
&driver->resampler_data);
free(audio_data.data);
if (audio_data.audio_callback.callback)
{
audio_data.audio_callback.callback = NULL;
audio_data.audio_callback.set_state = NULL;
}
if (audio_data.data)
free(audio_data.data);
audio_data.data = NULL;
free(audio_data.outsamples);
if (audio_data.outsamples)
free(audio_data.outsamples);
audio_data.outsamples = NULL;
event_command(EVENT_CMD_DSP_FILTER_DEINIT);
@@ -471,18 +481,7 @@ void init_audio(void)
return;
error:
if (audio_data.conv_outsamples)
free(audio_data.conv_outsamples);
audio_data.conv_outsamples = NULL;
if (audio_data.data)
free(audio_data.data);
audio_data.data = NULL;
if (audio_data.rewind_buf)
free(audio_data.rewind_buf);
audio_data.rewind_buf = NULL;
if (audio_data.outsamples)
free(audio_data.outsamples);
audio_data.outsamples = NULL;
uninit_audio();
}
bool audio_driver_mute_toggle(void)
@@ -506,14 +505,6 @@ bool audio_driver_mute_toggle(void)
return true;
}
static int audio_driver_write_avail(void)
{
driver_t *driver = driver_get_ptr();
const audio_driver_t *audio = audio_get_ptr(driver);
return audio->write_avail(driver->audio_data);
}
/*
* audio_driver_readjust_input_rate:
*
@@ -521,11 +512,14 @@ static int audio_driver_write_avail(void)
*/
void audio_driver_readjust_input_rate(void)
{
driver_t *driver = driver_get_ptr();
const audio_driver_t *audio = driver ?
(const audio_driver_t*)driver->audio : NULL;
settings_t *settings = config_get_ptr();
unsigned write_idx = audio_data.buffer_free_samples_count++ &
(AUDIO_BUFFER_FREE_SAMPLES_COUNT - 1);
int half_size = audio_data.driver_buffer_size / 2;
int avail = audio_driver_write_avail();
int avail = audio->write_avail(driver->audio_data);
int delta_mid = avail - half_size;
double direction = (double)delta_mid / half_size;
double adjust = 1.0 + settings->audio.rate_control_delta * direction;
@@ -547,7 +541,8 @@ void audio_driver_readjust_input_rate(void)
bool audio_driver_alive(void)
{
driver_t *driver = driver_get_ptr();
const audio_driver_t *audio = audio_get_ptr(driver);
const audio_driver_t *audio = driver ?
(const audio_driver_t*)driver->audio : NULL;
return audio->alive(driver->audio_data);
}
@@ -588,14 +583,6 @@ void audio_driver_set_nonblocking_state(bool enable)
audio_data.block_chunk_size;
}
ssize_t audio_driver_write(const void *buf, size_t size)
{
driver_t *driver = driver_get_ptr();
const audio_driver_t *audio = audio_get_ptr(driver);
return audio->write(driver->audio_data, buf, size);
}
/**
* audio_driver_flush:
* @data : pointer to audio buffer.
@@ -616,6 +603,8 @@ bool audio_driver_flush(const int16_t *data, size_t samples)
struct rarch_dsp_data dsp_data = {0};
runloop_t *runloop = rarch_main_get_ptr();
driver_t *driver = driver_get_ptr();
const audio_driver_t *audio = driver ?
(const audio_driver_t*)driver->audio : NULL;
settings_t *settings = config_get_ptr();
if (driver->recording_data)
@@ -689,7 +678,7 @@ bool audio_driver_flush(const int16_t *data, size_t samples)
output_size = sizeof(int16_t);
}
if (audio_driver_write(output_data, output_frames * output_size * 2) < 0)
if (audio->write(driver->audio_data, output_data, output_frames * output_size * 2) < 0)
{
driver->audio_active = false;
return false;
@@ -880,11 +869,17 @@ bool audio_driver_has_callback(void)
void audio_driver_callback(void)
{
if (audio_driver_has_callback())
audio_data.audio_callback.callback();
{
if (audio_data.audio_callback.callback)
audio_data.audio_callback.callback();
}
}
void audio_driver_callback_set_state(bool state)
{
if (audio_driver_has_callback())
audio_data.audio_callback.set_state(state);
{
if (audio_data.audio_callback.set_state)
audio_data.audio_callback.set_state(state);
}
}
-2
View File
@@ -145,8 +145,6 @@ void uninit_audio(void);
void init_audio(void);
ssize_t audio_driver_write(const void *buf, size_t size);
bool audio_driver_flush(const int16_t *data, size_t samples);
void audio_driver_sample(int16_t left, int16_t right);
+6 -5
View File
@@ -87,9 +87,9 @@ void audio_convert_float_to_s16_C(int16_t *out,
void audio_convert_s16_to_float_SSE2(float *out,
const int16_t *in, size_t samples, float gain)
{
float fgain = gain / UINT32_C(0x80000000);
__m128 factor = _mm_set1_ps(fgain);
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)
{
@@ -155,14 +155,15 @@ void audio_convert_s16_to_float_altivec(float *out,
const int16_t *in, size_t samples, float gain)
{
size_t samples_in = samples;
const vector float gain_vec = { gain, gain , gain, gain };
const vector float zero_vec = { 0.0f, 0.0f, 0.0f, 0.0f};
/* 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);
@@ -386,7 +387,7 @@ void audio_convert_float_to_s16_ALLEGREX(int16_t *out,
for (; i < samples; i++)
{
int32_t val = (int32_t)(in[i] * 0x8000);
out[i] = (val > 0x7FFF) ? 0x7FFF :
out[i] = (val > 0x7FFF) ? 0x7FFF :
(val < -0x8000 ? -0x8000 : (int16_t)val);
}
}
+6 -12
View File
@@ -419,10 +419,7 @@ static INLINE float cc_int(float x, float b)
return (val > M_PI) ? M_PI : (val < -M_PI) ? -M_PI : val;
}
static INLINE float cc_kernel(float x, float b)
{
return (cc_int(x + 0.5, b) - cc_int(x - 0.5, b)) / (2.0 * M_PI);
}
#define cc_kernel(x, b) ((cc_int((x) + 0.5, (b)) - cc_int((x) - 0.5, (b))) / (2.0 * M_PI))
#else
static INLINE float cc_int(float x, float b)
{
@@ -433,10 +430,7 @@ static INLINE float cc_int(float x, float b)
return (val > 0.5) ? 0.5 : (val < -0.5) ? -0.5 : val;
}
static INLINE float cc_kernel(float x, float b)
{
return (cc_int(x + 0.5, b) - cc_int(x - 0.5, b));
}
#define cc_kernel(x, b) ((cc_int((x) + 0.5, (b)) - cc_int((x) - 0.5, (b))))
#endif
static INLINE void add_to(const audio_frame_float_t *source,
@@ -503,15 +497,15 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
while (re->distance < 1.0)
{
int i;
float temp;
outp->l = 0.0;
outp->r = 0.0;
for (i = 0; i < 4; i++)
{
temp = cc_kernel(re->distance + 1.0 - i, b);
outp->l += re->buffer[i].l * temp;
outp->r += re->buffer[i].r * temp;
float temp = cc_kernel(re->distance + 1.0 - i, b);
outp->l += re->buffer[i].l * temp;
outp->r += re->buffer[i].r * temp;
}
re->distance += ratio;
+42 -48
View File
@@ -121,10 +121,7 @@ static INLINE double sinc(double val)
}
#if defined(SINC_WINDOW_LANCZOS)
static INLINE double window_function(double idx)
{
return sinc(M_PI * idx);
}
#define window_function(idx) (sinc(M_PI * (idx)))
#elif defined(SINC_WINDOW_KAISER)
/* Modified Bessel function of first order.
* Check Wiki for mathematical definition ... */
@@ -153,10 +150,7 @@ static INLINE double besseli0(double x)
return sum;
}
static INLINE double window_function(double idx)
{
return besseli0(SINC_WINDOW_KAISER_BETA * sqrt(1 - idx * idx));
}
#define window_function(idx) (besseli0(SINC_WINDOW_KAISER_BETA * sqrt(1 - (idx) * (idx))))
#else
#error "No SINC window function defined."
#endif
@@ -247,17 +241,17 @@ static INLINE void process_sinc_C(rarch_sinc_resampler_t *resamp,
float *out_buffer)
{
unsigned i;
float sum_l = 0.0f;
float sum_r = 0.0f;
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
float sum_l = 0.0f;
float sum_r = 0.0f;
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
#if SINC_COEFF_LERP
const float *phase_table = resamp->phase_table + phase * taps * 2;
const float *delta_table = phase_table + taps;
float delta = (float)(resamp->time & SUBPHASE_MASK) * SUBPHASE_MOD;
float delta = (float)
(resamp->time & SUBPHASE_MASK) * SUBPHASE_MOD;
#else
const float *phase_table = resamp->phase_table + phase * taps;
#endif
@@ -283,18 +277,18 @@ static INLINE void process_sinc_C(rarch_sinc_resampler_t *resamp,
static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer)
{
unsigned i;
__m256 sum_l = _mm256_setzero_ps();
__m256 sum_r = _mm256_setzero_ps();
__m256 sum_l = _mm256_setzero_ps();
__m256 sum_r = _mm256_setzero_ps();
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
#if SINC_COEFF_LERP
const float *phase_table = resamp->phase_table + phase * taps * 2;
const float *delta_table = phase_table + taps;
__m256 delta = _mm256_set1_ps((float)
__m256 delta = _mm256_set1_ps((float)
(resamp->time & SUBPHASE_MASK) * SUBPHASE_MOD);
#else
const float *phase_table = resamp->phase_table + phase * taps;
@@ -302,28 +296,28 @@ static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer)
for (i = 0; i < taps; i += 8)
{
__m256 buf_l = _mm256_loadu_ps(buffer_l + i);
__m256 buf_r = _mm256_loadu_ps(buffer_r + i);
__m256 buf_l = _mm256_loadu_ps(buffer_l + i);
__m256 buf_r = _mm256_loadu_ps(buffer_r + i);
#if SINC_COEFF_LERP
__m256 deltas = _mm256_load_ps(delta_table + i);
__m256 sinc = _mm256_add_ps(_mm256_load_ps(phase_table + i),
__m256 sinc = _mm256_add_ps(_mm256_load_ps(phase_table + i),
_mm256_mul_ps(deltas, delta));
#else
__m256 sinc = _mm256_load_ps(phase_table + i);
__m256 sinc = _mm256_load_ps(phase_table + i);
#endif
sum_l = _mm256_add_ps(sum_l, _mm256_mul_ps(buf_l, sinc));
sum_r = _mm256_add_ps(sum_r, _mm256_mul_ps(buf_r, sinc));
sum_l = _mm256_add_ps(sum_l, _mm256_mul_ps(buf_l, sinc));
sum_r = _mm256_add_ps(sum_r, _mm256_mul_ps(buf_r, sinc));
}
/* hadd on AVX is weird, and acts on low-lanes
* and high-lanes separately. */
__m256 res_l = _mm256_hadd_ps(sum_l, sum_l);
__m256 res_r = _mm256_hadd_ps(sum_r, sum_r);
res_l = _mm256_hadd_ps(res_l, res_l);
res_r = _mm256_hadd_ps(res_r, res_r);
res_l = _mm256_add_ps(_mm256_permute2f128_ps(res_l, res_l, 1), res_l);
res_r = _mm256_add_ps(_mm256_permute2f128_ps(res_r, res_r, 1), res_r);
res_l = _mm256_hadd_ps(res_l, res_l);
res_r = _mm256_hadd_ps(res_r, res_r);
res_l = _mm256_add_ps(_mm256_permute2f128_ps(res_l, res_l, 1), res_l);
res_r = _mm256_add_ps(_mm256_permute2f128_ps(res_r, res_r, 1), res_r);
/* This is optimized to mov %xmmN, [mem].
* There doesn't seem to be any _mm256_store_ss intrinsic. */
@@ -335,23 +329,23 @@ static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer)
static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer)
{
unsigned i;
__m128 sum_l = _mm_setzero_ps();
__m128 sum_r = _mm_setzero_ps();
__m128 sum;
__m128 sum_l = _mm_setzero_ps();
__m128 sum_r = _mm_setzero_ps();
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
#if SINC_COEFF_LERP
const float *phase_table = resamp->phase_table + phase * taps * 2;
const float *delta_table = phase_table + taps;
__m128 delta = _mm_set1_ps((float)
__m128 delta = _mm_set1_ps((float)
(resamp->time & SUBPHASE_MASK) * SUBPHASE_MOD);
#else
const float *phase_table = resamp->phase_table + phase * taps;
#endif
__m128 sum;
for (i = 0; i < taps; i += 4)
{
@@ -360,13 +354,13 @@ static void process_sinc(rarch_sinc_resampler_t *resamp, float *out_buffer)
#if SINC_COEFF_LERP
__m128 deltas = _mm_load_ps(delta_table + i);
__m128 _sinc = _mm_add_ps(_mm_load_ps(phase_table + i),
__m128 _sinc = _mm_add_ps(_mm_load_ps(phase_table + i),
_mm_mul_ps(deltas, delta));
#else
__m128 _sinc = _mm_load_ps(phase_table + i);
#endif
sum_l = _mm_add_ps(sum_l, _mm_mul_ps(buf_l, _sinc));
sum_r = _mm_add_ps(sum_r, _mm_mul_ps(buf_r, _sinc));
sum_l = _mm_add_ps(sum_l, _mm_mul_ps(buf_l, _sinc));
sum_r = _mm_add_ps(sum_r, _mm_mul_ps(buf_r, _sinc));
}
/* Them annoying shuffles.
@@ -413,11 +407,11 @@ void process_sinc_neon_asm(float *out, const float *left,
static void process_sinc_neon(rarch_sinc_resampler_t *resamp,
float *out_buffer)
{
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
const float *buffer_l = resamp->buffer_l + resamp->ptr;
const float *buffer_r = resamp->buffer_r + resamp->ptr;
unsigned phase = resamp->time >> SUBPHASE_BITS;
unsigned taps = resamp->taps;
unsigned phase = resamp->time >> SUBPHASE_BITS;
unsigned taps = resamp->taps;
const float *phase_table = resamp->phase_table + phase * taps;
process_sinc_neon_asm(out_buffer, buffer_l, buffer_r, phase_table, taps);
+1 -1
View File
@@ -38,7 +38,7 @@ static void *android_camera_init(const char *device, uint64_t caps,
(void)width;
(void)height;
if ((caps & (1ULL << RETRO_CAMERA_BUFFER_OPENGL_TEXTURE)) == 0)
if ((caps & (UINT64_C(1) << RETRO_CAMERA_BUFFER_OPENGL_TEXTURE)) == 0)
{
RARCH_ERR("androidcamera returns OpenGL texture.\n");
return NULL;
+1 -1
View File
@@ -302,7 +302,7 @@ static void *v4l_init(const char *device, uint64_t caps,
struct stat st;
video4linux_t *v4l = NULL;
if ((caps & (1ULL << RETRO_CAMERA_BUFFER_RAW_FRAMEBUFFER)) == 0)
if ((caps & (UINT64_C(1) << RETRO_CAMERA_BUFFER_RAW_FRAMEBUFFER)) == 0)
{
RARCH_ERR("video4linux2 returns raw framebuffers.\n");
return NULL;
+3
View File
@@ -152,6 +152,9 @@ cheat_manager_t *cheat_manager_load(const char *path)
if (config_get_bool(conf, enable_key, &tmp_bool))
cheat->cheats[i].state = tmp_bool;
if (tmp)
free(tmp);
}
config_file_free(conf);
+18 -34
View File
@@ -534,7 +534,7 @@ static void event_deinit_core(bool reinit)
{
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
rarch_system_info_t *info = rarch_system_info_get_ptr();
pretro_unload_game();
pretro_deinit();
@@ -545,7 +545,11 @@ static void event_deinit_core(bool reinit)
if(settings->sort_savefiles_enable)
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
if(settings->sort_savestates_enable)
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
/* restore system directory if it was set to <content dir> */
if(settings->system_in_content_dir && !strcmp(info->info.library_name,"No Core"))
settings->system_directory[0] = '\0';
/* auto overrides: reload the original config */
if(global->overrides_active)
@@ -554,7 +558,6 @@ static void event_deinit_core(bool reinit)
global->overrides_active = false;
}
pretro_set_environment(rarch_environment_cb);
uninit_libretro_sym();
}
@@ -733,6 +736,9 @@ static bool event_init_core(void)
global->overrides_active = false;
}
/* reset video format to libretro's default */
video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);
pretro_set_environment(rarch_environment_cb);
/* auto-remap: apply remap files */
@@ -740,7 +746,7 @@ static bool event_init_core(void)
config_load_remap();
/* per-core saves: reset redirection paths */
if(settings->sort_savestates_enable || settings->sort_savefiles_enable)
if((settings->sort_savestates_enable || settings->sort_savefiles_enable) && !global->libretro_no_content)
set_paths_redirect(global->basename);
rarch_verify_api_version();
@@ -1152,6 +1158,8 @@ bool event_command(enum event_command cmd)
{
const struct retro_hw_render_callback *hw_render =
(const struct retro_hw_render_callback*)video_driver_callback();
const input_driver_t *input = driver ?
(const input_driver_t*)driver->input : NULL;
driver->video_cache_context = hw_render->cache_context;
driver->video_cache_context_ack = false;
@@ -1159,7 +1167,7 @@ bool event_command(enum event_command cmd)
driver->video_cache_context = false;
/* Poll input to avoid possibly stale data to corrupt things. */
input_driver_poll();
input->poll(driver->input_data);
#ifdef HAVE_MENU
menu_display_fb_set_dirty();
@@ -1259,41 +1267,19 @@ bool event_command(enum event_command cmd)
break;
case EVENT_CMD_OVERLAY_DEINIT:
#ifdef HAVE_OVERLAY
if (driver->overlay)
input_overlay_free(driver->overlay);
driver->overlay = NULL;
memset(&driver->overlay_state, 0, sizeof(driver->overlay_state));
input_overlay_free_ptr();
#endif
break;
case EVENT_CMD_OVERLAY_INIT:
event_command(EVENT_CMD_OVERLAY_DEINIT);
#ifdef HAVE_OVERLAY
if (driver->osk_enable)
{
if (!*settings->osk.overlay)
break;
}
else
{
if (!*settings->input.overlay)
break;
}
driver->overlay = input_overlay_new(
driver->osk_enable ?
settings->osk.overlay : settings->input.overlay,
driver->osk_enable ?
settings->osk.enable : settings->input.overlay_enable,
settings->input.overlay_opacity,
settings->input.overlay_scale);
if (!driver->overlay)
if (input_overlay_new_ptr() == -1)
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_LOAD_OVERLAY));
#endif
break;
case EVENT_CMD_OVERLAY_NEXT:
#ifdef HAVE_OVERLAY
input_overlay_next(driver->overlay, settings->input.overlay_opacity);
input_overlay_next(settings->input.overlay_opacity);
#endif
break;
case EVENT_CMD_DSP_FILTER_DEINIT:
@@ -1393,14 +1379,12 @@ bool event_command(enum event_command cmd)
break;
case EVENT_CMD_OVERLAY_SET_SCALE_FACTOR:
#ifdef HAVE_OVERLAY
input_overlay_set_scale_factor(driver->overlay,
settings->input.overlay_scale);
input_overlay_set_scale_factor(settings->input.overlay_scale);
#endif
break;
case EVENT_CMD_OVERLAY_SET_ALPHA_MOD:
#ifdef HAVE_OVERLAY
input_overlay_set_alpha_mod(driver->overlay,
settings->input.overlay_opacity);
input_overlay_set_alpha_mod(settings->input.overlay_opacity);
#endif
break;
case EVENT_CMD_DRIVERS_DEINIT:
+35 -10
View File
@@ -317,7 +317,9 @@ enum
#define MENU_DEFAULT_DRIVER MENU_RMENU
#elif defined(HAVE_RMENU_XUI)
#define MENU_DEFAULT_DRIVER MENU_RMENU_XUI
#elif defined(IOS) || defined(ANDROID)
#elif defined(MAC_OS_X_VERSION_10_6)
#define MENU_DEFAULT_DRIVER MENU_XMB
#elif defined(IOS) || defined(ANDROID) || defined(__CELLOS_LV2__)
#define MENU_DEFAULT_DRIVER MENU_GLUI
#else
#define MENU_DEFAULT_DRIVER MENU_RGUI
@@ -337,6 +339,16 @@ static const bool pointer_enable = true;
static const bool pointer_enable = false;
#endif
/* Certain platforms might have assets stored in the bundle that
* we need to extract to a user-writable directory on first boot.
*
* Examples include: Android, iOS/OSX) */
#if defined(ANDROID)
static bool bundle_assets_extract_enable = true;
#else
static bool bundle_assets_extract_enable = false;
#endif
static const bool def_history_list_enable = true;
static const unsigned int def_user_language = 0;
@@ -418,8 +430,13 @@ static unsigned swap_interval = 1;
*/
static const bool video_threaded = false;
#ifdef HAVE_THREADS
#if defined(HAVE_THREADS)
#if defined(GEKKO) || defined(PSP) || defined(_3DS) || defined(_XBOX1)
/* For single-core consoles right now it's better to have this be disabled. */
static const bool threaded_data_runloop_enable = false;
#else
static const bool threaded_data_runloop_enable = true;
#endif
#else
static const bool threaded_data_runloop_enable = false;
#endif
@@ -475,6 +492,8 @@ static bool config_save_on_exit = true;
static const bool default_overlay_enable = false;
static const bool overlay_hide_in_menu = true;
#ifdef HAVE_MENU
static bool default_block_config_read = true;
@@ -507,11 +526,21 @@ static unsigned default_menu_btn_info = RETRO_DEVICE_ID_JOYPAD_SELECT;
static unsigned default_menu_btn_scroll_down = RETRO_DEVICE_ID_JOYPAD_R;
static unsigned default_menu_btn_scroll_up = RETRO_DEVICE_ID_JOYPAD_L;
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
static unsigned menu_toggle_gamepad_combo = 2;
#else
static unsigned menu_toggle_gamepad_combo = 0;
#endif
#ifdef ANDROID
static bool back_as_menu_toggle_enable = true;
#endif
/* Crop overscanned frames. */
static const bool crop_overscan = true;
/* Font size for on-screen messages. */
#if defined(HAVE_RMENU)
#if defined(HAVE_LIBDBGFONT)
static const float font_size = 1.0f;
#else
static const float font_size = 32;
@@ -520,7 +549,7 @@ static const float font_size = 32;
/* Offset for where messages will be placed on-screen.
* Values are in range [0.0, 1.0]. */
static const float message_pos_offset_x = 0.05;
#ifdef RARCH_CONSOLE
#if defined(_XBOX1)
static const float message_pos_offset_y = 0.90;
#else
static const float message_pos_offset_y = 0.05;
@@ -583,7 +612,7 @@ static const int out_latency = 64;
static const bool audio_sync = true;
/* Audio rate control. */
#if defined(GEKKO) || !defined(RARCH_CONSOLE)
#if !defined(RARCH_CONSOLE)
static const bool rate_control = true;
#else
static const bool rate_control = false;
@@ -703,11 +732,7 @@ static const bool input_descriptor_label_show = true;
static const bool input_descriptor_hide_unbound = false;
#ifdef RARCH_MOBILE
static const unsigned input_max_users = 4;
#else
static const unsigned input_max_users = MAX_USERS;
#endif
static const unsigned input_max_users = 5;
#if defined(ANDROID)
#if defined(ANDROID_ARM)
+111 -14
View File
@@ -469,6 +469,7 @@ static void config_set_defaults(void)
settings->video.black_frame_insertion = black_frame_insertion;
settings->video.swap_interval = swap_interval;
settings->video.threaded = video_threaded;
settings->bundle_assets_extract_enable = bundle_assets_extract_enable;
if (g_defaults.settings.video_threaded_enable != video_threaded)
settings->video.threaded = g_defaults.settings.video_threaded_enable;
@@ -584,10 +585,12 @@ static void config_set_defaults(void)
settings->camera.allow = false;
settings->input.autoconfig_descriptor_label_show = true;
settings->input.back_as_menu_toggle_enable = true;
settings->input.input_descriptor_label_show = input_descriptor_label_show;
settings->input.input_descriptor_hide_unbound = input_descriptor_hide_unbound;
settings->input.remap_binds_enable = true;
settings->input.max_users = input_max_users;
settings->input.menu_toggle_gamepad_combo = menu_toggle_gamepad_combo;
rarch_assert(sizeof(settings->input.binds[0]) >= sizeof(retro_keybinds_1));
rarch_assert(sizeof(settings->input.binds[1]) >= sizeof(retro_keybinds_rest));
@@ -632,6 +635,7 @@ static void config_set_defaults(void)
settings->input.overlay_enable = true;
settings->input.overlay_enable_autopreferred = true;
settings->input.overlay_hide_in_menu = overlay_hide_in_menu;
settings->input.overlay_opacity = 0.7f;
settings->input.overlay_scale = 1.0f;
settings->input.autodetect_enable = input_autodetect_enable;
@@ -670,6 +674,7 @@ static void config_set_defaults(void)
*global->record.output_dir = '\0';
*global->record.config_dir = '\0';
*settings->bundle_assets_last_extracted_version = '\0';
*settings->core_options_path = '\0';
*settings->content_history_path = '\0';
*settings->content_history_directory = '\0';
@@ -1223,6 +1228,9 @@ static bool config_load_file(const char *path, bool set_defaults)
if (!global->force_fullscreen)
CONFIG_GET_BOOL_BASE(conf, settings, video.fullscreen, "video_fullscreen");
CONFIG_GET_BOOL_BASE(conf, settings, bundle_assets_extract_enable, "bundle_assets_extract_enable");
CONFIG_GET_PATH_BASE(conf, settings, bundle_assets_last_extracted_version, "bundle_assets_last_extracted_version");
CONFIG_GET_BOOL_BASE(conf, settings, video.windowed_fullscreen, "video_windowed_fullscreen");
CONFIG_GET_INT_BASE (conf, settings, video.monitor_index, "video_monitor_index");
CONFIG_GET_BOOL_BASE(conf, settings, video.disable_composition, "video_disable_composition");
@@ -1333,6 +1341,11 @@ static bool config_load_file(const char *path, bool set_defaults)
config_get_bool(conf, "soft_filter_enable",
&global->console.softfilter_enable);
CONFIG_GET_INT_BASE(conf, global, console.screen.resolutions.width,
"console_resolution_width");
CONFIG_GET_INT_BASE(conf, global, console.screen.resolutions.height,
"console_resolution_height");
CONFIG_GET_INT_BASE(conf, global, console.screen.flicker_filter_index,
"flicker_filter_index");
CONFIG_GET_INT_BASE(conf, global, console.screen.soft_filter_index,
@@ -1380,10 +1393,12 @@ static bool config_load_file(const char *path, bool set_defaults)
if (!strcmp(settings->audio.filter_dir, "default"))
*settings->audio.filter_dir = '\0';
CONFIG_GET_BOOL_BASE(conf, settings, input.back_as_menu_toggle_enable, "back_as_menu_toggle_enable");
CONFIG_GET_BOOL_BASE(conf, settings, input.remap_binds_enable, "input_remap_binds_enable");
CONFIG_GET_FLOAT_BASE(conf, settings, input.axis_threshold, "input_axis_threshold");
CONFIG_GET_BOOL_BASE(conf, settings, input.netplay_client_swap_input, "netplay_client_swap_input");
CONFIG_GET_INT_BASE(conf, settings, input.max_users, "input_max_users");
CONFIG_GET_INT_BASE(conf, settings, input.menu_toggle_gamepad_combo, "input_menu_toggle_gamepad_combo");
CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_label_show, "input_descriptor_label_show");
CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_hide_unbound, "input_descriptor_hide_unbound");
CONFIG_GET_BOOL_BASE(conf, settings, input.autoconfig_descriptor_label_show, "autoconfig_descriptor_label_show");
@@ -1541,8 +1556,6 @@ static bool config_load_file(const char *path, bool set_defaults)
CONFIG_GET_BOOL_BASE(conf, global, perfcnt_enable, "perfcnt_enable");
CONFIG_GET_INT_BASE(conf, settings, archive.mode, "archive_mode");
config_get_path(conf, "recording_output_directory", global->record.output_dir,
sizeof(global->record.output_dir));
config_get_path(conf, "recording_config_directory", global->record.config_dir,
@@ -1556,6 +1569,7 @@ static bool config_load_file(const char *path, bool set_defaults)
config_get_path(conf, "input_overlay", settings->input.overlay, sizeof(settings->input.overlay));
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_enable, "input_overlay_enable");
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_enable_autopreferred, "input_overlay_enable_autopreferred");
CONFIG_GET_BOOL_BASE(conf, settings, input.overlay_hide_in_menu, "input_overlay_hide_in_menu");
CONFIG_GET_FLOAT_BASE(conf, settings, input.overlay_opacity, "input_overlay_opacity");
CONFIG_GET_FLOAT_BASE(conf, settings, input.overlay_scale, "input_overlay_scale");
@@ -1700,10 +1714,16 @@ static bool config_load_file(const char *path, bool set_defaults)
{
RARCH_WARN("system_directory is not set in config. Assuming system directory is same folder as game: \"%s\".\n",
settings->system_directory);
settings->system_in_content_dir = true;
}
if (!strcmp(settings->system_directory, "default"))
{
RARCH_WARN("system_directory is not set in config. Assuming system directory is same folder as game: \"%s\".\n",
settings->system_directory);
*settings->system_directory = '\0';
settings->system_in_content_dir = true;
}
config_read_keybinds_conf(conf);
@@ -2162,7 +2182,7 @@ static void save_keybind_hat(config_file_t *conf, const char *key,
}
static void save_keybind_joykey(config_file_t *conf, const char *prefix,
const char *base, const struct retro_keybind *bind)
const char *base, const struct retro_keybind *bind, bool save_empty)
{
char key[64] = {0};
@@ -2170,7 +2190,10 @@ static void save_keybind_joykey(config_file_t *conf, const char *prefix,
strlcat(key, "_btn", sizeof(key));
if (bind->joykey == NO_BTN)
config_set_string(conf, key, "nul");
{
if (save_empty)
config_set_string(conf, key, "nul");
}
else if (GET_HAT_DIR(bind->joykey))
save_keybind_hat(conf, key, bind);
else
@@ -2178,7 +2201,7 @@ static void save_keybind_joykey(config_file_t *conf, const char *prefix,
}
static void save_keybind_axis(config_file_t *conf, const char *prefix,
const char *base, const struct retro_keybind *bind)
const char *base, const struct retro_keybind *bind, bool save_empty)
{
char key[64] = {0};
char config[16] = {0};
@@ -2189,7 +2212,10 @@ static void save_keybind_axis(config_file_t *conf, const char *prefix,
strlcat(key, "_axis", sizeof(key));
if (bind->joyaxis == AXIS_NONE)
config_set_string(conf, key, "nul");
{
if (save_empty)
config_set_string(conf, key, "nul");
}
else if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
{
dir = '-';
@@ -2214,18 +2240,19 @@ static void save_keybind_axis(config_file_t *conf, const char *prefix,
* @prefix : prefix name of keybind
* @base : base name of keybind
* @bind : pointer to key binding object
* @kb : save keyboard binds
*
* Save a key binding to the config file.
*/
static void save_keybind(config_file_t *conf, const char *prefix,
const char *base, const struct retro_keybind *bind)
const char *base, const struct retro_keybind *bind, bool save_kb, bool save_empty)
{
if (!bind->valid)
return;
save_keybind_key(conf, prefix, base, bind);
save_keybind_joykey(conf, prefix, base, bind);
save_keybind_axis(conf, prefix, base, bind);
if (save_kb)
save_keybind_key(conf, prefix, base, bind);
save_keybind_joykey(conf, prefix, base, bind, save_empty);
save_keybind_axis(conf, prefix, base, bind, save_empty);
}
/**
@@ -2247,7 +2274,7 @@ static void save_keybinds_user(config_file_t *conf, unsigned user)
if (prefix)
save_keybind(conf, prefix, input_config_bind_map[i].base,
&settings->input.binds[user][i]);
&settings->input.binds[user][i], true, true);
}
}
@@ -2310,6 +2337,67 @@ bool config_save_keybinds_file(const char *path)
return ret;
}
/**
* config_save_autoconf_profile:
* @path : Path that shall be written to.
* @user : Controller number to save
* Writes a controller autoconf file to disk.
**/
bool config_save_autoconf_profile(const char *path, unsigned user)
{
unsigned i;
int ret = false;
char buf[PATH_MAX_LENGTH] = {0};
char autoconf_file[PATH_MAX_LENGTH] = {0};
config_file_t *conf = NULL;
settings_t *settings = config_get_ptr();
fill_pathname_join(buf, settings->input.autoconfig_dir,
settings->input.joypad_driver, sizeof(buf));
if(path_is_directory(buf))
{
fill_pathname_join(buf, buf,
path, sizeof(buf));
fill_pathname_noext(autoconf_file, buf, ".cfg", sizeof(autoconf_file));
}
else
{
fill_pathname_join(buf, settings->input.autoconfig_dir,
path, sizeof(buf));
fill_pathname_noext(autoconf_file, buf, ".cfg", sizeof(autoconf_file));
}
conf = config_file_new(autoconf_file);
if (!conf)
{
conf = config_file_new(NULL);
if (!conf)
return false;
}
config_set_string(conf, "input_driver", settings->input.joypad_driver);
config_set_string(conf, "input_device", settings->input.device_names[user]);
if(settings->input.vid[user] && settings->input.pid[user])
{
config_set_int(conf, "input_vendor_id", settings->input.vid[user]);
config_set_int(conf, "input_product_id_id", settings->input.pid[user]);
}
for (i = 0; i < RARCH_FIRST_META_KEY; i++)
{
save_keybind(conf, "input", input_config_bind_map[i].base,
&settings->input.binds[user][i], false, false);
}
ret = config_file_write(conf, autoconf_file);
config_file_free(conf);
return ret;
}
/**
* config_save_file:
* @path : Path that shall be written to.
@@ -2337,12 +2425,15 @@ bool config_save_file(const char *path)
RARCH_LOG("Saving config at path: \"%s\"\n", path);
config_set_int(conf, "input_max_users", settings->input.max_users);
config_set_int(conf, "input_menu_toggle_gamepad_combo", settings->input.menu_toggle_gamepad_combo);
config_set_float(conf, "input_axis_threshold",
settings->input.axis_threshold);
config_set_bool(conf, "ui_companion_start_on_boot", settings->ui.companion_start_on_boot);
config_set_bool(conf, "video_gpu_record", settings->video.gpu_record);
config_set_bool(conf, "input_remap_binds_enable",
settings->input.remap_binds_enable);
config_set_bool(conf, "back_as_menu_toggle_enable",
settings->input.back_as_menu_toggle_enable);
config_set_bool(conf, "netplay_client_swap_input",
settings->input.netplay_client_swap_input);
config_set_bool(conf, "input_descriptor_label_show",
@@ -2399,6 +2490,8 @@ bool config_save_file(const char *path)
config_set_bool(conf, "video_force_srgb_disable",
settings->video.force_srgb_disable);
config_set_bool(conf, "video_fullscreen", settings->video.fullscreen);
config_set_bool(conf, "bundle_assets_extract_enable", settings->bundle_assets_extract_enable);
config_set_string(conf, "bundle_assets_last_extracted_version", settings->bundle_assets_last_extracted_version);
config_set_float(conf, "video_refresh_rate", settings->video.refresh_rate);
config_set_int(conf, "video_monitor_index",
settings->video.monitor_index);
@@ -2561,6 +2654,7 @@ bool config_save_file(const char *path)
config_set_path(conf, "input_overlay", settings->input.overlay);
config_set_bool(conf, "input_overlay_enable", settings->input.overlay_enable);
config_set_bool(conf, "input_overlay_enable_autopreferred", settings->input.overlay_enable_autopreferred);
config_set_bool(conf, "input_overlay_hide_in_menu", settings->input.overlay_hide_in_menu);
config_set_float(conf, "input_overlay_opacity",
settings->input.overlay_opacity);
config_set_float(conf, "input_overlay_scale",
@@ -2583,6 +2677,11 @@ bool config_save_file(const char *path)
config_set_bool(conf, "flicker_filter_enable",
global->console.flickerfilter_enable);
config_set_int(conf, "console_resolution_width",
global->console.screen.resolutions.width);
config_set_int(conf, "console_resolution_height",
global->console.screen.resolutions.height);
config_set_int(conf, "flicker_filter_index",
global->console.screen.flicker_filter_index);
config_set_int(conf, "soft_filter_index",
@@ -2675,8 +2774,6 @@ bool config_save_file(const char *path)
config_set_bool(conf, "core_set_supports_no_game_enable",
settings->core.set_supports_no_game_enable);
config_set_int(conf, "archive_mode", settings->archive.mode);
config_set_int(conf, "menu_ok_btn", settings->menu_ok_btn);
config_set_int(conf, "menu_cancel_btn", settings->menu_cancel_btn);
config_set_int(conf, "menu_search_btn", settings->menu_search_btn);
+18
View File
@@ -214,6 +214,8 @@ typedef struct settings
/* Set by autoconfiguration in joypad_autoconfig_dir.
* Does not override main binds. */
bool autoconfigured[MAX_USERS];
int vid[MAX_USERS];
int pid[MAX_USERS];
unsigned libretro_device[MAX_USERS];
unsigned analog_dpad_mode[MAX_USERS];
@@ -231,6 +233,7 @@ typedef struct settings
bool overlay_enable;
bool overlay_enable_autopreferred;
bool overlay_hide_in_menu;
char overlay[PATH_MAX_LENGTH];
float overlay_opacity;
float overlay_scale;
@@ -241,6 +244,9 @@ typedef struct settings
bool input_descriptor_hide_unbound;
char remapping_path[PATH_MAX_LENGTH];
unsigned menu_toggle_gamepad_combo;
bool back_as_menu_toggle_enable;
} input;
struct
@@ -276,6 +282,9 @@ typedef struct settings
int state_slot;
bool bundle_assets_extract_enable;
char bundle_assets_last_extracted_version[PATH_MAX_LENGTH];
char core_options_path[PATH_MAX_LENGTH];
char content_history_path[PATH_MAX_LENGTH];
char content_history_directory[PATH_MAX_LENGTH];
@@ -294,6 +303,7 @@ typedef struct settings
char resampler_directory[PATH_MAX_LENGTH];
char screenshot_directory[PATH_MAX_LENGTH];
char system_directory[PATH_MAX_LENGTH];
bool system_in_content_dir;
char extraction_directory[PATH_MAX_LENGTH];
char playlist_directory[PATH_MAX_LENGTH];
@@ -487,6 +497,14 @@ bool config_load_remap(void);
**/
bool config_save_keybinds_file(const char *path);
/**
* config_save_autoconf_profile:
* @path : Path that shall be written to.
* @user : Controller number to save
* Writes a controller autoconf file to disk.
**/
bool config_save_autoconf_profile(const char *path, unsigned user);
/**
* config_save_file:
* @path : Path that shall be written to.
+11 -3
View File
@@ -380,6 +380,7 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list,
bool core_info_get_display_name(const char *path, char *s, size_t len)
{
char *core_name = NULL;
char *display_name = NULL;
config_file_t *conf = NULL;
if (!path_file_exists(path))
@@ -393,19 +394,26 @@ bool core_info_get_display_name(const char *path, char *s, size_t len)
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)
return false;
goto error;
strlcpy(s, core_name, len);
snprintf(s, len,"%s",display_name);
free(core_name);
free(display_name);
return true;
error:
if (core_name)
free(core_name);
return false;
}
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
Vendored Executable → Regular
View File
File mode changed.
+560
View File
@@ -0,0 +1,560 @@
// stb_rect_pack.h - v0.06 - public domain - rectangle packing
// Sean Barrett 2014
//
// Useful for e.g. packing rectangular textures into an atlas.
// Does not do rotation.
//
// Not necessarily the awesomest packing method, but better than
// the totally naive one in stb_truetype (which is primarily what
// this is meant to replace).
//
// Has only had a few tests run, may have issues.
//
// More docs to come.
//
// No memory allocations; uses qsort() and assert() from stdlib.
// Can override those by defining STBRP_SORT and STBRP_ASSERT.
//
// This library currently uses the Skyline Bottom-Left algorithm.
//
// Please note: better rectangle packers are welcome! Please
// implement them to the same API, but with a different init
// function.
//
// Credits
//
// Library
// Sean Barrett
// Minor features
// Martins Mozeiko
// Bugfixes / warning fixes
// [your name could be here]
//
// Version history:
//
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
// 0.05: added STBRP_ASSERT to allow replacing assert
// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
// 0.01: initial release
//////////////////////////////////////////////////////////////////////////////
//
// INCLUDE SECTION
//
#ifndef STB_INCLUDE_STB_RECT_PACK_H
#define STB_INCLUDE_STB_RECT_PACK_H
#define STB_RECT_PACK_VERSION 1
#ifdef STBRP_STATIC
#define STBRP_DEF static
#else
#define STBRP_DEF extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct stbrp_context stbrp_context;
typedef struct stbrp_node stbrp_node;
typedef struct stbrp_rect stbrp_rect;
#ifdef STBRP_LARGE_RECTS
typedef int stbrp_coord;
#else
typedef unsigned short stbrp_coord;
#endif
STBRP_DEF void stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
// Assign packed locations to rectangles. The rectangles are of type
// 'stbrp_rect' defined below, stored in the array 'rects', and there
// are 'num_rects' many of them.
//
// Rectangles which are successfully packed have the 'was_packed' flag
// set to a non-zero value and 'x' and 'y' store the minimum location
// on each axis (i.e. bottom-left in cartesian coordinates, top-left
// if you imagine y increasing downwards). Rectangles which do not fit
// have the 'was_packed' flag set to 0.
//
// You should not try to access the 'rects' array from another thread
// while this function is running, as the function temporarily reorders
// the array while it executes.
//
// To pack into another rectangle, you need to call stbrp_init_target
// again. To continue packing into the same rectangle, you can call
// this function again. Calling this multiple times with multiple rect
// arrays will probably produce worse packing results than calling it
// a single time with the full rectangle array, but the option is
// available.
struct stbrp_rect
{
// reserved for your use:
int id;
// input:
stbrp_coord w, h;
// output:
stbrp_coord x, y;
int was_packed; // non-zero if valid packing
}; // 16 bytes, nominally
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
// Initialize a rectangle packer to:
// pack a rectangle that is 'width' by 'height' in dimensions
// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
//
// You must call this function every time you start packing into a new target.
//
// There is no "shutdown" function. The 'nodes' memory must stay valid for
// the following stbrp_pack_rects() call (or calls), but can be freed after
// the call (or calls) finish.
//
// Note: to guarantee best results, either:
// 1. make sure 'num_nodes' >= 'width'
// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
//
// If you don't do either of the above things, widths will be quantized to multiples
// of small integers to guarantee the algorithm doesn't run out of temporary storage.
//
// If you do #2, then the non-quantized algorithm will be used, but the algorithm
// may run out of temporary storage and be unable to pack some rectangles.
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
// Optionally call this function after init but before doing any packing to
// change the handling of the out-of-temp-memory scenario, described above.
// If you call init again, this will be reset to the default (false).
STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic);
// Optionally select which packing heuristic the library should use. Different
// heuristics will produce better/worse results for different data sets.
// If you call init again, this will be reset to the default.
enum
{
STBRP_HEURISTIC_Skyline_default=0,
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
STBRP_HEURISTIC_Skyline_BF_sortHeight,
};
//////////////////////////////////////////////////////////////////////////////
//
// the details of the following structures don't matter to you, but they must
// be visible so you can handle the memory allocations for them
struct stbrp_node
{
stbrp_coord x,y;
stbrp_node *next;
};
struct stbrp_context
{
int width;
int height;
int align;
int init_mode;
int heuristic;
int num_nodes;
stbrp_node *active_head;
stbrp_node *free_head;
stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
};
#ifdef __cplusplus
}
#endif
#endif
//////////////////////////////////////////////////////////////////////////////
//
// IMPLEMENTATION SECTION
//
#ifdef STB_RECT_PACK_IMPLEMENTATION
#ifndef STBRP_SORT
#include <stdlib.h>
#define STBRP_SORT qsort
#endif
#ifndef STBRP_ASSERT
#include <assert.h>
#define STBRP_ASSERT assert
#endif
enum
{
STBRP__INIT_skyline = 1,
};
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
{
switch (context->init_mode) {
case STBRP__INIT_skyline:
STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
context->heuristic = heuristic;
break;
default:
STBRP_ASSERT(0);
}
}
STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
{
if (allow_out_of_mem)
// if it's ok to run out of memory, then don't bother aligning them;
// this gives better packing, but may fail due to OOM (even though
// the rectangles easily fit). @TODO a smarter approach would be to only
// quantize once we've hit OOM, then we could get rid of this parameter.
context->align = 1;
else {
// if it's not ok to run out of memory, then quantize the widths
// so that num_nodes is always enough nodes.
//
// I.e. num_nodes * align >= width
// align >= width / num_nodes
// align = ceil(width/num_nodes)
context->align = (context->width + context->num_nodes-1) / context->num_nodes;
}
}
STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
{
int i;
#ifndef STBRP_LARGE_RECTS
STBRP_ASSERT(width <= 0xffff && height <= 0xffff);
#endif
for (i=0; i < num_nodes-1; ++i)
nodes[i].next = &nodes[i+1];
nodes[i].next = NULL;
context->init_mode = STBRP__INIT_skyline;
context->heuristic = STBRP_HEURISTIC_Skyline_default;
context->free_head = &nodes[0];
context->active_head = &context->extra[0];
context->width = width;
context->height = height;
context->num_nodes = num_nodes;
stbrp_setup_allow_out_of_mem(context, 0);
// node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
context->extra[0].x = 0;
context->extra[0].y = 0;
context->extra[0].next = &context->extra[1];
context->extra[1].x = (stbrp_coord) width;
#ifdef STBRP_LARGE_RECTS
context->extra[1].y = (1<<30);
#else
context->extra[1].y = 65535;
#endif
context->extra[1].next = NULL;
}
// find minimum y position if it starts at x1
static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
{
stbrp_node *node = first;
int x1 = x0 + width;
int min_y, visited_width, waste_area;
STBRP_ASSERT(first->x <= x0);
#if 0
// skip in case we're past the node
while (node->next->x <= x0)
++node;
#else
STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
#endif
STBRP_ASSERT(node->x <= x0);
min_y = 0;
waste_area = 0;
visited_width = 0;
while (node->x < x1) {
if (node->y > min_y) {
// raise min_y higher.
// we've accounted for all waste up to min_y,
// but we'll now add more waste for everything we've visted
waste_area += visited_width * (node->y - min_y);
min_y = node->y;
// the first time through, visited_width might be reduced
if (node->x < x0)
visited_width += node->next->x - x0;
else
visited_width += node->next->x - node->x;
} else {
// add waste area
int under_width = node->next->x - node->x;
if (under_width + visited_width > width)
under_width = width - visited_width;
waste_area += under_width * (min_y - node->y);
visited_width += under_width;
}
node = node->next;
}
*pwaste = waste_area;
return min_y;
}
typedef struct
{
int x,y;
stbrp_node **prev_link;
} stbrp__findresult;
static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height)
{
int best_waste = (1<<30), best_x, best_y = (1 << 30);
stbrp__findresult fr;
stbrp_node **prev, *node, *tail, **best = NULL;
// align to multiple of c->align
width = (width + c->align - 1);
width -= width % c->align;
STBRP_ASSERT(width % c->align == 0);
node = c->active_head;
prev = &c->active_head;
while (node->x + width <= c->width) {
int y,waste;
y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
// bottom left
if (y < best_y) {
best_y = y;
best = prev;
}
} else {
// best-fit
if (y + height <= c->height) {
// can only use it if it first vertically
if (y < best_y || (y == best_y && waste < best_waste)) {
best_y = y;
best_waste = waste;
best = prev;
}
}
}
prev = &node->next;
node = node->next;
}
best_x = (best == NULL) ? 0 : (*best)->x;
// if doing best-fit (BF), we also have to try aligning right edge to each node position
//
// e.g, if fitting
//
// ____________________
// |____________________|
//
// into
//
// | |
// | ____________|
// |____________|
//
// then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
//
// This makes BF take about 2x the time
if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) {
tail = c->active_head;
node = c->active_head;
prev = &c->active_head;
// find first node that's admissible
while (tail->x < width)
tail = tail->next;
while (tail) {
int xpos = tail->x - width;
int y,waste;
STBRP_ASSERT(xpos >= 0);
// find the left position that matches this
while (node->next->x <= xpos) {
prev = &node->next;
node = node->next;
}
STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
if (y + height < c->height) {
if (y <= best_y) {
if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
best_x = xpos;
STBRP_ASSERT(y <= best_y);
best_y = y;
best_waste = waste;
best = prev;
}
}
}
tail = tail->next;
}
}
fr.prev_link = best;
fr.x = best_x;
fr.y = best_y;
return fr;
}
static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
{
// find best position according to heuristic
stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
stbrp_node *node, *cur;
// bail if:
// 1. it failed
// 2. the best node doesn't fit (we don't always check this)
// 3. we're out of memory
if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
res.prev_link = NULL;
return res;
}
// on success, create new node
node = context->free_head;
node->x = (stbrp_coord) res.x;
node->y = (stbrp_coord) (res.y + height);
context->free_head = node->next;
// insert the new node into the right starting point, and
// let 'cur' point to the remaining nodes needing to be
// stiched back in
cur = *res.prev_link;
if (cur->x < res.x) {
// preserve the existing one, so start testing with the next one
stbrp_node *next = cur->next;
cur->next = node;
cur = next;
} else {
*res.prev_link = node;
}
// from here, traverse cur and free the nodes, until we get to one
// that shouldn't be freed
while (cur->next && cur->next->x <= res.x + width) {
stbrp_node *next = cur->next;
// move the current node to the free list
cur->next = context->free_head;
context->free_head = cur;
cur = next;
}
// stitch the list back in
node->next = cur;
if (cur->x < res.x + width)
cur->x = (stbrp_coord) (res.x + width);
#ifdef _DEBUG
cur = context->active_head;
while (cur->x < context->width) {
STBRP_ASSERT(cur->x < cur->next->x);
cur = cur->next;
}
STBRP_ASSERT(cur->next == NULL);
{
stbrp_node *L1 = NULL, *L2 = NULL;
int count=0;
cur = context->active_head;
while (cur) {
L1 = cur;
cur = cur->next;
++count;
}
cur = context->free_head;
while (cur) {
L2 = cur;
cur = cur->next;
++count;
}
STBRP_ASSERT(count == context->num_nodes+2);
}
#endif
return res;
}
static int rect_height_compare(const void *a, const void *b)
{
stbrp_rect *p = (stbrp_rect *) a;
stbrp_rect *q = (stbrp_rect *) b;
if (p->h > q->h)
return -1;
if (p->h < q->h)
return 1;
return (p->w > q->w) ? -1 : (p->w < q->w);
}
static int rect_width_compare(const void *a, const void *b)
{
stbrp_rect *p = (stbrp_rect *) a;
stbrp_rect *q = (stbrp_rect *) b;
if (p->w > q->w)
return -1;
if (p->w < q->w)
return 1;
return (p->h > q->h) ? -1 : (p->h < q->h);
}
static int rect_original_order(const void *a, const void *b)
{
stbrp_rect *p = (stbrp_rect *) a;
stbrp_rect *q = (stbrp_rect *) b;
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
}
#ifdef STBRP_LARGE_RECTS
#define STBRP__MAXVAL 0xffffffff
#else
#define STBRP__MAXVAL 0xffff
#endif
STBRP_DEF void stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
{
int i;
// we use the 'was_packed' field internally to allow sorting/unsorting
for (i=0; i < num_rects; ++i) {
rects[i].was_packed = i;
#ifndef STBRP_LARGE_RECTS
STBRP_ASSERT(rects[i].w <= 0xffff && rects[i].h <= 0xffff);
#endif
}
// sort according to heuristic
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
for (i=0; i < num_rects; ++i) {
stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
if (fr.prev_link) {
rects[i].x = (stbrp_coord) fr.x;
rects[i].y = (stbrp_coord) fr.y;
} else {
rects[i].x = rects[i].y = STBRP__MAXVAL;
}
}
// unsort
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
// set was_packed flags
for (i=0; i < num_rects; ++i)
rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
}
#endif
+3098
View File
File diff suppressed because it is too large. Load diff
-5
View File
@@ -287,11 +287,6 @@ typedef struct driver
* TODO: Refactor this better. */
bool gfx_use_rgba;
#ifdef HAVE_OVERLAY
input_overlay_t *overlay;
input_overlay_state_t overlay_state;
#endif
/* Interface for "poking". */
const video_poke_interface_t *video_poke;
+33
View File
@@ -564,6 +564,32 @@ void uninit_libretro_sym(void)
lib_handle = NULL;
#endif
pretro_init = NULL;
pretro_deinit = NULL;
pretro_api_version = NULL;
pretro_get_system_info = NULL;
pretro_get_system_av_info = NULL;
pretro_set_environment = NULL;
pretro_set_video_refresh = NULL;
pretro_set_audio_sample = NULL;
pretro_set_audio_sample_batch = NULL;
pretro_set_input_poll = NULL;
pretro_set_input_state = NULL;
pretro_set_controller_port_device = NULL;
pretro_reset = NULL;
pretro_run = NULL;
pretro_serialize_size = NULL;
pretro_serialize = NULL;
pretro_unserialize = NULL;
pretro_cheat_reset = NULL;
pretro_cheat_set = NULL;
pretro_load_game = NULL;
pretro_load_game_special = NULL;
pretro_unload_game = NULL;
pretro_get_region = NULL;
pretro_get_memory_data = NULL;
pretro_get_memory_size = NULL;
rarch_system_info_free();
driver->camera_active = false;
@@ -725,8 +751,15 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
if (!settings->system_directory || settings->system_directory[0] == '\0')
{
RARCH_WARN("SYSTEM DIR is empty, fill assume CONTENT DIR %s\n",global->fullpath);
fill_pathname_basedir(settings->system_directory, global->fullpath,
sizeof(settings->system_directory));
}
*(const char**)data = *settings->system_directory ?
settings->system_directory : NULL;
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n",
settings->system_directory);
break;
+283 -40
View File
@@ -28,10 +28,22 @@
#include "../frontend.h"
#include "../../general.h"
#include "../../msg_hash.h"
#include <file/file_path.h>
#define SDCARD_ROOT_WRITABLE 1
#define SDCARD_EXT_DIR_WRITABLE 2
#define SDCARD_NOT_WRITABLE 3
struct android_app *g_android;
static pthread_key_t thread_key;
char screenshot_dir[PATH_MAX_LENGTH];
char downloads_dir[PATH_MAX_LENGTH];
char apk_path[PATH_MAX_LENGTH];
char sdcard_dir[PATH_MAX_LENGTH];
char app_dir[PATH_MAX_LENGTH];
char ext_dir[PATH_MAX_LENGTH];
static INLINE void android_app_write_cmd(void *data, int8_t cmd)
{
struct android_app *android_app = (struct android_app*)data;
@@ -361,7 +373,8 @@ static void frontend_android_get_name(char *s, size_t len)
system_property_get("ro.product.model", s);
}
static void frontend_android_get_version(int32_t *major, int32_t *minor, int32_t *rel)
static void frontend_android_get_version(int32_t *major,
int32_t *minor, int32_t *rel)
{
char os_version_str[PROP_VALUE_MAX] = {0};
system_property_get("ro.build.version.release", os_version_str);
@@ -437,11 +450,29 @@ static bool device_is_game_console(const char *name)
return false;
}
bool test_permissions(const char *path)
{
char buf[PATH_MAX_LENGTH];
bool ret;
RARCH_LOG("Testing permissions for %s\n",path);
fill_pathname_join(buf, path, ".retroarch", sizeof(buf));
ret = path_mkdir(buf);
RARCH_LOG("Create %s %s\n", buf, ret ? "true" : "false");
if(ret)
rmdir(buf);
return ret;
}
static void frontend_android_get_environment_settings(int *argc,
char *argv[], void *data, void *params_data)
{
int32_t major, minor, rel;
int perms = 0;
char device_model[PROP_VALUE_MAX] = {0};
char device_id[PROP_VALUE_MAX] = {0};
struct rarch_main_wrap *args = NULL;
@@ -449,7 +480,8 @@ static void frontend_android_get_environment_settings(int *argc,
jobject obj = NULL;
jstring jstr = NULL;
struct android_app *android_app = (struct android_app*)data;
char buf[PATH_MAX_LENGTH] = {0};
if (!android_app)
return;
@@ -470,7 +502,8 @@ static void frontend_android_get_environment_settings(int *argc,
frontend_android_get_version(&major, &minor, &rel);
RARCH_LOG("Android OS version (major : %d, minor : %d, rel : %d)\n", major, minor, rel);
RARCH_LOG("Android OS version (major : %d, minor : %d, rel : %d)\n",
major, minor, rel);
CALL_OBJ_METHOD(env, obj, android_app->activity->clazz,
android_app->getIntent);
@@ -539,7 +572,7 @@ static void frontend_android_get_environment_settings(int *argc,
strlcpy(core_path, argv, sizeof(core_path));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
RARCH_LOG("Libretro path: [%s].\n", core_path);
RARCH_LOG("Libretro path: [%s]\n", core_path);
if (args && *core_path)
args->libretro_path = core_path;
}
@@ -568,67 +601,272 @@ static void frontend_android_get_environment_settings(int *argc,
}
}
/* External Storage */
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "SDCARD"));
if (android_app->getStringExtra && jstr)
{
const char *argv = NULL;
*sdcard_dir = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(sdcard_dir, argv, sizeof(sdcard_dir));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*sdcard_dir)
{
RARCH_LOG("External storage location [%s]\n", sdcard_dir);
/* TODO base dir handler */
}
}
/* Screenshots */
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "SCREENSHOTS"));
if (android_app->getStringExtra && jstr)
{
const char *argv = NULL;
*screenshot_dir = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(screenshot_dir, argv, sizeof(screenshot_dir));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*screenshot_dir)
{
RARCH_LOG("Picture folder location [%s]\n", screenshot_dir);
/* TODO: screenshot handler */
}
}
/* Downloads */
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "DOWNLOADS"));
if (android_app->getStringExtra && jstr)
{
const char *argv = NULL;
*downloads_dir = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(downloads_dir, argv, sizeof(downloads_dir));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*downloads_dir)
{
RARCH_LOG("Download folder location [%s].\n", downloads_dir);
/* TODO: downloads handler */
}
}
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "APK"));
if (android_app->getStringExtra && jstr)
{
const char *argv = NULL;
*apk_path = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(apk_path, argv, sizeof(apk_path));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*apk_path)
{
RARCH_LOG("APK location [%s].\n", apk_path);
}
}
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "EXTERNAL"));
if (android_app->getStringExtra && jstr)
{
const char *argv = NULL;
*ext_dir = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(ext_dir, argv, sizeof(ext_dir));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*ext_dir)
{
RARCH_LOG("External files location [%s]\n", ext_dir);
}
}
/* Content. */
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
(*env)->NewStringUTF(env, "DATADIR"));
if (android_app->getStringExtra && jstr)
{
static char path[PATH_MAX_LENGTH];
{
const char *argv = NULL;
*path = '\0';
*app_dir = '\0';
argv = (*env)->GetStringUTFChars(env, jstr, 0);
if (argv && *argv)
strlcpy(path, argv, sizeof(path));
strlcpy(app_dir, argv, sizeof(app_dir));
(*env)->ReleaseStringUTFChars(env, jstr, argv);
if (*path)
//set paths depending on the ability to write to sdcard_dir
if(*sdcard_dir)
{
if(test_permissions(sdcard_dir))
perms = SDCARD_ROOT_WRITABLE;
}
else if(*ext_dir)
{
if(test_permissions(ext_dir))
perms = SDCARD_EXT_DIR_WRITABLE;
}
else
perms = SDCARD_NOT_WRITABLE;
RARCH_LOG("SD permissions: %d",perms);
if (*app_dir)
{
RARCH_LOG("Data path: [%s].\n", path);
if (args && *path)
RARCH_LOG("Application location: [%s].\n", app_dir);
if (args && *app_dir)
{
fill_pathname_join(g_defaults.assets_dir, path,
fill_pathname_join(g_defaults.assets_dir, app_dir,
"assets", sizeof(g_defaults.savestate_dir));
fill_pathname_join(g_defaults.savestate_dir, path,
"savestates", sizeof(g_defaults.savestate_dir));
fill_pathname_join(g_defaults.extraction_dir, path,
fill_pathname_join(g_defaults.extraction_dir, app_dir,
"tmp", sizeof(g_defaults.extraction_dir));
fill_pathname_join(g_defaults.sram_dir, path,
"savefiles", sizeof(g_defaults.sram_dir));
fill_pathname_join(g_defaults.system_dir, path,
"system", sizeof(g_defaults.system_dir));
fill_pathname_join(g_defaults.shader_dir, path,
"shaders_glsl", sizeof(g_defaults.shader_dir));
fill_pathname_join(g_defaults.overlay_dir, path,
fill_pathname_join(g_defaults.shader_dir, app_dir,
"shaders", sizeof(g_defaults.shader_dir));
fill_pathname_join(g_defaults.overlay_dir, app_dir,
"overlays", sizeof(g_defaults.overlay_dir));
fill_pathname_join(g_defaults.core_dir, path,
fill_pathname_join(g_defaults.core_dir, app_dir,
"cores", sizeof(g_defaults.core_dir));
fill_pathname_join(g_defaults.core_info_dir,
path, "info", sizeof(g_defaults.core_info_dir));
app_dir, "info", sizeof(g_defaults.core_info_dir));
fill_pathname_join(g_defaults.autoconfig_dir,
path, "autoconfig/android", sizeof(g_defaults.autoconfig_dir));
app_dir, "autoconfig", sizeof(g_defaults.autoconfig_dir));
fill_pathname_join(g_defaults.audio_filter_dir,
path, "audio_filters", sizeof(g_defaults.audio_filter_dir));
app_dir, "audio_filters", sizeof(g_defaults.audio_filter_dir));
fill_pathname_join(g_defaults.video_filter_dir,
path, "video_filters", sizeof(g_defaults.video_filter_dir));
strlcpy(g_defaults.content_history_dir,
path, sizeof(g_defaults.content_history_dir));
app_dir, "video_filters", sizeof(g_defaults.video_filter_dir));
strlcpy(g_defaults.content_history_dir,
app_dir, sizeof(g_defaults.content_history_dir));
fill_pathname_join(g_defaults.database_dir,
path, "database/rdb", sizeof(g_defaults.database_dir));
app_dir, "database/rdb", sizeof(g_defaults.database_dir));
fill_pathname_join(g_defaults.cursor_dir,
path, "database/cursors", sizeof(g_defaults.cursor_dir));
app_dir, "database/cursors", sizeof(g_defaults.cursor_dir));
fill_pathname_join(g_defaults.cheats_dir,
path, "cheats", sizeof(g_defaults.cheats_dir));
app_dir, "cheats", sizeof(g_defaults.cheats_dir));
fill_pathname_join(g_defaults.playlist_dir,
path, "playlists", sizeof(g_defaults.playlist_dir));
app_dir, "playlists", sizeof(g_defaults.playlist_dir));
fill_pathname_join(g_defaults.remap_dir,
path, "remaps", sizeof(g_defaults.remap_dir));
app_dir, "remaps", sizeof(g_defaults.remap_dir));
fill_pathname_join(g_defaults.wallpapers_dir,
path, "wallpapers", sizeof(g_defaults.wallpapers_dir));
fill_pathname_join(g_defaults.core_assets_dir,
path, "downloads", sizeof(g_defaults.core_assets_dir));
app_dir, "wallpapers", sizeof(g_defaults.wallpapers_dir));
if(*downloads_dir && test_permissions(downloads_dir))
{
fill_pathname_join(g_defaults.core_assets_dir,
downloads_dir, "", sizeof(g_defaults.core_assets_dir));
}
else
{
fill_pathname_join(g_defaults.core_assets_dir,
app_dir, "downloads", sizeof(g_defaults.core_assets_dir));
path_mkdir(g_defaults.core_assets_dir);
}
RARCH_LOG("Default download folder: [%s]", g_defaults.core_assets_dir);
if(*screenshot_dir && test_permissions(screenshot_dir))
{
fill_pathname_join(g_defaults.screenshot_dir,
screenshot_dir, "", sizeof(g_defaults.screenshot_dir));
}
else
{
fill_pathname_join(g_defaults.screenshot_dir,
app_dir, "screenshots", sizeof(g_defaults.screenshot_dir));
path_mkdir(g_defaults.screenshot_dir);
}
RARCH_LOG("Default screenshot folder: [%s]", g_defaults.screenshot_dir);
switch (perms)
{
case SDCARD_EXT_DIR_WRITABLE:
fill_pathname_join(g_defaults.sram_dir,
ext_dir, "saves", sizeof(g_defaults.sram_dir));
path_mkdir(g_defaults.sram_dir);
fill_pathname_join(g_defaults.savestate_dir,
ext_dir, "states", sizeof(g_defaults.savestate_dir));
path_mkdir(g_defaults.savestate_dir);
fill_pathname_join(g_defaults.system_dir,
ext_dir, "system", sizeof(g_defaults.system_dir));
path_mkdir(g_defaults.system_dir);
break;
case SDCARD_NOT_WRITABLE:
fill_pathname_join(g_defaults.sram_dir,
app_dir, "saves", sizeof(g_defaults.sram_dir));
path_mkdir(g_defaults.sram_dir);
fill_pathname_join(g_defaults.savestate_dir,
app_dir, "states", sizeof(g_defaults.savestate_dir));
path_mkdir(g_defaults.savestate_dir);
fill_pathname_join(g_defaults.system_dir,
app_dir, "system", sizeof(g_defaults.system_dir));
path_mkdir(g_defaults.system_dir);
break;
case SDCARD_ROOT_WRITABLE:
default:
break;
}
/* create save and system directories in the internal dir too */
fill_pathname_join(buf,
app_dir, "saves", sizeof(buf));
path_mkdir(buf);
fill_pathname_join(buf,
app_dir, "states", sizeof(buf));
path_mkdir(buf);
fill_pathname_join(buf,
app_dir, "system", sizeof(buf));
path_mkdir(buf);
/* create save and system directories in the internal sd too */
fill_pathname_join(buf,
ext_dir, "saves", sizeof(buf));
path_mkdir(buf);
fill_pathname_join(buf,
ext_dir, "states", sizeof(buf));
path_mkdir(buf);
fill_pathname_join(buf,
ext_dir, "system", sizeof(buf));
path_mkdir(buf);
RARCH_LOG("Default savefile folder: [%s]", g_defaults.sram_dir);
RARCH_LOG("Default savestate folder: [%s]", g_defaults.savestate_dir);
RARCH_LOG("Default system folder: [%s]", g_defaults.system_dir);
}
}
}
@@ -638,7 +876,7 @@ static void frontend_android_get_environment_settings(int *argc,
g_defaults.settings.video_threaded_enable = true;
// Set automatic default values per device
/* Set automatic default values per device */
if (device_is_xperia_play(device_model))
{
g_defaults.settings.out_latency = 128;
@@ -652,7 +890,6 @@ static void frontend_android_get_environment_settings(int *argc,
else if (!strcmp(device_model, "JSS15J"))
g_defaults.settings.video_refresh_rate = 59.65;
/* FIXME - needs to be refactored */
#if 0
/* Explicitly disable input overlay by default
* for gamepad-like/console devices. */
@@ -797,8 +1034,14 @@ static int frontend_android_parse_drive_list(void *data)
{
file_list_t *list = (file_list_t*)data;
// MENU_FILE_DIRECTORY is not working with labels, placeholders for now
menu_list_push(list,
"/data/data/com.retroarch/", "", MENU_FILE_DIRECTORY, 0, 0);
app_dir, "Application Dir", MENU_FILE_DIRECTORY, 0, 0);
menu_list_push(list,
ext_dir, "External Application Dir", MENU_FILE_DIRECTORY, 0, 0);
menu_list_push(list,
sdcard_dir, "Internal Memory", MENU_FILE_DIRECTORY, 0, 0);
menu_list_push(list, "/", "",
MENU_FILE_DIRECTORY, 0, 0);
+9 -2
View File
@@ -29,6 +29,10 @@
#include <rthreads/rthreads.h>
bool test_permissions(const char *path);
char sdcard_dir[PATH_MAX_LENGTH];
struct android_app
{
ANativeActivity* activity;
@@ -57,6 +61,9 @@ struct android_app
jmethodID getPendingIntentLibretroPath;
jmethodID getPendingIntentFullPath;
jmethodID getPendingIntentIME;
jmethodID getPendingIntentStorageLocation;
jmethodID getPendingIntentDownloadsLocation;
jmethodID getPendingIntentScreenshotsLocation;
};
enum
@@ -64,7 +71,7 @@ enum
LOOPER_ID_MAIN = 1,
LOOPER_ID_INPUT,
LOOPER_ID_USER,
LOOPER_ID_INPUT_MSG,
LOOPER_ID_INPUT_MSG
};
enum
@@ -161,7 +168,7 @@ enum
APP_CMD_DESTROY,
// Set by thread when it will no longer reply to commands.
APP_CMD_DEAD,
APP_CMD_DEAD
};
#define JNI_EXCEPTION(env) \
+35 -13
View File
@@ -51,6 +51,10 @@
#include "../../menu/menu.h"
#endif
#if 0
#define RELEASE_BUILD
#endif
typedef enum
{
CFApplicationDirectory = 1, /* Supported applications (Applications) */
@@ -332,34 +336,52 @@ static void frontend_darwin_get_environment_settings(int *argc, char *argv[],
#ifdef OSX
strlcat(home_dir_buf, "/RetroArch", sizeof(home_dir_buf));
#endif
fill_pathname_join(g_defaults.core_dir, home_dir_buf, "modules", sizeof(g_defaults.core_dir));
fill_pathname_join(g_defaults.shader_dir, home_dir_buf, "shaders_glsl", sizeof(g_defaults.shader_dir));
fill_pathname_join(g_defaults.core_dir, home_dir_buf, "cores", sizeof(g_defaults.core_dir));
fill_pathname_join(g_defaults.core_info_dir, home_dir_buf, "info", sizeof(g_defaults.core_info_dir));
fill_pathname_join(g_defaults.overlay_dir, home_dir_buf, "overlays", sizeof(g_defaults.overlay_dir));
fill_pathname_join(g_defaults.autoconfig_dir, home_dir_buf, "autoconfig/hid", sizeof(g_defaults.autoconfig_dir));
fill_pathname_join(g_defaults.autoconfig_dir, home_dir_buf, "autoconfig", sizeof(g_defaults.autoconfig_dir));
fill_pathname_join(g_defaults.core_assets_dir, home_dir_buf, "downloads", sizeof(g_defaults.core_assets_dir));
fill_pathname_join(g_defaults.assets_dir, home_dir_buf, "assets", sizeof(g_defaults.assets_dir));
fill_pathname_join(g_defaults.system_dir, home_dir_buf, ".RetroArch", sizeof(g_defaults.system_dir));
strlcpy(g_defaults.menu_config_dir, g_defaults.system_dir, sizeof(g_defaults.menu_config_dir));
fill_pathname_join(g_defaults.system_dir, home_dir_buf, "system", sizeof(g_defaults.system_dir));
fill_pathname_join(g_defaults.menu_config_dir, home_dir_buf, "configs", sizeof(g_defaults.menu_config_dir));
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
fill_pathname_join(g_defaults.database_dir, home_dir_buf, "rdb", sizeof(g_defaults.database_dir));
fill_pathname_join(g_defaults.cursor_dir, home_dir_buf, "cursors", sizeof(g_defaults.cursor_dir));
fill_pathname_join(g_defaults.cheats_dir, home_dir_buf, "cht", sizeof(g_defaults.cheats_dir));
strlcpy(g_defaults.sram_dir, g_defaults.system_dir, sizeof(g_defaults.sram_dir));
strlcpy(g_defaults.savestate_dir, g_defaults.system_dir, sizeof(g_defaults.savestate_dir));
CFTemporaryDirectory(temp_dir, sizeof(temp_dir));
strlcpy(g_defaults.extraction_dir, temp_dir, sizeof(g_defaults.extraction_dir));
fill_pathname_join(g_defaults.shader_dir, home_dir_buf, "shaders_glsl", sizeof(g_defaults.shader_dir));
fill_pathname_join(g_defaults.sram_dir, home_dir_buf, "saves", sizeof(g_defaults.sram_dir));
fill_pathname_join(g_defaults.savestate_dir, home_dir_buf, "states", sizeof(g_defaults.savestate_dir));
fill_pathname_join(g_defaults.remap_dir, home_dir_buf, "remaps", sizeof(g_defaults.remap_dir));
#if defined(OSX)
#ifdef HAVE_CG
fill_pathname_join(g_defaults.shader_dir, home_dir_buf, "shaders_cg", sizeof(g_defaults.shader_dir));
#endif
fill_pathname_join(g_defaults.audio_filter_dir, home_dir_buf, "audio_filters", sizeof(g_defaults.audio_filter_dir));
fill_pathname_join(g_defaults.video_filter_dir, home_dir_buf, "video_filters", sizeof(g_defaults.video_filter_dir));
fill_pathname_join(g_defaults.playlist_dir, home_dir_buf, "playlists", sizeof(g_defaults.playlist_dir));
#endif
#ifdef RELEASE_BUILD
fill_pathname_join(g_defaults.remap_dir, bundle_path_buf, "Contents/Resources/remaps", sizeof(g_defaults.remap_dir));
fill_pathname_join(g_defaults.playlist_dir, bundle_path_buf, "Contents/Resources/playlists", sizeof(g_defaults.playlist_dir));
fill_pathname_join(g_defaults.shader_dir, bundle_path_buf, "Contents/Resources/shaders", sizeof(g_defaults.shader_dir));
fill_pathname_join(g_defaults.core_dir, bundle_path_buf, "Contents/Resources/cores", sizeof(g_defaults.core_dir));
fill_pathname_join(g_defaults.core_info_dir, bundle_path_buf, "Contents/Resources/info", sizeof(g_defaults.core_info_dir));
fill_pathname_join(g_defaults.overlay_dir, bundle_path_buf, "Contents/Resources/overlays", sizeof(g_defaults.overlay_dir));
fill_pathname_join(g_defaults.autoconfig_dir, bundle_path_buf, "Contents/Resources/autoconfig", sizeof(g_defaults.autoconfig_dir));
fill_pathname_join(g_defaults.core_assets_dir, bundle_path_buf, "Contents/Resources/downloads", sizeof(g_defaults.core_assets_dir));
fill_pathname_join(g_defaults.assets_dir, bundle_path_buf, "Contents/Resources/assets", sizeof(g_defaults.assets_dir));
fill_pathname_join(g_defaults.system_dir, bundle_path_buf, "Contents/Resources/system", sizeof(g_defaults.system_dir));
fill_pathname_join(g_defaults.menu_config_dir, bundle_path_buf, "Contents/Resources/configs", sizeof(g_defaults.menu_config_dir));
fill_pathname_join(g_defaults.config_path, g_defaults.menu_config_dir, "retroarch.cfg", sizeof(g_defaults.config_path));
fill_pathname_join(g_defaults.database_dir, bundle_path_buf, "Contents/Resources/rdb", sizeof(g_defaults.database_dir));
fill_pathname_join(g_defaults.cursor_dir, bundle_path_buf, "Contents/Resources/cursors", sizeof(g_defaults.cursor_dir));
fill_pathname_join(g_defaults.cheats_dir, bundle_path_buf, "Contents/Resources/cht", sizeof(g_defaults.cheats_dir));
fill_pathname_join(g_defaults.sram_dir, bundle_path_buf, "Contents/Resources/saves", sizeof(g_defaults.sram_dir));
fill_pathname_join(g_defaults.savestate_dir, bundle_path_buf, "Contents/Resources/states", sizeof(g_defaults.savestate_dir));
#endif
CFTemporaryDirectory(temp_dir, sizeof(temp_dir));
strlcpy(g_defaults.extraction_dir, temp_dir, sizeof(g_defaults.extraction_dir));
path_mkdir(bundle_path_buf);
+13 -18
View File
@@ -14,15 +14,26 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <sys/process.h>
#include <sysutil/sysutil_common.h>
#ifdef IS_SALAMANDER
#include <netex/net.h>
#include <np.h>
#include <np/drm.h>
#include <cell/sysmodule.h>
#endif
#include <sys/process.h>
#include <retro_log.h>
#include <file/file_path.h>
#ifndef IS_SALAMANDER
#include <file/file_list.h>
#endif
#include "../../ps3/sdk_defines.h"
#include "../../general.h"
#define EMULATOR_CONTENT_DIR "SSNE10000"
@@ -46,12 +57,6 @@ static bool multiman_detected = false;
static bool exit_spawn = false;
static bool exitspawn_start_game = false;
#ifdef IS_SALAMANDER
#include <netex/net.h>
#include <np.h>
#include <np/drm.h>
#include <cell/sysmodule.h>
#endif
#ifdef HAVE_SYSUTILS
static void callback_sysutil_exit(uint64_t status,
@@ -348,21 +353,11 @@ static void frontend_ps3_exitspawn(char *core_path, size_t core_path_size)
#endif
}
#include <stdio.h>
#include <cell/sysmodule.h>
#include <sys/process.h>
#include <sysutil/sysutil_common.h>
#include <netex/net.h>
#include <np.h>
#include <np/drm.h>
#include <retro_log.h>
static void frontend_ps3_exec(const char *path, bool should_load_game)
{
char spawn_data[256] = {0};
unsigned i;
char spawn_data[256] = {0};
(void)should_load_game;
+2 -2
View File
@@ -87,9 +87,9 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
"playlists", sizeof(g_defaults.playlist_dir));
fill_pathname_join(g_defaults.config_path, g_defaults.port_dir,
"retroarch.cfg", sizeof(g_defaults.config_path));
fill_pathname_join(g_defaults.cheats_dir, path,
fill_pathname_join(g_defaults.cheats_dir, g_defaults.cheats_dir,
"cheats", sizeof(g_defaults.cheats_dir));
fill_pathname_join(g_defaults.remap_dir, path,
fill_pathname_join(g_defaults.remap_dir, g_defaults.remap_dir,
"remaps", sizeof(g_defaults.remap_dir));
#ifndef IS_SALAMANDER
+7 -2
View File
@@ -38,14 +38,19 @@ void main_exit_save_config(void)
{
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
rarch_system_info_t *info = rarch_system_info_get_ptr();
if (settings->config_save_on_exit && *global->config_path)
{
/* restore original paths in case per-core organization is enabled */
if (settings->sort_savefiles_enable && orig_savefile_dir[0] != '\0')
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
strlcpy(global->savefile_dir,orig_savefile_dir,sizeof(global->savefile_dir));
if (settings->sort_savestates_enable && orig_savestate_dir[0] != '\0')
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
strlcpy(global->savestate_dir,orig_savestate_dir,sizeof(global->savestate_dir));
/* restore system directory if it was set to <content dir> */
if(settings->system_in_content_dir && !strcmp(info->info.library_name,"No Core"))
settings->system_directory[0] = '\0';
/* Save last core-specific config to the default config location,
* needed on consoles for core switching and reusing last good
+1 -1
View File
@@ -33,7 +33,7 @@
#endif
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "1.2"
#define PACKAGE_VERSION "1.2.2"
#endif
/* Platform-specific headers */
+5 -1
View File
@@ -20,6 +20,8 @@
#include <xgraphics.h>
#endif
#include <formats/image.h>
#include "d3d.h"
#include "../video_viewport.h"
#include "../video_monitor.h"
@@ -1517,10 +1519,12 @@ static void d3d_overlay_vertex_geom(void *data,
}
static bool d3d_overlay_load(void *data,
const texture_image *images, unsigned num_images)
const void *image_data, unsigned num_images)
{
unsigned i, y;
d3d_video_t *d3d = (d3d_video_t*)data;
const struct texture_image *images = (const struct texture_image*)
image_data;
if (!d3d)
return false;
+15 -13
View File
@@ -359,8 +359,8 @@ static void gl_compute_fbo_geometry(gl_t *gl, unsigned width, unsigned height,
/* Calculate viewports for FBOs. */
for (i = 0; i < gl->fbo_pass; i++)
{
struct gl_fbo_rect *fbo_rect = &gl->fbo_rect[i];
struct gfx_fbo_scale *fbo_scale = &gl->fbo_scale[i];
struct gfx_fbo_rect *fbo_rect = &gl->fbo_rect[i];
struct gfx_fbo_scale *fbo_scale = &gl->fbo_scale[i];
switch (gl->fbo_scale[i].type_x)
{
@@ -764,7 +764,7 @@ static bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
}
#endif
static void gl_set_projection(gl_t *gl, struct gl_ortho *ortho, bool allow_rotate)
static void gl_set_projection(gl_t *gl, struct gfx_ortho *ortho, bool allow_rotate)
{
math_matrix_4x4 rot;
@@ -788,7 +788,7 @@ static void gl_set_viewport(void *data, unsigned viewport_width,
unsigned width, height;
int x = 0, y = 0;
float device_aspect = (float)viewport_width / viewport_height;
struct gl_ortho ortho = {0, 1, 0, 1, -1, 1};
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
settings_t *settings = config_get_ptr();
gl_t *gl = (gl_t*)data;
@@ -881,7 +881,7 @@ static void gl_set_viewport(void *data, unsigned viewport_width,
static void gl_set_rotation(void *data, unsigned rotation)
{
gl_t *gl = (gl_t*)data;
struct gl_ortho ortho = {0, 1, 0, 1, -1, 1};
struct gfx_ortho ortho = {0, 1, 0, 1, -1, 1};
if (!gl)
return;
@@ -930,7 +930,7 @@ static void gl_check_fbo_dimensions(gl_t *gl)
GLenum status;
unsigned img_width, img_height, max, pow2_size;
bool check_dimensions = false;
struct gl_fbo_rect *fbo_rect = &gl->fbo_rect[i];
struct gfx_fbo_rect *fbo_rect = &gl->fbo_rect[i];
if (!fbo_rect)
continue;
@@ -975,13 +975,13 @@ static void gl_check_fbo_dimensions(gl_t *gl)
}
static void gl_frame_fbo(gl_t *gl, uint64_t frame_count,
const struct gl_tex_info *tex_info)
const struct gfx_tex_info *tex_info)
{
unsigned width, height;
const struct gl_fbo_rect *prev_rect;
const struct gl_fbo_rect *rect;
struct gl_tex_info *fbo_info;
struct gl_tex_info fbo_tex_info[GFX_MAX_SHADERS];
const struct gfx_fbo_rect *prev_rect;
const struct gfx_fbo_rect *rect;
struct gfx_tex_info *fbo_info;
struct gfx_tex_info fbo_tex_info[GFX_MAX_SHADERS];
int i;
GLfloat xamt, yamt;
unsigned fbo_tex_info_cnt = 0;
@@ -1410,7 +1410,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame,
}
static INLINE void gl_set_prev_texture(gl_t *gl,
const struct gl_tex_info *tex_info)
const struct gfx_tex_info *tex_info)
{
memmove(gl->prev_info + 1, gl->prev_info,
sizeof(*tex_info) * (gl->textures - 1));
@@ -2900,10 +2900,12 @@ unsigned *height_p, size_t *pitch_p)
#ifdef HAVE_OVERLAY
static void gl_free_overlay(gl_t *gl);
static bool gl_overlay_load(void *data,
const struct texture_image *images, unsigned num_images)
const void *image_data, unsigned num_images)
{
unsigned i, j;
gl_t *gl = (gl_t*)data;
const struct texture_image *images =
(const struct texture_image*)image_data;
if (!gl)
return false;
+1 -78
View File
@@ -19,7 +19,7 @@
void gl_ff_vertex(const void *data)
{
#ifndef NO_GL_FF_VERTEX
const struct gl_coords *coords = (const struct gl_coords*)data;
const struct gfx_coords *coords = (const struct gfx_coords*)data;
/* Fall back to fixed function-style if needed and possible. */
glClientActiveTexture(GL_TEXTURE1);
@@ -157,80 +157,3 @@ bool gl_load_luts(const struct video_shader *shader,
glBindTexture(GL_TEXTURE_2D, 0);
return true;
}
static INLINE bool realloc_checked(void **ptr, size_t size)
{
void *nptr;
if (*ptr)
nptr = realloc(*ptr, size);
else
nptr = malloc(size);
if (nptr)
*ptr = nptr;
return *ptr == nptr;
}
bool gl_coord_array_add(gl_coord_array_t *ca, const gl_coords_t *coords, unsigned count)
{
bool success = false;
count = min(count, coords->vertices);
if (ca->coords.vertices + count >= ca->allocated)
{
unsigned alloc_size = next_pow2(ca->coords.vertices + count);
size_t base_size = sizeof(GLfloat) * alloc_size;
bool vert_ok = realloc_checked((void**)&ca->coords.vertex, 2 * base_size);
bool color_ok = realloc_checked((void**)&ca->coords.color, 4 * base_size);
bool tex_ok = realloc_checked((void**)&ca->coords.tex_coord, 2 * base_size);
bool lut_ok = realloc_checked((void**)&ca->coords.lut_tex_coord, 2 * base_size);
if (vert_ok && color_ok && tex_ok && lut_ok)
{
ca->allocated = alloc_size;
success = true;
}
}
else
success = true;
if (success)
{
size_t base_size = count * sizeof(GLfloat);
size_t offset = ca->coords.vertices;
/* XXX: i wish we used interlaced arrays so we could call memcpy only once */
memcpy(ca->coords.vertex + offset * 2, coords->vertex, base_size * 2);
memcpy(ca->coords.color + offset * 4, coords->color, base_size * 4);
memcpy(ca->coords.tex_coord + offset * 2, coords->tex_coord, base_size * 2);
memcpy(ca->coords.lut_tex_coord + offset * 2, coords->lut_tex_coord, base_size * 2);
ca->coords.vertices += count;
}
else
RARCH_WARN("Allocation failed.");
return success;
}
void gl_coord_array_free(gl_coord_array_t *ca)
{
if (!ca->allocated)
return;
free(ca->coords.vertex);
free(ca->coords.color);
free(ca->coords.tex_coord);
free(ca->coords.lut_tex_coord);
ca->coords.vertex = NULL;
ca->coords.color = NULL;
ca->coords.tex_coord = NULL;
ca->coords.lut_tex_coord = NULL;
ca->coords.vertices = 0;
ca->allocated = 0;
}
+22 -83
View File
@@ -17,22 +17,12 @@
#ifndef __GL_COMMON_H
#define __GL_COMMON_H
#include "../../general.h"
#include "../font_renderer_driver.h"
#include <gfx/math/matrix_4x4.h>
#include <gfx/scaler/scaler.h>
#include <formats/image.h>
#include "../video_context_driver.h"
#include "../video_shader_driver.h"
#include "../video_shader_parse.h"
#include <retro_inline.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include <string.h>
#ifdef HAVE_EGL
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -40,6 +30,17 @@
#include <glsym/glsym.h>
#include <retro_inline.h>
#include <gfx/math/matrix_4x4.h>
#include <gfx/scaler/scaler.h>
#include <formats/image.h>
#include "../../general.h"
#include "../font_renderer_driver.h"
#include "../video_common.h"
#include "../video_context_driver.h"
#include "../video_shader_driver.h"
#include "../video_shader_parse.h"
#if (!defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES3))
#ifdef GL_PIXEL_PACK_BUFFER
@@ -177,65 +178,6 @@
#endif
#endif
struct gl_fbo_rect
{
unsigned img_width;
unsigned img_height;
unsigned max_img_width;
unsigned max_img_height;
unsigned width;
unsigned height;
};
struct gl_ortho
{
GLfloat left;
GLfloat right;
GLfloat bottom;
GLfloat top;
GLfloat znear;
GLfloat zfar;
};
struct gl_tex_info
{
GLuint tex;
GLfloat input_size[2];
GLfloat tex_size[2];
GLfloat coord[8];
};
typedef struct gl_coords
{
const GLfloat *vertex;
const GLfloat *color;
const GLfloat *tex_coord;
const GLfloat *lut_tex_coord;
unsigned vertices;
} gl_coords_t;
typedef struct gl_mut_coords
{
GLfloat *vertex;
GLfloat *color;
GLfloat *tex_coord;
GLfloat *lut_tex_coord;
unsigned vertices;
} gl_mut_coords_t;
typedef struct gl_coord_array
{
gl_mut_coords_t coords;
unsigned allocated;
} gl_coord_array_t;
typedef struct gl_raster_block
{
bool fullscreen;
gl_coord_array_t carr;
} gl_font_raster_block_t;
struct gl_font_renderer;
typedef struct gl
@@ -247,8 +189,8 @@ typedef struct gl
GLuint texture[GFX_MAX_TEXTURES];
unsigned tex_index; /* For use with PREV. */
unsigned textures;
struct gl_tex_info tex_info;
struct gl_tex_info prev_info[GFX_MAX_TEXTURES];
struct gfx_tex_info tex_info;
struct gfx_tex_info prev_info[GFX_MAX_TEXTURES];
GLuint tex_mag_filter;
GLuint tex_min_filter;
bool tex_mipmap;
@@ -262,7 +204,7 @@ typedef struct gl
/* Render-to-texture, multipass shaders. */
GLuint fbo[GFX_MAX_SHADERS];
GLuint fbo_texture[GFX_MAX_SHADERS];
struct gl_fbo_rect fbo_rect[GFX_MAX_SHADERS];
struct gfx_fbo_rect fbo_rect[GFX_MAX_SHADERS];
struct gfx_fbo_scale fbo_scale[GFX_MAX_SHADERS];
int fbo_pass;
bool fbo_inited;
@@ -294,9 +236,9 @@ typedef struct gl
unsigned tex_w, tex_h;
math_matrix_4x4 mvp, mvp_no_rot;
struct gl_coords coords;
const GLfloat *vertex_ptr;
const GLfloat *white_color_ptr;
struct gfx_coords coords;
const float *vertex_ptr;
const float *white_color_ptr;
GLuint pbo;
@@ -319,9 +261,9 @@ typedef struct gl
bool overlay_enable;
bool overlay_full_screen;
GLuint *overlay_tex;
GLfloat *overlay_vertex_coord;
GLfloat *overlay_tex_coord;
GLfloat *overlay_color_coord;
float *overlay_vertex_coord;
float *overlay_tex_coord;
float *overlay_color_coord;
#endif
#ifdef HAVE_GL_ASYNC_READBACK
@@ -338,7 +280,7 @@ typedef struct gl
GLuint menu_texture;
bool menu_texture_enable;
bool menu_texture_full_screen;
GLfloat menu_texture_alpha;
float menu_texture_alpha;
#endif
#ifdef HAVE_GL_SYNC
@@ -418,9 +360,6 @@ static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
return 0;
}
bool gl_coord_array_add(gl_coord_array_t *ca, const gl_coords_t *coords, unsigned count);
void gl_coord_array_free(gl_coord_array_t *ca);
void gl_ff_vertex(const void *data);
void gl_ff_matrix(const void *data);
+8 -2
View File
@@ -165,7 +165,7 @@ enum
GX_RESOLUTIONS_LAST,
};
static unsigned menu_current_gx_resolution = GX_RESOLUTIONS_640_480;
static unsigned menu_current_gx_resolution = GX_RESOLUTIONS_448_448;
unsigned menu_gx_resolutions[GX_RESOLUTIONS_LAST][2] = {
{ 512, 192 },
@@ -427,6 +427,10 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
video_viewport_reset_custom();
g_current_framebuf = 0;
for( int i=0; i < GX_RESOLUTIONS_LAST; i++)
if(fbWidth == menu_gx_resolutions[i][0] && lines == menu_gx_resolutions[i][1])
menu_current_gx_resolution = i;
RARCH_LOG("GX Resolution Index: %d\n", menu_current_gx_resolution);
}
static void gx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
@@ -1337,10 +1341,12 @@ static void gx_get_poke_interface(void *data, const video_poke_interface_t **ifa
#ifdef HAVE_OVERLAY
static void gx_overlay_tex_geom(void *data, unsigned image, float x, float y, float w, float h);
static void gx_overlay_vertex_geom(void *data, unsigned image, float x, float y, float w, float h);
static bool gx_overlay_load(void *data, const struct texture_image *images, unsigned num_images)
static bool gx_overlay_load(void *data, const void *image_data, unsigned num_images)
{
unsigned i;
gx_video_t *gx = (gx_video_t*)data;
const struct texture_image *images = (const struct texture_image*)image_data;
gx_free_overlay(gx);
gx->overlay = (struct gx_overlay_data*)calloc(num_images, sizeof(*gx->overlay));
Loaded 100 of 237 files, more files were not shown because too many files have changed in this diff. Show more