Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
589b92cc99 | ||
|
|
e223821c22 | ||
|
|
f073739970 | ||
|
|
0bbb0d6913 | ||
|
|
c56f1403e5 | ||
|
|
1fab41ad63 | ||
|
|
f3f238381f | ||
|
|
49931f4df7 | ||
|
|
d06bd1870e | ||
|
|
2f36994f67 | ||
|
|
5cd9fb1da2 | ||
|
|
99e1a9b297 | ||
|
|
60f681f5f8 | ||
|
|
b886f7ab96 | ||
|
|
727e71d206 | ||
|
|
824c647377 | ||
|
|
5c258a52f5 | ||
|
|
0bc2a86fb5 | ||
|
|
8ee4fd9c15 | ||
|
|
cb9deedbf2 | ||
|
|
8bf42618d9 | ||
|
|
cf915d6524 | ||
|
|
0961446b19 | ||
|
|
09b9683e26 | ||
|
|
88caa51a5e | ||
|
|
eba3506b55 | ||
|
|
5a324c1dac | ||
|
|
6cb42bde29 | ||
|
|
d9a72d9b5c | ||
|
|
fd33f2153a | ||
|
|
e35fab5dc8 | ||
|
|
f02f1ebc8f | ||
|
|
5bc03fb3a8 | ||
|
|
edac6e0afc | ||
|
|
7ad1beeb81 | ||
|
|
a54a4d6cbe | ||
|
|
ffc075166e | ||
|
|
34c2791fa4 | ||
|
|
b9831cdc14 | ||
|
|
09ee27337c | ||
|
|
67c5d14900 | ||
|
|
31e76e4329 | ||
|
|
b3bb7def66 | ||
|
|
a86e4304b4 | ||
|
|
a919c26b81 | ||
|
|
b45c8bf916 | ||
|
|
280fab6cab | ||
|
|
ef1b066b64 | ||
|
|
d3b1eef196 | ||
|
|
34be1b9c9c | ||
|
|
6636fbaf15 | ||
|
|
f48c31cf68 | ||
|
|
ac9d54032f | ||
|
|
d725ff9738 | ||
|
|
ab55ed7908 | ||
|
|
7f3424ab15 | ||
|
|
40541d60c9 | ||
|
|
673e2ba57d | ||
|
|
4e64eac514 | ||
|
|
3222351ef0 | ||
|
|
11c3e3f4ff | ||
|
|
f7a443b4e9 | ||
|
|
a06dd9c3a2 | ||
|
|
450c665619 | ||
|
|
8162b77bae | ||
|
|
a2af5252c1 | ||
|
|
f1d8f98c90 | ||
|
|
63582f83b1 | ||
|
|
95da20190a | ||
|
|
eeeba3f343 | ||
|
|
e4da044c99 | ||
|
|
d10bb24328 | ||
|
|
f938c75e0b | ||
|
|
b298b2d4f0 | ||
|
|
a5f5e34e21 | ||
|
|
f5566cbe3b | ||
|
|
a73f91e68a | ||
|
|
bad3238ac7 | ||
|
|
badf8bdaad | ||
|
|
2a1f2b81c2 | ||
|
|
ca682d38eb | ||
|
|
b717828cf0 | ||
|
|
637c977b45 | ||
|
|
5ffd48217c | ||
|
|
0cdde16e2d | ||
|
|
ec00f709f7 | ||
|
|
b217bbad24 | ||
|
|
06838d044f | ||
|
|
615b8b39f1 | ||
|
|
9b019dbc1e | ||
|
|
eb406c7a91 | ||
|
|
f43be22e2d | ||
|
|
0e6ec34255 | ||
|
|
16c8fc35eb | ||
|
|
b3a66c9e7f | ||
|
|
7ecbb3ee05 | ||
|
|
cd81a91d30 | ||
|
|
56f273b0b5 | ||
|
|
a065ef18d1 | ||
|
|
9992a22e10 | ||
|
|
fedc1b4337 | ||
|
|
4785264967 | ||
|
|
24840c8918 | ||
|
|
8bf2b8a309 | ||
|
|
8b791c64a1 | ||
|
|
f8bf5d1827 | ||
|
|
f69fdbc1f4 | ||
|
|
5e6294bb8f | ||
|
|
1d1249fbd3 | ||
|
|
0764550c8e | ||
|
|
833e8164ee | ||
|
|
beb3cb5cc5 | ||
|
|
793e7483ad | ||
|
|
7545af9721 | ||
|
|
58e894f0c9 | ||
|
|
a0e794d690 | ||
|
|
6e3e7ecc30 | ||
|
|
42320c9726 | ||
|
|
09c67e3cf9 | ||
|
|
7d9530c83a | ||
|
|
418506ee09 | ||
|
|
59cf91980c | ||
|
|
911dc7f083 | ||
|
|
c02983bb9a | ||
|
|
65930421ba | ||
|
|
29de6895e9 | ||
|
|
1f01d62386 | ||
|
|
a6bbc31f95 | ||
|
|
f2ee781e92 | ||
|
|
09f3c3ca77 | ||
|
|
bca0789d35 | ||
|
|
3bc88f3298 | ||
|
|
e85de903b8 | ||
|
|
80c498c38c | ||
|
|
f016f866b4 | ||
|
|
fd1e556292 | ||
|
|
413c2bc35f | ||
|
|
b6863dcc4a | ||
|
|
d6d6f080c7 | ||
|
|
ce18d5b099 | ||
|
|
89be56a9ae | ||
|
|
313f015fcd | ||
|
|
6f645f2cf9 | ||
|
|
22b3bc3243 | ||
|
|
526e6845d0 | ||
|
|
8d284624ce | ||
|
|
ce569438a7 | ||
|
|
50d820f790 | ||
|
|
39fb39f5f6 | ||
|
|
39e15c983b | ||
|
|
82feadd350 | ||
|
|
5ac2ac62a3 | ||
|
|
8d04b1fbda | ||
|
|
a480ad285b | ||
|
|
777040107d | ||
|
|
e8d1970789 | ||
|
|
5705c30b95 | ||
|
|
1ff9f89e7d | ||
|
|
64a68d4e09 | ||
|
|
6f9467817e | ||
|
|
26b7ccead9 | ||
|
|
6001d6bacd | ||
|
|
b50f6a02ed | ||
|
|
9fbaf0ad28 | ||
|
|
f70070cd16 | ||
|
|
f323b3ef8c | ||
|
|
2aac64552d | ||
|
|
19542d4f00 | ||
|
|
117fd48f15 | ||
|
|
7fb1265227 | ||
|
|
23348f41ac | ||
|
|
0708e585e3 | ||
|
|
b7e2755e2b | ||
|
|
b77353e348 | ||
|
|
01ce2eaf31 | ||
|
|
7f9bd9bd8a | ||
|
|
48068f147a | ||
|
|
06f656004b | ||
|
|
b908b1083b | ||
|
|
5d87c697bb | ||
|
|
2a881d64be | ||
|
|
fbc504acfe | ||
|
|
32b3aa6b00 | ||
|
|
c2c9ace028 | ||
|
|
33b7388a9e | ||
|
|
bbc63f7e99 | ||
|
|
135ee2f503 | ||
|
|
ae14d8c78a | ||
|
|
b3e054a946 | ||
|
|
a0b2e4881a | ||
|
|
c9814c9b12 | ||
|
|
2dbc3c4b56 | ||
|
|
599ed62849 | ||
|
|
86e7f34666 | ||
|
|
1a4954ce55 | ||
|
|
fd56d5c1b8 | ||
|
|
108a6b9e21 | ||
|
|
723fee32e1 | ||
|
|
5a5e3951ff | ||
|
|
ccafdf8cc4 | ||
|
|
c697923eb6 | ||
|
|
38fd0592f5 | ||
|
|
b46f3c9c29 | ||
|
|
4b8e65322c | ||
|
|
a687ca54d8 | ||
|
|
6bb0d87d87 | ||
|
|
4c1562fb70 | ||
|
|
c5f2b7e8a1 | ||
|
|
55054f257a | ||
|
|
41e28460fa | ||
|
|
527c0c29d4 | ||
|
|
af752ba24b | ||
|
|
9e61a5ebf4 | ||
|
|
7e46058362 | ||
|
|
0107be2485 | ||
|
|
2bdce53651 | ||
|
|
69a406809e | ||
|
|
a11f8419fe | ||
|
|
028c9b5e3c | ||
|
|
f58c171428 | ||
|
|
01415528c6 | ||
|
|
2121f7a813 | ||
|
|
10c8c0198b | ||
|
|
d1786210ac | ||
|
|
5749d5e034 | ||
|
|
d9b125a645 | ||
|
|
97d6b4e3fd | ||
|
|
405ac5ebe5 | ||
|
|
396b08513a | ||
|
|
17024c4056 | ||
|
|
5bd889ac02 | ||
|
|
a1ffbfdec9 | ||
|
|
5fd65afae1 | ||
|
|
6e63f562ea | ||
|
|
70607acb6b | ||
|
|
c3f5ea0fcc | ||
|
|
1b163e6a5a | ||
|
|
70b423cc3e | ||
|
|
88c4b2415d | ||
|
|
51d8051f58 | ||
|
|
dd174e4fab | ||
|
|
b698e434f5 | ||
|
|
25d2f2a45f | ||
|
|
da7a75f0fb | ||
|
|
63ce5ee4c0 | ||
|
|
d21e9c002d | ||
|
|
0ad4df7308 | ||
|
|
3a90d38464 | ||
|
|
4a2ddc92c9 | ||
|
|
512e73f263 | ||
|
|
77fd0ef994 | ||
|
|
5dffca10fa | ||
|
|
0ea522585d | ||
|
|
6f99b4d381 | ||
|
|
2ec593f3b4 | ||
|
|
0189fa2c59 | ||
|
|
33feed8aa7 | ||
|
|
7bcd4dd04d | ||
|
|
4c9077568d | ||
|
|
2f9e8b44e3 | ||
|
|
403e32ca5f | ||
|
|
f50751909c | ||
|
|
2eab572773 | ||
|
|
2698d4622a | ||
|
|
25ffeb1ed9 | ||
|
|
e2d510e4f6 | ||
|
|
b6609d576b | ||
|
|
8fc5c85589 | ||
|
|
b501e19dc4 | ||
|
|
5e634a48ce | ||
|
|
a2c1a3e82b | ||
|
|
feb661754b | ||
|
|
84066d569c | ||
|
|
d80915fab8 | ||
|
|
7b45800ff9 | ||
|
|
b79f81a595 | ||
|
|
15a3aa134a | ||
|
|
2f26eac396 | ||
|
|
cec1f3408f | ||
|
|
9d268aba54 | ||
|
|
c604b44672 | ||
|
|
5d6ae90ab9 | ||
|
|
a014591dfe | ||
|
|
e99a23a5e2 | ||
|
|
dc96b4820f | ||
|
|
2ae9758ead | ||
|
|
34414b5919 | ||
|
|
d7db50e4eb | ||
|
|
ab604524dc | ||
|
|
ea9d5b56bf | ||
|
|
9fb753410e | ||
|
|
80899d45d2 | ||
|
|
c82ca15c91 | ||
|
|
7867c3ee74 | ||
|
|
b91f310b60 | ||
|
|
14b6a6636b | ||
|
|
af978297e2 | ||
|
|
141dbabe3d | ||
|
|
aa8c8dbaa6 | ||
|
|
8c1a918899 | ||
|
|
63c7104ab1 | ||
|
|
d104a878f1 | ||
|
|
7a4f6bcb2d | ||
|
|
425948c706 | ||
|
|
abf7a80f27 | ||
|
|
954121b99c | ||
|
|
c09cc19cfe | ||
|
|
4cb5d57ede | ||
|
|
46cdc34b9b | ||
|
|
0c11148273 | ||
|
|
51137d5351 | ||
|
|
1c406bc098 | ||
|
|
12ca517cf7 | ||
|
|
701b5609d4 | ||
|
|
cdf3ce309e | ||
|
|
387d687ef9 | ||
|
|
68f400bd9f | ||
|
|
c6fc3eaafd | ||
|
|
370970e78f | ||
|
|
e23499d2b2 | ||
|
|
51e2a128c5 | ||
|
|
c90072df55 | ||
|
|
04b98bebd9 | ||
|
|
000f9650d7 | ||
|
|
6f4e53e454 | ||
|
|
52e2fd1689 | ||
|
|
c84ddb53fa | ||
|
|
3605b97c80 | ||
|
|
dcd5a4fdcc | ||
|
|
74627d1497 | ||
|
|
82f645ce51 | ||
|
|
84066e1a5d | ||
|
|
664592b354 | ||
|
|
a1a4bc4057 | ||
|
|
3aff5a3ee2 | ||
|
|
c6992b3a6a | ||
|
|
4ac38a738f | ||
|
|
3de05cbbbb | ||
|
|
f2d20786a4 | ||
|
|
54e6048cd2 | ||
|
|
82cd8263dc | ||
|
|
c4617f0f6b | ||
|
|
1cc1f6d782 | ||
|
|
66ac83cfed | ||
|
|
21ea7c74e9 | ||
|
|
08b56582b2 | ||
|
|
cbc79e0d67 | ||
|
|
e3661c1e3d | ||
|
|
bfb996dbcd | ||
|
|
a59fd029b1 | ||
|
|
b6760e27fb | ||
|
|
039ba91c48 | ||
|
|
f2a608b131 | ||
|
|
5292c80e59 | ||
|
|
908eafa604 | ||
|
|
f97965f43b | ||
|
|
610d316852 | ||
|
|
5cb8a0793c | ||
|
|
648b9cf341 | ||
|
|
6a6b419ddb | ||
|
|
cccc221e8c | ||
|
|
3c5fe79df8 | ||
|
|
57ee3c0c33 | ||
|
|
7921d1d1e9 | ||
|
|
0350e0a495 | ||
|
|
f6abb8360f | ||
|
|
6801a0de28 | ||
|
|
161a7166c5 | ||
|
|
6eca7858fc | ||
|
|
3d348edcb3 | ||
|
|
a07c8cd551 | ||
|
|
ff06f20251 | ||
|
|
c06defe102 | ||
|
|
be51f54ab5 | ||
|
|
c0a7d10ec0 | ||
|
|
08760b626b | ||
|
|
bab4760794 | ||
|
|
2b3ff002bd | ||
|
|
231a5ea250 | ||
|
|
142941d950 | ||
|
|
39772de535 | ||
|
|
d3fb5cc3ee | ||
|
|
1a4127abad | ||
|
|
41a77639e3 | ||
|
|
7f6ec7ce16 | ||
|
|
08c759a16e | ||
|
|
8aa383463a | ||
|
|
0fa61b3ade | ||
|
|
2aa7c46e78 | ||
|
|
457ffd3dd8 | ||
|
|
eadaad57da | ||
|
|
aec9bbc9f5 | ||
|
|
cb226e5611 | ||
|
|
b45441d4c9 | ||
|
|
f149db6173 | ||
|
|
1caa441dbf | ||
|
|
8a0f47f6d1 | ||
|
|
c71c93efbd | ||
|
|
56b71a8d82 | ||
|
|
84fe1b0376 | ||
|
|
d09490789a | ||
|
|
8c9c1df64b | ||
|
|
49e35a5bcf | ||
|
|
044ef3d3f4 | ||
|
|
792ee4459c | ||
|
|
4bc2941c99 | ||
|
|
67448cafaf | ||
|
|
9ab86c64ba | ||
|
|
af916ccab7 | ||
|
|
4e59fe67d0 | ||
|
|
3b53633e5b | ||
|
|
827f32b2d1 | ||
|
|
4d4f56ec9a | ||
|
|
a3aab2f98e | ||
|
|
3cc6e07174 | ||
|
|
b133499071 | ||
|
|
671c49d970 | ||
|
|
4e0b93f445 | ||
|
|
fea509a643 | ||
|
|
a9f398c0c4 | ||
|
|
ed756f279f | ||
|
|
4d56dd000e | ||
|
|
ef3d6ffaae | ||
|
|
394cdf9c7c | ||
|
|
2c3373ddea | ||
|
|
6405c9b3ed |
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,6 +27,7 @@ HAVE_SDL2 := 0
|
||||
HAVE_RSOUND := 0
|
||||
HAVE_PYTHON := 0
|
||||
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_FREETYPE := 1
|
||||
HAVE_FFMPEG := 0
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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" />
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
Before Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 391 B |
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 997 B |
|
Before Width: | Height: | Size: 547 B |
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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) \
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef PACKAGE_VERSION
|
||||
#define PACKAGE_VERSION "1.2"
|
||||
#define PACKAGE_VERSION "1.2.2"
|
||||
#endif
|
||||
|
||||
/* Platform-specific headers */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||