Commit Graph

128 Commits

Author SHA1 Message Date
LibretroAdmin d30f16dc79 Remove cursor directory/cursor manager list - Views obsoleted
this
2022-10-25 15:21:47 +02:00
neil4 b98c53ddb7
Improve haptic feedback for input overlays (#14517)
Repurpose vibrate_on_keypress to enable device's standard keypress feedback on overlay key/button state changes

- Add keypress_vibrate function ptr to input_driver_t (only implemented on Android for now)
- (Android) Remove APP_CMD_VIBRATE_KEYPRESS
- (Android) Add doHapticFeedback, called directly to avoid latency
2022-10-16 09:58:09 +02:00
LibretroAdmin fcbd72dbf3
Use flags pt4 (#14497)
* * Use flags for rarch_state
* Get rid of ^M linebreaks in retroarch_types.h

* Buildfixes for consoles

* (audio driver) use flags instead of bools

* (video) Use flags instead of bools

* Rewrite input driver state bools into flags
2022-10-08 10:39:15 +02:00
LibretroAdmin be044c09dd Disable Feral GameMode for Android - only available on Linux 2022-09-13 19:29:45 +02:00
LibretroAdmin f1ff92c881 * menu_entries_append and menu_entries_append_enum are now combined into
one - if you set the last parameter to a valid 'rarch_setting_t' pointer
and enum_msg to MSG_UNKNOWN, you will get the previous menu_entries_append
behavior
* Renamed remaining function to menu_entries_append so that we have one
consistent way of adding menu entries instead of two
Reduces some code duplication significantly
2022-08-27 17:40:52 +02:00
LibretroAdmin c3a1c578b6 Prefer to use string_starts_with_size/string_ends_with_size (less strlen
calls)
2022-08-26 17:27:55 +02:00
LibretroAdmin 29caa95f7e (platform_unix.c) Use safer 'fill_pathname_join_special' for assembling
file path names instead of snprintf
(ctr_gfx.c) Use strlcpy instead of snprintf where possible
(ctr_gfx.c) Use snprintf instead of sprintf where possible
(ctr_gfx.c) Some general style nits
2022-08-26 10:43:42 +02:00
LibretroAdmin 6f738d4fbd Gradually get rid of strcpy_literal
Reasons:
1 - Just a macro for strcpy
1.2 - doesn't have a return type unlike strlcpy, can't be used
for string concatenation
1.3 - unsafe compared to strlcpy

Do either manual string assignment per character or strlcpy, no
inbetween by resorting to strcpy
2022-08-23 15:04:47 +02:00
LibretroAdmin a9157f975e
String cleanups (#14304)
(retroarch.c) retroarch_get_capabilities - get rid of strlcat
party in RARCH_CAPABILITIES_CPU, do simple manual assignment for
concatenation instead and NULL terminate at the end
(menu_displaylist.c) Do something about some of the unnecessarily huge
local strings of PATH_MAX_LENGTH size (can be as large as 8192)
(menu_displaylist.c) Replace some trivial strlcats / snprintfs
(D3D10/D3D11/D3D12) Strings don't need to be initialized -
strlcpy already null-terminates - get rid of some constants
2022-08-08 19:11:15 +02:00
LibretroAdmin 94ed25be56
Cleanups (#14296)
- (database_info.c) Optimizations for database_info_build_query_enum() -
 it would call strlcat at the very least 3 times, normally more than that.
 Every strlcat call is at least one or more strlens. Reduce it all down
 to manual string concatenation and one strlcat
- (database_info_build_query_enum) - always NULL terminates string so no need for NULL termination done by callee
* (menu_displaylist) use smaller strings for basename paths, remove one unnecessary string
in menu_displaylist.c function
- (disk_index_file.c) Avoid another trivial string concatenation by doing
it manually after fill_pathname_join_special
- (fill_pathname_join_delim) since fill_pathname_join_delim() now has a return value, use it for 
string concatenation
- (platform_unix) - Use BUFSIZ as size for a buffer in system_property_get
- some other trivial strlcat usage replacements
2022-08-06 18:04:40 +02:00
LibretroAdmin b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
libretroadmin a23231525d (Android) frontend_android_get_version_sdk - use strtol again - this
time assign the return value to the dereferenced pointer
2022-07-19 10:59:32 +02:00
LibretroAdmin 87240556ea
Should fix Android strtol regression (when converting from sscanf) (#14183) 2022-07-18 04:38:52 +02:00
libretroadmin a64f0332f9 Replace sscanf call in frontend_unix_get_os 2022-07-18 02:10:40 +02:00
libretroadmin c89f6cf0a9 Replace more trivial usage of sscanf 2022-07-17 18:33:54 +02:00
libretroadmin d95e426b4e (Platform drivers) Cleanups - get rid of unnecessary logs
(VGA Font driver) Get rid of unused code by if 0ing it out
2022-07-08 22:10:53 +02:00
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