1
0
mirror of https://github.com/libretro/RetroArch synced 2025-03-03 13:14:04 +00:00

145 Commits

Author SHA1 Message Date
GavinDarkglider
4387b0ab94
Lakka Switch Updates.... ()
* Lakka: Switch: Decouple From LibNX builds.

* Lakka: Always show Power Management Settings menu

* Lakka: Switch: Add Nintendo Switch Options Menu, and First Option

* Lakka: Switch: Add CEC Toggle

* Lakka: Switch: Add Bluetooth ERTM Toggle

* Retroarch: unix platform:  Always display battery meter even when the device reports it as unknown
This is useful for most arm devices that have unknown battery status until charger state changes

* Retroarch: Lakka: Remove Gamemode stuff from build

Lakka will never include this, as it only runs base system, and retroarch.
2023-10-06 04:55:22 -07:00
libretroadmin
f51b49f213 More explicit typecasts to bools 2023-08-16 03:22:02 +02:00
libretroadmin
bd090dea71 Replace more strlcat calls 2023-07-16 18:07:49 +02:00
nfore
9ca5c5e623 Revive/rewrite Keyboard Overlay and OSK Toggle
Add keyboard overlay preset, keyboard submenu, and osk_toggle hotkey. Use overlay caching for osk_toggle.

For now, keyboard menu has only preset path, auto-scale toggle, and opacity.

Related fixes:
- input_keyboard_event: Don't check hotkey binds when device is RETRO_DEVICE_POINTER
- Add input_keymaps_translate_rk_to_ascii() for correct character input to input_keyboard_event
- input_overlay_poll: Delay clearing INPUT_OVERLAY_BLOCKED flag until there is no overlay input (Avoids stray input after osk_toggle)
- Send keyboard events for modifiers before other keys (for correct modifier+key input if hitboxes overlap)
2023-07-09 04:42:49 +02:00
libretroadmin
1cff8e26f4 (Android) Move DPI metric code to dispserv_android.c - and remove
duplicate code
2023-06-20 08:31:19 +02:00
libretroadmin
e8242253a7 Reduce strlcat calls where possible 2023-06-19 06:00:10 +02:00
Grisly Glee
4202f8650d
Fix trivial signedness warnings ()
* Fix trivial signedness warnings

* Followup on trivial signedness warnings
2023-06-14 04:43:11 +02:00
libretroadmin
51d238875e Get rid of obsolete HAVE_VIDEO_LAYOUT - obsolete spec, was only
ever implemented for OpenGL2 driver, lots of code debt, best to
instead just keep improving the overlay system instead which is
already available for most video drivers
2023-02-23 21:03:41 +01:00
libretroadmin
9fbd62d7b8 Reduce dependence on strcpy_literal (just a macro for strcpy) - prefer
going through safer strlcpy
2023-01-22 17:13:38 +01:00
libretroadmin
378e90e745 retroarch.h functions should be namespaced 'retroarch_' instead
of 'rarch_'
2023-01-22 16:58:22 +01:00
Thiago Kenji Okada
c5bfd52159
Add CORE_INFO_DIR to ./configure ()
* Add missing FILTERS_DIR definition to qb/config.libs.sh

* Add CORE_INFO_DIR configuration option
2022-12-23 14:40:48 +01:00
Thiago Kenji Okada
894c44c5ea
Add more flags to ./configure ()
* Allow disabling "Update Core Info" from Online Updater

* Add ASSETS_DIR as an alternative to DEFAULT_DIR_ASSETS

* Add FILTERS_DIR configuration option

* Fix other platform_unix.c platforms

* Conditionally use ASSETS_DIR/FILTERS_DIR
2022-12-23 01:28:57 +01:00
libretroadmin
8f1af4a2e6 (Frontend) Style nits/cleanups 2022-12-15 14:34:22 +01:00
LibretroAdmin
cf0951b5d5 (Android) Do device initialization only once in init function 2022-10-31 00:36:55 +01:00
LibretroAdmin
a94c4c72c2 Use size_t as type for returned value of strlen instead of int 2022-10-29 19:40:48 +02:00
LibretroAdmin
c1a3085939 Fix UNIX builds 2022-10-29 19:07:49 +02:00
LibretroAdmin
91d7f5970b Cleanups in platform_unix.c 2022-10-29 18:37:12 +02:00
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 ()
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 ()
* * 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 ()
(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 ()
- (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) () 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 ()
* 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 () 2022-02-17 04:59:37 +01:00
Braden Farmer
5bacf1e9be
[Android] Populate external storage devices inside the file browser on Android 11+ devices ()
[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 () 2022-02-04 17:40:57 +01:00
jdgleaver
688c652673
[GameMode] Improve error handling () 2021-12-15 19:01:39 +01:00
Nikos Chantziaras
430baf7c21
Add Linux GameMode support ()
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 ()
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. () 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