Commit Graph

162 Commits

Author SHA1 Message Date
Vladimir Serbinenko 25a8e05597 Support battery indicator on RetroFW 2022-05-07 00:53:02 +02:00
jSTE0 715c054de5
Improve CPU architecture and model name identification for Miyoo (#13704)
* features_cpu: Return model name on non-x86 Linux platforms

Extract model name from /proc/cpuinfo.

* platform/unix: Rework identification of classic Arm CPUs

Identify pre-ARMv7 CPUs based on the machine hardware name starting with
"arm" instead of matching every individual variant. This will then
include the ARM926EJ-S which has armv5tejl as its machine hardware name.
2022-03-09 21:27:12 +01:00
Mats e76da47b31
Fix base path when compiling with unix cwd (#13631) 2022-02-17 04:59:37 +01:00
Braden Farmer 5bacf1e9be
[Android] Populate external storage devices inside the file browser on Android 11+ devices (#13615)
[Android] Populate external storage devices inside the file browser on Android 11+ devices
2022-02-15 16:11:39 +01:00
Sou Bunnbu 763fcd8267
unix, win32: Allow set the default libretro_directory via environment variable (#12040) 2022-02-04 17:40:57 +01:00
jdgleaver 688c652673
[GameMode] Improve error handling (#13362) 2021-12-15 19:01:39 +01:00
Nikos Chantziaras 430baf7c21
Add Linux GameMode support (#13339)
This can fix a lot of performance issues, like audio crackling and frame
time spikes. This requires the GameMode package to be installed. See:

https://github.com/FeralInteractive/gamemode

This commit adds a "Game Mode" bool option to the "Power
Management" and "Latency" settings sections, and it can be toggled
on/off without restarting RA.

The actual toggling of game mode happens in a new frontend platform
interface function. Perhaps this will become useful for other platforms
that provide some equivalent of Linux GameMode.

Since the GameMode ABI is fixed, and the API comes as a single,
header-only file with no actual deps, we simply bundle the header
(deps/feralgamemode/gamemode_client.h.) That way, all Linux builds will
have support for GameMode regardless of whether the GameMode development
package is installed or not.
2021-12-14 14:07:42 +01:00
twinaphex 619398bbe4 Backport parts of 73c0760236 2021-11-09 23:12:57 +01:00
Mats 6a59dad08c
Add compile option to make unix use cwd as env (#12989)
Setting UNIX_CWD_ENV to 1 when compiling with the unix platform will make
the base path for the env the cwd. This is to be able to match the behavior on
Windows.
2021-09-15 21:48:11 +02:00
twinaphex 20ef0667b0 Add initial webOS port courtesy of informatic/webosbrew/mariotaku 2021-08-11 20:04:11 +02:00
jdgleaver 9e100b752e (RS-90) Move appdata (retroarch) base directory to external microsd card 2021-07-15 16:56:23 +01:00
CTCaer 98be8f0c22 plat: unix: correct backlight max_brightness path
We are assuming that device has its backlight device symlinked to /sys/class/backlight/backlight so this should be stated.

Additionally any hardcoding should be disallowed and the symlink should be always used.
2021-06-09 13:16:37 +03:00
CTCaer 86f8670d0b plat: unix: get better battery stats on sysfs nodes
This addresses 2 issues:

1. Input controllers report battery supplies.
   That causes wrong charging status or capacities if they report percentages instead of levels.
   Such supplies normally report scope attributes that report Unknown or Device type of power supply.
   If reported value is System or the attribute is missing, it's considered a System supply and used.

2. Various systems have backup batteries.
   That causes the wrong capacity to be reported depending on order of node creation.
   This is addressed by keeping track of these and calculating an average.
2021-05-31 18:36:49 +03:00
GavinDarkglider f24f827c4c
Updates For Lakka Switch build. (#12369) 2021-05-07 20:58:30 +02:00
David Guillen Fandos e1385c0187 Adjust brightness according to the limit
Seems like some platforms feature non-standard maximums, but the
variable is correclty exported for us to use
2021-03-20 22:19:28 +01:00
twinaphex fdfc4dda08 (OpenDingux) Don't build in code that we don't need for Dingux 2021-01-20 09:56:40 +01:00
twinaphex 1ea46ea171 (Unix) Fix build 2021-01-16 16:37:52 +01:00
twinaphex 4c51e31b9d (Platform) Cleanups + add missing function pointer bind for Darwin 2021-01-16 16:14:03 +01:00
jdgleaver b5feb2d48b (.gitlab-ci.yml) Use xenial-gcc9 build container + add missing artefacts 2021-01-05 11:19:05 +00:00
David Guillen Fandos 192d131020 Fix Lakka build in !switch !oga2 platforms 2020-12-03 16:13:22 +01:00
David Guillen Fandos a442696b71 First attempt at adding proper brightness
Supports Switch and OGA
2020-11-26 19:22:05 +01:00
Autechre 54eb22dd2b
Merge pull request #11606 from Scrumplex/feat-run-media
Also show /run/media or /run/media/$USER in drives list
2020-11-25 16:04:52 +01:00
David Guillen Fandos f5693f15e7 Make get_lakka_version available in all builds
This simplifies a bit the code, for some new lakka patches to come.
2020-11-23 18:44:24 +01:00
Sefa Eyeoglu e3dc9a7e1d feat: also show /run/media or /run/media/$USER in drives list 2020-11-22 14:25:46 +01:00
twinaphex 3ac75c043e Jdgleaver improvements 2020-11-20 03:55:55 +01:00
twinaphex 9ee1e33e09 Only attempt to call dir_check_defaults once per runtime session
when calling the frontend environment get callback - we want to
look at the 'default' directories, and then if they don't yet exist,
auto-create them so we can store files in them.
2020-11-19 07:10:22 +01:00
jdgleaver 3e52f318d5 AI Service fixes 2020-10-22 15:59:26 +01:00
jdgleaver 2bc705144f OpenDingux: Update default directory paths 2020-10-08 16:15:46 +01:00
jdgleaver 3bd66cc14d OpenDingux port improvements: Phase 1 2020-10-01 15:56:14 +01:00
twinaphex 599f338d74 Use strcpy_literal for string literals 2020-09-21 00:36:07 +02:00
jdgleaver 4799d2d955 (Android/Play Store) Add frontend support for core installation via Play Feature Delivery 2020-08-28 16:30:54 +01:00
twinaphex 855351de9e Reorder g_defaults, alignment 2020-08-16 04:38:02 +02:00
jdgleaver aefeae4b50 (Linux/Android) Fix reporting of free memory 2020-07-20 16:22:12 +01:00
twinaphex 501f737249 (Android) Split up Android context driver into two - GL and Vulkan 2020-07-17 13:45:37 +02:00
jdgleaver e44242db93 (Linux) Set default saves/save states/system paths 2020-05-28 12:09:46 +01:00
twinaphex e64b4c1d24 For gamepad-like console/Android TV devices - default to Ozone 2020-05-20 17:34:39 +02:00
twinaphex d9ab59cb4a Comment out function that isn't used 2020-05-20 16:29:57 +02:00
twinaphex ad1aa59ce1 Cleanup != NULL comparisons 2020-05-19 21:15:06 +02:00
Vladimir Serbinenko 99e9a1ea0d platform_unix: Fix overflow when computing total memory on i386 2020-04-17 00:54:06 +02:00
twinaphex 8fe2fe7b62 (UNIX) Remove hashing dependency 2020-02-23 04:52:27 +01:00
valadaa48 2dbb13d8dd Add match on "battery" instead of just "BAT" to appease some unices
- required for odroid go advance
2020-02-22 22:16:57 -05:00
twinaphex 09da302b8d Try to make it more portable for BSD 2020-02-16 19:37:59 +01:00
twinaphex f0bdb61fd8 gfx_display and gfx_animation no longer tied to HAVE_MENU 2020-02-16 15:51:58 +01:00
twinaphex 2d274f1369 Move accessibility features to platform frontend driver 2020-02-14 00:17:55 +01:00
twinaphex 85d64602ff Move retroarch_get_launch_arguments() function call outside
of frontend driver - should be called by Salamander too which
has no conception of RetroArch launch arguments
2020-02-01 17:42:18 +01:00
jdgleaver 569014c5d2 (Filebrowser) Fix file selection issues when starting from (or navigating to) the top level directory 2019-12-31 12:34:03 +00:00
Themaister 15ffffa835 Android/Vulkan: Recreate swapchain on orientation change.
ANativeWindow getWidth/Height does not detect any changes when using
Vulkan, so use the old onContentRectChanged callback to get notified
when size changed. Use those values instead when figuring out how large
swapchain to create.

Tested trivially on Galaxy S9+ Exynos model.
2019-12-15 16:46:41 +01:00
radius 3f88a49bdc linux frontend: add proper drives 2019-11-12 19:11:51 +01:00
twinaphex 1da7baa49d (Android) get_mem_free - different implementation for Android 2019-09-26 20:07:39 +02:00
twinaphex b94b9e2adb Go back to plain strlcpy/strlcat - probably best to look at
opportunities to reduce these calls vs. replacing them with
unsafe macros
2019-09-23 00:19:01 +02:00
twinaphex ed29c6f59c Start going for consistent memory representation - instead of
'memory used' needs to become 'memory free'
2019-09-22 03:57:59 +02:00
twinaphex 3b057d9605 Start using STRLCAT_CONST_INCR and STRLCPY_CONST 2019-09-20 23:33:17 +02:00
twinaphex 1ced1b3f73 (Platform unix) Updates 2019-09-18 03:37:25 +02:00
twinaphex c2cad1f122 (platform_unix) Small cleanups 2019-09-17 01:33:54 +02:00
twinaphex ba40af1dde (Android) android_app_entry - cleanup 2019-07-20 18:55:23 +02:00
twinaphex 212ff42ae0 (Gradle/Android Studio) Update
(Default threaded video setting) Remove
g_defaults.settings.threaded_video - could help Switch and Android
2019-07-10 12:21:18 +02:00
Twinaphex 048980e051
Update platform_unix.c 2019-06-24 05:18:28 +02:00
radius d865c5e4a6 add some copyright on files I contributed considerably just in case 2019-06-20 05:45:17 +02:00
orbea cafc45d705 Remove duplicate code. 2019-06-02 22:25:20 -07:00
twinaphex 4862368b02 (Unix/Linux) Correct parse_drive_list (potential fix) 2019-05-31 07:11:10 +02:00
radius d8c4c4e276 further cleanup 2019-05-28 16:29:49 +02:00
radius 5071a33cd3 simplify this mess
So this makes two basic changes:
1. Add a few extra dirs, hide root dir in the filesystem
2. Simplify the default dir selection code so it doesn't take three code blocks to change a dir

A few of the decisions here were weird.
This shouldn't affect anything for end users and makes the code more mantainable.

Log from the first run:

```
05-27 22:42:21.507 16529 16567 I RetroArch: jni_thread_destruct()
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV] Android version (major : 7, minor : 1, rel : 2)
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV] Checking arguments passed from intent ...
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: config file: [/storage/emulated/0/Android/data/com.retroarch.aarch64/files/retroarch.cfg] -->correct
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: current IME: [com.koushikdutta.vysor/.VysorIME]
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: libretro path: [/data/user/0/com.retroarch.aarch64/cores/]
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: android internal storage location: [/storage/emulated/0]
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: android picture folder location [/storage/emulated/0/Pictures] -->cleanup no longer needed
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: android download folder location [/storage/emulated/0/Download] -->cleanup no longer needed
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: APK location [/data/app/com.retroarch.aarch64-2/base.apk]
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: android external files location [/storage/emulated/0/Android/data/com.retroarch.aarch64/files]
05-27 22:45:27.586 16992 17046 I RetroArch: [ENV]: app dir: [/data/user/0/com.retroarch.aarch64]
05-27 22:45:27.586 16992 17046 I RetroArch: Testing permissions for /storage/emulated/0 -->correct
05-27 22:45:27.587 16992 17046 I RetroArch: Create /storage/emulated/0/.retroarch in /storage/emulated/0 true
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: application location: [/data/user/0/com.retroarch.aarch64]
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: default download folder: [] -->fixup
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: default savefile folder: [/storage/emulated/0/RetroArch/saves] -->correct
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: default savestate folder: [/storage/emulated/0/RetroArch/states] -->correct
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: default system folder: [/storage/emulated/0/RetroArch/system] -->correct
05-27 22:45:27.587 16992 17046 I RetroArch: [ENV]: default screenshot folder: [/storage/emulated/0/RetroArch/screenshots] -->correct
05-27 22:45:27.780 16992 17046 I RetroArch: [recording] youtube streaming key empty
05-27 22:45:27.781 16992 17046 W RetroArch: Using old --libretro behavior. Setting libretro_directory to "/data/user/0/com.retroarch.aarch64/cores/" instead.
05-27 22:45:27.781 16992 17046 I RetroArch: RetroArch 1.7.7 (Git 772d06f)
```

Also these are changed:

![image](/uploads/c7a68118e9d91567b135ded551f571ee/image.png)

Should be easier to navigate to other mountpoints
2019-05-28 16:29:41 +02:00
radius 87452b2eac fixup layout path on android, add some comments, move the order of the user directories 2019-05-28 16:29:36 +02:00
radius d0c8b3ccf4 restart works on linux too 2019-05-21 04:53:37 +02:00
nia 443f5f907e platform_unix: Check whether LANG is defined before using it.
Fixes a segfault.
2019-05-18 13:11:10 +01:00
Twinaphex 59d8d701a6
Merge pull request #8769 from natinusala/master
platform_linux: more flexible battery display
2019-05-13 01:59:53 +02:00
Twinaphex fbec6b84e8
Merge pull request #8529 from huwpascoe/mame_overlay
video_layout (mame artwork)
2019-05-13 00:42:26 +02:00
natinusala e128c06d2e platform_linux: more flexible battery display 2019-05-12 14:38:40 +02:00
plaidman 5eb2f7962d update CPU clock profiles and battery info for lakka-switch 2019-05-11 13:42:53 -04:00
Huw Pascoe 685aabb094 video_layout config 2019-05-11 09:58:46 +01:00
twinaphex 161d4caa8f Get rid of two retro_assert calls 2019-04-28 15:16:42 +02:00
Brad Parker a5e52bd3c7 android: set preferred OS language on first start 2019-04-16 02:09:38 -04:00
Brad Parker 1ecc5fd9d1 unix: only set default language if support for multiple languages is compiled in 2019-04-16 00:41:59 -04:00
Brad Parker aa588dec35 set default language on first startup according to OS setting (initial *nix implementation) 2019-04-15 23:14:49 -04:00
jdgleaver 93506a0d18 Log to file improvements 2019-03-21 16:57:54 +00:00
radius 8fd0aedc56 add log to file settings 2019-03-17 14:28:17 -05:00
Brad Parker 44a06d69a6 android: add gamepad rumble support 2019-03-13 03:32:18 -04:00
Brad Parker 954c54baee add device vibration option for cores that support rumble (with initial android implementation) 2019-03-12 13:07:16 -04:00
Brad Parker f6dc7f4f02 android: add option to vibrate on touch 2019-03-10 21:36:52 -04:00
Brad Parker e22148fed4 show cpu model name in log, implemented for x86/64 on windows/linux so far 2019-02-23 16:50:42 -05:00
Brad Parker f5f492845f add setting for screen orientation, with initial android implementation 2019-02-21 00:31:55 -05:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
radius bcfa332be9 stop litering emmmc for temporary files 2018-12-25 20:18:19 -05:00
Royerson 6044044852
add CM9/10 default model names for Xperia Play 2018-11-19 10:25:11 -07:00
twinaphex 64b2e6ea5f Update platform_unix.c 2018-10-02 20:08:23 +02:00
Brad Parker aa083d1e4c android: add configurable setting for Sustained Performance Mode 2018-06-19 02:50:33 -04:00
Brad Parker 7176bb19ad support powerstate/battery level in Android 2018-06-16 19:15:16 -04:00
twinaphex 2bda59b8e4 (platform_unix.c) Get rid of some warnings 2018-05-18 05:17:13 +02:00
twinaphex 5a80a6046f (Android) Remove no longer needed machine/cpu-features.h 2018-04-28 19:29:30 +02:00
twinaphex 167b977c4d Fix some build errors with MSVC 2003/2005 cores 2018-03-28 16:22:35 +02:00
twinaphex 72dc03a1c6 Try to fix Coverity warnings 2018-03-19 06:58:36 +01:00
twinaphex 33f0009a11 Fix UNIX build 2018-02-25 20:49:44 +01:00
twinaphex 78406bef69 (platform_unix.c) Remove lots of hashes 2018-02-25 17:58:36 +01:00
twinaphex b0f29a6743 (platform_unix.c) Remove more hashes 2018-02-25 13:16:17 +01:00
Brad Parker 1923ec11a9 platform_unix: remove HAVE_NETWORKING requirement 2018-02-08 11:44:26 -05:00
Brad Parker 9ef75473e0 fix coverity warnings 2018-01-26 00:14:59 -05:00
Brad Parker 9e347ec71f detect shader file changes on move and delete as well, and wait a few frames before re-applying changes 2018-01-25 19:09:55 -05:00
Brad Parker f087b150c9 Add quick menu option to watch shader files for changes and recompile automatically (Linux only for now) 2018-01-25 15:50:57 -05:00
kwyxz b9585df325 Update Haiku port to allow it to build again 2018-01-20 00:19:01 -08:00