mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-10 03:21:30 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
908974dfe4 | ||
|
|
904f0e65e5 | ||
|
|
51722b628c | ||
|
|
28ab397d60 | ||
|
|
8a06263ba6 | ||
|
|
811138221a | ||
|
|
daa30b1dc8 | ||
|
|
d2ec1ba2cc | ||
|
|
6467d24070 | ||
|
|
eebe0eda48 | ||
|
|
419eb5a6c0 | ||
|
|
0cd1843bc2 | ||
|
|
8066a6938f | ||
|
|
16a5a69bae | ||
|
|
eed44eea9c | ||
|
|
1788042c9e | ||
|
|
bf95fa34da | ||
|
|
32f7d73835 | ||
|
|
88e56faafa | ||
|
|
1df3e20bdd | ||
|
|
6a5af218c7 | ||
|
|
b3316fea35 | ||
|
|
db030f6472 | ||
|
|
c48ccdb1fc | ||
|
|
9ea18c433b | ||
|
|
a529b7b487 | ||
|
|
690670e2b5 | ||
|
|
5351b56a0b | ||
|
|
b757304513 | ||
|
|
cc0ce43a57 | ||
|
|
5904839bc6 | ||
|
|
fffc7597fd | ||
|
|
4a7dfba6ee | ||
|
|
addc75748b | ||
|
|
ece9851afb | ||
|
|
2e480a37ea | ||
|
|
890e076d20 | ||
|
|
547f8968aa | ||
|
|
b0b3abe775 | ||
|
|
27d2877106 | ||
|
|
897488862e | ||
|
|
0212567d75 | ||
|
|
109adf9739 | ||
|
|
ca2a4cdb27 | ||
|
|
3057c31798 | ||
|
|
0a123e8215 | ||
|
|
1eaf6f54cc | ||
|
|
9be6d265b4 | ||
|
|
8fff917341 | ||
|
|
adc3c9e36b | ||
|
|
da06dfca0d | ||
|
|
030231038c | ||
|
|
38fe58e746 | ||
|
|
b80b9cd157 | ||
|
|
8a68c620ac | ||
|
|
4b73879369 | ||
|
|
1ab81e5711 | ||
|
|
999887bda5 | ||
|
|
b9a08520ff | ||
|
|
1da7baa49d | ||
|
|
1b8093513d | ||
|
|
2061b465fb | ||
|
|
6dd46e6971 | ||
|
|
6ac8b89601 | ||
|
|
4b586b6496 | ||
|
|
e8bd94aab8 | ||
|
|
b5cf9b639e | ||
|
|
91caf28bfc | ||
|
|
2409831a14 | ||
|
|
bc52b952d7 | ||
|
|
4428b545bb | ||
|
|
fdf3a07b15 | ||
|
|
c8c5b69b5e | ||
|
|
473400902c | ||
|
|
58ad81f063 | ||
|
|
b01149f068 | ||
|
|
89ae74fba6 | ||
|
|
a1f2c6197f | ||
|
|
f4467d6595 | ||
|
|
688d1ef81c | ||
|
|
4f2ed12e4f | ||
|
|
ef710442f1 | ||
|
|
2bd71b55bc | ||
|
|
c78dcbd382 | ||
|
|
80b62fc635 | ||
|
|
7d466c8177 | ||
|
|
516bace3ca | ||
|
|
3307e65ad3 | ||
|
|
01dc71f598 | ||
|
|
17fb07cb85 | ||
|
|
85d9eeb50d | ||
|
|
0314921434 | ||
|
|
dde7c28730 | ||
|
|
682b403a9c | ||
|
|
08d3fe8c04 | ||
|
|
82259a086e | ||
|
|
d045484788 | ||
|
|
dd522cdc6f | ||
|
|
ae7d956341 | ||
|
|
b94b9e2adb | ||
|
|
621c79dd3c | ||
|
|
21a2ba3f79 | ||
|
|
579c41535a | ||
|
|
107b5eec44 | ||
|
|
882a66b49a | ||
|
|
b4e1ca8a2c | ||
|
|
f309c85f92 | ||
|
|
db723df879 | ||
|
|
5f87fa1aca | ||
|
|
f33264f7a6 | ||
|
|
c5b3428408 | ||
|
|
efdc07ab10 | ||
|
|
920a20f060 | ||
|
|
2414224df8 | ||
|
|
511f43d5cf | ||
|
|
a6ec5a9831 | ||
|
|
6fe4559b8e | ||
|
|
83f1b28f98 | ||
|
|
4f564360e7 | ||
|
|
1ddd7ee79d | ||
|
|
23bb1414ff | ||
|
|
ad1fb29092 | ||
|
|
6a9feb7978 | ||
|
|
ae21bd98aa | ||
|
|
eadfb1398a | ||
|
|
bbb2bda20a | ||
|
|
4e155dbc8e | ||
|
|
9f0f53b1d7 | ||
|
|
fbb8a9640c | ||
|
|
2135e86fc7 | ||
|
|
69a38f9b9f | ||
|
|
c7fd375120 | ||
|
|
464df18ac2 | ||
|
|
3a39a51f11 | ||
|
|
c2b26a3cd9 | ||
|
|
ed29c6f59c | ||
|
|
a855447d11 | ||
|
|
111d666f85 | ||
|
|
d356f88fb5 | ||
|
|
03bddff8e6 | ||
|
|
ccc2bea0c4 | ||
|
|
c1504555ac | ||
|
|
08393b1d0c | ||
|
|
2fca06c994 | ||
|
|
f4feda6323 | ||
|
|
c5750da85a | ||
|
|
c81d363a6e | ||
|
|
302e2fdc53 | ||
|
|
f65e005d97 | ||
|
|
7cfd996802 | ||
|
|
1ed38ddb2d | ||
|
|
6d8bc91220 | ||
|
|
2f0a5f48aa | ||
|
|
3b057d9605 | ||
|
|
76f4cf5cc5 | ||
|
|
99a3aa8ee1 | ||
|
|
73c63d8768 | ||
|
|
3da84396b6 | ||
|
|
2e9a793519 | ||
|
|
bcb7e14d0f | ||
|
|
42818a2310 | ||
|
|
eb72a2e7d2 | ||
|
|
dacf9e327a | ||
|
|
2a8798b729 | ||
|
|
2892abf155 | ||
|
|
3bd585a94e | ||
|
|
2d4236882f | ||
|
|
ec4bfd7827 | ||
|
|
7173efe10f | ||
|
|
43000d2e24 | ||
|
|
db624a7c99 | ||
|
|
72a9d77638 | ||
|
|
36e5909057 | ||
|
|
8655038601 | ||
|
|
9250f649db | ||
|
|
71cc43651a | ||
|
|
e7eb0e2b3e | ||
|
|
33353d5cd9 | ||
|
|
1149487fbd | ||
|
|
f192e8618f | ||
|
|
4eac009c27 | ||
|
|
15470596ad | ||
|
|
f4c6b06b49 | ||
|
|
1d621c412c | ||
|
|
7dc2ca425f | ||
|
|
1075522147 | ||
|
|
9a5b8f0475 | ||
|
|
bd39d72acd | ||
|
|
b582f1c7c6 | ||
|
|
1027762db5 | ||
|
|
ab515daa0c | ||
|
|
3a61cfe6ec | ||
|
|
d09362ed6f | ||
|
|
6eaf19533b | ||
|
|
8f8a9863ad | ||
|
|
c186747edc | ||
|
|
922680851a | ||
|
|
3fbeb0617b | ||
|
|
306d7f6f8a | ||
|
|
ab60005cdc | ||
|
|
f663c64cd4 | ||
|
|
a9ef8333eb | ||
|
|
6d89bbfe61 | ||
|
|
b0a8f5d775 | ||
|
|
ed77d46cc9 | ||
|
|
1ced1b3f73 | ||
|
|
698387e762 | ||
|
|
8928052863 | ||
|
|
8fa6230426 | ||
|
|
7dd3939a26 | ||
|
|
b28c405377 | ||
|
|
b6a6127509 | ||
|
|
7d58bb9799 | ||
|
|
65aa939296 | ||
|
|
c3c4638b22 | ||
|
|
a36d5926d7 | ||
|
|
6f6b1a8333 | ||
|
|
861262ef3a | ||
|
|
c7c7d0988e | ||
|
|
712547cb2b | ||
|
|
5024b77492 | ||
|
|
d01ae6929d | ||
|
|
c2cad1f122 | ||
|
|
25f232616b | ||
|
|
4ea493c86c | ||
|
|
d526530167 | ||
|
|
ae6e2f5df5 | ||
|
|
4354ad296d | ||
|
|
86839db417 | ||
|
|
b9e8e95498 | ||
|
|
150f4f0f4b | ||
|
|
66794d2166 | ||
|
|
81ec152f10 | ||
|
|
60574f04d2 | ||
|
|
419fe62da8 | ||
|
|
aacc544300 | ||
|
|
9fd4ff7a8d | ||
|
|
352be447df | ||
|
|
5ba77289d9 | ||
|
|
497868ecaf | ||
|
|
ef216d3010 | ||
|
|
d2add47f1e | ||
|
|
f45a1d797e | ||
|
|
80311970cf | ||
|
|
1040d3eedf | ||
|
|
07c6b4c363 | ||
|
|
454b4ea715 | ||
|
|
7c2d2246fe | ||
|
|
725430994d | ||
|
|
ea7e682253 | ||
|
|
97d2be1ff3 | ||
|
|
d38dfa60f6 | ||
|
|
b179dde1e7 | ||
|
|
4c7beacfe4 | ||
|
|
b7fe19b6c8 | ||
|
|
744fac6777 | ||
|
|
f0adf90ec0 | ||
|
|
70b573c951 | ||
|
|
e1a7b82b2e | ||
|
|
c24caa8f48 | ||
|
|
753be84ae0 | ||
|
|
27ada9b7b2 | ||
|
|
785ed87117 | ||
|
|
85f07b6f27 | ||
|
|
f004666674 | ||
|
|
eb012a353a | ||
|
|
c645d43598 | ||
|
|
ef3c83da04 | ||
|
|
a0fd9d21d2 | ||
|
|
f6d1cbe6b9 | ||
|
|
ac5c03c458 | ||
|
|
25006cadfe | ||
|
|
d00af57b4a | ||
|
|
85f46b9899 | ||
|
|
50f2beb15b | ||
|
|
561a4cd4bf | ||
|
|
1b7e95b1bd | ||
|
|
f382589083 | ||
|
|
7cdc5c8e93 | ||
|
|
2179c16f60 | ||
|
|
fde7026ac2 | ||
|
|
8520a94b8f | ||
|
|
e39f5d7143 | ||
|
|
3047c55121 | ||
|
|
b875a69266 | ||
|
|
518f1bae20 | ||
|
|
9edd5eeaeb | ||
|
|
b0cc504d7c | ||
|
|
5d5de8ce51 | ||
|
|
a6ee786a4f | ||
|
|
48db589ed2 | ||
|
|
dec30677d9 | ||
|
|
c566b7eca5 | ||
|
|
e8df78f508 | ||
|
|
7cca6ea394 | ||
|
|
3a680df733 | ||
|
|
97d91a895c | ||
|
|
f4aabd0226 | ||
|
|
af75ddd04a | ||
|
|
5140bf9bd0 | ||
|
|
204407b64a | ||
|
|
48d28aa734 | ||
|
|
7e50bedd07 | ||
|
|
7d267d124e | ||
|
|
8b3fcf7740 | ||
|
|
3ac29eb659 | ||
|
|
a55a159fb9 | ||
|
|
e6227f9898 | ||
|
|
a52130e368 | ||
|
|
350eeeebbf | ||
|
|
0ab26a1371 | ||
|
|
49032ae2f2 | ||
|
|
b1fb7a1c1e | ||
|
|
2997c26069 | ||
|
|
a7723ba13f | ||
|
|
3fdd7a4b61 |
No files matched your search
+1
-1
@@ -152,4 +152,4 @@ addons:
|
||||
build_command: "make"
|
||||
branch_pattern: coverity_scan
|
||||
notifications:
|
||||
email: false
|
||||
email: true
|
||||
+61
-1
@@ -1,4 +1,64 @@
|
||||
# 1.7.9 (future)
|
||||
# Future (1.8.0)
|
||||
|
||||
# (1.7.9)
|
||||
- AI SERVICE: Image mode is now much faster, it now saves the image in-memory in PNG format then passes it along to the translation service
|
||||
- BUGFIX: Touch input - When using an overlay to toggle the quick menu on touchscreen devices, we no longer get 'phantom' menu input - i.e. the old bug of hitting the toggle and instantly resuming content (or performing a save state) is fixed
|
||||
- BUGFIX: Networking - RetroArch crashed when pressing left while Relay Server Location entry was selected
|
||||
- BUGFIX: Networking - fix memory leak that could happen at exit after a network
|
||||
operation had run
|
||||
- CHEEVOS: Improve handling of line endings when calculating CD hashes for retroachievements
|
||||
- CHEEVOS: Add support for Sega CD/Saturn; reduce hash calls to server
|
||||
- FPGA: Add initial FPGA port for Z-Turn boards - not really release-ready yet, will need community support to continue. Currently employs naive framebuffer approach, not fullspeed
|
||||
- GL1: GLDirect (D3D9 to OGL1.1 wrapper) support
|
||||
- GONG: Stability fixes
|
||||
- LINUX/UDEV: Fix touchscreen/lightgun issues
|
||||
- MENU/MATERIALUI: MaterialUI no longer 'forgets' its place when navigating backwards in menus, and navigation in general is 'cleaner'.
|
||||
- MENU/MATERIALUI: Add initial gesture support
|
||||
- MENU/MATERIALUI: Improved touch support
|
||||
- MENU/MATERIALUI: Bugfix - Random' items are no longer automatically highlighted when performing standard up/down 'flick' scrolling through lists (items are only highlighted when you keep the pointer still for > 200 ms)
|
||||
- MENU/MATERIALUI: Bugfix - The display no longer 'jerks' for one frame when navigating backwards through lists
|
||||
- MENU/MATERIALUI: Bugfix - The Material UI scaling factor is now based upon the device-reported screen DPI value (previously it relied upon a hard-coded magic number, which was never correct)
|
||||
- MENU/RGUI: Functional mouse/touchscreen support
|
||||
- MENU/ONSCREEN KEYBOARD: On-screen keyboard entry via mouse/touchscreen has been tidied up - no more double inputs (or unwanted menu interaction in the background)
|
||||
- MENU/MOUSE: Mouse wheel up/down is now a proper 'up/down', same as using cursor keys or a dpad
|
||||
- MENU/MOUSE: Mouse wheel tilt left/right has been wired up to normal 'left/right' commands. Also further improved mouse wheel tilt
|
||||
- MENU/OZONE: Add option to toggle between static and scrolling content metadata
|
||||
- MENU/XMB: Add full gesture support
|
||||
- MENU/OSX: Fixed mouse buttons - mouse down events were not hooked up
|
||||
- MENU: When navigating backwards from a core options drop-down list (i.e. pressing select or cancel), the last menu position is remembered (instead of resetting back to the first core option item each time)
|
||||
- MENU: Add mouse/touchscreen gesture support
|
||||
- MENU: Add option to delete playlists (Settings > Playlists > Playlist Management)
|
||||
- MOBILE (ANDROID/IOS): Add option to automatically rotate overlays when changing orientation
|
||||
- OSD: Memory details should now be available on every platform (get_mem_total and get_mem_free need to be implemented in the frontend driver for it to work)
|
||||
- OSD: Memory details can now be shown individually without FPS and frame count
|
||||
- OSX/METAL: CoreAudio V3 driver should now be the default audio driver on first startup
|
||||
- PS2: Fix memory leaks in font/video driver
|
||||
- SWITCH: Set default aspect ratio to core provided instead of 4:3
|
||||
- THREADED VIDEO: Fix FPS text in threaded video mode
|
||||
- VITA: Set default aspect ratio to core provided instead of 4:3
|
||||
- VITA: Add system language detection
|
||||
- VITA: More memory support
|
||||
- WIN32: Log window now has title 'Logging Console'
|
||||
- WII: Add Wiimote lightgun support
|
||||
|
||||
# 1.7.8 (v4)
|
||||
- COMMON: Enable customisation of runtime 'last played' display format.
|
||||
- CHEEVOS: Add hashing support for PSX (bin/cue, chd, or real CD) (for real this time, got added in the CHANGELOG for v2 then reverted before it hit release)
|
||||
- IOS: Update for iOS 13, fix the asset packaging issues
|
||||
- LOCALIZATION: Update Portuguese Brazilian Translation
|
||||
- MENU: Add 12-hour time/date versions of all formats
|
||||
- SWITCH: Add 'AI Service' option to Switch (untested)
|
||||
- SWITCH: Update to newest libnx
|
||||
|
||||
# 1.7.8 (v3)
|
||||
- GLCORE: Ensure correct scaling of menu texture (with RGUI)
|
||||
- IPS: Soft-Patch any IPS size
|
||||
- METAL: Fix overlay issue - setup correct viewport before rendering overlay
|
||||
- METAL/STB: Fix font driver issue with AMD GPUs on MacOS.
|
||||
- MENU/RGUI: Correctly rescale menu when resizing window if aspect ratio lock is enabled.
|
||||
- OSX: Remove OSX suffix in window title
|
||||
- PSP: Fix audio conversion code
|
||||
- REMAPS: Fix analog remapping regression -analog remapping would break controls
|
||||
|
||||
# 1.7.8 (v2)
|
||||
- 3DS: Fix 3DS startup crash
|
||||
|
||||
@@ -53,6 +53,10 @@ ifneq ($(findstring DOS,$(OS)),)
|
||||
LDFLAGS += -lemu
|
||||
endif
|
||||
|
||||
ifneq ($(findstring FPGA,$(OS)),)
|
||||
DEFINES += -DHAVE_FPGA
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
LDFLAGS += -static-libgcc -lwinmm
|
||||
endif
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
# This build was put together and is maintained by ModMyClassic.com for Libretro.
|
||||
# The purpose is to give Libretro a proper "official" build platform for classic consoles.
|
||||
# If you need any help in building for the classics or have any questions then please visit
|
||||
# https://modmyclassic.com/comp and we will help in any way possible!
|
||||
|
||||
# Building Prerequisites ##############
|
||||
# arm-linux-gnueabihf-strip
|
||||
# patchelf
|
||||
# bc
|
||||
|
||||
include version.all
|
||||
|
||||
# Classic Readme Variables ############
|
||||
CLASSIC_ALT_VER := $(shell echo $(RARCH_VERSION) | tr . _)
|
||||
CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)
|
||||
CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION) (Official Optimised)
|
||||
CLASSIC_VERSION := $(RARCH_VERSION)
|
||||
MOD_CREATOR := Libretro + ModMyClassic
|
||||
MOD_CATEGORY := RetroArch
|
||||
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
|
||||
|
||||
# Platform dependant Variables ########
|
||||
HAKCHI_DIR := RA_Platform-Hakchi
|
||||
HAKCHI_GIT := https://github.com/Classicmods/RA_Platform-Hakchi
|
||||
|
||||
# General Shared Variables ############
|
||||
TARGET := retroarch
|
||||
|
||||
# Libretro Defines ####################
|
||||
#HAVE_CLASSIC = Classic Hook, disable some features
|
||||
#HAVE_C_A7A7 = Classic Armv7 Cortex A7 optimisation override
|
||||
#HAVE_HAKCHI = Hakchi Hook, change default configurations etc (TODO)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
|
||||
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
|
||||
CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
|
||||
make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
|
||||
arm-linux-gnueabihf-strip -v retroarch
|
||||
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
|
||||
|
||||
#HAKCHI BUILD (NESC, SNESC)
|
||||
#FYI this build was originally known as RetroArch 'Neo' for Hakchi.
|
||||
@echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
rm -fr /tmp/$(HAKCHI_DIR)
|
||||
cd /tmp/; git clone $(HAKCHI_GIT)
|
||||
cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch
|
||||
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version
|
||||
cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md
|
||||
printf "%s\n" \
|
||||
"---" \
|
||||
"Name: $(CLASSIC_MODS_NAME)" \
|
||||
"Creator: $(MOD_CREATOR)" \
|
||||
"Category: $(MOD_CATEGORY)" \
|
||||
"Version: $(CLASSIC_MODS_VER)" \
|
||||
"Built on: $(shell date)" \
|
||||
"Git commit: $(GIT_COMMIT)" \
|
||||
"---" > /tmp/$(HAKCHI_DIR)/readme.md
|
||||
cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md
|
||||
rm /tmp/$(HAKCHI_DIR)/readme_COPY.md
|
||||
@echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" *
|
||||
mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod .
|
||||
@echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **"
|
||||
rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp
|
||||
|
||||
@echo "*********************************************************************"
|
||||
@echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***"
|
||||
@echo "*********************************************************************"
|
||||
clean:
|
||||
rm -rf obj-unix
|
||||
rm -f *.d
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
rm -f $(CLASSIC_MODS_VER).hmod
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# This build was put together and is maintained by ModMyClassic.com for Libretro.
|
||||
# The purpose is to give Libretro a proper "official" build platform for classic consoles.
|
||||
# If you need any help in building for the classics or have any questions then please visit
|
||||
# https://modmyclassic.com and we will help in any way possible!
|
||||
|
||||
# Building Prerequisites ##############
|
||||
# arm-linux-gnueabihf-strip
|
||||
|
||||
include version.all
|
||||
|
||||
# General Shared Variables ############
|
||||
TARGET := retroarch
|
||||
|
||||
# Libretro Defines ####################
|
||||
#HAVE_CLASSIC = Classic Hook, disable some features
|
||||
#HAVE_C_A7A7 = Classic Armv7 Cortex A7 optimisation override
|
||||
#HAVE_SEGAM = Sega Mini Hook, change default configurations etc (TODO)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
|
||||
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
|
||||
CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --disable-wayland --disable-x11 --disable-opengl --disable-opengl1 --disable-opengl_core --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
|
||||
make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_SEGAM=1 -j #Cook it
|
||||
arm-linux-gnueabihf-strip -v retroarch
|
||||
@echo "*********************************************************************"
|
||||
@echo "*** SEGA Mega Drive Mini RetroArch binary built successfully! ***"
|
||||
@echo "*********************************************************************"
|
||||
clean:
|
||||
rm -rf obj-unix
|
||||
rm -f *.d
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# This build was put together and is maintained by ModMyClassic.com for Libretro.
|
||||
# The purpose is to give Libretro a proper "official" build platform for classic consoles.
|
||||
# If you need any help in building for the classics or have any questions then please visit
|
||||
# https://modmyclassic.com and we will help in any way possible!
|
||||
|
||||
# INFO: THIS BUILD TARGET ALSO COVERS THE NESC!!!
|
||||
|
||||
# Building Prerequisites ##############
|
||||
# arm-linux-gnueabihf-strip
|
||||
# patchelf
|
||||
|
||||
include version.all
|
||||
|
||||
# General Shared Variables ############
|
||||
TARGET := retroarch
|
||||
|
||||
# Libretro Defines ####################
|
||||
#HAVE_CLASSIC = Classic Hook, disable some features
|
||||
#HAVE_C_A7A7 = Classic Armv7 Cortex A7 optimisation override
|
||||
#HAVE_HAKCHI = Hakchi Hook, change default configurations etc (TODO)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
retroarch:
|
||||
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
|
||||
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
|
||||
CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --disable-wayland --disable-x11 --disable-opengl --disable-opengl1 --disable-opengl_core --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord
|
||||
make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
|
||||
arm-linux-gnueabihf-strip -v retroarch
|
||||
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
|
||||
@echo "*********************************************************************"
|
||||
@echo "*** NES/SNES Classic RetroArch binary built successfully! ***"
|
||||
@echo "*********************************************************************"
|
||||
clean:
|
||||
rm -rf obj-unix
|
||||
rm -f *.d
|
||||
rm -f *.o
|
||||
rm -f audio/*.o
|
||||
rm -f conf/*.o
|
||||
rm -f gfx/*.o
|
||||
rm -f gfx/drivers_font/*.o
|
||||
rm -f gfx/drivers_font_renderer/*.o
|
||||
rm -f gfx/drivers_context/*.o
|
||||
rm -f gfx/py_state/*.o
|
||||
rm -f compat/*.o
|
||||
rm -f record/*.o
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
+36
-4
@@ -595,7 +595,9 @@ ifeq ($(HAVE_ALSA), 1)
|
||||
OBJ += audio/drivers/alsa.o
|
||||
|
||||
ifneq ($(HAVE_HAKCHI), 1)
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
ifneq ($(HAVE_SEGAM), 1)
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
@@ -799,7 +801,6 @@ endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/menu_driver.o \
|
||||
menu/menu_content.o \
|
||||
menu/menu_setting.o \
|
||||
menu/widgets/menu_filebrowser.o \
|
||||
menu/widgets/menu_dialog.o \
|
||||
@@ -1129,6 +1130,24 @@ ifeq ($(HAVE_SIXEL), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_VIDEO), 1)
|
||||
ifneq ($(NETWORK_VIDEO_HOST),)
|
||||
DEFINES += -DNETWORK_VIDEO_HOST=$(NETWORK_VIDEO_HOST)
|
||||
else
|
||||
DEFINES += -DNETWORK_VIDEO_HOST=127.0.0.1
|
||||
endif
|
||||
|
||||
ifneq ($(NETWORK_VIDEO_PORT),)
|
||||
DEFINES += -DNETWORK_VIDEO_PORT=$(NETWORK_VIDEO_PORT)
|
||||
else
|
||||
DEFINES += -DNETWORK_VIDEO_PORT=4953
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_NETWORK_VIDEO
|
||||
OBJ += gfx/drivers/network_gfx.o \
|
||||
gfx/drivers_context/network_ctx.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
OBJ += gfx/drivers/drm_gfx.o
|
||||
INCLUDE_DIRS += -I/usr/include/libdrm
|
||||
@@ -1255,7 +1274,8 @@ endif
|
||||
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
HAVE_SDL_COMMON = 1
|
||||
OBJ += gfx/drivers/sdl2_gfx.o
|
||||
OBJ += gfx/drivers/sdl2_gfx.o \
|
||||
gfx/common/sdl2_common.o
|
||||
DEF_FLAGS += $(SDL2_CFLAGS)
|
||||
LIBS += $(SDL2_LIBS)
|
||||
else ifeq ($(HAVE_SDL), 1)
|
||||
@@ -1777,6 +1797,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
cheevos-new/fixup.o \
|
||||
cheevos-new/parser.o \
|
||||
cheevos-new/hash.o \
|
||||
$(LIBRETRO_COMM_DIR)/formats/cdfs/cdfs.o \
|
||||
deps/rcheevos/src/rcheevos/trigger.o \
|
||||
deps/rcheevos/src/rcheevos/condset.o \
|
||||
deps/rcheevos/src/rcheevos/condition.o \
|
||||
@@ -1893,6 +1914,13 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(findstring FPGA,$(OS)),)
|
||||
OBJ += gfx/drivers/fpga_gfx.o \
|
||||
gfx/drivers_context/fpga_ctx.o \
|
||||
gfx/drivers_font/fpga_font.o \
|
||||
menu/drivers_display/menu_display_fpga.o
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
OBJ += media/rarch.o \
|
||||
gfx/common/win32_common.o \
|
||||
@@ -2010,7 +2038,7 @@ endif
|
||||
##################################
|
||||
### Classic Platform specifics ###
|
||||
###############WIP################
|
||||
# Help at https://modmyclassic.com/comp
|
||||
# Help at https://modmyclassic.com
|
||||
|
||||
ifeq ($(HAVE_CLASSIC), 1)
|
||||
DEFINES += -DHAVE_CLASSIC
|
||||
@@ -2040,4 +2068,8 @@ endif
|
||||
ifeq ($(HAVE_HAKCHI), 1)
|
||||
DEFINES += -DHAVE_HAKCHI
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SEGAM), 1)
|
||||
DEFINES += -DHAVE_SEGAM
|
||||
endif
|
||||
##################################
|
||||
@@ -21,6 +21,7 @@ OBJ :=
|
||||
|
||||
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' -DHAVE_STB_VORBIS
|
||||
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_PRX = 0
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
@@ -45,6 +45,9 @@ LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CD
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lz
|
||||
LIBS += -lcdvdfs -lpatches -lpoweroff
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
|
||||
+8
-8
@@ -85,18 +85,16 @@ LD := $(CXX)
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls -O2
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O2 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
ASFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -Wl,-q
|
||||
|
||||
CFLAGS += -Wall -ffast-math
|
||||
CFLAGS += -Wall -ffast-math -g
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
@@ -114,7 +112,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub \
|
||||
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub \
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
|
||||
@@ -154,17 +152,19 @@ $(TARGET).elf: $(OBJ) libretro_vita.a
|
||||
$(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
%.velf: %.elf
|
||||
cp $< $<.unstripped.elf
|
||||
$(PREFIX)strip -g $<
|
||||
vita-elf-create $< $@
|
||||
|
||||
%.self: %.velf
|
||||
vita-make-fself -c -s $< $@
|
||||
|
||||
%.vpk: %.self
|
||||
vita-mksfoex -s TITLE_ID=$(VITA_TITLE_ID) "$(VITA_TITLE_NAME)" param.sfo
|
||||
vita-mksfoex -s TITLE_ID=$(VITA_TITLE_ID) "$(VITA_TITLE_NAME)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
# Useful for developers
|
||||
|
||||
@@ -21,7 +21,7 @@ RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc
|
||||
@@ -55,7 +55,7 @@ OBJS = frontend/frontend_salamander.o \
|
||||
all: $(TARGET).vpk
|
||||
|
||||
%.vpk: eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" param.sfo
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin $@
|
||||
|
||||
eboot.bin: $(TARGET).velf
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
#include <psp2/kernel/sysmem.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
|
||||
#define RAM_THRESHOLD 0xA00000 // Memory left to the system for threads and other internal stuffs
|
||||
|
||||
static int _newlib_heap_memblock;
|
||||
static unsigned _newlib_heap_size;
|
||||
static char *_newlib_heap_base, *_newlib_heap_end, *_newlib_heap_cur;
|
||||
char *_newlib_heap_base, *_newlib_heap_end, *_newlib_heap_cur;
|
||||
static char _newlib_sbrk_mutex[32] __attribute__ ((aligned (8)));
|
||||
|
||||
static int _newlib_vm_memblock;
|
||||
@@ -50,11 +52,16 @@ void _init_vita_heap(void) {
|
||||
if (sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)_newlib_sbrk_mutex, "sbrk mutex", 0, 0, 0) < 0) {
|
||||
goto failure;
|
||||
}
|
||||
|
||||
// Always allocating the max avaliable USER_RW mem on the system
|
||||
SceKernelFreeMemorySizeInfo info;
|
||||
info.size = sizeof(SceKernelFreeMemorySizeInfo);
|
||||
sceKernelGetFreeMemorySize(&info);
|
||||
|
||||
if (&_newlib_heap_size_user != NULL) {
|
||||
_newlib_heap_size = _newlib_heap_size_user;
|
||||
}else{
|
||||
_newlib_heap_size = 192 * 1024 * 1024;
|
||||
_newlib_heap_size = info.size_user - RAM_THRESHOLD;
|
||||
}
|
||||
|
||||
_newlib_heap_size -= _newlib_vm_size;
|
||||
|
||||
+407
-172
@@ -21,6 +21,7 @@
|
||||
#include <streams/interface_stream.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <features/features_cpu.h>
|
||||
#include <formats/cdfs.h>
|
||||
#include <compat/strl.h>
|
||||
#include <rhash.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
@@ -1067,7 +1068,9 @@ static void rcheevos_unlock_cb(unsigned id, void* userdata)
|
||||
#ifndef CHEEVOS_DONT_DEACTIVATE
|
||||
cheevo->active &= ~*(unsigned*)userdata;
|
||||
#endif
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "cheevo %u deactivated: %s\n", id, cheevo->info->title);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "cheevo %u deactivated (%s): %s\n", id,
|
||||
(*(unsigned*)userdata) == RCHEEVOS_ACTIVE_HARDCORE ? "hardcore" : "softcore",
|
||||
cheevo->info->title);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1098,8 +1101,9 @@ typedef struct
|
||||
char url[256];
|
||||
char badge_basepath[PATH_MAX_LENGTH];
|
||||
char badge_fullpath[PATH_MAX_LENGTH];
|
||||
unsigned char last_hash[16];
|
||||
unsigned char hash[16];
|
||||
bool round;
|
||||
unsigned ext_hash;
|
||||
unsigned gameid;
|
||||
unsigned i;
|
||||
unsigned j;
|
||||
@@ -1123,6 +1127,7 @@ typedef struct
|
||||
struct http_connection_t *conn;
|
||||
struct http_t *http;
|
||||
const rcheevos_cheevo_t *cheevo_end;
|
||||
cdfs_file_t cdfp;
|
||||
|
||||
/* co-routine required fields */
|
||||
CORO_FIELDS
|
||||
@@ -1131,14 +1136,14 @@ typedef struct
|
||||
enum
|
||||
{
|
||||
/* Negative values because CORO_SUB generates positive values */
|
||||
RCHEEVOS_SNES_MD5 = -1,
|
||||
RCHEEVOS_GENESIS_MD5 = -2,
|
||||
RCHEEVOS_GENERIC_MD5 = -1,
|
||||
RCHEEVOS_SNES_MD5 = -2,
|
||||
RCHEEVOS_LYNX_MD5 = -3,
|
||||
RCHEEVOS_NES_MD5 = -4,
|
||||
RCHEEVOS_GENERIC_MD5 = -5,
|
||||
RCHEEVOS_FILENAME_MD5 = -6,
|
||||
RCHEEVOS_PSX_MD5 = -5,
|
||||
RCHEEVOS_ARCADE_MD5 = -6,
|
||||
RCHEEVOS_EVAL_MD5 = -7,
|
||||
RCHEEVOS_FILL_MD5 = -8,
|
||||
RCHEEVOS_SEGACD_MD5 = -8,
|
||||
RCHEEVOS_GET_GAMEID = -9,
|
||||
RCHEEVOS_GET_CHEEVOS = -10,
|
||||
RCHEEVOS_GET_BADGES = -11,
|
||||
@@ -1155,23 +1160,13 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
const int lynx_header_len = 0x40;
|
||||
ssize_t num_read = 0;
|
||||
size_t to_read = 4096;
|
||||
uint8_t *buffer = NULL;
|
||||
uint8_t *ptr = NULL;
|
||||
const char *end = NULL;
|
||||
|
||||
static const uint32_t genesis_exts[] =
|
||||
{
|
||||
0x0b888feeU, /* mdx */
|
||||
0x005978b6U, /* md */
|
||||
0x0b88aa89U, /* smd */
|
||||
0x0b88767fU, /* gen */
|
||||
0x0b8861beU, /* bin */
|
||||
0x0b886782U, /* cue */
|
||||
0x0b8880d0U, /* iso */
|
||||
0x0b88aa98U, /* sms */
|
||||
0x005977f3U, /* gg */
|
||||
0x0059797fU, /* sg */
|
||||
0
|
||||
};
|
||||
size_t exe_name_size = 0;
|
||||
char exe_name_buffer[64];
|
||||
char* exe_name = NULL;
|
||||
char* scan = NULL;
|
||||
char buffer[2048];
|
||||
|
||||
static const uint32_t snes_exts[] =
|
||||
{
|
||||
@@ -1186,20 +1181,52 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t nes_exts[] =
|
||||
{
|
||||
0x0b88944bU, /* nes */
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t lynx_exts[] =
|
||||
{
|
||||
0x0b888cf7U, /* lnx */
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t psx_exts[] =
|
||||
{
|
||||
0x0b886782U, /* cue */
|
||||
0x0b88899aU, /* m3u */
|
||||
/*0x0b88af0bU,* toc */
|
||||
/*0x0b88652fU,* ccd */
|
||||
/*0x0b889c67U,* pbp */
|
||||
0x0b8865d4U, /* chd */
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t segacd_exts[] =
|
||||
{
|
||||
0x0b886782U, /* cue */
|
||||
0x0b8880d0U, /* iso */
|
||||
0x0b8865d4U, /* chd */
|
||||
0
|
||||
};
|
||||
|
||||
static const uint32_t arcade_exts[] =
|
||||
{
|
||||
0x0b88c7d8U, /* zip */
|
||||
0
|
||||
};
|
||||
|
||||
static rcheevos_finder_t finders[] =
|
||||
{
|
||||
{RCHEEVOS_SNES_MD5, "SNES (discards header)", snes_exts},
|
||||
{RCHEEVOS_GENESIS_MD5, "Genesis (6Mb padding)", genesis_exts},
|
||||
{RCHEEVOS_LYNX_MD5, "Atari Lynx (discards header)", lynx_exts},
|
||||
{RCHEEVOS_NES_MD5, "NES (discards header)", NULL},
|
||||
{RCHEEVOS_GENERIC_MD5, "Generic (plain content)", NULL},
|
||||
{RCHEEVOS_FILENAME_MD5, "Generic (filename)", NULL}
|
||||
{RCHEEVOS_LYNX_MD5, "Atari Lynx (discards header)", lynx_exts},
|
||||
{RCHEEVOS_NES_MD5, "NES (discards header)", nes_exts},
|
||||
{RCHEEVOS_PSX_MD5, "Playstation (main executable)", psx_exts},
|
||||
{RCHEEVOS_SEGACD_MD5, "Sega CD/Saturn (first sector)", segacd_exts},
|
||||
{RCHEEVOS_ARCADE_MD5, "Arcade (filename)", arcade_exts},
|
||||
{RCHEEVOS_GENERIC_MD5, "Generic (plain content)", NULL}
|
||||
};
|
||||
|
||||
CORO_ENTER();
|
||||
@@ -1243,15 +1270,13 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
buffer = (uint8_t*)coro->data + coro->len;
|
||||
ptr = (uint8_t*)coro->data + coro->len;
|
||||
to_read = 4096;
|
||||
|
||||
if (to_read > coro->count)
|
||||
to_read = coro->count;
|
||||
|
||||
num_read = intfstream_read(coro->stream,
|
||||
(void*)buffer, to_read);
|
||||
|
||||
num_read = intfstream_read(coro->stream, (void*)ptr, to_read);
|
||||
if (num_read <= 0)
|
||||
break;
|
||||
|
||||
@@ -1268,14 +1293,44 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
}
|
||||
|
||||
/* Use the supported extensions as a hint
|
||||
* to what method we should use. */
|
||||
core_get_system_info(&coro->sysinfo);
|
||||
|
||||
/* Use the selected file's extension to determine which method to use */
|
||||
for (coro->i = 0; coro->i < ARRAY_SIZE(finders); coro->i++)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes)
|
||||
{
|
||||
for (coro->j = 0; finders[coro->i].ext_hashes[coro->j]; coro->j++)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes[coro->j] == coro->ext_hash)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "testing %s\n", finders[coro->i].name);
|
||||
CORO_GOSUB(finders[coro->i].label);
|
||||
|
||||
if (coro->gameid != 0)
|
||||
goto found;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Use the extensions supported by the core as a hint to what method we should use. */
|
||||
core_get_system_info(&coro->sysinfo);
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "no method for file extension, trying core supported extensions: %s\n", coro->sysinfo.valid_extensions);
|
||||
for (coro->i = 0; coro->i < ARRAY_SIZE(finders); coro->i++)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes)
|
||||
{
|
||||
for (coro->j = 0; finders[coro->i].ext_hashes[coro->j]; coro->j++)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes[coro->j] == coro->ext_hash)
|
||||
break;
|
||||
}
|
||||
|
||||
/* did we already check this one? */
|
||||
if (finders[coro->i].ext_hashes[coro->j] == coro->ext_hash)
|
||||
continue;
|
||||
|
||||
coro->ext = coro->sysinfo.valid_extensions;
|
||||
|
||||
while (coro->ext)
|
||||
@@ -1298,13 +1353,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes[coro->j] == hash)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "testing %s\n",
|
||||
finders[coro->i].name);
|
||||
|
||||
/*
|
||||
* Inputs: CHEEVOS_VAR_INFO
|
||||
* Outputs: CHEEVOS_VAR_GAMEID, the game was found if it's different from 0
|
||||
*/
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "testing %s\n", finders[coro->i].name);
|
||||
CORO_GOSUB(finders[coro->i].label);
|
||||
|
||||
if (coro->gameid != 0)
|
||||
@@ -1318,18 +1367,13 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
||||
}
|
||||
}
|
||||
|
||||
/* Try hashing methods not specifically tied to a file extension */
|
||||
for (coro->i = 0; coro->i < ARRAY_SIZE(finders); coro->i++)
|
||||
{
|
||||
if (finders[coro->i].ext_hashes)
|
||||
continue;
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "testing %s\n",
|
||||
finders[coro->i].name);
|
||||
|
||||
/*
|
||||
* Inputs: CHEEVOS_VAR_INFO
|
||||
* Outputs: CHEEVOS_VAR_GAMEID
|
||||
*/
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "testing %s\n", finders[coro->i].name);
|
||||
CORO_GOSUB(finders[coro->i].label);
|
||||
|
||||
if (coro->gameid != 0)
|
||||
@@ -1432,11 +1476,12 @@ found:
|
||||
CORO_GOSUB(RCHEEVOS_GET_BADGES);
|
||||
CORO_STOP();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a SNES game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a SNES game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_SNES_MD5)
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
@@ -1444,6 +1489,7 @@ found:
|
||||
Unheadered files fall back to RCHEEVOS_GENERIC_MD5. */
|
||||
if (coro->len < 0x2000 || coro->len % 0x2000 != snes_header_len)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not locate SNES header\n", coro->gameid);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
@@ -1456,41 +1502,12 @@ found:
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a Genesis game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_GENESIS_MD5)
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
coro->offset = 0;
|
||||
coro->count = 0;
|
||||
CORO_GOSUB(RCHEEVOS_EVAL_MD5);
|
||||
|
||||
if (coro->count == 0)
|
||||
{
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
if (coro->count < CHEEVOS_MB(6))
|
||||
{
|
||||
coro->offset = 0;
|
||||
coro->count = CHEEVOS_MB(6) - coro->count;
|
||||
CORO_GOSUB(RCHEEVOS_FILL_MD5);
|
||||
}
|
||||
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify an Atari Lynx game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
/**************************************************************************
|
||||
* Info Tries to identify an Atari Lynx game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_LYNX_MD5)
|
||||
|
||||
/* Checks for the existence of a headered Lynx file.
|
||||
@@ -1498,6 +1515,7 @@ found:
|
||||
if (coro->len <= (unsigned)lynx_header_len ||
|
||||
memcmp("LYNX", (void *)coro->data, 5) != 0)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not locate LYNX header\n", coro->gameid);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
@@ -1510,11 +1528,12 @@ found:
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a NES game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a NES game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_NES_MD5)
|
||||
|
||||
/* Checks for the existence of a headered NES file.
|
||||
@@ -1534,6 +1553,7 @@ found:
|
||||
|| coro->header.id[3] != 0x1a)
|
||||
{
|
||||
coro->gameid = 0;
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not locate NES header\n", coro->gameid);
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
@@ -1545,11 +1565,220 @@ found:
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a "generic" game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a Sega CD game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_SEGACD_MD5)
|
||||
{
|
||||
/* ignore bin files less than 16MB - they're probably a ROM, not a CD */
|
||||
if (coro->ext_hash == 0x0b8861beU && coro->len < CHEEVOS_MB(16))
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "ignoring small BIN file - assuming not CD\n", coro->gameid);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
/* find the data track - it should be the first one */
|
||||
coro->stream = cdfs_open_data_track(coro->path);
|
||||
if (coro->stream)
|
||||
{
|
||||
/* open the raw CD */
|
||||
if (cdfs_open_file(&coro->cdfp, coro->stream, NULL))
|
||||
{
|
||||
coro->count = 512;
|
||||
free(coro->data);
|
||||
coro->data = (uint8_t*)malloc(coro->count);
|
||||
cdfs_read_file(&coro->cdfp, coro->data, coro->count);
|
||||
coro->len = coro->count;
|
||||
|
||||
CORO_GOSUB(RCHEEVOS_EVAL_MD5);
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
}
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not open CD\n", coro->gameid);
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a Playstation game
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_PSX_MD5)
|
||||
{
|
||||
MD5_Init(&coro->md5);
|
||||
|
||||
/* if we're looking at an m3u file, get the first disc from the playlist */
|
||||
end = path_get_extension(coro->path);
|
||||
if (string_is_equal_noncase(end, "m3u"))
|
||||
{
|
||||
intfstream_t* m3u_stream = intfstream_open_file(coro->path, RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
if (m3u_stream)
|
||||
{
|
||||
char disc_path[PATH_MAX_LENGTH];
|
||||
char* tmp;
|
||||
|
||||
num_read = intfstream_read(m3u_stream, buffer, sizeof(buffer));
|
||||
intfstream_close(m3u_stream);
|
||||
buffer[num_read] = '\0';
|
||||
|
||||
tmp = buffer;
|
||||
while (*tmp && *tmp != '\n')
|
||||
++tmp;
|
||||
if (tmp > buffer && tmp[-1] == '\r')
|
||||
--tmp;
|
||||
*tmp = '\0';
|
||||
|
||||
fill_pathname_basedir(disc_path, coro->path, sizeof(disc_path));
|
||||
strlcat(disc_path, buffer, sizeof(disc_path));
|
||||
|
||||
free((void*)coro->path);
|
||||
coro->path = strdup(disc_path);
|
||||
}
|
||||
}
|
||||
|
||||
/* find the data track - it should be the first one */
|
||||
coro->stream = cdfs_open_data_track(coro->path);
|
||||
if (coro->stream)
|
||||
{
|
||||
/* open the SYSTEM.CNF file and find the BOOT= record */
|
||||
if (cdfs_open_file(&coro->cdfp, coro->stream, "SYSTEM.CNF"))
|
||||
{
|
||||
cdfs_read_file(&coro->cdfp, buffer, sizeof(buffer));
|
||||
|
||||
for (scan = buffer; scan < &buffer[sizeof(buffer)] && *scan; ++scan)
|
||||
{
|
||||
if (strncmp(scan, "BOOT", 4) == 0)
|
||||
{
|
||||
exe_name = scan + 4;
|
||||
while (isspace(*exe_name))
|
||||
++exe_name;
|
||||
if (*exe_name == '=')
|
||||
{
|
||||
++exe_name;
|
||||
while (isspace(*exe_name))
|
||||
++exe_name;
|
||||
|
||||
if (strncmp(exe_name, "cdrom:", 6) == 0)
|
||||
exe_name += 6;
|
||||
if (*exe_name == '\\')
|
||||
++exe_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (*scan && *scan != '\n')
|
||||
++scan;
|
||||
}
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
if (exe_name)
|
||||
{
|
||||
scan = exe_name;
|
||||
while (*scan != '\n' && *scan != '\r' && *scan != ';' && *scan != ' ')
|
||||
++scan;
|
||||
*scan = '\0';
|
||||
|
||||
exe_name_size = scan - exe_name;
|
||||
if (exe_name_size < sizeof(exe_name_buffer))
|
||||
strcpy(exe_name_buffer, exe_name);
|
||||
|
||||
/* open the file pointed to by the BOOT= record */
|
||||
if (exe_name_buffer[0] && cdfs_open_file(&coro->cdfp, coro->stream, exe_name_buffer))
|
||||
{
|
||||
cdfs_read_file(&coro->cdfp, buffer, sizeof(buffer));
|
||||
|
||||
/* the PSX-E header specifies the executable size as a 4-byte value 28 bytes into the header, which doesn't
|
||||
* include the header itself. We want to include the header in the hash, so append another 2048 to that value.
|
||||
* ASSERT: this results in the same value as coro->cdfp->size */
|
||||
coro->count = 2048 + (((uint8_t)buffer[28 + 3] << 24) | ((uint8_t)buffer[28 + 2] << 16) |
|
||||
((uint8_t)buffer[28 + 1] << 8) | (uint8_t)buffer[28]);
|
||||
|
||||
if (coro->count > CHEEVOS_MB(16)) /* sanity check */
|
||||
{
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* there's a few games that are use a singular engine and only differ via their data files.
|
||||
* luckily, they have unique serial numbers, and use the serial number as the boot file in the
|
||||
* standard way. include the boot executable name in the hash */
|
||||
coro->count += exe_name_size;
|
||||
|
||||
free(coro->data);
|
||||
coro->data = (uint8_t*)malloc(coro->count);
|
||||
memcpy(coro->data, exe_name_buffer, exe_name_size);
|
||||
coro->len = exe_name_size;
|
||||
|
||||
memcpy((uint8_t*)coro->data + coro->len, buffer, sizeof(buffer));
|
||||
coro->len += sizeof(buffer);
|
||||
|
||||
while (coro->len < coro->count)
|
||||
{
|
||||
CORO_YIELD();
|
||||
|
||||
to_read = coro->count - coro->len;
|
||||
if (to_read > 2048)
|
||||
to_read = 2048;
|
||||
|
||||
cdfs_read_file(&coro->cdfp, (uint8_t*)coro->data + coro->len, to_read);
|
||||
|
||||
coro->len += to_read;
|
||||
};
|
||||
|
||||
CORO_GOSUB(RCHEEVOS_EVAL_MD5);
|
||||
MD5_Final(coro->hash, &coro->md5);
|
||||
|
||||
cdfs_close_file(&coro->cdfp);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not locate primary executable\n", coro->gameid);
|
||||
|
||||
intfstream_close(coro->stream);
|
||||
CHEEVOS_FREE(coro->stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "could not open CD\n", coro->gameid);
|
||||
}
|
||||
|
||||
coro->gameid = 0;
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a game by examining the entire file (no special processing)
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_GENERIC_MD5)
|
||||
|
||||
MD5_Init(&coro->md5);
|
||||
@@ -1565,12 +1794,14 @@ found:
|
||||
|
||||
CORO_GOTO(RCHEEVOS_GET_GAMEID);
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify a game based on its filename (with no extension)
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_FILENAME_MD5)
|
||||
|
||||
/**************************************************************************
|
||||
* Info Tries to identify an arcade game based on its filename (with no extension).
|
||||
* An arcade game "rom" is a zip file containing many ROMs.
|
||||
* Input CHEEVOS_VAR_INFO the content info
|
||||
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_ARCADE_MD5)
|
||||
if (!string_is_empty(coro->path))
|
||||
{
|
||||
char base_noext[PATH_MAX_LENGTH];
|
||||
@@ -1584,11 +1815,12 @@ found:
|
||||
}
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Evaluates the CHEEVOS_VAR_MD5 hash
|
||||
* Inputs CHEEVOS_VAR_INFO, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
|
||||
* Outputs CHEEVOS_VAR_MD5, CHEEVOS_VAR_COUNT
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Evaluates the CHEEVOS_VAR_MD5 hash
|
||||
* Inputs CHEEVOS_VAR_INFO, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
|
||||
* Outputs CHEEVOS_VAR_MD5, CHEEVOS_VAR_COUNT
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_EVAL_MD5)
|
||||
|
||||
if (coro->count == 0)
|
||||
@@ -1606,40 +1838,24 @@ found:
|
||||
coro->count);
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Updates the CHEEVOS_VAR_MD5 hash with a repeated value
|
||||
* Inputs CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
|
||||
* Outputs CHEEVOS_VAR_MD5
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_FILL_MD5)
|
||||
|
||||
{
|
||||
char buffer[4096];
|
||||
|
||||
while (coro->count > 0)
|
||||
{
|
||||
size_t len = sizeof(buffer);
|
||||
|
||||
if (len > coro->count)
|
||||
len = coro->count;
|
||||
|
||||
memset((void*)buffer, coro->offset, len);
|
||||
MD5_Update(&coro->md5, (void*)buffer, len);
|
||||
coro->count -= len;
|
||||
}
|
||||
}
|
||||
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs coro->hash
|
||||
* Outputs CHEEVOS_VAR_GAMEID
|
||||
*************************************************************************/
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs coro->hash
|
||||
* Outputs CHEEVOS_VAR_GAMEID
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_GET_GAMEID)
|
||||
|
||||
{
|
||||
int size;
|
||||
|
||||
if (memcmp(coro->last_hash, coro->hash, sizeof(coro->hash)) == 0)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "hash did not change, returning %u\n", coro->gameid);
|
||||
CORO_RET();
|
||||
}
|
||||
memcpy(coro->last_hash, coro->hash, sizeof(coro->hash));
|
||||
|
||||
size = rc_url_get_gameid(coro->url, sizeof(coro->url), coro->hash);
|
||||
|
||||
if (size < 0)
|
||||
@@ -1648,6 +1864,11 @@ found:
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "checking %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
|
||||
coro->hash[0], coro->hash[1], coro->hash[2], coro->hash[3],
|
||||
coro->hash[4], coro->hash[5], coro->hash[6], coro->hash[7],
|
||||
coro->hash[8], coro->hash[9], coro->hash[10], coro->hash[11],
|
||||
coro->hash[12], coro->hash[13], coro->hash[14], coro->hash[15]);
|
||||
rcheevos_log_url(RCHEEVOS_TAG "rc_url_get_gameid: %s\n", coro->url);
|
||||
CORO_GOSUB(RCHEEVOS_HTTP_GET);
|
||||
|
||||
@@ -1661,11 +1882,12 @@ found:
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_GET_CHEEVOS)
|
||||
{
|
||||
int ret;
|
||||
@@ -1693,11 +1915,12 @@ found:
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_GET_BADGES)
|
||||
|
||||
badges_ctx = new_badges_ctx;
|
||||
@@ -1788,9 +2011,10 @@ found:
|
||||
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Logs in the user at Retro Achievements
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Logs in the user at Retro Achievements
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_LOGIN)
|
||||
{
|
||||
const char* username;
|
||||
@@ -1880,9 +2104,10 @@ found:
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Info Pauses execution for five seconds
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Pauses execution for five seconds
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_DELAY)
|
||||
|
||||
{
|
||||
@@ -1898,11 +2123,12 @@ found:
|
||||
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Makes a HTTP GET request
|
||||
* Inputs CHEEVOS_VAR_URL
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Makes a HTTP GET request
|
||||
* Inputs CHEEVOS_VAR_URL
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_HTTP_GET)
|
||||
|
||||
for (coro->k = 0; coro->k < 5; coro->k++)
|
||||
@@ -1973,11 +2199,12 @@ found:
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Couldn't connect to server after 5 tries\n");
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Deactivates the achievements already awarded
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Deactivates the achievements already awarded
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_DEACTIVATE)
|
||||
|
||||
CORO_GOSUB(RCHEEVOS_LOGIN);
|
||||
@@ -1985,6 +2212,7 @@ found:
|
||||
int ret;
|
||||
unsigned mode;
|
||||
|
||||
/* Two calls - one for softcore and one for hardcore */
|
||||
for (coro->i = 0; coro->i < 2; coro->i++)
|
||||
{
|
||||
ret = rc_url_get_unlock_list(coro->url, sizeof(coro->url), coro->settings->arrays.cheevos_username, rcheevos_locals.token, coro->gameid, coro->i);
|
||||
@@ -2011,11 +2239,12 @@ found:
|
||||
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Posts the "playing" activity to Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs
|
||||
*************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* Info Posts the "playing" activity to Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs
|
||||
*************************************************************************/
|
||||
CORO_SUB(RCHEEVOS_PLAYING)
|
||||
|
||||
snprintf(
|
||||
@@ -2038,7 +2267,6 @@ found:
|
||||
else
|
||||
CHEEVOS_ERR(RCHEEVOS_TAG "error posting playing activity\n");
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "posted playing activity\n");
|
||||
CORO_RET();
|
||||
|
||||
CORO_LEAVE();
|
||||
@@ -2078,7 +2306,8 @@ bool rcheevos_load(const void *data)
|
||||
{
|
||||
retro_task_t *task;
|
||||
const struct retro_game_info *info = NULL;
|
||||
rcheevos_coro_t *coro = NULL;
|
||||
rcheevos_coro_t *coro = NULL;
|
||||
char buffer[32];
|
||||
|
||||
rcheevos_loaded = false;
|
||||
rcheevos_hardcore_paused = false;
|
||||
@@ -2129,6 +2358,12 @@ bool rcheevos_load(const void *data)
|
||||
coro->path = strdup(info->path);
|
||||
}
|
||||
|
||||
strncpy(buffer, path_get_extension(info->path), sizeof(buffer));
|
||||
buffer[sizeof(buffer) - 1] = '\0';
|
||||
string_to_lower(buffer);
|
||||
coro->ext_hash = rcheevos_djb2(buffer, strlen(buffer));
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "ext_hash %08x ('%s')\n", coro->ext_hash, buffer);
|
||||
|
||||
task->handler = rcheevos_task_handler;
|
||||
task->state = (void*)coro;
|
||||
task->mute = true;
|
||||
|
||||
+18
-7
@@ -93,6 +93,10 @@
|
||||
#define DEFAULT_MAX_PADS 16
|
||||
#endif
|
||||
|
||||
#if defined(GEKKO)
|
||||
#define DEFAULT_MOUSE_SCALE 1
|
||||
#endif
|
||||
|
||||
#if defined(RARCH_MOBILE) || defined(HAVE_LIBNX)
|
||||
#define DEFAULT_POINTER_ENABLE true
|
||||
#else
|
||||
@@ -293,12 +297,7 @@
|
||||
|
||||
#if defined(__CELLOS_LV2) || defined(_XBOX360)
|
||||
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_16_9
|
||||
#elif defined(PSP)
|
||||
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE
|
||||
#elif defined(_3DS)
|
||||
/* Previously defaulted to ASPECT_RATIO_4_3.
|
||||
* Non-4:3 content looks dreadful when stretched
|
||||
* to 4:3 on the 3DS screen... */
|
||||
#elif defined(PSP) || defined(_3DS) || defined(HAVE_LIBNX) || defined(VITA)
|
||||
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE
|
||||
#elif defined(RARCH_CONSOLE)
|
||||
#define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_4_3
|
||||
@@ -322,6 +321,12 @@
|
||||
#define DEFAULT_INPUT_OVERLAY_OPACITY 0.7f
|
||||
#endif
|
||||
|
||||
#if defined(RARCH_MOBILE)
|
||||
#define DEFAULT_OVERLAY_AUTO_ROTATE true
|
||||
#else
|
||||
#define DEFAULT_OVERLAY_AUTO_ROTATE false
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
#include "menu/menu_animation.h"
|
||||
@@ -335,6 +340,7 @@
|
||||
#ifdef HAVE_OZONE
|
||||
#define DEFAULT_OZONE_COLLAPSE_SIDEBAR false
|
||||
#define DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME true
|
||||
#define DEFAULT_OZONE_SCROLL_CONTENT_METADATA false
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SETTINGS_SHOW_DRIVERS true
|
||||
@@ -861,6 +867,9 @@ static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISP
|
||||
/* Specifies which runtime record to use on playlist sublabels */
|
||||
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
||||
|
||||
/* Specifies time/date display format for runtime 'last played' data */
|
||||
#define DEFAULT_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE PLAYLIST_LAST_PLAYED_STYLE_YMD_HMS
|
||||
|
||||
static const unsigned playlist_entry_remove_enable = PLAYLIST_ENTRY_REMOVE_ENABLE_ALL;
|
||||
#endif
|
||||
|
||||
@@ -941,7 +950,9 @@ static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
static const unsigned menu_thumbnail_upscale_threshold = 0;
|
||||
|
||||
static const unsigned menu_timedate_style = 5;
|
||||
#ifdef HAVE_MENU
|
||||
static const unsigned menu_timedate_style = MENU_TIMEDATE_STYLE_DM_HM;
|
||||
#endif
|
||||
|
||||
static const bool xmb_vertical_thumbnails = false;
|
||||
|
||||
|
||||
+30
-57
@@ -166,6 +166,7 @@ enum video_driver_enum
|
||||
VIDEO_CACA,
|
||||
VIDEO_GDI,
|
||||
VIDEO_VGA,
|
||||
VIDEO_FPGA,
|
||||
VIDEO_NULL
|
||||
};
|
||||
|
||||
@@ -364,6 +365,8 @@ static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL2;
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GDI;
|
||||
#elif defined(DJGPP)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VGA;
|
||||
#elif defined(HAVE_FPGA)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_FPGA;
|
||||
#elif defined(HAVE_DYLIB) && !defined(ANDROID)
|
||||
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_EXT;
|
||||
#else
|
||||
@@ -400,7 +403,7 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_AUDIOIO;
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_OSS;
|
||||
#elif defined(HAVE_JACK)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_JACK;
|
||||
#elif defined(HAVE_COREAUDIO)
|
||||
#elif defined(HAVE_COREAUDIO) && !defined(HAVE_COCOA_METAL)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_COREAUDIO;
|
||||
#elif defined(HAVE_COREAUDIO3)
|
||||
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_COREAUDIO3;
|
||||
@@ -444,7 +447,7 @@ static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL;
|
||||
|
||||
#ifdef HAVE_WINMM
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM;
|
||||
#elif defined(HAVE_ALSA) && !defined(HAVE_HAKCHI)
|
||||
#elif defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM)
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA;
|
||||
#else
|
||||
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
|
||||
@@ -827,6 +830,8 @@ const char *config_get_default_video(void)
|
||||
return "gdi";
|
||||
case VIDEO_VGA:
|
||||
return "vga";
|
||||
case VIDEO_FPGA:
|
||||
return "fpga";
|
||||
case VIDEO_NULL:
|
||||
break;
|
||||
}
|
||||
@@ -1584,6 +1589,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("input_overlay_show_physical_inputs", &settings->bools.input_overlay_show_physical_inputs, true, false, false);
|
||||
SETTING_BOOL("input_overlay_hide_in_menu", &settings->bools.input_overlay_hide_in_menu, true, DEFAULT_OVERLAY_HIDE_IN_MENU, false);
|
||||
SETTING_BOOL("input_overlay_show_mouse_cursor", &settings->bools.input_overlay_show_mouse_cursor, true, DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR, false);
|
||||
SETTING_BOOL("input_overlay_auto_rotate", &settings->bools.input_overlay_auto_rotate, true, DEFAULT_OVERLAY_AUTO_ROTATE, false);
|
||||
#endif
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
SETTING_BOOL("video_layout_enable", &settings->bools.video_layout_enable, true, true, false);
|
||||
@@ -1651,6 +1657,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, DEFAULT_OZONE_COLLAPSE_SIDEBAR, false);
|
||||
SETTING_BOOL("ozone_truncate_playlist_name", &settings->bools.ozone_truncate_playlist_name, true, DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME, false);
|
||||
SETTING_BOOL("ozone_scroll_content_metadata",&settings->bools.ozone_scroll_content_metadata, true, DEFAULT_OZONE_SCROLL_CONTENT_METADATA, false);
|
||||
#endif
|
||||
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
|
||||
@@ -1726,6 +1733,9 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("input_max_users", input_driver_get_uint(INPUT_ACTION_MAX_USERS), true, input_max_users, false);
|
||||
SETTING_UINT("fps_update_interval", &settings->uints.fps_update_interval, true, DEFAULT_FPS_UPDATE_INTERVAL, false);
|
||||
SETTING_UINT("input_menu_toggle_gamepad_combo", &settings->uints.input_menu_toggle_gamepad_combo, true, menu_toggle_gamepad_combo, false);
|
||||
#ifdef GEKKO
|
||||
SETTING_UINT("input_mouse_scale", &settings->uints.input_mouse_scale, true, DEFAULT_MOUSE_SCALE, false);
|
||||
#endif
|
||||
SETTING_UINT("audio_latency", &settings->uints.audio_latency, false, 0 /* TODO */, false);
|
||||
SETTING_UINT("audio_resampler_quality", &settings->uints.audio_resampler_quality, true, audio_resampler_quality_level, false);
|
||||
SETTING_UINT("audio_block_frames", &settings->uints.audio_block_frames, true, 0, false);
|
||||
@@ -1827,7 +1837,11 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("netplay_share_analog", &settings->uints.netplay_share_analog, true, netplay_share_analog, false);
|
||||
#endif
|
||||
#ifdef HAVE_LANGEXTRA
|
||||
#ifdef VITA
|
||||
SETTING_UINT("user_language", msg_hash_get_uint(MSG_HASH_USER_LANGUAGE), true, frontend_driver_get_user_language(), false);
|
||||
#else
|
||||
SETTING_UINT("user_language", msg_hash_get_uint(MSG_HASH_USER_LANGUAGE), true, DEFAULT_USER_LANGUAGE, false);
|
||||
#endif
|
||||
#endif
|
||||
SETTING_UINT("bundle_assets_extract_version_current", &settings->uints.bundle_assets_extract_version_current, true, 0, false);
|
||||
SETTING_UINT("bundle_assets_extract_last_version", &settings->uints.bundle_assets_extract_last_version, true, 0, false);
|
||||
@@ -1867,6 +1881,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("playlist_entry_remove_enable", &settings->uints.playlist_entry_remove_enable, true, playlist_entry_remove_enable, false);
|
||||
SETTING_UINT("playlist_show_inline_core_name", &settings->uints.playlist_show_inline_core_name, true, playlist_show_inline_core_name, false);
|
||||
SETTING_UINT("playlist_sublabel_runtime_type", &settings->uints.playlist_sublabel_runtime_type, true, playlist_sublabel_runtime_type, false);
|
||||
SETTING_UINT("playlist_sublabel_last_played_style", &settings->uints.playlist_sublabel_last_played_style, true, DEFAULT_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, false);
|
||||
#endif
|
||||
|
||||
*size = count;
|
||||
@@ -3102,7 +3117,7 @@ static bool config_load_file(const char *path, settings_t *settings)
|
||||
sizeof(global->name.savefile));
|
||||
fill_pathname_dir(global->name.savefile,
|
||||
path_get(RARCH_PATH_BASENAME),
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
".srm",
|
||||
sizeof(global->name.savefile));
|
||||
}
|
||||
}
|
||||
@@ -3127,7 +3142,7 @@ static bool config_load_file(const char *path, settings_t *settings)
|
||||
sizeof(global->name.savestate));
|
||||
fill_pathname_dir(global->name.savestate,
|
||||
path_get(RARCH_PATH_BASENAME),
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
".state",
|
||||
sizeof(global->name.savestate));
|
||||
}
|
||||
}
|
||||
@@ -3252,19 +3267,19 @@ bool config_load_override(void)
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
free(config_directory);
|
||||
@@ -3479,19 +3494,19 @@ bool config_load_remap(const char *directory_input_remapping)
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
remap_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
remap_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
remap_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
".rmp",
|
||||
path_size);
|
||||
|
||||
input_remapping_set_defaults(false);
|
||||
@@ -3635,7 +3650,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
fill_pathname_join(buf_new, buf,
|
||||
path, path_size);
|
||||
fill_pathname_noext(autoconf_file, buf_new,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
free(buf_new);
|
||||
@@ -3645,7 +3660,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
||||
fill_pathname_join(buf, autoconf_dir,
|
||||
path, path_size);
|
||||
fill_pathname_noext(autoconf_file, buf,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
}
|
||||
|
||||
@@ -3994,19 +4009,19 @@ bool config_save_overrides(int override_type)
|
||||
fill_pathname_join_special_ext(game_path,
|
||||
config_directory, core_name,
|
||||
game_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(content_path,
|
||||
config_directory, core_name,
|
||||
content_dir_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
fill_pathname_join_special_ext(core_path,
|
||||
config_directory, core_name,
|
||||
core_name,
|
||||
file_path_str(FILE_PATH_CONFIG_EXTENSION),
|
||||
".cfg",
|
||||
path_size);
|
||||
|
||||
if (!conf)
|
||||
@@ -4050,88 +4065,46 @@ bool config_save_overrides(int override_type)
|
||||
for (i = 0; i < (unsigned)bool_settings_size; i++)
|
||||
{
|
||||
if ((*bool_settings[i].ptr) != (*bool_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%d\n",
|
||||
bool_settings[i].ident, (*bool_settings[i].ptr));
|
||||
RARCH_LOG(" override: %s=%d\n",
|
||||
bool_overrides[i].ident, (*bool_overrides[i].ptr));
|
||||
config_set_bool(conf, bool_overrides[i].ident,
|
||||
(*bool_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)int_settings_size; i++)
|
||||
{
|
||||
if ((*int_settings[i].ptr) != (*int_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%d\n",
|
||||
int_settings[i].ident, (*int_settings[i].ptr));
|
||||
RARCH_LOG(" override: %s=%d\n",
|
||||
int_overrides[i].ident, (*int_overrides[i].ptr));
|
||||
config_set_int(conf, int_overrides[i].ident,
|
||||
(*int_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)uint_settings_size; i++)
|
||||
{
|
||||
if ((*uint_settings[i].ptr) != (*uint_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%d\n",
|
||||
uint_settings[i].ident, (*uint_settings[i].ptr));
|
||||
RARCH_LOG(" override: %s=%d\n",
|
||||
uint_overrides[i].ident, (*uint_overrides[i].ptr));
|
||||
config_set_int(conf, uint_overrides[i].ident,
|
||||
(*uint_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)size_settings_size; i++)
|
||||
{
|
||||
if ((*size_settings[i].ptr) != (*size_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%d\n",
|
||||
size_settings[i].ident, (*size_settings[i].ptr));
|
||||
RARCH_LOG(" override: %s=%d\n",
|
||||
size_overrides[i].ident, (*size_overrides[i].ptr));
|
||||
config_set_int(conf, size_overrides[i].ident,
|
||||
(int)(*size_overrides[i].ptr));
|
||||
}
|
||||
}
|
||||
for (i = 0; i < (unsigned)float_settings_size; i++)
|
||||
{
|
||||
if ((*float_settings[i].ptr) != (*float_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%f\n",
|
||||
float_settings[i].ident, *float_settings[i].ptr);
|
||||
RARCH_LOG(" override: %s=%f\n",
|
||||
float_overrides[i].ident, *float_overrides[i].ptr);
|
||||
config_set_float(conf, float_overrides[i].ident,
|
||||
*float_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)array_settings_size; i++)
|
||||
{
|
||||
if (!string_is_equal(array_settings[i].ptr, array_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%s\n",
|
||||
array_settings[i].ident, array_settings[i].ptr);
|
||||
RARCH_LOG(" override: %s=%s\n",
|
||||
array_overrides[i].ident, array_overrides[i].ptr);
|
||||
config_set_string(conf, array_overrides[i].ident,
|
||||
array_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (unsigned)path_settings_size; i++)
|
||||
{
|
||||
if (!string_is_equal(path_settings[i].ptr, path_overrides[i].ptr))
|
||||
{
|
||||
RARCH_LOG(" original: %s=%s\n",
|
||||
path_settings[i].ident, path_settings[i].ptr);
|
||||
RARCH_LOG(" override: %s=%s\n",
|
||||
path_overrides[i].ident, path_overrides[i].ptr);
|
||||
config_set_path(conf, path_overrides[i].ident,
|
||||
path_overrides[i].ptr);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
|
||||
+6
-1
@@ -130,6 +130,7 @@ typedef struct settings
|
||||
bool input_overlay_hide_in_menu;
|
||||
bool input_overlay_show_physical_inputs;
|
||||
bool input_overlay_show_mouse_cursor;
|
||||
bool input_overlay_auto_rotate;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
bool input_all_users_control_menu;
|
||||
@@ -368,6 +369,7 @@ typedef struct settings
|
||||
bool enable_device_vibration;
|
||||
bool ozone_collapse_sidebar;
|
||||
bool ozone_truncate_playlist_name;
|
||||
bool ozone_scroll_content_metadata;
|
||||
|
||||
bool log_to_file;
|
||||
bool log_to_file_timestamp;
|
||||
@@ -454,7 +456,9 @@ typedef struct settings
|
||||
|
||||
unsigned input_bind_timeout;
|
||||
unsigned input_bind_hold;
|
||||
|
||||
#ifdef GEKKO
|
||||
unsigned input_mouse_scale;
|
||||
#endif
|
||||
unsigned input_menu_toggle_gamepad_combo;
|
||||
unsigned input_keyboard_gamepad_mapping_type;
|
||||
unsigned input_poll_type_behavior;
|
||||
@@ -538,6 +542,7 @@ typedef struct settings
|
||||
unsigned playlist_entry_remove_enable;
|
||||
unsigned playlist_show_inline_core_name;
|
||||
unsigned playlist_sublabel_runtime_type;
|
||||
unsigned playlist_sublabel_last_played_style;
|
||||
|
||||
unsigned camera_width;
|
||||
unsigned camera_height;
|
||||
|
||||
+2
-4
@@ -228,9 +228,7 @@ static config_file_t *core_info_list_iterate(
|
||||
}
|
||||
#endif
|
||||
|
||||
strlcat(info_path_base,
|
||||
file_path_str(FILE_PATH_CORE_INFO_EXTENSION),
|
||||
info_path_base_size);
|
||||
strlcat(info_path_base, ".info", info_path_base_size);
|
||||
|
||||
info_path = (char*)malloc(info_path_base_size);
|
||||
fill_pathname_join(info_path,
|
||||
@@ -1136,7 +1134,7 @@ bool core_info_hw_api_supported(core_info_t *info)
|
||||
if (string_is_empty(cur_api))
|
||||
continue;
|
||||
|
||||
cur_api_len = strlen(cur_api);
|
||||
cur_api_len = (int)strlen(cur_api);
|
||||
|
||||
for (j = 0; j < cur_api_len; j++)
|
||||
{
|
||||
|
||||
@@ -386,7 +386,7 @@ void GONG_CORE_PREFIX(retro_init)(void)
|
||||
else
|
||||
GONG_CORE_PREFIX(log_cb) = NULL;
|
||||
|
||||
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned char));
|
||||
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned));
|
||||
|
||||
game_buffer.width = WIDTH;
|
||||
game_buffer.height = HEIGHT;
|
||||
|
||||
+22
-6
@@ -464,6 +464,19 @@ static void do_memchunkhax1(void)
|
||||
write_kaddr(0x1F000008, saved_vram_value);
|
||||
}
|
||||
|
||||
Result get_luma_version(u32 *major, u32 *minor) {
|
||||
s64 out;
|
||||
u32 version;
|
||||
|
||||
if (R_FAILED(svcGetSystemInfo(&out, 0x10000, 0)))
|
||||
return -1;
|
||||
|
||||
version = (u32)out;
|
||||
*major = GET_VERSION_MAJOR(version);
|
||||
*minor = GET_VERSION_MINOR(version);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Result svchax_init(bool patch_srv)
|
||||
{
|
||||
bool isNew3DS;
|
||||
@@ -475,12 +488,15 @@ Result svchax_init(bool patch_srv)
|
||||
{
|
||||
if (__service_ptr)
|
||||
{
|
||||
if (kver > SYSTEM_VERSION(2, 50, 11))
|
||||
return -1;
|
||||
else if (kver > SYSTEM_VERSION(2, 46, 0))
|
||||
do_memchunkhax2();
|
||||
else
|
||||
do_memchunkhax1();
|
||||
u32 luma_major, luma_minor;
|
||||
|
||||
if (kver > SYSTEM_VERSION(2, 50, 11) &&
|
||||
(R_FAILED(get_luma_version(&luma_major, &luma_minor) || luma_major < 8)))
|
||||
return -1;
|
||||
else if (kver > SYSTEM_VERSION(2, 46, 0) && kver <= SYSTEM_VERSION(2, 50, 11))
|
||||
do_memchunkhax2();
|
||||
else if (kver <= SYSTEM_VERSION(2, 46, 0))
|
||||
do_memchunkhax1();
|
||||
}
|
||||
|
||||
svc_7b((backdoor_fn)k_enable_all_svcs, isNew3DS);
|
||||
|
||||
+8
-10
@@ -38,8 +38,7 @@ int database_info_build_query_enum(char *s, size_t len,
|
||||
bool add_quotes = true;
|
||||
bool add_glob = false;
|
||||
|
||||
string_add_bracket_open(s, len);
|
||||
string_add_single_quote(s, len);
|
||||
strlcpy(s, "{'", len);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -51,7 +50,7 @@ int database_info_build_query_enum(char *s, size_t len,
|
||||
break;
|
||||
case DATABASE_QUERY_ENTRY_DEVELOPER:
|
||||
strlcat(s, "developer", len);
|
||||
add_glob = true;
|
||||
add_glob = true;
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DATABASE_QUERY_ENTRY_ORIGIN:
|
||||
@@ -110,19 +109,18 @@ int database_info_build_query_enum(char *s, size_t len,
|
||||
break;
|
||||
}
|
||||
|
||||
string_add_single_quote(s, len);
|
||||
string_add_colon(s, len);
|
||||
strlcat(s, "':", len);
|
||||
if (add_glob)
|
||||
string_add_glob_open(s, len);
|
||||
strlcat(s, "glob('*", len);
|
||||
if (add_quotes)
|
||||
string_add_quote(s, len);
|
||||
strlcat(s, "\"", len);
|
||||
strlcat(s, path, len);
|
||||
if (add_glob)
|
||||
string_add_glob_close(s, len);
|
||||
strlcat(s, "*')", len);
|
||||
if (add_quotes)
|
||||
string_add_quote(s, len);
|
||||
strlcat(s, "\"", len);
|
||||
|
||||
string_add_bracket_close(s, len);
|
||||
strlcat(s, "}", len);
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("query: %s\n", s);
|
||||
|
||||
@@ -145,7 +145,7 @@ if [ $SALAMANDER = "yes" ]; then
|
||||
if [ $PLATFORM = "vita" ] ; then
|
||||
mkdir -p ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/livearea/contents
|
||||
vita-make-fself -c -s ../retroarchvita_salamander.velf ../pkg/${platform}/retroarch.vpk/vpk/eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=RETROVITA "RetroArch" ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/param.sfo
|
||||
vita-mksfoex -s TITLE_ID=RETROVITA "RetroArch" -d ATTRIBUTE2=12 ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/param.sfo
|
||||
cp ../pkg/${platform}/assets/ICON0.PNG ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/icon0.png
|
||||
cp -R ../pkg/${platform}/assets/livearea ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/
|
||||
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
|
||||
|
||||
+17
-24
@@ -171,7 +171,8 @@ void fill_pathname_application_special(char *s,
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
||||
s1[0] = s2[0] = '\0';
|
||||
s1[0] = '\0';
|
||||
s2[0] = '\0';
|
||||
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
@@ -204,9 +205,7 @@ void fill_pathname_application_special(char *s,
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||
fill_pathname_join(s, s1,
|
||||
file_path_str(FILE_PATH_BACKGROUND_IMAGE),
|
||||
len);
|
||||
fill_pathname_join(s, s1, "bg.png", len);
|
||||
free(s1);
|
||||
}
|
||||
}
|
||||
@@ -280,10 +279,9 @@ void fill_pathname_application_special(char *s,
|
||||
#ifdef HAVE_XMB
|
||||
{
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
s1[0] = s2[0] = '\0';
|
||||
s1[0] = '\0';
|
||||
|
||||
fill_pathname_join(
|
||||
s1,
|
||||
@@ -291,13 +289,9 @@ void fill_pathname_application_special(char *s,
|
||||
"xmb",
|
||||
PATH_MAX_LENGTH * sizeof(char)
|
||||
);
|
||||
fill_pathname_join(s2,
|
||||
s1, xmb_theme_ident(),
|
||||
PATH_MAX_LENGTH * sizeof(char)
|
||||
);
|
||||
strlcpy(s, s2, len);
|
||||
fill_pathname_join(s,
|
||||
s1, xmb_theme_ident(), len);
|
||||
free(s1);
|
||||
free(s2);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
@@ -365,10 +359,7 @@ void fill_pathname_application_special(char *s,
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB);
|
||||
fill_pathname_join(s, s1,
|
||||
file_path_str(FILE_PATH_TTF_FONT),
|
||||
len);
|
||||
|
||||
fill_pathname_join(s, s1, "font.ttf", len);
|
||||
free(s1);
|
||||
}
|
||||
}
|
||||
@@ -376,11 +367,12 @@ void fill_pathname_application_special(char *s,
|
||||
break;
|
||||
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS:
|
||||
{
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
s1[0] = s2[0] = '\0';
|
||||
s1[0] = '\0';
|
||||
s2[0] = '\0';
|
||||
|
||||
fill_pathname_join(s1,
|
||||
settings->paths.directory_thumbnails,
|
||||
@@ -401,11 +393,12 @@ void fill_pathname_application_special(char *s,
|
||||
|
||||
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES:
|
||||
{
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
s1[0] = s2[0] = '\0';
|
||||
s1[0] = '\0';
|
||||
s2[0] = '\0';
|
||||
|
||||
fill_pathname_join(s1,
|
||||
settings->paths.directory_thumbnails,
|
||||
|
||||
@@ -504,9 +504,9 @@ static uint64_t frontend_ctr_get_mem_total(void)
|
||||
return osGetMemRegionSize(MEMREGION_ALL);
|
||||
}
|
||||
|
||||
static uint64_t frontend_ctr_get_mem_used(void)
|
||||
static uint64_t frontend_ctr_get_mem_free(void)
|
||||
{
|
||||
return osGetMemRegionUsed(MEMREGION_ALL);
|
||||
return osGetMemRegionFree(MEMREGION_ALL);
|
||||
}
|
||||
|
||||
static enum frontend_powerstate frontend_ctr_get_powerstate(
|
||||
@@ -609,7 +609,7 @@ frontend_ctx_driver_t frontend_ctx_ctr =
|
||||
frontend_ctr_get_powerstate,
|
||||
frontend_ctr_parse_drive_list,
|
||||
frontend_ctr_get_mem_total,
|
||||
frontend_ctr_get_mem_used,
|
||||
frontend_ctr_get_mem_free,
|
||||
NULL, /* install_signal_handler */
|
||||
NULL, /* get_signal_handler_state */
|
||||
NULL, /* set_signal_handler_state */
|
||||
|
||||
@@ -525,11 +525,11 @@ static uint64_t frontend_gx_get_mem_total(void)
|
||||
return total;
|
||||
}
|
||||
|
||||
static uint64_t frontend_gx_get_mem_used(void)
|
||||
static uint64_t frontend_gx_get_mem_free(void)
|
||||
{
|
||||
uint64_t total = SYSMEM1_SIZE - SYS_GetArena1Size();
|
||||
uint64_t total = SYSMEM1_SIZE - (SYSMEM1_SIZE - SYS_GetArena1Size());
|
||||
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
||||
total += gx_mem2_used();
|
||||
total += (gx_mem2_total() - gx_mem2_used());
|
||||
#endif
|
||||
return total;
|
||||
}
|
||||
@@ -555,7 +555,7 @@ frontend_ctx_driver_t frontend_ctx_gx = {
|
||||
NULL, /* get_powerstate */
|
||||
frontend_gx_parse_drive_list,
|
||||
frontend_gx_get_mem_total,
|
||||
frontend_gx_get_mem_used,
|
||||
frontend_gx_get_mem_free,
|
||||
NULL, /* install_signal_handler */
|
||||
NULL, /* get_sighandler_state */
|
||||
NULL, /* set_sighandler_state */
|
||||
|
||||
@@ -156,7 +156,7 @@ static void frontend_ps2_init(void *data)
|
||||
int bootDeviceID;
|
||||
|
||||
SifInitRpc(0);
|
||||
#if !defined(DEBUG)
|
||||
#if !defined(DEBUG) || defined(BUILD_FOR_PCSX2)
|
||||
/* Comment this line if you don't wanna debug the output */
|
||||
while(!SifIopReset(NULL, 0)){};
|
||||
#endif
|
||||
@@ -368,7 +368,7 @@ static int frontend_ps2_parse_drive_list(void *data, bool load_content)
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
||||
enum_idx,
|
||||
FILE_TYPE_DIRECTORY, 0, 0);
|
||||
#if defined(DEBUG)
|
||||
#if defined(DEBUG) && !defined(BUILD_FOR_PCSX2)
|
||||
menu_entries_append_enum(list,
|
||||
"host:",
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef VITA
|
||||
#include <psp2/system_param.h>
|
||||
#include <psp2/power.h>
|
||||
#include <psp2/sysmodule.h>
|
||||
#include <psp2/appmgr.h>
|
||||
#include <psp2/apputil.h>
|
||||
|
||||
#include "../../bootstrap/vita/sbrk.c"
|
||||
#include "../../bootstrap/vita/threading.c"
|
||||
@@ -300,6 +302,12 @@ static void frontend_psp_init(void *data)
|
||||
scePowerSetGpuClockFrequency(222);
|
||||
scePowerSetGpuXbarClockFrequency(166);
|
||||
sceSysmoduleLoadModule(SCE_SYSMODULE_NET);
|
||||
|
||||
SceAppUtilInitParam appUtilParam;
|
||||
SceAppUtilBootParam appUtilBootParam;
|
||||
memset(&appUtilParam, 0, sizeof(SceAppUtilInitParam));
|
||||
memset(&appUtilBootParam, 0, sizeof(SceAppUtilBootParam));
|
||||
sceAppUtilInit(&appUtilParam, &appUtilBootParam);
|
||||
#else
|
||||
(void)data;
|
||||
/* initialize debug screen */
|
||||
@@ -506,6 +514,64 @@ static int frontend_psp_parse_drive_list(void *data, bool load_content)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef VITA
|
||||
enum retro_language psp_get_retro_lang_from_langid(int langid)
|
||||
{
|
||||
switch (langid)
|
||||
{
|
||||
case SCE_SYSTEM_PARAM_LANG_JAPANESE:
|
||||
return RETRO_LANGUAGE_JAPANESE;
|
||||
case SCE_SYSTEM_PARAM_LANG_FRENCH:
|
||||
return RETRO_LANGUAGE_FRENCH;
|
||||
case SCE_SYSTEM_PARAM_LANG_SPANISH:
|
||||
return RETRO_LANGUAGE_SPANISH;
|
||||
case SCE_SYSTEM_PARAM_LANG_GERMAN:
|
||||
return RETRO_LANGUAGE_GERMAN;
|
||||
case SCE_SYSTEM_PARAM_LANG_ITALIAN:
|
||||
return RETRO_LANGUAGE_ITALIAN;
|
||||
case SCE_SYSTEM_PARAM_LANG_DUTCH:
|
||||
return RETRO_LANGUAGE_DUTCH;
|
||||
case SCE_SYSTEM_PARAM_LANG_PORTUGUESE_PT:
|
||||
return RETRO_LANGUAGE_PORTUGUESE_PORTUGAL;
|
||||
case SCE_SYSTEM_PARAM_LANG_RUSSIAN:
|
||||
return RETRO_LANGUAGE_RUSSIAN;
|
||||
case SCE_SYSTEM_PARAM_LANG_KOREAN:
|
||||
return RETRO_LANGUAGE_KOREAN;
|
||||
case SCE_SYSTEM_PARAM_LANG_CHINESE_T:
|
||||
return RETRO_LANGUAGE_CHINESE_TRADITIONAL;
|
||||
case SCE_SYSTEM_PARAM_LANG_CHINESE_S:
|
||||
return RETRO_LANGUAGE_CHINESE_SIMPLIFIED;
|
||||
case SCE_SYSTEM_PARAM_LANG_POLISH:
|
||||
return RETRO_LANGUAGE_POLISH;
|
||||
case SCE_SYSTEM_PARAM_LANG_PORTUGUESE_BR:
|
||||
return RETRO_LANGUAGE_PORTUGUESE_BRAZIL;
|
||||
case SCE_SYSTEM_PARAM_LANG_TURKISH:
|
||||
return RETRO_LANGUAGE_TURKISH;
|
||||
case SCE_SYSTEM_PARAM_LANG_ENGLISH_US:
|
||||
case SCE_SYSTEM_PARAM_LANG_ENGLISH_GB:
|
||||
default:
|
||||
return RETRO_LANGUAGE_ENGLISH;
|
||||
}
|
||||
}
|
||||
|
||||
enum retro_language frontend_psp_get_user_language(void)
|
||||
{
|
||||
int langid;
|
||||
sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &langid);
|
||||
return psp_get_retro_lang_from_langid(langid);
|
||||
}
|
||||
|
||||
static uint64_t frontend_psp_get_mem_total(void)
|
||||
{
|
||||
return _newlib_heap_end - _newlib_heap_base;
|
||||
}
|
||||
|
||||
static uint64_t frontend_psp_get_mem_used(void)
|
||||
{
|
||||
return _newlib_heap_end - _newlib_heap_cur;
|
||||
}
|
||||
#endif
|
||||
|
||||
frontend_ctx_driver_t frontend_ctx_psp = {
|
||||
frontend_psp_get_environment_settings,
|
||||
frontend_psp_init,
|
||||
@@ -526,8 +592,13 @@ frontend_ctx_driver_t frontend_ctx_psp = {
|
||||
frontend_psp_get_architecture,
|
||||
frontend_psp_get_powerstate,
|
||||
frontend_psp_parse_drive_list,
|
||||
#ifdef VITA
|
||||
frontend_psp_get_mem_total,
|
||||
frontend_psp_get_mem_used,
|
||||
#else
|
||||
NULL, /* get_mem_total */
|
||||
NULL, /* get_mem_free */
|
||||
#endif
|
||||
NULL, /* install_signal_handler */
|
||||
NULL, /* get_sighandler_state */
|
||||
NULL, /* set_sighandler_state */
|
||||
@@ -538,10 +609,11 @@ frontend_ctx_driver_t frontend_ctx_psp = {
|
||||
NULL, /* check_for_path_changes */
|
||||
NULL, /* set_sustained_performance_mode */
|
||||
NULL, /* get_cpu_model_name */
|
||||
NULL, /* get_user_language */
|
||||
#ifdef VITA
|
||||
frontend_psp_get_user_language,
|
||||
"vita",
|
||||
#else
|
||||
NULL, /* get_user_language */
|
||||
"psp",
|
||||
#endif
|
||||
};
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "../../switch_performance_profiles.h"
|
||||
#include "../../configuration.h"
|
||||
#include <unistd.h>
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <libtransistor/nx.h>
|
||||
#include <libtransistor/ipc_helpers.h>
|
||||
@@ -55,8 +56,6 @@
|
||||
static enum frontend_fork switch_fork_mode = FRONTEND_FORK_NONE;
|
||||
static const char *elf_path_cst = "/switch/retroarch_switch.nro";
|
||||
|
||||
static uint64_t frontend_switch_get_mem_used(void);
|
||||
|
||||
bool platform_switch_has_focus = true;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
@@ -816,21 +815,16 @@ static int frontend_switch_parse_drive_list(void *data, bool load_content)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint64_t frontend_switch_get_mem_total(void)
|
||||
static uint64_t frontend_switch_get_mem_free(void)
|
||||
{
|
||||
uint64_t memoryTotal = 0;
|
||||
svcGetInfo(&memoryTotal, 6, 0xffff8001, 0);
|
||||
memoryTotal += frontend_switch_get_mem_used();
|
||||
|
||||
return memoryTotal;
|
||||
struct mallinfo mem_info = mallinfo();
|
||||
return mem_info.fordblks;
|
||||
}
|
||||
|
||||
static uint64_t frontend_switch_get_mem_used(void)
|
||||
static uint64_t frontend_switch_get_mem_total(void)
|
||||
{
|
||||
uint64_t memoryUsed = 0;
|
||||
svcGetInfo(&memoryUsed, 7, 0xffff8001, 0);
|
||||
|
||||
return memoryUsed;
|
||||
struct mallinfo mem_info = mallinfo();
|
||||
return mem_info.usmblks;
|
||||
}
|
||||
|
||||
static enum frontend_powerstate
|
||||
@@ -962,7 +956,7 @@ frontend_ctx_driver_t frontend_ctx_switch =
|
||||
frontend_switch_get_powerstate,
|
||||
frontend_switch_parse_drive_list,
|
||||
frontend_switch_get_mem_total,
|
||||
frontend_switch_get_mem_used,
|
||||
frontend_switch_get_mem_free,
|
||||
NULL, /* install_signal_handler */
|
||||
NULL, /* get_signal_handler_state */
|
||||
NULL, /* set_signal_handler_state */
|
||||
|
||||
@@ -144,10 +144,14 @@ int system_property_get(const char *command,
|
||||
char buffer[PATH_MAX_LENGTH] = {0};
|
||||
char cmd[PATH_MAX_LENGTH] = {0};
|
||||
char *curpos = NULL;
|
||||
size_t buf_pos = strlcpy(cmd, command, sizeof(cmd));
|
||||
|
||||
snprintf(cmd, sizeof(cmd), "%s %s", command, args);
|
||||
cmd[buf_pos] = ' ';
|
||||
cmd[buf_pos+1] = '\0';
|
||||
|
||||
pipe = popen(cmd, "r");
|
||||
buf_pos = strlcat(cmd, args, sizeof(cmd));
|
||||
|
||||
pipe = popen(cmd, "r");
|
||||
|
||||
if (!pipe)
|
||||
goto error;
|
||||
@@ -1689,13 +1693,17 @@ static void frontend_unix_get_env(int *argc,
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
if (xdg)
|
||||
snprintf(base_path, sizeof(base_path),
|
||||
"%s/retroarch", xdg);
|
||||
{
|
||||
strlcpy(base_path, xdg, sizeof(base_path));
|
||||
strlcat(base_path, "/retroarch", sizeof(base_path));
|
||||
}
|
||||
else if (home)
|
||||
snprintf(base_path, sizeof(base_path),
|
||||
"%s/.config/retroarch", home);
|
||||
{
|
||||
strlcpy(base_path, home, sizeof(base_path));
|
||||
strlcat(base_path, "/.config/retroarch", sizeof(base_path));
|
||||
}
|
||||
else
|
||||
snprintf(base_path, sizeof(base_path), "retroarch");
|
||||
strlcpy(base_path, "retroarch", sizeof(base_path));
|
||||
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path,
|
||||
"cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||
@@ -1785,11 +1793,8 @@ static void free_saved_state(struct android_app* android_app)
|
||||
static void android_app_destroy(struct android_app *android_app)
|
||||
{
|
||||
JNIEnv *env = NULL;
|
||||
int result = system("sh -c \"sh /sdcard/reset\"");
|
||||
|
||||
RARCH_LOG("android_app_destroy\n");
|
||||
int result;
|
||||
result = system("sh -c \"sh /sdcard/reset\"");
|
||||
RARCH_LOG("Result: %d\n", result);
|
||||
free_saved_state(android_app);
|
||||
|
||||
slock_lock(android_app->mutex);
|
||||
@@ -2039,28 +2044,14 @@ static void frontend_unix_exitspawn(char *core_path, size_t core_path_size)
|
||||
|
||||
static uint64_t frontend_unix_get_mem_total(void)
|
||||
{
|
||||
char line[256];
|
||||
uint64_t total = 0;
|
||||
FILE * data = fopen("/proc/meminfo", "r");
|
||||
if (!data)
|
||||
return 0;
|
||||
|
||||
while (fgets(line, sizeof(line), data))
|
||||
{
|
||||
if (sscanf(line, "MemTotal: " STRING_REP_USIZE " kB", (size_t*)&total) == 1)
|
||||
{
|
||||
fclose(data);
|
||||
total *= 1024;
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(data);
|
||||
return 0;
|
||||
long pages = sysconf(_SC_PHYS_PAGES);
|
||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
return pages * page_size;
|
||||
}
|
||||
|
||||
static uint64_t frontend_unix_get_mem_used(void)
|
||||
static uint64_t frontend_unix_get_mem_free(void)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
char line[256];
|
||||
uint64_t total = 0;
|
||||
uint64_t freemem = 0;
|
||||
@@ -2083,7 +2074,12 @@ static uint64_t frontend_unix_get_mem_used(void)
|
||||
}
|
||||
|
||||
fclose(data);
|
||||
return total - freemem - buffers - cached;
|
||||
return freemem - buffers - cached;
|
||||
#else
|
||||
unsigned long long ps = sysconf(_SC_PAGESIZE);
|
||||
unsigned long long pn = sysconf(_SC_AVPHYS_PAGES);
|
||||
return ps * pn;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*#include <valgrind/valgrind.h>*/
|
||||
@@ -2314,11 +2310,8 @@ static bool frontend_unix_check_for_path_changes(path_change_data_t *change_data
|
||||
i += sizeof(struct inotify_event) + event->len;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
static void frontend_unix_set_sustained_performance_mode(bool on)
|
||||
@@ -2340,7 +2333,8 @@ static const char* frontend_unix_get_cpu_model_name(void)
|
||||
#ifdef ANDROID
|
||||
return NULL;
|
||||
#else
|
||||
cpu_features_get_model_name(unix_cpu_model_name, sizeof(unix_cpu_model_name));
|
||||
cpu_features_get_model_name(unix_cpu_model_name,
|
||||
sizeof(unix_cpu_model_name));
|
||||
return unix_cpu_model_name;
|
||||
#endif
|
||||
}
|
||||
@@ -2358,7 +2352,8 @@ enum retro_language frontend_unix_get_user_language(void)
|
||||
|
||||
if (g_android->getUserLanguageString)
|
||||
{
|
||||
CALL_OBJ_METHOD(env, jstr, g_android->activity->clazz, g_android->getUserLanguageString);
|
||||
CALL_OBJ_METHOD(env, jstr,
|
||||
g_android->activity->clazz, g_android->getUserLanguageString);
|
||||
|
||||
if (jstr)
|
||||
{
|
||||
@@ -2410,7 +2405,7 @@ frontend_ctx_driver_t frontend_ctx_unix = {
|
||||
frontend_unix_get_powerstate,
|
||||
frontend_unix_parse_drive_list,
|
||||
frontend_unix_get_mem_total,
|
||||
frontend_unix_get_mem_used,
|
||||
frontend_unix_get_mem_free,
|
||||
frontend_unix_install_signal_handlers,
|
||||
frontend_unix_get_signal_handler_state,
|
||||
frontend_unix_set_signal_handler_state,
|
||||
|
||||
@@ -554,8 +554,7 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
|
||||
":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE)
|
||||
snprintf(g_defaults.settings.menu,
|
||||
sizeof(g_defaults.settings.menu), "xmb");
|
||||
strlcpy(g_defaults.settings.menu, "xmb", sizeof(g_defaults.settings.menu));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -624,6 +623,8 @@ static void frontend_win32_attach_console(void)
|
||||
if(!AttachConsole( ATTACH_PARENT_PROCESS))
|
||||
AllocConsole();
|
||||
|
||||
SetConsoleTitle("Log Console");
|
||||
|
||||
if(need_stdout) freopen( "CONOUT$", "w", stdout );
|
||||
if(need_stderr) freopen( "CONOUT$", "w", stderr );
|
||||
|
||||
|
||||
@@ -370,12 +370,12 @@ uint64_t frontend_driver_get_total_memory(void)
|
||||
return frontend->get_total_mem();
|
||||
}
|
||||
|
||||
uint64_t frontend_driver_get_used_memory(void)
|
||||
uint64_t frontend_driver_get_free_memory(void)
|
||||
{
|
||||
frontend_ctx_driver_t *frontend = frontend_get_ptr();
|
||||
if (!frontend || !frontend->get_used_mem)
|
||||
if (!frontend || !frontend->get_free_mem)
|
||||
return 0;
|
||||
return frontend->get_used_mem();
|
||||
return frontend->get_free_mem();
|
||||
}
|
||||
|
||||
void frontend_driver_install_signal_handler(void)
|
||||
|
||||
@@ -95,7 +95,7 @@ typedef struct frontend_ctx_driver
|
||||
enum frontend_powerstate (*get_powerstate)(int *seconds, int *percent);
|
||||
int (*parse_drive_list)(void*, bool);
|
||||
uint64_t (*get_total_mem)(void);
|
||||
uint64_t (*get_used_mem)(void);
|
||||
uint64_t (*get_free_mem)(void);
|
||||
void (*install_signal_handler)(void);
|
||||
int (*get_signal_handler_state)(void);
|
||||
void (*set_signal_handler_state)(int value);
|
||||
@@ -193,7 +193,7 @@ bool frontend_driver_get_salamander_basename(char *s, size_t len);
|
||||
|
||||
uint64_t frontend_driver_get_total_memory(void);
|
||||
|
||||
uint64_t frontend_driver_get_used_memory(void);
|
||||
uint64_t frontend_driver_get_free_memory(void);
|
||||
|
||||
void frontend_driver_install_signal_handler(void);
|
||||
|
||||
|
||||
@@ -307,21 +307,6 @@ void dxgi_update_title(video_frame_info_t* video_info)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
const ui_window_t* window = ui_companion_driver_get_window_ptr();
|
||||
const settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
char mem[128];
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
|
||||
if (window)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,11 @@ typedef struct
|
||||
__unsafe_unretained id<MTLBuffer> buffer;
|
||||
} BufferRange;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, ViewportResetMode) {
|
||||
kFullscreenViewport,
|
||||
kVideoViewport
|
||||
};
|
||||
|
||||
/*! @brief Context contains the render state used by various components */
|
||||
@interface Context : NSObject
|
||||
|
||||
@@ -59,8 +64,8 @@ typedef struct
|
||||
- (void)convertFormat:(RPixelFormat)fmt from:(id<MTLTexture>)src to:(id<MTLTexture>)dst;
|
||||
- (id<MTLRenderPipelineState>)getStockShader:(int)index blend:(bool)blend;
|
||||
|
||||
/*! @brief resets the viewport for the main render encoder to the drawable size */
|
||||
- (void)resetRenderViewport;
|
||||
/*! @brief resets the viewport for the main render encoder to \a mode */
|
||||
- (void)resetRenderViewport:(ViewportResetMode)mode;
|
||||
|
||||
/*! @brief resets the scissor rect for the main render encoder to the drawable size */
|
||||
- (void)resetScissorRect;
|
||||
|
||||
@@ -493,8 +493,10 @@
|
||||
|
||||
- (id<MTLCommandBuffer>)blitCommandBuffer
|
||||
{
|
||||
if (!_blitCommandBuffer)
|
||||
if (!_blitCommandBuffer) {
|
||||
_blitCommandBuffer = [_commandQueue commandBuffer];
|
||||
_blitCommandBuffer.label = @"Blit command buffer";
|
||||
}
|
||||
return _blitCommandBuffer;
|
||||
}
|
||||
|
||||
@@ -562,6 +564,7 @@
|
||||
assert(_commandBuffer == nil);
|
||||
dispatch_semaphore_wait(_inflightSemaphore, DISPATCH_TIME_FOREVER);
|
||||
_commandBuffer = [_commandQueue commandBuffer];
|
||||
_commandBuffer.label = @"Frame command buffer";
|
||||
_backBuffer = nil;
|
||||
}
|
||||
|
||||
@@ -579,17 +582,19 @@
|
||||
_backBuffer = self.nextDrawable.texture;
|
||||
}
|
||||
_rce = [_commandBuffer renderCommandEncoderWithDescriptor:rpd];
|
||||
_rce.label = @"Frame command encoder";
|
||||
}
|
||||
return _rce;
|
||||
}
|
||||
|
||||
- (void)resetRenderViewport
|
||||
- (void)resetRenderViewport:(ViewportResetMode)mode
|
||||
{
|
||||
bool fullscreen = mode == kFullscreenViewport;
|
||||
MTLViewport vp = {
|
||||
.originX = 0,
|
||||
.originY = 0,
|
||||
.width = _viewport.full_width,
|
||||
.height = _viewport.full_height,
|
||||
.originX = fullscreen ? 0 : _viewport.x,
|
||||
.originY = fullscreen ? 0 : _viewport.y,
|
||||
.width = fullscreen ? _viewport.full_width : _viewport.width,
|
||||
.height = fullscreen ? _viewport.full_height : _viewport.height,
|
||||
.znear = 0,
|
||||
.zfar = 1,
|
||||
};
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
{
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
@@ -67,7 +66,6 @@
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
}
|
||||
|
||||
@@ -75,8 +73,7 @@
|
||||
{
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
[ce setBuffer:tin offset:0 atIndex:0];
|
||||
@@ -89,7 +86,6 @@
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
if (_clearNextRender)
|
||||
{
|
||||
[_context resetRenderViewport];
|
||||
[_context resetRenderViewport:kFullscreenViewport];
|
||||
[_context drawQuadX:0
|
||||
y:0
|
||||
w:1
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
//
|
||||
// metal_common.h
|
||||
// RetroArch_Metal
|
||||
//
|
||||
// Created by Stuart Carnie on 5/14/18.
|
||||
//
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018-2019 - Stuart Carnie
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef METAL_COMMON_H__
|
||||
#define METAL_COMMON_H__
|
||||
@@ -26,6 +35,38 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt);
|
||||
|
||||
#pragma mark - Classes
|
||||
|
||||
#import <MetalKit/MetalKit.h>
|
||||
|
||||
@interface MetalView : MTKView
|
||||
@end
|
||||
|
||||
#ifdef HAVE_COCOA_METAL
|
||||
|
||||
@protocol ApplePlatform
|
||||
|
||||
/*! @brief renderView returns the current render view based on the viewType */
|
||||
@property (readonly) id renderView;
|
||||
|
||||
/*! @brief isActive returns true if the application has focus */
|
||||
@property (readonly) bool hasFocus;
|
||||
|
||||
@property (readwrite) apple_view_type_t viewType;
|
||||
|
||||
/*! @brief setVideoMode adjusts the video display to the specified mode */
|
||||
- (void)setVideoMode:(gfx_ctx_mode_t)mode;
|
||||
|
||||
/*! @brief setCursorVisible specifies whether the cursor is visible */
|
||||
- (void)setCursorVisible:(bool)v;
|
||||
|
||||
/*! @brief controls whether the screen saver should be disabled and
|
||||
* the displays should not sleep.
|
||||
*/
|
||||
- (bool)setDisableDisplaySleep:(bool)disable;
|
||||
@end
|
||||
|
||||
extern id<ApplePlatform> apple_platform;
|
||||
#endif
|
||||
|
||||
@interface FrameView : NSObject
|
||||
|
||||
@property (nonatomic, readonly) RPixelFormat format;
|
||||
|
||||
+83
-36
@@ -1,8 +1,17 @@
|
||||
/*
|
||||
* metal_common.m
|
||||
* RetroArch_Metal
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2018-2019 - Stuart Carnie
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* Created by Stuart Carnie on 5/14/18.
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@@ -39,6 +48,24 @@
|
||||
x = (__bridge __typeof__(x))(__bridge_retained void *)((NSObject *)__y); \
|
||||
}
|
||||
|
||||
@implementation MetalView
|
||||
|
||||
- (void)keyDown:(NSEvent*)theEvent
|
||||
{
|
||||
}
|
||||
|
||||
/* Stop the annoying sound when pressing a key. */
|
||||
- (BOOL)acceptsFirstResponder
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
||||
#pragma mark - private categories
|
||||
|
||||
@interface FrameView()
|
||||
@@ -83,7 +110,6 @@
|
||||
id<MTLSamplerState> _samplerStateNearest;
|
||||
|
||||
// other state
|
||||
Uniforms _uniforms;
|
||||
Uniforms _viewportMVP;
|
||||
}
|
||||
|
||||
@@ -270,23 +296,16 @@
|
||||
[_frameView updateFrame:data pitch:pitch];
|
||||
}
|
||||
|
||||
[self _drawViews:video_info];
|
||||
[self _drawCore:video_info];
|
||||
[self _drawMenu:video_info];
|
||||
|
||||
if (video_info->statistics_show)
|
||||
{
|
||||
struct font_params *osd_params = (struct font_params *)&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text, osd_params);
|
||||
}
|
||||
}
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (_overlay.enabled)
|
||||
{
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
[rce pushDebugGroup:@"overlay"];
|
||||
[_context resetRenderViewport:_overlay.fullscreen ? kFullscreenViewport : kVideoViewport];
|
||||
[rce setRenderPipelineState:[_context getStockShader:VIDEO_SHADER_STOCK_BLEND blend:YES]];
|
||||
[rce setVertexBytes:_context.uniforms length:sizeof(*_context.uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setFragmentSamplerState:_samplerStateLinear atIndex:SamplerIndexDraw];
|
||||
@@ -295,15 +314,35 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
if (video_info->statistics_show)
|
||||
{
|
||||
struct font_params *osd_params = (struct font_params *)&video_info->osd_stat_params;
|
||||
|
||||
if (osd_params)
|
||||
{
|
||||
[rce pushDebugGroup:@"video stats"];
|
||||
font_driver_render_msg(video_info, NULL, video_info->stat_text, osd_params);
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (video_info->widgets_inited)
|
||||
{
|
||||
[rce pushDebugGroup:@"menu widgets"];
|
||||
menu_widgets_frame(video_info);
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (msg && *msg)
|
||||
{
|
||||
[rce pushDebugGroup:@"message"];
|
||||
[self _renderMessage:msg info:video_info];
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
|
||||
[self _endFrame];
|
||||
}
|
||||
@@ -340,7 +379,7 @@
|
||||
float g = settings->uints.video_msg_bgcolor_green / 255.0f;
|
||||
float b = settings->uints.video_msg_bgcolor_blue / 255.0f;
|
||||
float a = settings->floats.video_msg_bgcolor_opacity;
|
||||
[_context resetRenderViewport];
|
||||
[_context resetRenderViewport:kFullscreenViewport];
|
||||
[_context drawQuadX:x y:y w:width h:height r:r g:g b:b a:a];
|
||||
}
|
||||
|
||||
@@ -358,7 +397,7 @@
|
||||
[_context begin];
|
||||
}
|
||||
|
||||
- (void)_drawViews:(video_frame_info_t *)video_info
|
||||
- (void)_drawCore:(video_frame_info_t *)video_info
|
||||
{
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
|
||||
@@ -381,11 +420,20 @@
|
||||
[_frameView drawWithEncoder:rce];
|
||||
}
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
|
||||
if (_menu.enabled && _menu.hasFrame)
|
||||
- (void)_drawMenu:(video_frame_info_t *)video_info
|
||||
{
|
||||
if (!_menu.enabled)
|
||||
return;
|
||||
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
|
||||
if (_menu.hasFrame)
|
||||
{
|
||||
[rce pushDebugGroup:@"menu frame"];
|
||||
[_menu.view drawWithContext:_context];
|
||||
[rce setVertexBytes:&_uniforms length:sizeof(_uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setVertexBytes:_context.uniforms length:sizeof(*_context.uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setRenderPipelineState:_t_pipelineState];
|
||||
if (_menu.view.filter == RTextureFilterNearest)
|
||||
{
|
||||
@@ -396,21 +444,13 @@
|
||||
[rce setFragmentSamplerState:_samplerStateLinear atIndex:SamplerIndexDraw];
|
||||
}
|
||||
[_menu.view drawWithEncoder:rce];
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
|
||||
#if defined(HAVE_MENU)
|
||||
if (_menu.enabled)
|
||||
else
|
||||
{
|
||||
MTLViewport viewport = {
|
||||
.originX = 0.0f,
|
||||
.originY = 0.0f,
|
||||
.width = _viewport->full_width,
|
||||
.height = _viewport->full_height,
|
||||
.znear = 0.0f,
|
||||
.zfar = 1.0,
|
||||
};
|
||||
[rce setViewport:viewport];
|
||||
[rce pushDebugGroup:@"menu"];
|
||||
[_context resetRenderViewport:kFullscreenViewport];
|
||||
menu_driver_frame(video_info);
|
||||
[rce popDebugGroup];
|
||||
}
|
||||
@@ -899,6 +939,7 @@ typedef struct MTLALIGN(16)
|
||||
}
|
||||
|
||||
id<MTLCommandBuffer> cb = ctx.blitCommandBuffer;
|
||||
[cb pushDebugGroup:@"shaders"];
|
||||
|
||||
MTLRenderPassDescriptor *rpd = [MTLRenderPassDescriptor new];
|
||||
rpd.colorAttachments[0].loadAction = MTLLoadActionDontCare;
|
||||
@@ -920,12 +961,11 @@ typedef struct MTLALIGN(16)
|
||||
rce = [cb renderCommandEncoderWithDescriptor:rpd];
|
||||
}
|
||||
|
||||
#if DEBUG && METAL_DEBUG
|
||||
rce.label = [NSString stringWithFormat:@"pass %d", i];
|
||||
#endif
|
||||
|
||||
[rce setRenderPipelineState:_engine.pass[i]._state];
|
||||
|
||||
NSURL *shaderPath = [NSURL fileURLWithPath:_engine.pass[i]._state.label];
|
||||
rce.label = shaderPath.lastPathComponent.stringByDeletingPathExtension;
|
||||
|
||||
_engine.pass[i].frame_count = (uint32_t)_frameCount;
|
||||
if (_shader->pass[i].frame_count_mod)
|
||||
_engine.pass[i].frame_count %= _shader->pass[i].frame_count_mod;
|
||||
@@ -997,6 +1037,8 @@ typedef struct MTLALIGN(16)
|
||||
_drawState = ViewDrawStateContext;
|
||||
else
|
||||
_drawState = ViewDrawStateAll;
|
||||
|
||||
[cb popDebugGroup];
|
||||
}
|
||||
|
||||
- (void)_updateRenderTargets
|
||||
@@ -1141,6 +1183,9 @@ typedef struct MTLALIGN(16)
|
||||
config_file_t *conf = video_shader_read_preset(path.UTF8String);
|
||||
struct video_shader *shader = (struct video_shader *)calloc(1, sizeof(*shader));
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
NSString *shadersPath = [NSString stringWithFormat:@"%s/", settings->paths.directory_video_shader];
|
||||
|
||||
@try
|
||||
{
|
||||
unsigned i;
|
||||
@@ -1216,7 +1261,9 @@ typedef struct MTLALIGN(16)
|
||||
vd.layouts[4].stepFunction = MTLVertexStepFunctionPerVertex;
|
||||
|
||||
MTLRenderPipelineDescriptor *psd = [MTLRenderPipelineDescriptor new];
|
||||
psd.label = [NSString stringWithFormat:@"pass %d", i];
|
||||
|
||||
psd.label = [[NSString stringWithUTF8String:shader->pass[i].source.path]
|
||||
stringByReplacingOccurrencesOfString:shadersPath withString:@""];
|
||||
|
||||
MTLRenderPipelineColorAttachmentDescriptor *ca = psd.colorAttachments[0];
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* copyright (c) 2011-2017 - Daniel De Matteis
|
||||
* copyright (c) 2016-2019 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __NETWORK_VIDEO_COMMON_H
|
||||
#define __NETWORK_VIDEO_COMMON_H
|
||||
|
||||
typedef struct network
|
||||
{
|
||||
unsigned video_width;
|
||||
unsigned video_height;
|
||||
unsigned screen_width;
|
||||
unsigned screen_height;
|
||||
void *ctx_data;
|
||||
const gfx_ctx_driver_t *ctx_driver;
|
||||
char address[256];
|
||||
uint16_t port;
|
||||
int fd;
|
||||
} network_video_t;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2019 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "sdl2_common.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include "SDL.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
void sdl2_set_handles(void *data, enum rarch_display_type display_type)
|
||||
{
|
||||
/* SysWMinfo headers are broken on OSX. */
|
||||
SDL_SysWMinfo info;
|
||||
SDL_Window *window = (SDL_Window*)data;
|
||||
SDL_VERSION(&info.version);
|
||||
|
||||
if (SDL_GetWindowWMInfo(window, &info) != 1)
|
||||
return;
|
||||
|
||||
video_driver_display_userdata_set((uintptr_t)window);
|
||||
|
||||
switch (display_type)
|
||||
{
|
||||
case RARCH_DISPLAY_WIN32:
|
||||
#if defined(_WIN32)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_WIN32);
|
||||
video_driver_display_set(0);
|
||||
video_driver_window_set((uintptr_t)info.info.win.window);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_DISPLAY_X11:
|
||||
#if defined(HAVE_X11)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_X11);
|
||||
video_driver_display_set((uintptr_t)info.info.x11.display);
|
||||
video_driver_window_set((uintptr_t)info.info.x11.window);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_DISPLAY_OSX:
|
||||
#ifdef HAVE_COCOA
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_window_set((uintptr_t)info.info.cocoa.window);
|
||||
#endif
|
||||
break;
|
||||
case RARCH_DISPLAY_WAYLAND:
|
||||
#ifdef HAVE_WAYLAND
|
||||
video_driver_display_type_set(RARCH_DISPLAY_WAYLAND);
|
||||
video_driver_display_set((uintptr_t)info.info.wl.display);
|
||||
video_driver_window_set((uintptr_t)info.info.wl.surface);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
case RARCH_DISPLAY_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2019 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
@@ -13,25 +13,15 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <retro_assert.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
#ifndef SDL2_COMMON_H__
|
||||
#define SDL2_COMMON_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../video_defines.h"
|
||||
|
||||
void sdl2_set_handles(void *data, enum rarch_display_type
|
||||
display_type);
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "menu_content.h"
|
||||
#include "menu_driver.h"
|
||||
#include "menu_shader.h"
|
||||
|
||||
#include "../core_info.h"
|
||||
#include "../configuration.h"
|
||||
#include "../defaults.h"
|
||||
#include "../playlist.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
/* This file should probably be removed, but may need
|
||||
* to add something to it in the future... */
|
||||
@@ -992,6 +992,7 @@ bool win32_window_create(void *data, unsigned style,
|
||||
|
||||
video_driver_display_type_set(RARCH_DISPLAY_WIN32);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)&main_window);
|
||||
video_driver_window_set((uintptr_t)main_window.hwnd);
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 /* 2K */
|
||||
|
||||
+5
-16
@@ -554,6 +554,8 @@ bool x11_alive(void *data)
|
||||
case 4: /* Grabbed */
|
||||
/* Scroll up */
|
||||
case 5: /* Scroll down */
|
||||
case 6: /* Scroll wheel left */
|
||||
case 7: /* Scroll wheel right */
|
||||
x_input_poll_wheel(&event.xbutton, true);
|
||||
break;
|
||||
}
|
||||
@@ -679,30 +681,17 @@ bool x11_connect(void)
|
||||
|
||||
void x11_update_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t *video_info = (video_frame_info_t*)data2;
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
XStoreName(g_x11_dpy, g_x11_win, title);
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, XA_WM_NAME, XA_STRING,
|
||||
8, PropModeReplace, (const unsigned char*)title,
|
||||
strlen(title));
|
||||
}
|
||||
|
||||
bool x11_input_ctx_new(bool true_full)
|
||||
|
||||
@@ -1460,28 +1460,9 @@ static void d3d8_get_overlay_interface(void *data,
|
||||
|
||||
static void d3d8_update_title(video_frame_info_t *video_info)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
#ifndef _XBOX
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
#endif
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _XBOX
|
||||
if (window)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
+2
-23
@@ -1510,30 +1510,9 @@ static void d3d9_get_overlay_interface(void *data,
|
||||
|
||||
static void d3d9_update_title(video_frame_info_t *video_info)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
#ifdef _XBOX
|
||||
const ui_window_t *window = NULL;
|
||||
#else
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
#endif
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _XBOX
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (window)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
@@ -0,0 +1,584 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#include "../font_driver.h"
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../common/fpga_common.h"
|
||||
|
||||
typedef struct RegOp
|
||||
{
|
||||
int fd;
|
||||
void *ptr;
|
||||
int only_mmap;
|
||||
int only_munmap;
|
||||
} RegOp;
|
||||
|
||||
static unsigned char *fpga_menu_frame = NULL;
|
||||
static unsigned fpga_menu_width = 0;
|
||||
static unsigned fpga_menu_height = 0;
|
||||
static unsigned fpga_menu_pitch = 0;
|
||||
static unsigned fpga_video_width = 0;
|
||||
static unsigned fpga_video_height = 0;
|
||||
static unsigned fpga_video_pitch = 0;
|
||||
static unsigned fpga_video_bits = 0;
|
||||
static unsigned fpga_menu_bits = 0;
|
||||
static bool fpga_rgb32 = false;
|
||||
static bool fpga_menu_rgb32 = false;
|
||||
static RegOp regOp;
|
||||
|
||||
static unsigned int get_memory_size(void)
|
||||
{
|
||||
FILE *size_fp;
|
||||
unsigned int size;
|
||||
|
||||
/* this file holds the memory range needed to map the framebuffer into
|
||||
* kernel address space, it is specified in the device tree
|
||||
*/
|
||||
size_fp = fopen("/sys/class/uio/uio0/maps/map0/size", "r");
|
||||
|
||||
if (!size_fp)
|
||||
{
|
||||
RARCH_ERR("unable to open the uio size file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fscanf(size_fp, "0x%08X", &size);
|
||||
fclose(size_fp);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
static void do_mmap_op(RegOp *regOp)
|
||||
{
|
||||
if (regOp->only_munmap == 0)
|
||||
{
|
||||
regOp->fd = open("/dev/uio0", O_RDWR);
|
||||
|
||||
if (regOp->fd < 1)
|
||||
return;
|
||||
|
||||
regOp->ptr = mmap(NULL, get_memory_size(), PROT_READ|PROT_WRITE, MAP_SHARED, regOp->fd, 0);
|
||||
|
||||
if (regOp->ptr == MAP_FAILED)
|
||||
{
|
||||
RARCH_ERR("could not mmap() memory\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (regOp->only_mmap == 0)
|
||||
{
|
||||
if (munmap(regOp->ptr, get_memory_size()) == -1)
|
||||
{
|
||||
RARCH_ERR("could not munmap() memory\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
close(regOp->fd);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void fpga_gfx_create(fpga_t *fpga)
|
||||
{
|
||||
memset(®Op, 0, sizeof(regOp));
|
||||
|
||||
regOp.only_mmap = 1;
|
||||
|
||||
do_mmap_op(®Op);
|
||||
|
||||
fpga->framebuffer = ((volatile unsigned*)regOp.ptr);
|
||||
}
|
||||
|
||||
static void *fpga_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
{
|
||||
unsigned full_x, full_y;
|
||||
gfx_ctx_input_t inp;
|
||||
gfx_ctx_mode_t mode;
|
||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||
unsigned win_width = 0, win_height = 0;
|
||||
unsigned temp_width = 0, temp_height = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
fpga_t *fpga = (fpga_t*)calloc(1, sizeof(*fpga));
|
||||
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
|
||||
fpga_video_width = video->width;
|
||||
fpga_video_height = video->height;
|
||||
fpga_rgb32 = video->rgb32;
|
||||
|
||||
fpga_video_bits = video->rgb32 ? 32 : 16;
|
||||
|
||||
if (video->rgb32)
|
||||
fpga_video_pitch = video->width * 4;
|
||||
else
|
||||
fpga_video_pitch = video->width * 2;
|
||||
|
||||
fpga_gfx_create(fpga);
|
||||
|
||||
ctx_driver = video_context_driver_init_first(fpga,
|
||||
settings->arrays.video_context_driver,
|
||||
GFX_CTX_FPGA_API, 1, 0, false);
|
||||
if (!ctx_driver)
|
||||
goto error;
|
||||
|
||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||
|
||||
RARCH_LOG("[FPGA]: Found FPGA context: %s\n", ctx_driver->ident);
|
||||
|
||||
video_context_driver_get_video_size(&mode);
|
||||
|
||||
full_x = mode.width;
|
||||
full_y = mode.height;
|
||||
mode.width = 0;
|
||||
mode.height = 0;
|
||||
|
||||
RARCH_LOG("[FPGA]: Detecting screen resolution %ux%u.\n", full_x, full_y);
|
||||
|
||||
win_width = video->width;
|
||||
win_height = video->height;
|
||||
|
||||
if (video->fullscreen && (win_width == 0) && (win_height == 0))
|
||||
{
|
||||
win_width = full_x;
|
||||
win_height = full_y;
|
||||
}
|
||||
|
||||
mode.width = win_width;
|
||||
mode.height = win_height;
|
||||
mode.fullscreen = video->fullscreen;
|
||||
|
||||
if (!video_context_driver_set_video_mode(&mode))
|
||||
goto error;
|
||||
|
||||
mode.width = 0;
|
||||
mode.height = 0;
|
||||
|
||||
video_context_driver_get_video_size(&mode);
|
||||
|
||||
temp_width = mode.width;
|
||||
temp_height = mode.height;
|
||||
mode.width = 0;
|
||||
mode.height = 0;
|
||||
|
||||
/* Get real known video size, which might have been altered by context. */
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(&temp_width, &temp_height);
|
||||
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
RARCH_LOG("[FPGA]: Using resolution %ux%u\n", temp_width, temp_height);
|
||||
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (settings->bools.video_font_enable)
|
||||
font_driver_init_osd(NULL, false,
|
||||
video->is_threaded,
|
||||
FONT_DRIVER_RENDER_FPGA);
|
||||
|
||||
RARCH_LOG("[FPGA]: Init complete.\n");
|
||||
|
||||
return fpga;
|
||||
|
||||
error:
|
||||
video_context_driver_destroy();
|
||||
if (fpga)
|
||||
free(fpga);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_frame(void *data, const void *frame,
|
||||
unsigned frame_width, unsigned frame_height, uint64_t frame_count,
|
||||
unsigned pitch, const char *msg, video_frame_info_t *video_info)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
const void *frame_to_copy = frame;
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
unsigned bits = fpga_video_bits;
|
||||
bool draw = true;
|
||||
fpga_t *fpga = (fpga_t*)data;
|
||||
|
||||
if (!frame || !frame_width || !frame_height)
|
||||
return true;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_driver_frame(video_info);
|
||||
#endif
|
||||
|
||||
if (fpga_video_width != frame_width || fpga_video_height != frame_height || fpga_video_pitch != pitch)
|
||||
{
|
||||
if (frame_width > 4 && frame_height > 4)
|
||||
{
|
||||
fpga_video_width = frame_width;
|
||||
fpga_video_height = frame_height;
|
||||
fpga_video_pitch = pitch;
|
||||
}
|
||||
}
|
||||
|
||||
if (fpga_menu_frame && video_info->menu_is_alive)
|
||||
{
|
||||
frame_to_copy = fpga_menu_frame;
|
||||
width = fpga_menu_width;
|
||||
height = fpga_menu_height;
|
||||
pitch = fpga_menu_pitch;
|
||||
bits = fpga_menu_bits;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = fpga_video_width;
|
||||
height = fpga_video_height;
|
||||
pitch = fpga_video_pitch;
|
||||
|
||||
if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height))
|
||||
draw = false;
|
||||
|
||||
if (video_info->menu_is_alive)
|
||||
draw = false;
|
||||
}
|
||||
|
||||
video_context_driver_get_video_size(&mode);
|
||||
|
||||
if (draw)
|
||||
{
|
||||
if (bits == 16)
|
||||
{
|
||||
if (frame_to_copy == fpga_menu_frame)
|
||||
{
|
||||
/* RGBX4444 color bits for RGUI */
|
||||
unsigned x, y;
|
||||
|
||||
for (y = 0; y < FB_HEIGHT; y++)
|
||||
{
|
||||
for (x = 0; x < FB_WIDTH; x++)
|
||||
{
|
||||
/* scale incoming frame to fit the screen */
|
||||
unsigned scaled_x = (width * x) / FB_WIDTH;
|
||||
unsigned scaled_y = (height * y) / FB_HEIGHT;
|
||||
unsigned short pixel = ((unsigned short*)frame_to_copy)[width * scaled_y + scaled_x];
|
||||
|
||||
/* convert RGBX444 to XRGB8888 */
|
||||
unsigned r = ((pixel & 0xF000) >> 12);
|
||||
unsigned g = ((pixel & 0x0F00) >> 8);
|
||||
unsigned b = ((pixel & 0x00F0) >> 4);
|
||||
|
||||
fpga->framebuffer[FB_WIDTH * y + x] = (r << 20) | (b << 12) | (g << 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* RGB565 color bits for core */
|
||||
unsigned x, y;
|
||||
|
||||
for (y = 0; y < FB_HEIGHT; y++)
|
||||
{
|
||||
for (x = 0; x < FB_WIDTH; x++)
|
||||
{
|
||||
/* scale incoming frame to fit the screen */
|
||||
unsigned scaled_x = (width * x) / FB_WIDTH;
|
||||
unsigned scaled_y = (height * y) / FB_HEIGHT;
|
||||
unsigned short pixel = ((unsigned short*)frame_to_copy)[width * scaled_y + scaled_x];
|
||||
|
||||
/* convert RGB565 to XRBG8888 */
|
||||
unsigned r = ((pixel & 0xF800) >> 11);
|
||||
unsigned g = ((pixel & 0x07E0) >> 5);
|
||||
unsigned b = ((pixel & 0x001F) >> 0);
|
||||
|
||||
fpga->framebuffer[FB_WIDTH * y + x] = (r << 19) | (b << 11) | (g << 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO/FIXME: handle 32-bit core output */
|
||||
}
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fpga_gfx_set_nonblock_state(void *data, bool toggle)
|
||||
{
|
||||
(void)data;
|
||||
(void)toggle;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_alive(void *data)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
unsigned temp_width = 0;
|
||||
unsigned temp_height = 0;
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
size_data.quit = &quit;
|
||||
size_data.resize = &resize;
|
||||
size_data.width = &temp_width;
|
||||
size_data.height = &temp_height;
|
||||
|
||||
video_context_driver_check_window(&size_data);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(&temp_width, &temp_height);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_focus(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fpga_gfx_free(void *data)
|
||||
{
|
||||
fpga_t *fpga = (fpga_t*)data;
|
||||
|
||||
if (fpga_menu_frame)
|
||||
{
|
||||
free(fpga_menu_frame);
|
||||
fpga_menu_frame = NULL;
|
||||
}
|
||||
|
||||
if (!fpga)
|
||||
return;
|
||||
|
||||
font_driver_free_osd();
|
||||
video_context_driver_free();
|
||||
|
||||
free(fpga);
|
||||
|
||||
regOp.only_mmap = 0;
|
||||
regOp.only_munmap = 1;
|
||||
|
||||
do_mmap_op(®Op);
|
||||
}
|
||||
|
||||
static bool fpga_gfx_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
(void)data;
|
||||
(void)type;
|
||||
(void)path;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void fpga_gfx_set_rotation(void *data,
|
||||
unsigned rotation)
|
||||
{
|
||||
(void)data;
|
||||
(void)rotation;
|
||||
}
|
||||
|
||||
static void fpga_gfx_viewport_info(void *data,
|
||||
struct video_viewport *vp)
|
||||
{
|
||||
(void)data;
|
||||
(void)vp;
|
||||
}
|
||||
|
||||
static bool fpga_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
|
||||
{
|
||||
(void)data;
|
||||
(void)buffer;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fpga_set_texture_frame(void *data,
|
||||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||
float alpha)
|
||||
{
|
||||
unsigned pitch = width * 2;
|
||||
|
||||
if (rgb32)
|
||||
pitch = width * 4;
|
||||
|
||||
if (fpga_menu_frame)
|
||||
{
|
||||
free(fpga_menu_frame);
|
||||
fpga_menu_frame = NULL;
|
||||
}
|
||||
|
||||
if (!fpga_menu_frame || fpga_menu_width != width || fpga_menu_height != height || fpga_menu_pitch != pitch)
|
||||
if (pitch && height)
|
||||
fpga_menu_frame = (unsigned char*)malloc(pitch * height);
|
||||
|
||||
if (fpga_menu_frame && frame && pitch && height)
|
||||
{
|
||||
memcpy(fpga_menu_frame, frame, pitch * height);
|
||||
fpga_menu_width = width;
|
||||
fpga_menu_height = height;
|
||||
fpga_menu_pitch = pitch;
|
||||
fpga_menu_bits = rgb32 ? 32 : 16;
|
||||
}
|
||||
}
|
||||
|
||||
static void fpga_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, params);
|
||||
}
|
||||
|
||||
static void fpga_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
size_data.width = width;
|
||||
size_data.height = height;
|
||||
video_context_driver_get_video_output_size(&size_data);
|
||||
}
|
||||
|
||||
static void fpga_get_video_output_prev(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_prev();
|
||||
}
|
||||
|
||||
static void fpga_get_video_output_next(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_next();
|
||||
}
|
||||
|
||||
static void fpga_set_video_mode(void *data, unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
|
||||
mode.width = width;
|
||||
mode.height = height;
|
||||
mode.fullscreen = fullscreen;
|
||||
|
||||
video_context_driver_set_video_mode(&mode);
|
||||
}
|
||||
|
||||
static const video_poke_interface_t fpga_poke_interface = {
|
||||
NULL,
|
||||
NULL,
|
||||
fpga_set_video_mode,
|
||||
NULL,
|
||||
fpga_get_video_output_size,
|
||||
fpga_get_video_output_prev,
|
||||
fpga_get_video_output_next,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#if defined(HAVE_MENU)
|
||||
fpga_set_texture_frame,
|
||||
NULL,
|
||||
fpga_set_osd_msg,
|
||||
NULL,
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#endif
|
||||
|
||||
NULL,
|
||||
#ifdef HAVE_MENU
|
||||
NULL,
|
||||
#endif
|
||||
};
|
||||
|
||||
static void fpga_gfx_get_poke_interface(void *data,
|
||||
const video_poke_interface_t **iface)
|
||||
{
|
||||
(void)data;
|
||||
*iface = &fpga_poke_interface;
|
||||
}
|
||||
|
||||
static void fpga_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate)
|
||||
{
|
||||
}
|
||||
|
||||
bool fpga_has_menu_frame(void)
|
||||
{
|
||||
return (fpga_menu_frame != NULL);
|
||||
}
|
||||
|
||||
video_driver_t video_fpga = {
|
||||
fpga_gfx_init,
|
||||
fpga_gfx_frame,
|
||||
fpga_gfx_set_nonblock_state,
|
||||
fpga_gfx_alive,
|
||||
fpga_gfx_focus,
|
||||
fpga_gfx_suppress_screensaver,
|
||||
fpga_gfx_has_windowed,
|
||||
fpga_gfx_set_shader,
|
||||
fpga_gfx_free,
|
||||
"fpga",
|
||||
fpga_gfx_set_viewport,
|
||||
fpga_gfx_set_rotation,
|
||||
fpga_gfx_viewport_info,
|
||||
fpga_gfx_read_viewport,
|
||||
NULL, /* read_frame_raw */
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
NULL, /* overlay_interface */
|
||||
#endif
|
||||
fpga_gfx_get_poke_interface,
|
||||
};
|
||||
+3
-2
@@ -3064,8 +3064,9 @@ static bool gl2_frame(void *data, const void *frame,
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
}
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
if (video_info->cb_update_window_title)
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
/* Reset state which could easily mess up libretro core. */
|
||||
if (gl->hw_render_fbo_init)
|
||||
|
||||
+40
-13
@@ -387,7 +387,7 @@ static void *gl1_gfx_init(const video_info_t *video,
|
||||
video->is_threaded,
|
||||
FONT_DRIVER_RENDER_OPENGL1_API);
|
||||
|
||||
gl1->smooth = settings->bools.video_smooth;
|
||||
gl1->smooth = settings->bools.video_smooth;
|
||||
gl1->supports_bgra = string_list_find_elem(gl1->extensions, "GL_EXT_bgra");
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
@@ -546,10 +546,12 @@ void gl1_gfx_set_viewport(gl1_t *gl1,
|
||||
|
||||
static void draw_tex(gl1_t *gl1, int pot_width, int pot_height, int width, int height, GLuint tex, const void *frame_to_copy)
|
||||
{
|
||||
uint8_t *frame = NULL;
|
||||
uint8_t *frame_rgba = NULL;
|
||||
/* FIXME: For now, everything is uploaded as BGRA8888, I could not get 444 or 555 to work, and there is no 565 support in GL 1.1 either. */
|
||||
GLint internalFormat = GL_RGB8;
|
||||
GLenum format = (gl1->supports_bgra ? GL_BGRA_EXT : GL_RGBA);
|
||||
GLenum type = GL_UNSIGNED_BYTE;
|
||||
GLenum format = gl1->supports_bgra ? GL_BGRA_EXT : GL_RGBA;
|
||||
GLenum type = GL_UNSIGNED_BYTE;
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_CULL_FACE);
|
||||
@@ -557,16 +559,41 @@ static void draw_tex(gl1_t *gl1, int pot_width, int pot_height, int width, int h
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
/* multi-texture not part of GL 1.1 */
|
||||
/* Multi-texture not part of GL 1.1 */
|
||||
/*glActiveTexture(GL_TEXTURE0);*/
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, pot_width);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
|
||||
/* TODO: We could implement red/blue swap if client GL does not support BGRA... but even MS GDI Generic supports it */
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, pot_width, pot_height, 0, format, type, NULL);
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, type, frame_to_copy);
|
||||
/* For whatever reason you can't send NULL in GLDirect,
|
||||
so we send the frame as dummy data */
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, pot_width, pot_height, 0, format, type, frame_to_copy);
|
||||
|
||||
frame = (uint8_t*)frame_to_copy;
|
||||
if (!gl1->supports_bgra)
|
||||
{
|
||||
frame_rgba = (uint8_t*)malloc(pot_width * pot_height * 4);
|
||||
if (frame_rgba)
|
||||
{
|
||||
int x, y;
|
||||
for (y = 0; y < pot_height; y++)
|
||||
{
|
||||
for (x = 0; x < pot_width; x++)
|
||||
{
|
||||
int index = (y * pot_width + x) * 4;
|
||||
frame_rgba[index + 2] = frame[index + 0];
|
||||
frame_rgba[index + 1] = frame[index + 1];
|
||||
frame_rgba[index + 0] = frame[index + 2];
|
||||
frame_rgba[index + 3] = frame[index + 3];
|
||||
}
|
||||
}
|
||||
frame = frame_rgba;
|
||||
}
|
||||
}
|
||||
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, format, type, frame);
|
||||
free(frame_rgba);
|
||||
|
||||
if (tex == gl1->tex)
|
||||
{
|
||||
@@ -613,16 +640,16 @@ static void draw_tex(gl1_t *gl1, int pot_width, int pot_height, int width, int h
|
||||
glBegin(GL_QUADS);
|
||||
|
||||
{
|
||||
float tex_BL[2] = {0.0f, 0.0f};
|
||||
float tex_BR[2] = {1.0f, 0.0f};
|
||||
float tex_TL[2] = {0.0f, 1.0f};
|
||||
float tex_TR[2] = {1.0f, 1.0f};
|
||||
float tex_BL[2] = {0.0f, 0.0f};
|
||||
float tex_BR[2] = {1.0f, 0.0f};
|
||||
float tex_TL[2] = {0.0f, 1.0f};
|
||||
float tex_TR[2] = {1.0f, 1.0f};
|
||||
float *tex_mirror_BL = tex_TL;
|
||||
float *tex_mirror_BR = tex_TR;
|
||||
float *tex_mirror_TL = tex_BL;
|
||||
float *tex_mirror_TR = tex_BR;
|
||||
float norm_width = (1.0f / (float)pot_width) * (float)width;
|
||||
float norm_height = (1.0f / (float)pot_height) * (float)height;
|
||||
float norm_width = (1.0f / (float)pot_width) * (float)width;
|
||||
float norm_height = (1.0f / (float)pot_height) * (float)height;
|
||||
|
||||
/* remove extra POT padding */
|
||||
tex_mirror_BR[0] = norm_width;
|
||||
|
||||
@@ -1593,6 +1593,8 @@ static void gl_core_draw_menu_texture(gl_core_t *gl, video_frame_info_t *video_i
|
||||
|
||||
if (gl->menu_texture_full_screen)
|
||||
glViewport(0, 0, video_info->width, video_info->height);
|
||||
else
|
||||
glViewport(gl->vp.x, gl->vp.y, gl->vp.width, gl->vp.height);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + 1);
|
||||
glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
|
||||
|
||||
@@ -0,0 +1,557 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_timers.h>
|
||||
#include <stdlib.h>
|
||||
#include <compat/strl.h>
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
#include <net/net_compat.h>
|
||||
#include <net/net_socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#include "../font_driver.h"
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include "../common/network_common.h"
|
||||
|
||||
#define xstr(s) str(s)
|
||||
#define str(s) #s
|
||||
|
||||
enum {
|
||||
NETWORK_VIDEO_PIXELFORMAT_RGBA8888 = 0,
|
||||
NETWORK_VIDEO_PIXELFORMAT_BGRA8888,
|
||||
NETWORK_VIDEO_PIXELFORMAT_RGB565
|
||||
} network_video_pixelformat;
|
||||
|
||||
static unsigned char *network_menu_frame = NULL;
|
||||
static unsigned network_menu_width = 0;
|
||||
static unsigned network_menu_height = 0;
|
||||
static unsigned network_menu_pitch = 0;
|
||||
static unsigned network_video_width = 0;
|
||||
static unsigned network_video_height = 0;
|
||||
static unsigned network_video_pitch = 0;
|
||||
static unsigned network_video_bits = 0;
|
||||
static unsigned network_menu_bits = 0;
|
||||
static bool network_rgb32 = false;
|
||||
static bool network_menu_rgb32 = false;
|
||||
static unsigned *network_video_temp_buf = NULL;
|
||||
|
||||
static void *network_gfx_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
void *ctx_data = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
network_video_t *network = (network_video_t*)calloc(1, sizeof(*network));
|
||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||
struct addrinfo *addr = NULL, *next_addr = NULL;
|
||||
int fd;
|
||||
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
|
||||
network_rgb32 = video->rgb32;
|
||||
network_video_bits = video->rgb32 ? 32 : 16;
|
||||
|
||||
if (video->rgb32)
|
||||
network_video_pitch = video->width * 4;
|
||||
else
|
||||
network_video_pitch = video->width * 2;
|
||||
|
||||
ctx_driver = video_context_driver_init_first(network,
|
||||
"network",
|
||||
GFX_CTX_NETWORK_VIDEO_API, 1, 0, false, &ctx_data);
|
||||
|
||||
if (!ctx_driver)
|
||||
goto error;
|
||||
|
||||
if (ctx_data)
|
||||
network->ctx_data = ctx_data;
|
||||
|
||||
network->ctx_driver = ctx_driver;
|
||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||
|
||||
RARCH_LOG("[network]: Found network video context: %s\n", ctx_driver->ident);
|
||||
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (settings->bools.video_font_enable)
|
||||
font_driver_init_osd(network, false,
|
||||
video->is_threaded,
|
||||
FONT_DRIVER_RENDER_NETWORK_VIDEO);
|
||||
|
||||
strlcpy(network->address, xstr(NETWORK_VIDEO_HOST), sizeof(network->address));
|
||||
network->port = NETWORK_VIDEO_PORT;
|
||||
|
||||
RARCH_LOG("[network] Connecting to host %s:%d\n", network->address, network->port);
|
||||
try_connect:
|
||||
fd = socket_init((void**)&addr, network->port, network->address, SOCKET_TYPE_STREAM);
|
||||
|
||||
next_addr = addr;
|
||||
|
||||
while (fd >= 0)
|
||||
{
|
||||
{
|
||||
int ret = socket_connect(fd, (void*)next_addr, true);
|
||||
|
||||
if (ret >= 0) /* && socket_nonblock(fd)) */
|
||||
break;
|
||||
|
||||
socket_close(fd);
|
||||
}
|
||||
|
||||
fd = socket_next((void**)&next_addr);
|
||||
}
|
||||
|
||||
if (addr)
|
||||
freeaddrinfo_retro(addr);
|
||||
|
||||
network->fd = fd;
|
||||
|
||||
#if 0
|
||||
socket_nonblock(network->fd);
|
||||
#endif
|
||||
|
||||
if (network->fd > 0)
|
||||
RARCH_LOG("[network]: Connected to host.\n");
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[network]: Could not connect to host, retrying...\n");
|
||||
retro_sleep(1000);
|
||||
goto try_connect;
|
||||
}
|
||||
|
||||
RARCH_LOG("[network]: Init complete.\n");
|
||||
|
||||
return network;
|
||||
|
||||
error:
|
||||
video_context_driver_destroy();
|
||||
if (network)
|
||||
free(network);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool network_gfx_frame(void *data, const void *frame,
|
||||
unsigned frame_width, unsigned frame_height, uint64_t frame_count,
|
||||
unsigned pitch, const char *msg, video_frame_info_t *video_info)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
const void *frame_to_copy = frame;
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
unsigned bits = network_video_bits;
|
||||
unsigned pixfmt = NETWORK_VIDEO_PIXELFORMAT_RGB565;
|
||||
bool draw = true;
|
||||
network_video_t *network = (network_video_t*)data;
|
||||
|
||||
if (!frame || !frame_width || !frame_height)
|
||||
return true;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_driver_frame(video_info);
|
||||
#endif
|
||||
|
||||
if (network_video_width != frame_width || network_video_height != frame_height || network_video_pitch != pitch)
|
||||
{
|
||||
if (frame_width > 4 && frame_height > 4)
|
||||
{
|
||||
network_video_width = frame_width;
|
||||
network_video_height = frame_height;
|
||||
network_video_pitch = pitch;
|
||||
network->screen_width = network_video_width;
|
||||
network->screen_height = network_video_height;
|
||||
}
|
||||
}
|
||||
|
||||
if (network_menu_frame && video_info->menu_is_alive)
|
||||
{
|
||||
frame_to_copy = network_menu_frame;
|
||||
width = network_menu_width;
|
||||
height = network_menu_height;
|
||||
pitch = network_menu_pitch;
|
||||
bits = network_menu_bits;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = network_video_width;
|
||||
height = network_video_height;
|
||||
pitch = network_video_pitch;
|
||||
|
||||
if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height))
|
||||
draw = false;
|
||||
|
||||
if (video_info->menu_is_alive)
|
||||
draw = false;
|
||||
}
|
||||
|
||||
if (network->video_width != width || network->video_height != height)
|
||||
{
|
||||
network->video_width = width;
|
||||
network->video_height = height;
|
||||
|
||||
if (network_video_temp_buf)
|
||||
{
|
||||
free(network_video_temp_buf);
|
||||
}
|
||||
|
||||
network_video_temp_buf = (unsigned*)malloc(network->screen_width * network->screen_height * sizeof(unsigned));
|
||||
}
|
||||
|
||||
if (bits == 16)
|
||||
{
|
||||
if (network_video_temp_buf)
|
||||
{
|
||||
if (frame_to_copy == network_menu_frame)
|
||||
{
|
||||
/* Scale and convert 16-bit RGBX4444 image to 32-bit RGBX8888. */
|
||||
unsigned x, y;
|
||||
|
||||
for (y = 0; y < network->screen_height; y++)
|
||||
{
|
||||
for (x = 0; x < network->screen_width; x++)
|
||||
{
|
||||
/* scale incoming frame to fit the screen */
|
||||
unsigned scaled_x = (width * x) / network->screen_width;
|
||||
unsigned scaled_y = (height * y) / network->screen_height;
|
||||
unsigned short pixel = ((unsigned short*)frame_to_copy)[width * scaled_y + scaled_x];
|
||||
|
||||
/* convert RGBX4444 to RGBX8888 */
|
||||
unsigned r = ((pixel & 0xF000) << 8) | ((pixel & 0xF000) << 4);
|
||||
unsigned g = ((pixel & 0x0F00) << 4) | ((pixel & 0x0F00) << 0);
|
||||
unsigned b = ((pixel & 0x00F0) << 0) | ((pixel & 0x00F0) >> 4);
|
||||
|
||||
network_video_temp_buf[network->screen_width * y + x] = 0xFF000000 | b | g | r;
|
||||
}
|
||||
}
|
||||
|
||||
pixfmt = NETWORK_VIDEO_PIXELFORMAT_RGBA8888;
|
||||
frame_to_copy = network_video_temp_buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Scale and convert 16-bit RGB565 image to 32-bit RGBX8888. */
|
||||
unsigned x, y;
|
||||
|
||||
for (y = 0; y < network->screen_height; y++)
|
||||
{
|
||||
for (x = 0; x < network->screen_width; x++)
|
||||
{
|
||||
/* scale incoming frame to fit the screen */
|
||||
unsigned scaled_x = (width * x) / network->screen_width;
|
||||
unsigned scaled_y = (height * y) / network->screen_height;
|
||||
unsigned short pixel = ((unsigned short*)frame_to_copy)[(pitch / (bits / 8)) * scaled_y + scaled_x];
|
||||
|
||||
/* convert RGB565 to RGBX8888 */
|
||||
unsigned r = ((pixel & 0x001F) << 3) | ((pixel & 0x001C) >> 2);
|
||||
unsigned g = ((pixel & 0x07E0) << 5) | ((pixel & 0x0600) >> 1);
|
||||
unsigned b = ((pixel & 0xF800) << 8) | ((pixel & 0xE000) << 3);
|
||||
|
||||
network_video_temp_buf[network->screen_width * y + x] = 0xFF000000 | b | g | r;
|
||||
}
|
||||
}
|
||||
|
||||
pixfmt = NETWORK_VIDEO_PIXELFORMAT_BGRA8888;
|
||||
frame_to_copy = network_video_temp_buf;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no temp buffer available yet */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Scale 32-bit RGBX8888 image to output geometry. */
|
||||
unsigned x, y;
|
||||
|
||||
for (y = 0; y < network->screen_height; y++)
|
||||
{
|
||||
for (x = 0; x < network->screen_width; x++)
|
||||
{
|
||||
/* scale incoming frame to fit the screen */
|
||||
unsigned scaled_x = (width * x) / network->screen_width;
|
||||
unsigned scaled_y = (height * y) / network->screen_height;
|
||||
unsigned pixel = ((unsigned*)frame_to_copy)[(pitch / (bits / 8)) * scaled_y + scaled_x];
|
||||
|
||||
network_video_temp_buf[network->screen_width * y + x] = pixel;
|
||||
}
|
||||
}
|
||||
|
||||
pixfmt = NETWORK_VIDEO_PIXELFORMAT_BGRA8888;
|
||||
frame_to_copy = network_video_temp_buf;
|
||||
}
|
||||
|
||||
if (draw && network->screen_width > 0 && network->screen_height > 0)
|
||||
{
|
||||
if (network->fd > 0)
|
||||
socket_send_all_blocking(network->fd, frame_to_copy, network->screen_width * network->screen_height * 4, true);
|
||||
}
|
||||
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void network_gfx_set_nonblock_state(void *data, bool toggle)
|
||||
{
|
||||
(void)data;
|
||||
(void)toggle;
|
||||
}
|
||||
|
||||
static bool network_gfx_alive(void *data)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
unsigned temp_width = 0;
|
||||
unsigned temp_height = 0;
|
||||
bool quit = false;
|
||||
bool resize = false;
|
||||
bool is_shutdown = rarch_ctl(RARCH_CTL_IS_SHUTDOWN, NULL);
|
||||
network_video_t *network = (network_video_t*)data;
|
||||
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
network->ctx_driver->check_window(network->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height, is_shutdown);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(&temp_width, &temp_height);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool network_gfx_focus(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool network_gfx_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool network_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void network_gfx_free(void *data)
|
||||
{
|
||||
network_video_t *network = (network_video_t*)data;
|
||||
|
||||
if (network_menu_frame)
|
||||
{
|
||||
free(network_menu_frame);
|
||||
network_menu_frame = NULL;
|
||||
}
|
||||
|
||||
if (network_video_temp_buf)
|
||||
{
|
||||
free(network_video_temp_buf);
|
||||
network_video_temp_buf = NULL;
|
||||
}
|
||||
|
||||
font_driver_free_osd();
|
||||
|
||||
if (network->fd >= 0)
|
||||
socket_close(network->fd);
|
||||
|
||||
if (network)
|
||||
free(network);
|
||||
}
|
||||
|
||||
static bool network_gfx_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
(void)data;
|
||||
(void)type;
|
||||
(void)path;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void network_gfx_set_rotation(void *data,
|
||||
unsigned rotation)
|
||||
{
|
||||
(void)data;
|
||||
(void)rotation;
|
||||
}
|
||||
|
||||
static void network_set_texture_frame(void *data,
|
||||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||
float alpha)
|
||||
{
|
||||
unsigned pitch = width * 2;
|
||||
|
||||
if (rgb32)
|
||||
pitch = width * 4;
|
||||
|
||||
if (network_menu_frame)
|
||||
{
|
||||
free(network_menu_frame);
|
||||
network_menu_frame = NULL;
|
||||
}
|
||||
|
||||
if (!network_menu_frame || network_menu_width != width || network_menu_height != height || network_menu_pitch != pitch)
|
||||
if (pitch && height)
|
||||
network_menu_frame = (unsigned char*)malloc(pitch * height);
|
||||
|
||||
if (network_menu_frame && frame && pitch && height)
|
||||
{
|
||||
memcpy(network_menu_frame, frame, pitch * height);
|
||||
network_menu_width = width;
|
||||
network_menu_height = height;
|
||||
network_menu_pitch = pitch;
|
||||
network_menu_bits = rgb32 ? 32 : 16;
|
||||
}
|
||||
}
|
||||
|
||||
static void network_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
font_driver_render_msg(video_info, font, msg, (const struct font_params*)params);
|
||||
}
|
||||
|
||||
static void network_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
size_data.width = width;
|
||||
size_data.height = height;
|
||||
video_context_driver_get_video_output_size(&size_data);
|
||||
}
|
||||
|
||||
static void network_get_video_output_prev(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_prev();
|
||||
}
|
||||
|
||||
static void network_get_video_output_next(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_next();
|
||||
}
|
||||
|
||||
static void network_set_video_mode(void *data, unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
|
||||
mode.width = width;
|
||||
mode.height = height;
|
||||
mode.fullscreen = fullscreen;
|
||||
|
||||
video_context_driver_set_video_mode(&mode);
|
||||
}
|
||||
|
||||
static const video_poke_interface_t network_poke_interface = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
network_set_video_mode,
|
||||
NULL,
|
||||
NULL,
|
||||
network_get_video_output_size,
|
||||
network_get_video_output_prev,
|
||||
network_get_video_output_next,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#if defined(HAVE_MENU)
|
||||
network_set_texture_frame,
|
||||
NULL,
|
||||
network_set_osd_msg,
|
||||
NULL,
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#endif
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static void network_gfx_get_poke_interface(void *data,
|
||||
const video_poke_interface_t **iface)
|
||||
{
|
||||
(void)data;
|
||||
*iface = &network_poke_interface;
|
||||
}
|
||||
|
||||
static void network_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate)
|
||||
{
|
||||
}
|
||||
|
||||
bool network_has_menu_frame(void)
|
||||
{
|
||||
return (network_menu_frame != NULL);
|
||||
}
|
||||
|
||||
video_driver_t video_network = {
|
||||
network_gfx_init,
|
||||
network_gfx_frame,
|
||||
network_gfx_set_nonblock_state,
|
||||
network_gfx_alive,
|
||||
network_gfx_focus,
|
||||
network_gfx_suppress_screensaver,
|
||||
network_gfx_has_windowed,
|
||||
network_gfx_set_shader,
|
||||
network_gfx_free,
|
||||
"network",
|
||||
network_gfx_set_viewport,
|
||||
network_gfx_set_rotation,
|
||||
NULL, /* viewport_info */
|
||||
NULL, /* read_viewport */
|
||||
NULL, /* read_frame_raw */
|
||||
#ifdef HAVE_OVERLAY
|
||||
NULL, /* overlay_interface */
|
||||
#endif
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
NULL,
|
||||
#endif
|
||||
network_gfx_get_poke_interface,
|
||||
NULL /* wrap_type_to_enum */
|
||||
};
|
||||
@@ -99,8 +99,6 @@ static void init_ps2_video(ps2_video_t *ps2)
|
||||
|
||||
static void deinitTexture(GSTEXTURE *texture)
|
||||
{
|
||||
free(texture->Mem);
|
||||
free(texture->Clut);
|
||||
texture->Mem = NULL;
|
||||
texture->Clut = NULL;
|
||||
}
|
||||
@@ -369,6 +367,9 @@ static void ps2_gfx_free(void *data)
|
||||
deinitTexture(ps2->menuTexture);
|
||||
deinitTexture(ps2->coreTexture);
|
||||
|
||||
free(ps2->menuTexture);
|
||||
free(ps2->coreTexture);
|
||||
|
||||
gsKit_deinit_global(ps2->gsGlobal);
|
||||
|
||||
free(data);
|
||||
|
||||
+12
-24
@@ -36,6 +36,10 @@
|
||||
#include "SDL.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include "../common/sdl2_common.h"
|
||||
#endif
|
||||
|
||||
#include "../font_driver.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
@@ -211,28 +215,6 @@ static void sdl2_render_msg(sdl2_video_t *vid, const char *msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdl2_gfx_set_handles(sdl2_video_t *vid)
|
||||
{
|
||||
/* SysWMinfo headers are broken on OSX. */
|
||||
#if defined(_WIN32) || defined(HAVE_X11)
|
||||
SDL_SysWMinfo info;
|
||||
SDL_VERSION(&info.version);
|
||||
|
||||
if (SDL_GetWindowWMInfo(vid->window, &info) != 1)
|
||||
return;
|
||||
|
||||
#if defined(_WIN32)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_WIN32);
|
||||
video_driver_display_set(0);
|
||||
video_driver_window_set((uintptr_t)info.info.win.window);
|
||||
#elif defined(HAVE_X11)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_X11);
|
||||
video_driver_display_set((uintptr_t)info.info.x11.display);
|
||||
video_driver_window_set((uintptr_t)info.info.x11.window);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void sdl2_init_renderer(sdl2_video_t *vid)
|
||||
{
|
||||
unsigned flags = SDL_RENDERER_ACCELERATED;
|
||||
@@ -448,7 +430,13 @@ static void *sdl2_gfx_init(const video_info_t *video,
|
||||
sdl2_init_renderer(vid);
|
||||
sdl2_init_font(vid, settings->paths.path_font, settings->floats.video_font_size);
|
||||
|
||||
sdl2_gfx_set_handles(vid);
|
||||
#if defined(_WIN32)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_WIN32);
|
||||
#elif defined(HAVE_X11)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_X11);
|
||||
#elif defined(HAVE_COCOA)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_OSX);
|
||||
#endif
|
||||
|
||||
sdl_refresh_viewport(vid);
|
||||
|
||||
@@ -522,7 +510,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
SDL_SetWindowTitle(vid->window, title);
|
||||
SDL_SetWindowTitle((SDL_Window*)video_driver_display_userdata_get(), title);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -437,10 +437,29 @@ static bool android_gfx_ctx_suppress_screensaver(void *data, bool enable)
|
||||
|
||||
static void dpi_get_density(char *s, size_t len)
|
||||
{
|
||||
system_property_get("getprop", "ro.sf.lcd_density", s);
|
||||
static bool inited_once = false;
|
||||
static bool inited2_once = false;
|
||||
static char string[PROP_VALUE_MAX] = {0};
|
||||
static char string2[PROP_VALUE_MAX] = {0};
|
||||
if (!inited_once)
|
||||
{
|
||||
system_property_get("getprop", "ro.sf.lcd_density", string);
|
||||
inited_once = true;
|
||||
}
|
||||
|
||||
if (string_is_empty(s))
|
||||
system_property_get("wm", "density", s);
|
||||
if (!string_is_empty(string))
|
||||
{
|
||||
strlcpy(s, string, len);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!inited2_once)
|
||||
{
|
||||
system_property_get("wm", "density", string2);
|
||||
inited2_once = true;
|
||||
}
|
||||
|
||||
strlcpy(s, string2, len);
|
||||
}
|
||||
|
||||
static bool android_gfx_ctx_get_metrics(void *data,
|
||||
@@ -615,26 +634,6 @@ static void android_gfx_ctx_set_flags(void *data, uint32_t flags)
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
static void android_gfx_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_android = {
|
||||
android_gfx_ctx_init,
|
||||
android_gfx_ctx_destroy,
|
||||
@@ -649,7 +648,7 @@ const gfx_ctx_driver_t gfx_ctx_android = {
|
||||
NULL, /* get_video_output_next */
|
||||
android_gfx_ctx_get_metrics,
|
||||
NULL,
|
||||
android_gfx_update_window_title,
|
||||
NULL, /* update_title */
|
||||
android_gfx_ctx_check_window,
|
||||
android_gfx_ctx_set_resize,
|
||||
android_gfx_ctx_has_focus,
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
#ifdef HAVE_VULKAN
|
||||
#include "../common/vulkan_common.h"
|
||||
#endif
|
||||
#ifdef HAVE_METAL
|
||||
#include "../common/metal_common.h"
|
||||
#endif
|
||||
|
||||
typedef struct cocoa_ctx_data
|
||||
{
|
||||
@@ -90,8 +93,26 @@ static unsigned g_major = 0;
|
||||
@end
|
||||
#endif
|
||||
|
||||
/* forward declaration */
|
||||
void *nsview_get_ptr(void);
|
||||
static CocoaView* g_instance;
|
||||
|
||||
void *nsview_get_ptr(void)
|
||||
{
|
||||
#if defined(HAVE_COCOA)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||
#elif defined(HAVE_COCOA_METAL)
|
||||
video_driver_display_type_set(RARCH_DISPLAY_OSX);
|
||||
video_driver_display_set(0);
|
||||
video_driver_display_userdata_set((uintptr_t)g_instance);
|
||||
#endif
|
||||
return (BRIDGE void *)g_instance;
|
||||
}
|
||||
|
||||
void nsview_set_ptr(CocoaView *p)
|
||||
{
|
||||
g_instance = p;
|
||||
}
|
||||
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)
|
||||
static NSOpenGLPixelFormat* g_format;
|
||||
@@ -228,7 +249,7 @@ float get_backing_scale_factor(void)
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
NSView *g_view = apple_platform.renderView;
|
||||
#elif defined(HAVE_COCOA)
|
||||
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
|
||||
CocoaView *g_view = g_instance;
|
||||
#endif
|
||||
backing_scale_def = (float)get_from_selector
|
||||
([[g_view window] class], [g_view window], selector, &ret);
|
||||
@@ -348,15 +369,8 @@ float cocoagl_gfx_ctx_get_native_scale(void)
|
||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)
|
||||
static void cocoagl_gfx_ctx_update_title(void *data, void *data2)
|
||||
{
|
||||
ui_window_cocoa_t view;
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
#if defined(HAVE_COCOA)
|
||||
view.data = (CocoaView*)nsview_get_ptr();
|
||||
#elif defined(HAVE_COCOA_METAL)
|
||||
view.data = (BRIDGE void *)apple_platform.renderView;
|
||||
#endif
|
||||
|
||||
|
||||
if (window)
|
||||
{
|
||||
char title[128];
|
||||
@@ -366,7 +380,7 @@ static void cocoagl_gfx_ctx_update_title(void *data, void *data2)
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
window->set_title(&view, title);
|
||||
window->set_title((void*)video_driver_display_userdata_get(), title);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -471,7 +485,7 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
NSView *g_view = apple_platform.renderView;
|
||||
#elif defined(HAVE_COCOA)
|
||||
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
|
||||
CocoaView *g_view = g_instance;
|
||||
#endif
|
||||
CGRect cgrect = NSRectToCGRect([g_view frame]);
|
||||
#if MAC_OS_X_VERSION_10_7
|
||||
|
||||
@@ -928,26 +928,6 @@ static void gfx_ctx_drm_set_flags(void *data, uint32_t flags)
|
||||
drm->core_hw_context_enable = true;
|
||||
}
|
||||
|
||||
void gfx_ctx_drm_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_drm = {
|
||||
gfx_ctx_drm_init,
|
||||
gfx_ctx_drm_destroy,
|
||||
@@ -962,7 +942,7 @@ const gfx_ctx_driver_t gfx_ctx_drm = {
|
||||
NULL, /* get_video_output_next */
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
gfx_ctx_drm_update_window_title,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_drm_check_window,
|
||||
NULL, /* set_resize */
|
||||
gfx_ctx_drm_has_focus,
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* FPGA context. */
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../video_driver.h"
|
||||
#include "../common/fpga_common.h"
|
||||
|
||||
static unsigned g_resize_width = FB_WIDTH;
|
||||
static unsigned g_resize_height = FB_HEIGHT;
|
||||
|
||||
static void gfx_ctx_fpga_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
{
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_set_resize(void *data,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
(void)data;
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_update_title(void *data, void *data2)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
*width = g_resize_width;
|
||||
*height = g_resize_height;
|
||||
}
|
||||
|
||||
static void *gfx_ctx_fpga_init(video_frame_info_t *video_info, void *video_driver)
|
||||
{
|
||||
(void)video_driver;
|
||||
|
||||
return (void*)"fpga";
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_destroy(void *data)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_set_video_mode(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
if (false)
|
||||
goto error;
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
gfx_ctx_fpga_destroy(data);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static void gfx_ctx_fpga_input_driver(void *data,
|
||||
const char *joypad_name,
|
||||
const input_driver_t **input, void **input_data)
|
||||
{
|
||||
(void)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_has_focus(void *data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_get_metrics(void *data,
|
||||
enum display_metric_types type, float *value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_fpga_bind_api(void *data,
|
||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_show_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_swap_interval(void *data, unsigned interval)
|
||||
{
|
||||
(void)data;
|
||||
(void)interval;
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_set_flags(void *data, uint32_t flags)
|
||||
{
|
||||
(void)data;
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
static uint32_t gfx_ctx_fpga_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_NONE);
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void gfx_ctx_fpga_swap_buffers(void *data, void *data2)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_fpga = {
|
||||
gfx_ctx_fpga_init,
|
||||
gfx_ctx_fpga_destroy,
|
||||
gfx_ctx_fpga_bind_api,
|
||||
gfx_ctx_fpga_swap_interval,
|
||||
gfx_ctx_fpga_set_video_mode,
|
||||
gfx_ctx_fpga_get_video_size,
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
NULL, /* get_video_output_next */
|
||||
gfx_ctx_fpga_get_metrics,
|
||||
NULL,
|
||||
gfx_ctx_fpga_update_title,
|
||||
gfx_ctx_fpga_check_window,
|
||||
gfx_ctx_fpga_set_resize,
|
||||
gfx_ctx_fpga_has_focus,
|
||||
gfx_ctx_fpga_suppress_screensaver,
|
||||
gfx_ctx_fpga_has_windowed,
|
||||
gfx_ctx_fpga_swap_buffers,
|
||||
gfx_ctx_fpga_input_driver,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gfx_ctx_fpga_show_mouse,
|
||||
"fpga",
|
||||
gfx_ctx_fpga_get_flags,
|
||||
gfx_ctx_fpga_set_flags,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -68,31 +68,14 @@ static bool gfx_ctx_gdi_set_resize(void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_gdi_update_window_title(void *data, void *data2)
|
||||
static void gfx_ctx_gdi_update_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
int64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
int64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
#endif
|
||||
}
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (window && title[0])
|
||||
@@ -305,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_gdi = {
|
||||
NULL, /* get_video_output_next */
|
||||
win32_get_metrics,
|
||||
NULL,
|
||||
gfx_ctx_gdi_update_window_title,
|
||||
gfx_ctx_gdi_update_title,
|
||||
gfx_ctx_gdi_check_window,
|
||||
gfx_ctx_gdi_set_resize,
|
||||
gfx_ctx_gdi_has_focus,
|
||||
|
||||
@@ -276,26 +276,6 @@ static void *gfx_ctx_khr_display_get_context_data(void *data)
|
||||
return &khr->vk.context;
|
||||
}
|
||||
|
||||
static void gfx_ctx_khr_display_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t *video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_khr_display = {
|
||||
gfx_ctx_khr_display_init,
|
||||
gfx_ctx_khr_display_destroy,
|
||||
@@ -310,7 +290,7 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = {
|
||||
NULL, /* get_video_output_next */
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
gfx_ctx_khr_display_update_window_title,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_khr_display_check_window,
|
||||
gfx_ctx_khr_display_set_resize,
|
||||
gfx_ctx_khr_display_has_focus,
|
||||
|
||||
@@ -305,26 +305,6 @@ static float gfx_ctx_mali_fbdev_get_refresh_rate(void *data)
|
||||
return mali->refresh_rate;
|
||||
}
|
||||
|
||||
static void gfx_ctx_mali_fbdev_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_mali_fbdev = {
|
||||
gfx_ctx_mali_fbdev_init,
|
||||
gfx_ctx_mali_fbdev_destroy,
|
||||
@@ -339,7 +319,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = {
|
||||
NULL, /* get_video_output_next */
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
gfx_ctx_mali_fbdev_update_window_title,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_mali_fbdev_check_window,
|
||||
NULL, /* set_resize */
|
||||
gfx_ctx_mali_fbdev_has_focus,
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* network video context. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../ui/ui_companion_driver.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#include "../common/win32_common.h"
|
||||
#endif
|
||||
|
||||
static enum gfx_ctx_api network_ctx_api = GFX_CTX_NONE;
|
||||
|
||||
static void gfx_ctx_network_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
||||
{
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_set_resize(void *data,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
(void)data;
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_update_window_title(void *data, void *data2)
|
||||
{
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void *gfx_ctx_network_init(
|
||||
video_frame_info_t *video_info, void *video_driver)
|
||||
{
|
||||
(void)video_driver;
|
||||
|
||||
return (void*)"network";
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_destroy(void *data)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_set_video_mode(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_input_driver(void *data,
|
||||
const char *joypad_name,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
*input_data = input_udev.init(joypad_name);
|
||||
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_udev;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_has_focus(void *data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_get_metrics(void *data,
|
||||
enum display_metric_types type, float *value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static enum gfx_ctx_api gfx_ctx_network_get_api(void *data)
|
||||
{
|
||||
return network_ctx_api;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_network_bind_api(void *data,
|
||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_show_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_swap_interval(void *data, int interval)
|
||||
{
|
||||
(void)data;
|
||||
(void)interval;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_set_flags(void *data, uint32_t flags)
|
||||
{
|
||||
(void)data;
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
static uint32_t gfx_ctx_network_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void gfx_ctx_network_swap_buffers(void *data, void *data2)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_network = {
|
||||
gfx_ctx_network_init,
|
||||
gfx_ctx_network_destroy,
|
||||
gfx_ctx_network_get_api,
|
||||
gfx_ctx_network_bind_api,
|
||||
gfx_ctx_network_swap_interval,
|
||||
gfx_ctx_network_set_video_mode,
|
||||
gfx_ctx_network_get_video_size,
|
||||
NULL, /* get_refresh_rate */
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
NULL, /* get_video_output_next */
|
||||
gfx_ctx_network_get_metrics,
|
||||
NULL,
|
||||
gfx_ctx_network_update_window_title,
|
||||
gfx_ctx_network_check_window,
|
||||
gfx_ctx_network_set_resize,
|
||||
gfx_ctx_network_has_focus,
|
||||
gfx_ctx_network_suppress_screensaver,
|
||||
true, /* has_windowed */
|
||||
gfx_ctx_network_swap_buffers,
|
||||
gfx_ctx_network_input_driver,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gfx_ctx_network_show_mouse,
|
||||
"network",
|
||||
gfx_ctx_network_get_flags,
|
||||
gfx_ctx_network_set_flags,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
@@ -287,26 +287,6 @@ static float orbis_ctx_get_refresh_rate(void *data)
|
||||
return ctx_orbis->refresh_rate;
|
||||
}
|
||||
|
||||
static void orbis_ctx_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t orbis_ctx = {
|
||||
orbis_ctx_init,
|
||||
orbis_ctx_destroy,
|
||||
@@ -321,7 +301,7 @@ const gfx_ctx_driver_t orbis_ctx = {
|
||||
NULL, /* get_video_output_next */
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
orbis_ctx_update_window_title,
|
||||
NULL, /* update_title */
|
||||
orbis_ctx_check_window,
|
||||
NULL, /* set_resize */
|
||||
orbis_ctx_has_focus,
|
||||
|
||||
@@ -409,26 +409,6 @@ static void gfx_ctx_ps3_set_flags(void *data, uint32_t flags)
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void gfx_ctx_ps3_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
}
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_ps3 = {
|
||||
gfx_ctx_ps3_init,
|
||||
gfx_ctx_ps3_destroy,
|
||||
@@ -443,7 +423,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = {
|
||||
gfx_ctx_ps3_get_video_output_next,
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
gfx_ctx_ps3_update_window_title,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_ps3_check_window,
|
||||
NULL, /* set_resize */
|
||||
gfx_ctx_ps3_has_focus,
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include "../common/sdl2_common.h"
|
||||
#endif
|
||||
|
||||
static enum gfx_ctx_api sdl_api = GFX_CTX_OPENGL_API;
|
||||
static unsigned g_major = 2;
|
||||
static unsigned g_minor = 1;
|
||||
@@ -214,6 +218,14 @@ static bool sdl_ctx_set_video_mode(void *data,
|
||||
goto error;
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#if defined(_WIN32)
|
||||
sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_WIN32);
|
||||
#elif defined(HAVE_X11)
|
||||
sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_X11);
|
||||
#elif defined(HAVE_COCOA)
|
||||
sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_OSX);
|
||||
#endif
|
||||
|
||||
if (sdl->g_ctx)
|
||||
video_driver_set_video_cache_context_ack();
|
||||
else
|
||||
@@ -276,20 +288,18 @@ static void sdl_ctx_get_video_size(void *data,
|
||||
static void sdl_ctx_update_title(void *data, void *data2)
|
||||
{
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data;
|
||||
|
||||
if (sdl && title[0])
|
||||
SDL_SetWindowTitle(sdl->g_win, title);
|
||||
#else
|
||||
if (title[0])
|
||||
{
|
||||
#ifdef HAVE_SDL2
|
||||
SDL_SetWindowTitle((SDL_Window*)video_driver_display_userdata_get(), title);
|
||||
#else
|
||||
SDL_WM_SetCaption(title, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void sdl_ctx_check_window(void *data, bool *quit,
|
||||
|
||||
@@ -48,37 +48,6 @@ static bool gfx_ctx_sixel_set_resize(void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_sixel_update_window_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t *video_info = (video_frame_info_t*)data2;
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
}
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (window && title[0])
|
||||
window->set_title(&main_window, title);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gfx_ctx_sixel_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
@@ -197,7 +166,7 @@ const gfx_ctx_driver_t gfx_ctx_sixel = {
|
||||
NULL, /* get_video_output_next */
|
||||
gfx_ctx_sixel_get_metrics,
|
||||
NULL,
|
||||
gfx_ctx_sixel_update_window_title,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_sixel_check_window,
|
||||
gfx_ctx_sixel_set_resize,
|
||||
gfx_ctx_sixel_has_focus,
|
||||
|
||||
@@ -1158,23 +1158,19 @@ static void gfx_ctx_wl_update_title(void *data, void *data2)
|
||||
|
||||
if (wl && title[0])
|
||||
{
|
||||
if (wl->xdg_toplevel)
|
||||
if (wl->xdg_toplevel || wl->zxdg_toplevel)
|
||||
{
|
||||
if (wl->deco)
|
||||
if (wl->deco)
|
||||
{
|
||||
zxdg_toplevel_decoration_v1_set_mode(wl->deco, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
}
|
||||
xdg_toplevel_set_title(wl->xdg_toplevel, title);
|
||||
}
|
||||
else if (wl->zxdg_toplevel)
|
||||
{
|
||||
if (wl->deco)
|
||||
{
|
||||
zxdg_toplevel_decoration_v1_set_mode(wl->deco, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
}
|
||||
zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, title);
|
||||
}
|
||||
}
|
||||
zxdg_toplevel_decoration_v1_set_mode(wl->deco,
|
||||
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
}
|
||||
}
|
||||
if (wl->xdg_toplevel)
|
||||
xdg_toplevel_set_title(wl->xdg_toplevel, title);
|
||||
else if (wl->zxdg_toplevel)
|
||||
zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, title);
|
||||
}
|
||||
}
|
||||
|
||||
static bool gfx_ctx_wl_get_metrics(void *data,
|
||||
|
||||
@@ -512,28 +512,11 @@ static bool gfx_ctx_wgl_set_resize(void *data,
|
||||
|
||||
static void gfx_ctx_wgl_update_title(void *data, void *data2)
|
||||
{
|
||||
const settings_t *settings = config_get_ptr();
|
||||
video_frame_info_t* video_info = (video_frame_info_t*)data2;
|
||||
char title[128];
|
||||
|
||||
title[0] = '\0';
|
||||
|
||||
if (settings->bools.video_memory_show)
|
||||
{
|
||||
#ifndef __WINRT__
|
||||
uint64_t mem_bytes_used = frontend_driver_get_used_memory();
|
||||
uint64_t mem_bytes_total = frontend_driver_get_total_memory();
|
||||
char mem[128];
|
||||
|
||||
mem[0] = '\0';
|
||||
|
||||
snprintf(
|
||||
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", mem_bytes_used / (1024.0f * 1024.0f),
|
||||
mem_bytes_total / (1024.0f * 1024.0f));
|
||||
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
|
||||
#endif
|
||||
}
|
||||
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
|
||||
if (title[0])
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2017 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../font_driver.h"
|
||||
#include "../video_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../common/fpga_common.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const font_renderer_driver_t *fpga_font_driver;
|
||||
void *fpga_font_data;
|
||||
fpga_t *fpga;
|
||||
} fpga_raster_t;
|
||||
|
||||
static void *fpga_init_font(void *data,
|
||||
const char *font_path, float font_size,
|
||||
bool is_threaded)
|
||||
{
|
||||
fpga_raster_t *font = (fpga_raster_t*)calloc(1, sizeof(*font));
|
||||
|
||||
if (!font)
|
||||
return NULL;
|
||||
|
||||
font->fpga = (fpga_t*)data;
|
||||
|
||||
font_size = 1;
|
||||
|
||||
if (!font_renderer_create_default((const void**)&font->fpga_font_driver,
|
||||
&font->fpga_font_data, font_path, font_size))
|
||||
{
|
||||
RARCH_WARN("Couldn't initialize font renderer.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
static void fpga_render_free_font(void *data, bool is_threaded)
|
||||
{
|
||||
(void)data;
|
||||
(void)is_threaded;
|
||||
}
|
||||
|
||||
static int fpga_get_message_width(void *data, const char *msg,
|
||||
unsigned msg_len, float scale)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct font_glyph *fpga_font_get_glyph(
|
||||
void *data, uint32_t code)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void fpga_render_msg(
|
||||
video_frame_info_t *video_info,
|
||||
void *data, const char *msg,
|
||||
const void *userdata)
|
||||
{
|
||||
float x, y, scale;
|
||||
fpga_raster_t *font = (fpga_raster_t*)data;
|
||||
unsigned newX, newY, len;
|
||||
unsigned align;
|
||||
const struct font_params *params = (const struct font_params*)userdata;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
|
||||
if (!font || string_is_empty(msg))
|
||||
return;
|
||||
|
||||
if (params)
|
||||
{
|
||||
x = params->x;
|
||||
y = params->y;
|
||||
scale = params->scale;
|
||||
align = params->text_align;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = video_info->font_msg_pos_x;
|
||||
y = video_info->font_msg_pos_y;
|
||||
scale = 1.0f;
|
||||
align = TEXT_ALIGN_LEFT;
|
||||
}
|
||||
|
||||
if (!font->fpga)
|
||||
return;
|
||||
|
||||
len = utf8len(msg);
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case TEXT_ALIGN_LEFT:
|
||||
newX = x * width * scale;
|
||||
break;
|
||||
case TEXT_ALIGN_RIGHT:
|
||||
newX = (x * width * scale) - len;
|
||||
break;
|
||||
case TEXT_ALIGN_CENTER:
|
||||
newX = (x * width * scale) - (len / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* TODO: draw osd msg */
|
||||
}
|
||||
|
||||
static void fpga_font_flush_block(unsigned width, unsigned height, void* data)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void fpga_font_bind_block(void* data, void* userdata)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
font_renderer_t fpga_font = {
|
||||
fpga_init_font,
|
||||
fpga_render_free_font,
|
||||
fpga_render_msg,
|
||||
"fpga font",
|
||||
fpga_font_get_glyph, /* get_glyph */
|
||||
fpga_font_bind_block, /* bind_block */
|
||||
fpga_font_flush_block, /* flush */
|
||||
fpga_get_message_width /* get_message_width */
|
||||
};
|
||||
@@ -80,6 +80,12 @@
|
||||
_buffer = [_context.device newBufferWithBytes:_atlas->buffer
|
||||
length:(NSUInteger)(_stride * _atlas->height)
|
||||
options:MTLResourceStorageModeManaged];
|
||||
|
||||
// Even though newBufferWithBytes will copy the initial contents
|
||||
// from our atlas, it doesn't seem to invalidate the buffer when
|
||||
// doing so, causing corrupted text rendering if we hit this code
|
||||
// path. To work around it we manually invalidate the buffer.
|
||||
[_buffer didModifyRange:NSMakeRange(0, _buffer.length)];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -324,7 +330,7 @@ static INLINE void write_quad6(SpriteVertex *pv,
|
||||
id<MTLRenderCommandEncoder> rce = _context.rce;
|
||||
[rce pushDebugGroup:@"render fonts"];
|
||||
|
||||
[_context resetRenderViewport];
|
||||
[_context resetRenderViewport:kFullscreenViewport];
|
||||
[rce setRenderPipelineState:_state];
|
||||
[rce setVertexBytes:&_uniforms length:sizeof(Uniforms) atIndex:BufferIndexUniforms];
|
||||
[rce setVertexBuffer:_vert offset:start atIndex:BufferIndexPositions];
|
||||
|
||||
@@ -45,10 +45,15 @@ static u32 gsKit_fontm_clut[16] = { 0x00000000, 0x11111111, 0x22222222, 0x333333
|
||||
|
||||
static void deinit_texture(GSTEXTURE *texture)
|
||||
{
|
||||
free(texture->Mem);
|
||||
free(texture->Clut);
|
||||
texture->Mem = NULL;
|
||||
texture->Clut = NULL;
|
||||
if (texture->Mem!= NULL) {
|
||||
free(texture->Mem);
|
||||
texture->Mem = NULL;
|
||||
}
|
||||
|
||||
if (texture->Mem!= NULL) {
|
||||
free(texture->Clut);
|
||||
texture->Clut = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void deinit_gsfont(GSFONTM *gsFontM)
|
||||
|
||||
@@ -167,14 +167,17 @@ static GLint gl_glsl_get_uniform(glsl_shader_data_t *glsl,
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s%s", glsl->shader->prefix, base);
|
||||
strlcpy(buf, glsl->shader->prefix, sizeof(buf));
|
||||
strlcat(buf, base, sizeof(buf));
|
||||
loc = glGetUniformLocation(prog, buf);
|
||||
if (loc >= 0)
|
||||
return loc;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(glsl_prefixes); i++)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s%s", glsl_prefixes[i], base);
|
||||
buf[0] = '\0';
|
||||
strlcpy(buf, glsl_prefixes[i], sizeof(buf));
|
||||
strlcat(buf, base, sizeof(buf));
|
||||
loc = glGetUniformLocation(prog, buf);
|
||||
if (loc >= 0)
|
||||
return loc;
|
||||
@@ -192,14 +195,16 @@ static GLint gl_glsl_get_attrib(glsl_shader_data_t *glsl,
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s%s", glsl->shader->prefix, base);
|
||||
strlcpy(buf, glsl->shader->prefix, sizeof(buf));
|
||||
strlcat(buf, base, sizeof(buf));
|
||||
loc = glGetUniformLocation(prog, buf);
|
||||
if (loc >= 0)
|
||||
return loc;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(glsl_prefixes); i++)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s%s", glsl_prefixes[i], base);
|
||||
strlcpy(buf, glsl_prefixes[i], sizeof(buf));
|
||||
strlcat(buf, base, sizeof(buf));
|
||||
loc = glGetAttribLocation(prog, buf);
|
||||
if (loc >= 0)
|
||||
return loc;
|
||||
@@ -569,10 +574,14 @@ static void gl_glsl_find_uniforms_frame(glsl_shader_data_t *glsl,
|
||||
|
||||
texture[0] = texture_size[0] = input_size[0] = tex_coord[0] = '\0';
|
||||
|
||||
snprintf(texture, sizeof(texture), "%s%s", base, "Texture");
|
||||
snprintf(texture_size, sizeof(texture_size), "%s%s", base, "TextureSize");
|
||||
snprintf(input_size, sizeof(input_size), "%s%s", base, "InputSize");
|
||||
snprintf(tex_coord, sizeof(tex_coord), "%s%s", base, "TexCoord");
|
||||
strlcpy(texture, base, sizeof(texture));
|
||||
strlcat(texture, "Texture", sizeof(texture));
|
||||
strlcpy(texture_size, base, sizeof(texture_size));
|
||||
strlcat(texture_size, "TextureSize", sizeof(texture_size));
|
||||
strlcpy(input_size, base, sizeof(input_size));
|
||||
strlcat(input_size, "InputSize", sizeof(input_size));
|
||||
strlcpy(tex_coord, base, sizeof(tex_coord));
|
||||
strlcat(tex_coord, "TexCoord", sizeof(tex_coord));
|
||||
|
||||
if (frame->texture < 0)
|
||||
frame->texture = gl_glsl_get_uniform(glsl, prog, texture);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
#include <compat/strl.h>
|
||||
#include "../../verbosity.h"
|
||||
|
||||
using namespace std;
|
||||
@@ -723,8 +724,13 @@ bool slang_reflect(
|
||||
}
|
||||
}
|
||||
|
||||
RARCH_LOG("[slang]:\n");
|
||||
RARCH_LOG("[slang]: Parameters:\n");
|
||||
{
|
||||
char buf[64];
|
||||
buf[0] = '\0';
|
||||
snprintf(buf, sizeof(buf),
|
||||
"[slang]:\n%s [slang]: Parameters:\n", FILE_PATH_LOG_INFO);
|
||||
RARCH_LOG(buf);
|
||||
}
|
||||
|
||||
for (i = 0; i < reflection->semantic_float_parameters.size(); i++)
|
||||
{
|
||||
|
||||
@@ -177,6 +177,7 @@ extern font_renderer_t d3d12_font;
|
||||
extern font_renderer_t caca_font;
|
||||
extern font_renderer_t gdi_font;
|
||||
extern font_renderer_t vga_font;
|
||||
extern font_renderer_t fpga_font;
|
||||
extern font_renderer_t sixel_font;
|
||||
extern font_renderer_t switch_font;
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ enum rarch_display_type
|
||||
RARCH_DISPLAY_X11,
|
||||
/* video_display => N/A, video_window => HWND */
|
||||
RARCH_DISPLAY_WIN32,
|
||||
RARCH_DISPLAY_WAYLAND,
|
||||
RARCH_DISPLAY_OSX
|
||||
};
|
||||
|
||||
@@ -98,8 +99,10 @@ enum font_driver_render_api
|
||||
FONT_DRIVER_RENDER_METAL_API,
|
||||
FONT_DRIVER_RENDER_CACA,
|
||||
FONT_DRIVER_RENDER_SIXEL,
|
||||
FONT_DRIVER_RENDER_NETWORK_VIDEO,
|
||||
FONT_DRIVER_RENDER_GDI,
|
||||
FONT_DRIVER_RENDER_VGA,
|
||||
FONT_DRIVER_RENDER_FPGA,
|
||||
FONT_DRIVER_RENDER_SWITCH
|
||||
};
|
||||
|
||||
|
||||
+29
-20
@@ -354,22 +354,24 @@ static bool video_shader_parse_textures(config_file_t *conf,
|
||||
fill_pathname_resolve_relative(shader->lut[shader->luts].path,
|
||||
conf->path, tmp_path, sizeof(shader->lut[shader->luts].path));
|
||||
|
||||
|
||||
strlcpy(shader->lut[shader->luts].id, id,
|
||||
sizeof(shader->lut[shader->luts].id));
|
||||
|
||||
snprintf(id_filter, sizeof(id_filter), "%s_linear", id);
|
||||
strlcpy(id_filter, id, sizeof(id_filter));
|
||||
strlcat(id_filter, "_linear", sizeof(id_filter));
|
||||
if (config_get_bool(conf, id_filter, &smooth))
|
||||
shader->lut[shader->luts].filter = smooth ?
|
||||
RARCH_FILTER_LINEAR : RARCH_FILTER_NEAREST;
|
||||
else
|
||||
shader->lut[shader->luts].filter = RARCH_FILTER_UNSPEC;
|
||||
|
||||
snprintf(id_wrap, sizeof(id_wrap), "%s_wrap_mode", id);
|
||||
strlcpy(id_wrap, id, sizeof(id_wrap));
|
||||
strlcat(id_wrap, "_wrap_mode", sizeof(id_wrap));
|
||||
if (config_get_array(conf, id_wrap, wrap_mode, sizeof(wrap_mode)))
|
||||
shader->lut[shader->luts].wrap = wrap_str_to_mode(wrap_mode);
|
||||
|
||||
snprintf(id_mipmap, sizeof(id_mipmap), "%s_mipmap", id);
|
||||
strlcpy(id_mipmap, id, sizeof(id_mipmap));
|
||||
strlcat(id_mipmap, "_mipmap", sizeof(id_mipmap));
|
||||
if (config_get_bool(conf, id_mipmap, &mipmap))
|
||||
shader->lut[shader->luts].mipmap = mipmap;
|
||||
else
|
||||
@@ -1090,10 +1092,6 @@ void video_shader_write_conf_preset(config_file_t *conf,
|
||||
|
||||
for (i = 0; i < shader->luts; i++)
|
||||
{
|
||||
char key[128];
|
||||
|
||||
key[0] = '\0';
|
||||
|
||||
if (preset_path)
|
||||
{
|
||||
strlcpy(tmp, shader->lut[i].path, tmp_size);
|
||||
@@ -1107,20 +1105,31 @@ void video_shader_write_conf_preset(config_file_t *conf,
|
||||
|
||||
if (shader->lut[i].filter != RARCH_FILTER_UNSPEC)
|
||||
{
|
||||
snprintf(key, sizeof(key), "%s_linear", shader->lut[i].id);
|
||||
char key[128];
|
||||
key[0] = '\0';
|
||||
strlcpy(key, shader->lut[i].id, sizeof(key));
|
||||
strlcat(key, "_linear", sizeof(key));
|
||||
config_set_bool(conf, key,
|
||||
shader->lut[i].filter == RARCH_FILTER_LINEAR);
|
||||
}
|
||||
|
||||
snprintf(key, sizeof(key),
|
||||
"%s_wrap_mode", shader->lut[i].id);
|
||||
config_set_string(conf, key,
|
||||
wrap_mode_to_str(shader->lut[i].wrap));
|
||||
{
|
||||
char key[128];
|
||||
key[0] = '\0';
|
||||
strlcpy(key, shader->lut[i].id, sizeof(key));
|
||||
strlcat(key, "_wrap_mode", sizeof(key));
|
||||
config_set_string(conf, key,
|
||||
wrap_mode_to_str(shader->lut[i].wrap));
|
||||
}
|
||||
|
||||
snprintf(key, sizeof(key),
|
||||
"%s_mipmap", shader->lut[i].id);
|
||||
config_set_bool(conf, key,
|
||||
shader->lut[i].mipmap);
|
||||
{
|
||||
char key[128];
|
||||
key[0] = '\0';
|
||||
strlcpy(key, shader->lut[i].id, sizeof(key));
|
||||
strlcat(key, "_mipmap", sizeof(key));
|
||||
config_set_bool(conf, key,
|
||||
shader->lut[i].mipmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1191,12 +1200,12 @@ const char *video_shader_get_preset_extension(enum rarch_shader_type type)
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_SHADER_GLSL:
|
||||
return file_path_str(FILE_PATH_GLSLP_EXTENSION);
|
||||
return ".glslp";
|
||||
case RARCH_SHADER_SLANG:
|
||||
return file_path_str(FILE_PATH_SLANGP_EXTENSION);
|
||||
return ".slangp";
|
||||
case RARCH_SHADER_HLSL:
|
||||
case RARCH_SHADER_CG:
|
||||
return file_path_str(FILE_PATH_CGP_EXTENSION);
|
||||
return ".cgp";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-1
@@ -157,6 +157,7 @@ ACHIEVEMENTS
|
||||
#endif
|
||||
|
||||
#include "../libretro-common/formats/json/jsonsax.c"
|
||||
#include "../libretro-common/formats/cdfs/cdfs.c"
|
||||
#include "../network/net_http_special.c"
|
||||
|
||||
#include "../cheevos-new/cheevos.c"
|
||||
@@ -405,6 +406,7 @@ VIDEO DRIVER
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include "../gfx/drivers/sdl2_gfx.c"
|
||||
#include "../gfx/common/sdl2_common.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VG
|
||||
@@ -1237,7 +1239,6 @@ MENU
|
||||
#include "../menu/menu_driver.c"
|
||||
#include "../menu/menu_setting.c"
|
||||
#include "../menu/menu_cbs.c"
|
||||
#include "../menu/menu_content.c"
|
||||
|
||||
#if defined(HAVE_NETWORKING)
|
||||
#include "../menu/menu_networking.c"
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
static bool x11_mouse_wu;
|
||||
static bool x11_mouse_wd;
|
||||
static bool x11_mouse_hwu;
|
||||
static bool x11_mouse_hwd;
|
||||
|
||||
int16_t x_mouse_state_wheel(unsigned id)
|
||||
{
|
||||
@@ -35,6 +37,14 @@ int16_t x_mouse_state_wheel(unsigned id)
|
||||
ret = x11_mouse_wd;
|
||||
x11_mouse_wd = 0;
|
||||
return ret;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
ret = x11_mouse_hwu;
|
||||
x11_mouse_hwu = 0;
|
||||
return ret;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
ret = x11_mouse_hwd;
|
||||
x11_mouse_hwd = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -50,5 +60,13 @@ void x_input_poll_wheel(XButtonEvent *event, bool latch)
|
||||
case 5:
|
||||
x11_mouse_wd = 1;
|
||||
break;
|
||||
case 6:
|
||||
/* Scroll wheel left == HORIZ_WHEELDOWN */
|
||||
x11_mouse_hwd = 1;
|
||||
break;
|
||||
case 7:
|
||||
/* Scroll wheel right == HORIZ_WHEELUP */
|
||||
x11_mouse_hwu = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
+192
-4
@@ -32,11 +32,109 @@
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
|
||||
#ifdef HW_RVL
|
||||
/* gx joypad functions */
|
||||
bool gxpad_mousevalid(unsigned port);
|
||||
void gx_joypad_read_mouse(unsigned port, int *irx, int *iry, uint32_t *button);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int x_abs, y_abs;
|
||||
int x_last, y_last;
|
||||
uint32_t button;
|
||||
} gx_input_mouse_t;
|
||||
#endif
|
||||
|
||||
typedef struct gx_input
|
||||
{
|
||||
const input_device_driver_t *joypad;
|
||||
#ifdef HW_RVL
|
||||
int mouse_max;
|
||||
gx_input_mouse_t *mouse;
|
||||
#endif
|
||||
} gx_input_t;
|
||||
|
||||
#ifdef HW_RVL
|
||||
static int16_t gx_lightgun_state(gx_input_t *gx, unsigned id, uint16_t joy_idx)
|
||||
{
|
||||
struct video_viewport vp = {0};
|
||||
video_driver_get_viewport_info(&vp);
|
||||
int16_t res_x = 0;
|
||||
int16_t res_y = 0;
|
||||
int16_t res_screen_x = 0;
|
||||
int16_t res_screen_y = 0;
|
||||
int16_t x = 0;
|
||||
int16_t y = 0;
|
||||
|
||||
vp.x = 0;
|
||||
vp.y = 0;
|
||||
vp.width = 0;
|
||||
vp.height = 0;
|
||||
vp.full_width = 0;
|
||||
vp.full_height = 0;
|
||||
|
||||
x = gx->mouse[joy_idx].x_abs;
|
||||
y = gx->mouse[joy_idx].y_abs;
|
||||
|
||||
if (!(video_driver_translate_coord_viewport_wrap(&vp, x, y,
|
||||
&res_x, &res_y, &res_screen_x, &res_screen_y)))
|
||||
return 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X:
|
||||
return res_screen_x;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y:
|
||||
return res_screen_y;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_TRIGGER);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_A:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_AUX_A);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_B:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_AUX_B);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_C:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_AUX_C);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_START:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_START);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SELECT:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_LIGHTGUN_SELECT);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN:
|
||||
return !gxpad_mousevalid(joy_idx);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t gx_mouse_state(gx_input_t *gx, unsigned id, uint16_t joy_idx)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
int x_scale = settings->uints.input_mouse_scale;
|
||||
int y_scale = settings->uints.input_mouse_scale;
|
||||
|
||||
x = (gx->mouse[joy_idx].x_abs - gx->mouse[joy_idx].x_last) * x_scale;
|
||||
y = (gx->mouse[joy_idx].y_abs - gx->mouse[joy_idx].y_last) * y_scale;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_X:
|
||||
return x;
|
||||
case RETRO_DEVICE_ID_MOUSE_Y:
|
||||
return y;
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_MOUSE_LEFT);
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||
return gx->mouse[joy_idx].button & (1 << RETRO_DEVICE_ID_MOUSE_RIGHT);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int16_t gx_input_state(void *data,
|
||||
rarch_joypad_info_t joypad_info,
|
||||
const struct retro_keybind **binds,
|
||||
@@ -96,6 +194,13 @@ static int16_t gx_input_state(void *data,
|
||||
return input_joypad_analog(gx->joypad,
|
||||
joypad_info, port, idx, id, binds[port]);
|
||||
break;
|
||||
#ifdef HW_RVL
|
||||
case RETRO_DEVICE_MOUSE:
|
||||
return gx_mouse_state(gx, id, joypad_info.joy_idx);
|
||||
|
||||
case RETRO_DEVICE_LIGHTGUN:
|
||||
return gx_lightgun_state(gx, id, joypad_info.joy_idx);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -110,10 +215,36 @@ static void gx_input_free_input(void *data)
|
||||
|
||||
if (gx->joypad)
|
||||
gx->joypad->destroy();
|
||||
|
||||
#ifdef HW_RVL
|
||||
if(gx->mouse)
|
||||
free(gx->mouse);
|
||||
#endif
|
||||
free(gx);
|
||||
}
|
||||
|
||||
#ifdef HW_RVL
|
||||
static inline int gx_count_mouse(gx_input_t *gx)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if(gx)
|
||||
{
|
||||
for(int i=0; i<DEFAULT_MAX_PADS; i++)
|
||||
{
|
||||
if(gx->joypad->name(i))
|
||||
{
|
||||
if(!strcmp(gx->joypad->name(i), "Wiimote Controller"))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void *gx_input_init(const char *joypad_driver)
|
||||
{
|
||||
gx_input_t *gx = (gx_input_t*)calloc(1, sizeof(*gx));
|
||||
@@ -121,23 +252,80 @@ static void *gx_input_init(const char *joypad_driver)
|
||||
return NULL;
|
||||
|
||||
gx->joypad = input_joypad_init_driver(joypad_driver, gx);
|
||||
|
||||
#ifdef HW_RVL
|
||||
/* Allocate at least 1 mouse at startup */
|
||||
gx->mouse_max = 1;
|
||||
gx->mouse = (gx_input_mouse_t*) calloc(gx->mouse_max, sizeof(gx_input_mouse_t));
|
||||
#endif
|
||||
return gx;
|
||||
}
|
||||
|
||||
#ifdef HW_RVL
|
||||
static void gx_input_poll_mouse(gx_input_t *gx)
|
||||
{
|
||||
int count = 0;
|
||||
count = gx_count_mouse(gx);
|
||||
|
||||
if(gx && count > 0)
|
||||
{
|
||||
if(count != gx->mouse_max)
|
||||
{
|
||||
gx_input_mouse_t* tmp = NULL;
|
||||
|
||||
tmp = (gx_input_mouse_t*)realloc(gx->mouse, count * sizeof(gx_input_mouse_t));
|
||||
if(!tmp)
|
||||
{
|
||||
free(gx->mouse);
|
||||
}
|
||||
else
|
||||
{
|
||||
gx->mouse = tmp;
|
||||
gx->mouse_max = count;
|
||||
|
||||
for(int i=0; i<gx->mouse_max; i++)
|
||||
{
|
||||
gx->mouse[i].x_last = 0;
|
||||
gx->mouse[i].y_last = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(unsigned i=0; i<gx->mouse_max; i++)
|
||||
{
|
||||
gx->mouse[i].x_last = gx->mouse[i].x_abs;
|
||||
gx->mouse[i].y_last = gx->mouse[i].y_abs;
|
||||
gx_joypad_read_mouse(i, &gx->mouse[i].x_abs, &gx->mouse[i].y_abs, &gx->mouse[i].button);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void gx_input_poll(void *data)
|
||||
{
|
||||
gx_input_t *gx = (gx_input_t*)data;
|
||||
|
||||
if (gx && gx->joypad)
|
||||
{
|
||||
gx->joypad->poll();
|
||||
#ifdef HW_RVL
|
||||
if(gx->mouse)
|
||||
gx_input_poll_mouse(gx);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static uint64_t gx_input_get_capabilities(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
#ifdef HW_RVL
|
||||
return (1 << RETRO_DEVICE_JOYPAD) |
|
||||
(1 << RETRO_DEVICE_ANALOG) |
|
||||
(1 << RETRO_DEVICE_MOUSE) |
|
||||
(1 << RETRO_DEVICE_LIGHTGUN);
|
||||
#else
|
||||
return (1 << RETRO_DEVICE_JOYPAD) |
|
||||
(1 << RETRO_DEVICE_ANALOG);
|
||||
#endif
|
||||
}
|
||||
|
||||
static const input_device_driver_t *gx_input_get_joypad_driver(void *data)
|
||||
|
||||
@@ -519,7 +519,7 @@ static bool udev_input_add_device(udev_input_t *udev,
|
||||
else
|
||||
{
|
||||
device->mouse.x_min = absinfo.minimum;
|
||||
device->mouse.x_min = absinfo.maximum;
|
||||
device->mouse.x_max = absinfo.maximum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ static bool udev_input_add_device(udev_input_t *udev,
|
||||
else
|
||||
{
|
||||
device->mouse.y_min = absinfo.minimum;
|
||||
device->mouse.y_min = absinfo.maximum;
|
||||
device->mouse.y_max = absinfo.maximum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,18 +106,9 @@ static bool x_mouse_button_pressed(
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
return x_mouse_state_wheel( key );
|
||||
|
||||
/* case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
result = x11->mouse_hwu;
|
||||
x11->mouse_hwu = false;
|
||||
return result;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
result = x11->mouse_hwd;
|
||||
x11->mouse_hwd = false;
|
||||
return result;
|
||||
*/
|
||||
return x_mouse_state_wheel( key );
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -237,6 +228,8 @@ static int16_t x_mouse_state(x11_input_t *x11, unsigned id)
|
||||
return x11->mouse_r;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
return x_mouse_state_wheel(id);
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
return x11->mouse_m;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#define WPADInit WPAD_Init
|
||||
#define WPADDisconnect WPAD_Disconnect
|
||||
#define WPADProbe WPAD_Probe
|
||||
#define WPADSetDataFormat WPAD_SetDataFormat
|
||||
#endif
|
||||
|
||||
#define WPAD_EXP_SICKSAXIS 252
|
||||
@@ -41,6 +42,28 @@
|
||||
#define NUM_DEVICES 1
|
||||
#endif
|
||||
|
||||
#ifdef HW_RVL
|
||||
#define MAX_MOUSEBUTTONS 6
|
||||
static const uint32_t gx_mousemask[MAX_MOUSEBUTTONS] =
|
||||
{
|
||||
WPAD_BUTTON_B,
|
||||
WPAD_BUTTON_A,
|
||||
WPAD_BUTTON_1,
|
||||
WPAD_BUTTON_2,
|
||||
WPAD_BUTTON_PLUS,
|
||||
WPAD_BUTTON_MINUS
|
||||
};
|
||||
|
||||
struct gx_mousedata
|
||||
{
|
||||
int32_t x, y;
|
||||
uint32_t mouse_button;
|
||||
bool valid;
|
||||
};
|
||||
|
||||
static struct gx_mousedata gx_mouse[2];
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
GX_GC_A = 0,
|
||||
@@ -102,6 +125,8 @@ static uint32_t pad_type[DEFAULT_MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_N
|
||||
static int16_t analog_state[DEFAULT_MAX_PADS][2][2];
|
||||
static bool g_menu = false;
|
||||
|
||||
static bool gx_joypad_query_pad(unsigned pad);
|
||||
|
||||
#ifdef HW_RVL
|
||||
static bool g_quit = false;
|
||||
|
||||
@@ -116,6 +141,47 @@ static void reset_cb(void)
|
||||
g_menu = true;
|
||||
}
|
||||
|
||||
#ifdef HW_RVL
|
||||
static inline void gx_mouse_info(uint32_t joybutton, unsigned port)
|
||||
{
|
||||
uint8_t i;
|
||||
ir_t ir;
|
||||
|
||||
/* Get the IR data from the wiimote */
|
||||
WPAD_IR(port, &ir);
|
||||
if (ir.valid)
|
||||
{
|
||||
gx_mouse[port].valid = true;
|
||||
gx_mouse[port].x = ir.x;
|
||||
gx_mouse[port].y = ir.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
gx_mouse[port].valid = false;
|
||||
}
|
||||
|
||||
/* reset button state */
|
||||
gx_mouse[port].mouse_button = 0;
|
||||
for (i = 0; i < MAX_MOUSEBUTTONS; i++)
|
||||
gx_mouse[port].mouse_button |= (joybutton & gx_mousemask[i]) ? (1 << i) : 0;
|
||||
|
||||
/* Small adjustment to match the RA buttons */
|
||||
gx_mouse[port].mouse_button = gx_mouse[port].mouse_button << 2;
|
||||
}
|
||||
|
||||
bool gxpad_mousevalid(unsigned port)
|
||||
{
|
||||
return gx_mouse[port].valid;
|
||||
}
|
||||
|
||||
void gx_joypad_read_mouse(unsigned port, int *irx, int *iry, uint32_t *button)
|
||||
{
|
||||
*irx = gx_mouse[port].x;
|
||||
*iry = gx_mouse[port].y;
|
||||
*button = gx_mouse[port].mouse_button;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *gx_joypad_name(unsigned pad)
|
||||
{
|
||||
switch (pad_type[pad])
|
||||
@@ -150,6 +216,33 @@ static void handle_hotplug(unsigned port, uint32_t ptype)
|
||||
);
|
||||
}
|
||||
|
||||
static void check_port0_active(uint8_t pad_count)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
int idx = settings->uints.input_joypad_map[0];
|
||||
|
||||
if(pad_count < 2 && idx != 0)
|
||||
{
|
||||
#ifdef HW_RVL
|
||||
pad_type[0] = WPAD_EXP_NONE;
|
||||
#else
|
||||
pad_type[0] = WPAD_EXP_GAMECUBE;
|
||||
#endif
|
||||
settings->uints.input_joypad_map[0] = 0;
|
||||
|
||||
input_autoconfigure_connect(
|
||||
gx_joypad_name(0),
|
||||
NULL,
|
||||
gx_joypad.ident,
|
||||
0, // port
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
||||
input_config_set_device_name(0, gx_joypad_name(0));
|
||||
}
|
||||
}
|
||||
|
||||
static bool gx_joypad_button(unsigned port, uint16_t key)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
@@ -309,6 +402,7 @@ static int16_t WPAD_StickY(WPADData *data, u8 right)
|
||||
static void gx_joypad_poll(void)
|
||||
{
|
||||
unsigned i, j, port;
|
||||
uint8_t pad_count = 0;
|
||||
uint8_t gcpad = 0;
|
||||
uint64_t state_p1;
|
||||
uint64_t check_menu_toggle;
|
||||
@@ -381,6 +475,11 @@ static void gx_joypad_poll(void)
|
||||
|
||||
down = wpaddata->btns_h;
|
||||
|
||||
/* Mouse & Lightgun: Retrieve IR data */
|
||||
if (ptype == WPAD_EXP_NONE)
|
||||
if (port == WPAD_CHAN_0 || port == WPAD_CHAN_1)
|
||||
gx_mouse_info(wpaddata->btns_h, port);
|
||||
|
||||
*state_cur |= (down & WPAD_BUTTON_A) ? (UINT64_C(1) << GX_WIIMOTE_A) : 0;
|
||||
*state_cur |= (down & WPAD_BUTTON_B) ? (UINT64_C(1) << GX_WIIMOTE_B) : 0;
|
||||
*state_cur |= (down & WPAD_BUTTON_1) ? (UINT64_C(1) << GX_WIIMOTE_1) : 0;
|
||||
@@ -389,6 +488,8 @@ static void gx_joypad_poll(void)
|
||||
*state_cur |= (down & WPAD_BUTTON_MINUS) ? (UINT64_C(1) << GX_WIIMOTE_MINUS) : 0;
|
||||
*state_cur |= (down & WPAD_BUTTON_HOME) ? (UINT64_C(1) << GX_WIIMOTE_HOME) : 0;
|
||||
|
||||
|
||||
|
||||
if (ptype != WPAD_EXP_NUNCHUK)
|
||||
{
|
||||
/* Rotated d-pad on Wiimote. */
|
||||
@@ -439,6 +540,14 @@ static void gx_joypad_poll(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Count active controllers */
|
||||
if(gx_joypad_query_pad(port))
|
||||
pad_count++;
|
||||
|
||||
/* Always enable 1 pad in port 0 if there's only 1 controller connected.
|
||||
* This avoids being stuck in rgui input settings. */
|
||||
check_port0_active(pad_count);
|
||||
|
||||
if (ptype != pad_type[port])
|
||||
handle_hotplug(port, ptype);
|
||||
|
||||
@@ -482,6 +591,9 @@ static bool gx_joypad_init(void *data)
|
||||
PAD_Init();
|
||||
#ifdef HW_RVL
|
||||
WPADInit();
|
||||
/* Set IR for all wiimotes */
|
||||
WPAD_SetVRes(WPAD_CHAN_ALL,640,480);
|
||||
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
||||
#endif
|
||||
|
||||
gx_joypad_poll();
|
||||
|
||||
@@ -96,6 +96,13 @@ enum overlay_visibility
|
||||
OVERLAY_VISIBILITY_HIDDEN
|
||||
};
|
||||
|
||||
enum overlay_orientation
|
||||
{
|
||||
OVERLAY_ORIENTATION_NONE = 0,
|
||||
OVERLAY_ORIENTATION_LANDSCAPE,
|
||||
OVERLAY_ORIENTATION_PORTRAIT
|
||||
};
|
||||
|
||||
struct overlay
|
||||
{
|
||||
bool full_screen;
|
||||
|
||||
+3
-1
@@ -1059,7 +1059,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Throttle Menu Framerate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Settings")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -4118,3 +4118,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"إحذف قائمة التشغيل")
|
||||
+4
-2
@@ -1053,7 +1053,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"限制菜单帧率")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, /* TODO/FIXME - update */
|
||||
"菜单文件浏览器")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"菜单线性过滤")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -1751,7 +1751,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM,
|
||||
"MM/DD HH:MM")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"HH:MM:SS (AM/PM)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TRUE,
|
||||
"是")
|
||||
@@ -5136,3 +5136,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"删除播放列表")
|
||||
+3
-1
@@ -993,7 +993,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"限制選單幀率")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, /* TODO/FIXME - update */
|
||||
"選單文件瀏覽器")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"選單線性過濾")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -3894,3 +3894,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"刪除播放清單")
|
||||
+3
-1
@@ -1030,7 +1030,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Bildwiederholrate im Menü begrenzen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Einstellungen")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Linearer Filter für Menü")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -4023,3 +4023,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Wiedergabeliste löschen")
|
||||
+2
-2
@@ -1608,7 +1608,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Ρυθμίσεις"
|
||||
"File Browser"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
@@ -2951,7 +2951,7 @@ MSG_HASH(
|
||||
"ΜΜ/ΗΗ ΩΩ:ΛΛ"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"ΩΩ:ΛΛ:ΔΔ (ΠΜ/ΜΜ)"
|
||||
)
|
||||
MSG_HASH(
|
||||
|
||||
+3
-1
@@ -914,7 +914,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Throttle Menu Framerate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Menu File Browser")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -3782,3 +3782,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Forigi ludliston")
|
||||
+3
-1
@@ -3019,7 +3019,7 @@ MSG_HASH(
|
||||
"MM/DD HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"HH:MM:SS (AM/PM)"
|
||||
)
|
||||
MSG_HASH(
|
||||
@@ -8252,3 +8252,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Borrar lista de reproducción")
|
||||
+3
-1
@@ -3220,7 +3220,7 @@ MSG_HASH(
|
||||
"MM/JJ HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"HH:MM:SS (AM/PM)"
|
||||
)
|
||||
MSG_HASH(
|
||||
@@ -9040,3 +9040,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Supprimer la liste de lecture")
|
||||
+3
-1
@@ -1032,7 +1032,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Frequenza dei fotogrammi nel menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Impostazioni")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Filtro lineare del Menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -4003,3 +4003,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Elimina scaletta")
|
||||
+6
-2
@@ -1753,7 +1753,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"設定"
|
||||
"File Browser"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
@@ -3408,7 +3408,7 @@ MSG_HASH(
|
||||
"月/日 時:分"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"時:分:秒 (午前/午後)"
|
||||
)
|
||||
MSG_HASH(
|
||||
@@ -9745,3 +9745,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY,
|
||||
"シェーダの自動ロード遅延 (ms)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"プレイリストを削除"
|
||||
)
|
||||
+392
-34
@@ -389,6 +389,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUTO_REMAPS_ENABLE,
|
||||
"입력 설정 파일 자동으로 불러오기"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_GLOBAL_CORE_OPTIONS,
|
||||
"광역 코어 옵션 파일 사용"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_GLOBAL_CORE_OPTIONS,
|
||||
"모든 코어 설정을 공통의 설정 파일로 저장합니다.(retroarch-core-options.cfg). 사용 해제시 RetroArch의 'Config'폴더에 각각의 코어별로 지정된 폴더/파일로 설정이 저장됩니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUTO_SHADERS_ENABLE,
|
||||
"쉐이드 프리셋 자동으로 불러오기"
|
||||
@@ -613,6 +621,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE,
|
||||
"실행 기록 목록 크기"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE,
|
||||
"즐겨찾기 목록 크기"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE,
|
||||
"즐겨찾기 목록의 항목 수를 제한합니다. 제한 수량을 채우면 이전 목록을 삭제하기 전까지 추가 저장이 제한됩니다. 설정값을 -1로 하면 '무제한'(99999)으로 설정됩니다. 경고: 값을 줄이면 기존 항목이 삭제 될 수 있음!"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE,
|
||||
"항목 삭제 허용"
|
||||
@@ -685,6 +701,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_NAME,
|
||||
"시스템 이름"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_INFO_REQUIRED_HW_API,
|
||||
"그래픽 API 필요"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_INPUT_REMAPPING_OPTIONS,
|
||||
"컨트롤"
|
||||
@@ -1718,7 +1738,7 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"설정"
|
||||
"File Browser"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
@@ -2020,6 +2040,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND,
|
||||
"설정 항목 없음."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND,
|
||||
"자동 쉐이더 프리셋 찾지 못함."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_NO_SHADER_PARAMETERS,
|
||||
"쉐이더 매개변수 없음."
|
||||
@@ -2140,6 +2164,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO,
|
||||
"메뉴 실행 시 일시정지"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME,
|
||||
"상태저장 후 컨텐츠 이어하기"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME,
|
||||
"빠른 메뉴에서 '상태저장' 또는 '상태저장 불러오기' 실행 후 자동으로 메뉴를 닫고 현재 컨텐츠를 이어합니다. 해제시 느린 기기에서 상태저장 성능을 개선 할 수 있습니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE,
|
||||
"배경에서 실행하지 않음"
|
||||
@@ -2160,6 +2192,38 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS,
|
||||
"실행목록"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST,
|
||||
"실행목록 관리"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST,
|
||||
"선택된 실행목록의 관리 작업을 수행합니다(예: 기본 코어 연결 설정/초기화 등)."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_DEFAULT_CORE,
|
||||
"기본 코어"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_DEFAULT_CORE,
|
||||
"실행목록을 통해 실행시 기존에 연결된 코어가 없는 항목에 사용할 코어를 지정합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_RESET_CORES,
|
||||
"코어 연결 초기화"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_RESET_CORES,
|
||||
"실행목록 항목의 기존 코어 연결을 삭제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_PLAYLIST_MANAGER_RESETTING_CORES,
|
||||
"코어 초기화 중: "
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_PLAYLIST_MANAGER_CORES_RESET,
|
||||
"코어 초기화: "
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE,
|
||||
"라벨 디스플레이 모드"
|
||||
@@ -2196,6 +2260,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION_AND_DISC_INDEX,
|
||||
"지역 미치 디스크 인덱스 유지"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT,
|
||||
"시스템 기본"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_POINTER_ENABLE,
|
||||
"터치 지원"
|
||||
@@ -2558,6 +2626,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_DOWNLOAD_PL_ENTRY_THUMBNAILS,
|
||||
"현재 컨텐츠의 스크린샷/박스아트/타이틀 화면의 미리보기 이미지를 다운로드합니다. 사용 가능한 미리보기를 업데이트 해줍니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SET_CORE_ASSOCIATION,
|
||||
"코어 연결 설정"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION,
|
||||
"코어 연결 초기화"
|
||||
@@ -3315,7 +3387,7 @@ MSG_HASH(
|
||||
"MM/DD HH:MM"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS_AM_PM,
|
||||
"HH:MM:SS (AM/PM)"
|
||||
)
|
||||
MSG_HASH(
|
||||
@@ -3342,6 +3414,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED,
|
||||
"긴 메뉴 항목 스크롤시 사용할 애니메이션 속도입니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH,
|
||||
"부드러운 한 줄 텍스트"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH,
|
||||
"긴 메뉴 텍스트등을 표시할때 부드럽게 스크롤합니다. 성능에 작은 영향을 줄 수 있습니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME,
|
||||
"메뉴 색상 테마"
|
||||
@@ -3708,6 +3788,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY,
|
||||
"프레임 지연"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY,
|
||||
"자동-쉐이더 지연"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN,
|
||||
"전체화면 모드 사용"
|
||||
@@ -3804,10 +3888,18 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET,
|
||||
"쉐이더 프리셋 불러오기"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE,
|
||||
"저장"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS,
|
||||
"쉐이더 프리셋 다른 이름으로 저장"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GLOBAL,
|
||||
"광역 설정 저장"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE,
|
||||
"코어 프리셋 저장"
|
||||
@@ -4375,6 +4467,14 @@ MSG_HASH(
|
||||
MSG_ADDED_TO_FAVORITES,
|
||||
"즐겨찾기에 추가"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_ADD_TO_FAVORITES_FAILED,
|
||||
"즐겨찾기에 추가하지 못했습니다:실행목록 가득참"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_SET_CORE_ASSOCIATION,
|
||||
"코어 설정: "
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_RESET_CORE_ASSOCIATION,
|
||||
"실행목록 상의 코어 연결이 초기화 되었습니다."
|
||||
@@ -4615,6 +4715,10 @@ MSG_HASH(
|
||||
MSG_FAILED_TO_APPLY_SHADER,
|
||||
"쉐이더 적용 실패."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_FAILED_TO_APPLY_SHADER_PRESET,
|
||||
"쉐이더 프리셋을 적용하지 못했습니다:"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_FAILED_TO_BIND_SOCKET,
|
||||
"소켓 연결 실패."
|
||||
@@ -4879,6 +4983,10 @@ MSG_HASH(
|
||||
MSG_LOADING_HISTORY_FILE,
|
||||
"실행목록 파일 불러오는 중"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_LOADING_FAVORITES_FILE,
|
||||
"즐겨찾기 파일 불러오는 중"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_LOADING_STATE,
|
||||
"상태저장 불러오는 중"
|
||||
@@ -5792,11 +5900,11 @@ MSG_HASH(
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS,
|
||||
"Left/Right to change value"
|
||||
"좌/우 로 값 변경"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQMINUS,
|
||||
"Left/Right to change value"
|
||||
"좌/우 로 값 변경"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CHEAT_ADD_MATCHES,
|
||||
@@ -6500,6 +6608,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET,
|
||||
"쉐이더 프리셋을 불러옵니다. 쉐이더 파이프라인이 자동으로 설정됩니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE,
|
||||
"현재 쉐이서 프리셋을 저장합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS,
|
||||
"현재 쉐이더 설정을 새로운 프리셋으로 저장합니다."
|
||||
@@ -6516,6 +6628,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME,
|
||||
"현재 쉐이더 설정을 컨텐츠의 기본 값으로 저장합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL,
|
||||
"현재 쉐이더 설정을 기본 광역 설정으로 저장합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS,
|
||||
"현재 쉐이더를 직접 변경합니다. 변경사항이 프리셋 파일로 저장되진 않습니다."
|
||||
@@ -6788,6 +6904,22 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT,
|
||||
"컨텐츠 불러오기란을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_DISC,
|
||||
"디스크 불러오기 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_DISC,
|
||||
"'디스크 불러오기'옵션을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SHOW_DUMP_DISC,
|
||||
"디스크 덤프 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SHOW_DUMP_DISC,
|
||||
"'디스크 덤프'옵션을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION,
|
||||
"정보 표시"
|
||||
@@ -6911,13 +7043,21 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
|
||||
"방송 시작 설정란을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION,
|
||||
"코어 연결 설정 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION,
|
||||
"'코어 연결 설정'을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"코어 리스트 초기화 표시"
|
||||
"코어 연결 초기화 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
|
||||
"코어 리스트 초기화 설정란을 표시/해제합니다."
|
||||
"'코어 연결 초기화' 설정란을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
|
||||
@@ -7223,6 +7363,14 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_STARFIELD,
|
||||
"별"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT_SPEED,
|
||||
"배경 애니메이션 속도"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT_SPEED,
|
||||
"배경 입자 애니메이션 효과의 속도를 조정합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_RGUI_EXTENDED_ASCII,
|
||||
"확장 ASCII 지원"
|
||||
@@ -8410,6 +8558,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QT_REMOVE,
|
||||
"삭제"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QT_REMOVE_PASSES,
|
||||
"패스 삭제"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QT_APPLY,
|
||||
"적용"
|
||||
@@ -8659,6 +8811,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR,
|
||||
"왼쪽 사이드바를 항상 중첩되게 합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"실행목록 이름 단축"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"사용할 경우 실행목록 상의 시스템 이름을 숨김니다. 예를 들면 'Sony - PlayStation' 대신에 'PlayStation'으로 표시됩니다. 변경사항을 적용하려면 재시작해야 합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
|
||||
"선호된 시스템 색상 테마 사용"
|
||||
@@ -8911,34 +9071,34 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_LOG_DIR,
|
||||
"시스템 이벤트 로그 파일을 디렉토리에 저장합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE,
|
||||
"메뉴 위젯"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADERS_ENABLE,
|
||||
"비디오 쉐이더"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH,
|
||||
"코어 매치 없이 스캔"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH,
|
||||
"사용하지 않을 시 이미 설치된 코어에 한정해서 실행목록에 추가합니다. 사용할 시 코어 설치여부에 상관없이 실행목록에 추가되고 이 방법으로 스캔이 끝난 후에 필요한 코어를 설치할 수 있습니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT,
|
||||
"수평 아이콘 하이라이트 애니메이션"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
|
||||
"위/아래 이동 애니메이션"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
|
||||
"메뉴 열기/닫기 애니메이션"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE,
|
||||
"메뉴 위젯")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SHADERS_ENABLE,
|
||||
"비디오 쉐이더")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH,
|
||||
"코어 검색 없이 스캔")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH,
|
||||
"해제할 경우 설치된 코어가 지원되는 확장자만 실행목록에 추가됩니다. 설정하면 상관없이 추가됩니다. 스캐닝 이후에 코어를 설치할때 사용합니다.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT,
|
||||
"수직 아이콘 강조 애니메이션")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
|
||||
"상/하 이동 애니메이션")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
|
||||
"메뉴 열기/닫기 애니메이션")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_GPU_INDEX,
|
||||
"GPU 인덱스")
|
||||
MSG_HASH(MSG_DUMPING_DISC,
|
||||
"디스크 덤프 중...")
|
||||
MSG_HASH(MSG_DRIVE_NUMBER,
|
||||
"드라이브%d")
|
||||
MSG_HASH(MSG_LOAD_CORE_FIRST,
|
||||
"코어를 먼저 불러와주십시오.")
|
||||
MSG_HASH(MSG_DISC_DUMP_FAILED_TO_READ_FROM_DRIVE,
|
||||
"드라이브 읽기 실패. 덤프 취소됨.")
|
||||
MSG_HASH(MSG_DISC_DUMP_FAILED_TO_WRITE_TO_DISK,
|
||||
"디스크 기록 실패. 덤프 취소됨.")
|
||||
MSG_HASH(MSG_NO_DISC_INSERTED,
|
||||
"드라이브에 디스크가 없습니다.")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_DISC_INFORMATION,
|
||||
"디스크 정보"
|
||||
@@ -8947,6 +9107,18 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_DISC_INFORMATION,
|
||||
"삽입된 미디어 디스크의 정보를 봅니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_INCOMPATIBLE_CORE_FOR_VIDEO_DRIVER,
|
||||
"현재 코어가 비디오 드라이버와 호환되지 않습니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QT_RESET,
|
||||
"초기화"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_QT_RESET_ALL,
|
||||
"모두 초기화"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL,
|
||||
"프론트엔드 로그 레벨"
|
||||
@@ -8983,6 +9155,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESUME_CONTENT,
|
||||
"'컨텐츠 이어하기' 옵션을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS,
|
||||
"설정"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS,
|
||||
"설정화면 항목을 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT,
|
||||
"입력 표시"
|
||||
@@ -9199,6 +9379,158 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_LANG_YIDDISH,
|
||||
"이디시어"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DRIVERS,
|
||||
"드라이버 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS,
|
||||
"'드라이버 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO,
|
||||
"비디오 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_VIDEO,
|
||||
"'비디오 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO,
|
||||
"오디오 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AUDIO,
|
||||
"'오디오 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY,
|
||||
"지연시간 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LATENCY,
|
||||
"'지연시간 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE,
|
||||
"코어 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CORE,
|
||||
"'코어 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CONFIGURATION,
|
||||
"환경설정 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CONFIGURATION,
|
||||
"'환경설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_SAVING,
|
||||
"저장 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_SAVING,
|
||||
"'저장 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LOGGING,
|
||||
"로그 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LOGGING,
|
||||
"'로그 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_FRAME_THROTTLE,
|
||||
"프레임 조절 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_FRAME_THROTTLE,
|
||||
"'프레임 조절 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING,
|
||||
"녹화 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_RECORDING,
|
||||
"'녹화 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ONSCREEN_DISPLAY,
|
||||
"OSD 항목 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY,
|
||||
"'OSD 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER_INTERFACE,
|
||||
"사용자 인터페이스 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER_INTERFACE,
|
||||
"'사용자 인터페이스 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AI_SERVICE,
|
||||
"AI 서비스 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AI_SERVICE,
|
||||
"'AI 서비스 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_POWER_MANAGEMENT,
|
||||
"전력 관리 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_POWER_MANAGEMENT,
|
||||
"'전력 관리 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ACHIEVEMENTS,
|
||||
"도전과제 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ACHIEVEMENTS,
|
||||
"'도전과제 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK,
|
||||
"네트워크 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_NETWORK,
|
||||
"'네트워크 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_PLAYLISTS,
|
||||
"실행목록 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_PLAYLISTS,
|
||||
"'실행목록 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER,
|
||||
"사용자 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER,
|
||||
"'사용자 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY,
|
||||
"디렉토리 표시"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DIRECTORY,
|
||||
"'디렉토리 설정'을 설정화면에 표시/해제합니다."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_LOAD_DISC,
|
||||
"물리 미디어 디스크를 불러옵니다. 먼저 디스크와 사용할 코어를 선택해야 합니다.(코어 불러오기)")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_DUMP_DISC,
|
||||
@@ -9241,9 +9573,35 @@ MSG_HASH(
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
|
||||
"특정 게임에만 적용되는 게임 프리셋을 삭제합니다.")
|
||||
MSG_HASH(
|
||||
MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY,
|
||||
"쉐이더 프리셋이 성공적으로 삭제되었습니다.")
|
||||
MSG_HASH(
|
||||
MSG_ERROR_REMOVING_SHADER_PRESET,
|
||||
"쉐이더 프리셋 삭제 오류.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"프레임 타임 카운터")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"프레임 타임 카운터에 영향을 주는 설정을 조정합니다.(스레드된 비디오가 해제 되었을 경우에만 사용가능합니다)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
|
||||
"빨리감기 후 초기화")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
|
||||
"빨리감기 후 프레임 타임 카운터를 초기화합니다.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
|
||||
"상태저장 불러오기 후 초기화")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
|
||||
"상태저장 불러오기 후 프레임 타임 카운터를 초기화합니다.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
|
||||
"상태저장 후 초기화")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
|
||||
"상태저장 후 프레임 타임 카운터를 초기화합니다.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"이전 문자 위주의 시스템 텍스트 대신 모던하고 세련된 애니메이션, 알림, 표시 및 컨트롤을 사용합니다.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT,
|
||||
"탭사이를 스크롤 할때 발생하는 애니메이션입니다.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
|
||||
"위 아래를 움직일때 발생하는 애니메이션입니다.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
|
||||
"메뉴를 열때 발생하는 애니메이션입니다.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"재생목록 삭제")
|
||||
@@ -567,6 +567,10 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_ANALOG_DEADZONE,
|
||||
"input_analog_deadzone")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_ANALOG_SENSITIVITY,
|
||||
"input_analog_sensitivity")
|
||||
#ifdef GEKKO
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_MOUSE_SCALE,
|
||||
"input_mouse_scale")
|
||||
#endif
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_MODE,
|
||||
"input_bind_mode")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT,
|
||||
@@ -607,6 +611,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT,
|
||||
"overlay_show_physical_inputs_port")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
"overlay_show_mouse_cursor")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_AUTO_ROTATE,
|
||||
"input_overlay_auto_rotate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE,
|
||||
"input_player%u_analog_dpad_mode")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR,
|
||||
@@ -717,6 +723,8 @@ MSG_HASH(MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR,
|
||||
"ozone_collapse_sidebar")
|
||||
MSG_HASH(MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"ozone_truncate_playlist_name")
|
||||
MSG_HASH(MENU_ENUM_LABEL_OZONE_SCROLL_CONTENT_METADATA,
|
||||
"ozone_scroll_content_metadata")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
"materialui_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY,
|
||||
@@ -1985,6 +1993,8 @@ MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH,
|
||||
"playlist_fuzzy_archive_match")
|
||||
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE,
|
||||
"playlist_sublabel_runtime_type")
|
||||
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE,
|
||||
"playlist_sublabel_last_played_style")
|
||||
MSG_HASH(MENU_ENUM_LABEL_HELP_SEND_DEBUG_INFO,
|
||||
"help_send_debug_info")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VIBRATE_ON_KEYPRESS,
|
||||
@@ -2075,3 +2085,5 @@ MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
|
||||
"frame_time_counter_reset_after_load_state")
|
||||
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
|
||||
"frame_time_counter_reset_after_save_state")
|
||||
MSG_HASH(MENU_ENUM_LABEL_DELETE_PLAYLIST,
|
||||
"delete_playlist")
|
||||
+3
-1
@@ -913,7 +913,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Throttle Menu Framerate")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Instellingen")
|
||||
"Betandenbeheer")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu Linear Filter")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -3776,3 +3776,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Afspeellijst verwijderen")
|
||||
+4
-1
@@ -1064,7 +1064,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Menu obrotowe przepustnicy częstotliwości wyświetlania klatek")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Ustawienia")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Menu filtra liniowego")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -4622,3 +4622,6 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FPS_UPDATE_INTERVAL,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_START_CORE,
|
||||
"Zacznij rdzeń bez zawartości."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Usuń listę odtwarzania"
|
||||
)
|
||||
@@ -742,7 +742,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
" \n";
|
||||
snprintf(u, sizeof(u), /* can't inline this due to the printf arguments */
|
||||
"a) Vá para '%s' -> '%s', e habilite \n"
|
||||
"'Video Paralelizado'. A taxa de atualização \n"
|
||||
"'Vídeo Paralelizado'. A taxa de atualização \n"
|
||||
"não irá importar neste modo, a taxa de \n"
|
||||
"quadros será maior, mas o vídeo será \n"
|
||||
"menos fluído. \n"
|
||||
@@ -1523,6 +1523,14 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
" \n"
|
||||
"O máximo é 15.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_DELAY:
|
||||
snprintf(s, len,
|
||||
"Define por quantos milissegundos o carregamento automático\n"
|
||||
"de shaders será atrasado.\n"
|
||||
"\n"
|
||||
"Pode solucionar problemas gráficos devido ao uso de \n"
|
||||
"software de 'captura de tela', como software de streaming.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES:
|
||||
snprintf(s, len,
|
||||
"Define quantos quadros a CPU pode rodar \n"
|
||||
|
||||
+483
-201
File diff suppressed because it is too large.
Load diff
@@ -978,7 +978,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Acelerar taxa de fotogramas do menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Definições")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Filtro linear do menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -3848,3 +3848,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Apagar a lista de reprodução")
|
||||
+3
-1
@@ -996,7 +996,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
|
||||
"Максимальная частота кадров меню")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
|
||||
"Настройки")
|
||||
"File Browser")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
"Линейный фильтр меню")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
|
||||
@@ -4046,3 +4046,5 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
|
||||
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
|
||||
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST,
|
||||
"Удалить список воспроизведения")
|
||||
+72
-72
@@ -273,7 +273,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"kullanılan yazı tipini değiştirin.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS:
|
||||
snprintf(s, len, "İçeriğe özgü Core seçeneklerini otomatik olarak yükle.");
|
||||
snprintf(s, len, "İçeriğe özgü Çekirdek seçeneklerini otomatik olarak yükle.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE:
|
||||
snprintf(s, len, "Üzerine yazma yapılandırmalarını otomatik olarak yükle.");
|
||||
@@ -287,7 +287,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE:
|
||||
snprintf(s, len, "Sıralama kullanılan libretro \n"
|
||||
"core adını klasörlerdeki dosyalarına kaydeder. ");
|
||||
"Çekirdek adını klasörlerdeki dosyalarına kaydeder. ");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RESUME_CONTENT:
|
||||
snprintf(s, len, "Menüden çıkar ve içeriğe geri döner.");
|
||||
@@ -359,9 +359,9 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LIBRETRO_INFO_PATH:
|
||||
snprintf(s, len,
|
||||
"Core Bilgi Dizini. \n"
|
||||
"Çekirdek Bilgi Dizini. \n"
|
||||
" \n"
|
||||
"Libretro core bilgisini nerede \n"
|
||||
"Libretro Çekirdek bilgisini nerede \n"
|
||||
"arayacağınıza dair bir dizin.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_PLAYLIST_DIRECTORY:
|
||||
@@ -380,7 +380,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"kapatma prosedürünün seçilmesi RetroArch'in \n"
|
||||
"kapatılmasını tetikler. \n"
|
||||
" \n"
|
||||
"Bu seçeneği etkinleştirmek kukla bir core \n"
|
||||
"Bu seçeneği etkinleştirmek kukla bir Çekirdek \n"
|
||||
"yükler böylelikle menüde kalırız \n"
|
||||
"ve RetroArch kapanmaz.");
|
||||
break;
|
||||
@@ -522,7 +522,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND:
|
||||
snprintf(s, len,
|
||||
"Core tarafından ayarlanmamış giriş \n"
|
||||
"Çekirdek tarafından ayarlanmamış giriş \n"
|
||||
"tanımlayıcılarını gizleyin.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE:
|
||||
@@ -560,7 +560,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:
|
||||
snprintf(s, len,
|
||||
"Varsayılan olanların yerine \n"
|
||||
"Core tarafından ayarlanan giriş tanımlayıcılarını gösterin.");
|
||||
"Çekirdek tarafından ayarlanan giriş tanımlayıcılarını gösterin.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE:
|
||||
snprintf(s, len,
|
||||
@@ -659,15 +659,15 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_LIST:
|
||||
snprintf(s, len,
|
||||
"Core yükle. \n"
|
||||
"Çekirdek Yükle. \n"
|
||||
" \n"
|
||||
"Libretro Core uygulaması \n"
|
||||
"Libretro Çekirdek uygulaması \n"
|
||||
"için göz atın. Tarayıcının başladığı yer \n"
|
||||
"Core Dizin yolunuza bağlıdır \n"
|
||||
"Çekirdek Dizin yolunuza bağlıdır \n"
|
||||
"Boşsa, root'ta başlayacaktır. \n"
|
||||
" \n"
|
||||
"Core Dizini bir dizinse, menü bunu üst klasör olarak kullanır. \n"
|
||||
"Core Dizini tam yol ise, \n"
|
||||
"Çekirdek Dizini bir dizinse, menü bunu üst klasör olarak kullanır. \n"
|
||||
"Çekirdek Dizini tam yol ise, \n"
|
||||
"dosyanın bulunduğu klasörde \n"
|
||||
"başlayacaktır.");
|
||||
break;
|
||||
@@ -796,7 +796,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"ayarlayın. Ayarlanmazsa, \n"
|
||||
"kök dizininden başlayacaktır. \n"
|
||||
" \n"
|
||||
"Tarayıcı, 'Core Yükle'den ayarlanan son Core \n"
|
||||
"Tarayıcı, 'Çekirdek Yükle'den ayarlanan son Çekirdek \n"
|
||||
"için uzantıları filtreleyecek ve içerik \n"
|
||||
"yüklendiğinde bu çekirdeği kullanacaktır."
|
||||
);
|
||||
@@ -806,7 +806,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Geçmişten içerik yükleniyor. \n"
|
||||
" \n"
|
||||
"İçerik yüklendikçe, içerik ve libretro \n"
|
||||
"Core kombinasyonları geçmişe kaydedilir. \n"
|
||||
"Çekirdek kombinasyonları geçmişe kaydedilir. \n"
|
||||
" \n"
|
||||
"Geçmiş, RetroArch yapılandırma dosyasıyla aynı \n"
|
||||
"dizindeki bir dosyaya kaydedilir. Başlangıçta hiçbir \n"
|
||||
@@ -824,11 +824,11 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"OpenGL Video sürücüsü. \n"
|
||||
" \n"
|
||||
"Bu sürücü, yazılım tarafından oluşturulan \n"
|
||||
"Core uygulamalarına ek olarak libretro GL \n"
|
||||
"Çekirdek uygulamalarına ek olarak libretro GL \n"
|
||||
"çekirdeklerinin kullanılmasına izin verir.\n"
|
||||
" \n"
|
||||
"Yazılım tarafından oluşturulan ve libretro GL \n"
|
||||
"Core uygulamaları için performans, \n"
|
||||
"Çekirdek uygulamaları için performans, \n"
|
||||
"grafik kartınızın temelindeki GL sürücüsüne bağlıdır.");
|
||||
}
|
||||
else if (string_is_equal(settings->arrays.video_driver, "sdl2"))
|
||||
@@ -839,7 +839,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Bu bir SDL 2 yazılımı tarafından oluşturulan \n"
|
||||
"video sürücüsüdür.\n"
|
||||
" \n"
|
||||
"Yazılım tarafından oluşturulan libretro Core uygulamaları \n"
|
||||
"Yazılım tarafından oluşturulan libretro Çekirdek uygulamaları \n"
|
||||
"için performans, SDL uygulamanıza bağlıdır.");
|
||||
}
|
||||
else if (string_is_equal(settings->arrays.video_driver, "sdl1"))
|
||||
@@ -858,7 +858,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Direct3D Video sürücüsü. \n"
|
||||
" \n"
|
||||
"Yazılım tarafından oluşturulan Core performansı,\n"
|
||||
"Yazılım tarafından oluşturulan Çekirdek performansı,\n"
|
||||
"grafik kartınızın temelindeki D3D \n"
|
||||
"sürücüsüne bağlıdır.");
|
||||
}
|
||||
@@ -871,7 +871,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Karışım işlemleri için Samsung Exynos SoC'daki \n"
|
||||
" G2D bloğunu kullanır. \n"
|
||||
" \n"
|
||||
"Yazılım tarafından oluşturulan Core performansı \n"
|
||||
"Yazılım tarafından oluşturulan Çekirdek performansı \n"
|
||||
"optimum olmalıdır.");
|
||||
}
|
||||
else if (string_is_equal(settings->arrays.video_driver, "drm"))
|
||||
@@ -1202,9 +1202,9 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LIBRETRO_DIR_PATH:
|
||||
snprintf(s, len,
|
||||
"Core Dizini. \n"
|
||||
"Çekirdek Dizini. \n"
|
||||
" \n"
|
||||
"Libretro Core uygulamalarının \n"
|
||||
"Libretro Çekirdek uygulamalarının \n"
|
||||
"aranacağı dizin. ");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO:
|
||||
@@ -1383,11 +1383,11 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_THREADED:
|
||||
snprintf(s, len,
|
||||
"Use threaded video driver.\n"
|
||||
"Threaded video sürücüsü kullanın.\n"
|
||||
" \n"
|
||||
"Using this might improve performance at the \n"
|
||||
"possible cost of latency and more video \n"
|
||||
"stuttering.");
|
||||
"Bunu kullanmak, olası gecikme maliyetinde \n"
|
||||
"ve daha fazla video kasılmasında performansı \n"
|
||||
"artırabilir.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_VSYNC:
|
||||
snprintf(s, len,
|
||||
@@ -1442,20 +1442,20 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES:
|
||||
snprintf(s, len,
|
||||
"Sets how many frames CPU can \n"
|
||||
"run ahead of GPU when using 'GPU \n"
|
||||
"Hard Sync'.\n"
|
||||
"'GPU Hard Sync' kullanırken CPU'nun \n"
|
||||
"kaç tane GPU önünde çalışabileceğini \n"
|
||||
"ayarlar.\n"
|
||||
" \n"
|
||||
"Maximum is 3.\n"
|
||||
"Maksimum 3.\n"
|
||||
" \n"
|
||||
" 0: Syncs to GPU immediately.\n"
|
||||
" 1: Syncs to previous frame.\n"
|
||||
" 0: Hemen GPU'ya senkronize edilir.\n"
|
||||
" 1: Önceki kareye senkronize eder.\n"
|
||||
" 2: Etc ...");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION:
|
||||
snprintf(s, len,
|
||||
"Inserts a black frame inbetween \n"
|
||||
"frames.\n"
|
||||
"Çerçevelerin arasına siyah bir \n"
|
||||
"çerçeve ekler.\n"
|
||||
" \n"
|
||||
"Useful for 120 Hz monitors who want to \n"
|
||||
"play 60 Hz material with eliminated \n"
|
||||
@@ -1467,12 +1467,12 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN:
|
||||
snprintf(s, len,
|
||||
"Show startup screen in menu.\n"
|
||||
"Is automatically set to false when seen\n"
|
||||
"for the first time.\n"
|
||||
"Menüde başlangıç ekranını göster.\n"
|
||||
"İlk kez görüldüğünde otomatik olarak \n"
|
||||
"false olarak ayarlanır.\n"
|
||||
" \n"
|
||||
"This is only updated in config if\n"
|
||||
"'Save Configuration on Exit' is enabled.\n");
|
||||
"Bu, yalnızca 'Çıkışta Konfigürasyonu Kaydet'\n"
|
||||
"etkinse config dosyasında güncellenir.\n");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN:
|
||||
snprintf(s, len, "Toggles fullscreen.");
|
||||
@@ -1574,10 +1574,10 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Duty cycle.\n"
|
||||
" \n"
|
||||
"Describes how long the period of a turbo-enabled\n"
|
||||
"should be.\n"
|
||||
"Turbo etkin bir sürenin ne kadar sürmesi\n"
|
||||
"gerektiğini açıklar.\n"
|
||||
" \n"
|
||||
"Numbers are described in frames."
|
||||
"Sayılar çerçevelerde açıklanmıştır."
|
||||
);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE:
|
||||
@@ -1620,10 +1620,10 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_DELAY_FRAMES:
|
||||
snprintf(s, len,
|
||||
"The amount of delay frames to use for netplay. \n"
|
||||
"Netplay için kullanılacak gecikme karelerinin miktarı. \n"
|
||||
" \n"
|
||||
"Increasing this value will increase \n"
|
||||
"performance, but introduce more latency.");
|
||||
"Bu değerin arttırılması performansı \n"
|
||||
"artıracak ancak daha fazla gecikme sağlayacaktır.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE:
|
||||
snprintf(s, len,
|
||||
@@ -1784,19 +1784,19 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL:
|
||||
snprintf(s, len,
|
||||
"URL to core updater directory on the \n"
|
||||
"Libretro buildbot.");
|
||||
"Libretro buildbotundaki çekirdek \n"
|
||||
"güncelleyici dizininin URL'si.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL:
|
||||
snprintf(s, len,
|
||||
"URL to assets updater directory on the \n"
|
||||
"Libretro buildbot.");
|
||||
"Libretro buildbot'taki içerikler \n"
|
||||
"dizinindeki URL.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE:
|
||||
snprintf(s, len,
|
||||
"if enabled, overrides the input binds \n"
|
||||
"with the remapped binds set for the \n"
|
||||
"current core.");
|
||||
"etkinse, giriş, geçerli \n"
|
||||
"çekirdek için ayarlanan yeniden \n"
|
||||
"birleştirilen atamalarla geçersiz kılınır.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERLAY_DIRECTORY:
|
||||
snprintf(s, len,
|
||||
@@ -1818,32 +1818,32 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Filter files being shown by \n"
|
||||
"supported extensions.");
|
||||
"Desteklenen uzantılar tarafından \n"
|
||||
"gösterilen dosyaları filtrele.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_NICKNAME:
|
||||
snprintf(s, len,
|
||||
"The username of the person running RetroArch. \n"
|
||||
"This will be used for playing online games.");
|
||||
"RetroArch çalıştıran kişinin kullanıcı adı. \n"
|
||||
"Çevrimiçi oyunlar oynamak için kullanılacak.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT:
|
||||
snprintf(s, len,
|
||||
"The port of the host IP address. \n"
|
||||
"Can be either a TCP or UDP port.");
|
||||
"Ana bilgisayar IP adresinin bağlantı noktası. \n"
|
||||
"Bir TCP veya UDP bağlantı noktası olabilir.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Enable or disable spectator mode for \n"
|
||||
"the user during netplay.");
|
||||
"Netplay sırasında kullanıcı için seyirci modunu \n"
|
||||
"etkinleştirin veya devre dışı bırakın.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS:
|
||||
snprintf(s, len,
|
||||
"The address of the host to connect to.");
|
||||
"Bağlanılacak ana bilgisayarın adresi.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_PASSWORD:
|
||||
snprintf(s, len,
|
||||
"The password for connecting to the netplay \n"
|
||||
"host. Used only in host mode.");
|
||||
"Netplay ana bilgisayarına bağlanmak için şifre. \n"
|
||||
"Yalnızca ana bilgisayar modunda kullanılır.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD:
|
||||
snprintf(s, len,
|
||||
@@ -1861,7 +1861,7 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"boot sırasında (varsa).");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MENU_DRIVER:
|
||||
snprintf(s, len, "Menu driver to use.");
|
||||
snprintf(s, len, "Kullanılacak Menü sürücüsü.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO:
|
||||
snprintf(s, len,
|
||||
@@ -1880,20 +1880,20 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE:
|
||||
snprintf(s, len,
|
||||
"Enable input auto-detection.\n"
|
||||
"Otomatik giriş algılamayı etkinleştir.\n"
|
||||
" \n"
|
||||
"Will attempt to auto-configure \n"
|
||||
"joypads, Plug-and-Play style.");
|
||||
"Joypad'leri, Tak ve Çalıştır \n"
|
||||
"stilini otomatik olarak yapılandırmaya çalışır.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CAMERA_ALLOW:
|
||||
snprintf(s, len,
|
||||
"Kameranın Core tarafından erişimine izin ver \n"
|
||||
"Kameranın Çekirdek tarafından erişimine izin ver \n"
|
||||
"veya verme.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_LOCATION_ALLOW:
|
||||
snprintf(s, len,
|
||||
"Konum servislerine izin ver veya verme \n"
|
||||
"Corelar tarafından erişilir.");
|
||||
"çekirdekler tarafından erişilir.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_TURBO:
|
||||
snprintf(s, len,
|
||||
@@ -2111,14 +2111,14 @@ int menu_hash_get_help_tr_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Bir şeyler yapması için programa \n"
|
||||
"bir program yüklemeniz gerekir.. \n"
|
||||
"\n"
|
||||
"Böylelikle programa 'Libretro Core', \n"
|
||||
"yada kısaca 'core' diyoruz. \n"
|
||||
"Böylelikle programa 'Libretro Çekirdek', \n"
|
||||
"yada kısaca 'Çekirdek' diyoruz. \n"
|
||||
" \n"
|
||||
"Core yüklemek için 'Core Yükle' \n"
|
||||
"Çekirdek yüklemek için 'Çekirdek Yükle' \n"
|
||||
"kısmından bir tane seçin.\n"
|
||||
" \n"
|
||||
#ifdef HAVE_NETWORKING
|
||||
"Coreları birkaç yolla elde edebilirsiniz: \n"
|
||||
"Çekirdekleri birkaç yolla elde edebilirsiniz: \n"
|
||||
"* İndirmek için şöyle\n"
|
||||
"'%s' -> '%s'.\n"
|
||||
"* El ile yapmak için 'Core' klasörüne taşıyın\n"
|
||||
|
||||
Loaded 100 of 238 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user