Commit graph

461 commits

Author SHA1 Message Date
Tomas Jakobsson
367e0b00ea Fix broken lineendings 2022-01-27 15:55:02 +01:00
Tomas Jakobsson
bd2ae7d343
Merge pull request #769 from cmitu/jp-wordwrap
Improve text wrapping (rebased #269)
2022-01-25 10:08:45 +01:00
Tomas Jakobsson
842e8f4f19
Merge pull request #732 from Gemba/fb_minor_err_msg_on_noexec_script
Improved warning message when userscript is not mode 755.
2022-01-25 10:08:02 +01:00
cmitu
bc4f81b547 Improve text wrapping (rebased #269)
This is a re-work of PR#269 and PR#314:

* originally proposed by @eagle0wl and discussed/tested with @zigurana during #269, with the motivation being to accomodate texts in languages that don't use spaces between successive characters and words (e.g. Japanese/Chinese).

* @zigurana created a smaller PR in #314 (now closed), but hasn't been updated after @tomaz82's work that changed the Unicode (UTF8) string handling functions (see #297).

I've taken the changes from @zigurana's PR (#269) and updated the code to use `Utils::String::chars2Unicode`.

I added a smaller change for parsing the text. Since we analyze each Unicode code point now (instead of a string), I replaced the `sizeText` call with a simpler function, which gets the size for just the codepoint being scanned. `lineWidth` is consequently incremended for each Unicode code point or reset on a new line.

The performance of `textWrap` looks similar or better than the previous implementation (based in whitespace tokenization) and the results are similar to what was tested during the initial PR (#269).

**NOTE**: the line breaking for non-whitespace texts is a simple split around Unicode code points. Each language may have additional rules for line breaking in texts (i.e. some characters are not allowed at the end/beginning of a line, etc.). These rules are not implemented in this update, it would require additional text analysis.

Some details on line breaking rules for Japanese/Chinese/Korean languages can be consulted at https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages

Original descriptions for the changes on which this modification is based:

* from @eagl0wl's #269, _refine text wordwrap_:
 > refined single-multibyte text wordwrap.
 > You can now properly wrap Japanese character strings.
 > You can see some screenshot. If necessary, I can present more screenshots.
 >   http://eagle0wl.hatenadiary.jp/entry/2017/10/24/003606

* from @zigurana's #314, _Line-breaking (wrapping) for non ascii strings_
 > New PR (replacing #269).

Closes: #269
Supercedes: #269
2022-01-25 08:05:31 +00:00
Tomas Jakobsson
1aa46958ab Base SVG size on height 2022-01-20 11:33:18 +01:00
Tomas Jakobsson
ab38884a15 Potentially fix multithread issue 2022-01-20 11:33:11 +01:00
Tomas Jakobsson
495753abe6 Silence compiler warnings 2022-01-20 11:33:00 +01:00
Tomas Jakobsson
367277cb35
Merge pull request #770 from cmitu/date-time-format
TimeUtil: use `strftime` for date/time formatting.
2022-01-20 11:23:06 +01:00
Tomas Jakobsson
d4eb62b62c
Merge pull request #766 from TheMasterWho/feature/ScreensaverSlideshowVideos
Feature: Slideshow screensaver video support
2022-01-19 13:26:57 +01:00
Tomas Jakobsson
8675f38bd9
Merge pull request #767 from johnodon/master
Update FileSystemUtil.cpp - Allow for multilevel absolute paths in gamelist.xml
2022-01-18 20:33:24 +01:00
Jools Wills
d6d39e4d95
Merge pull request #762 from cmitu/hidapi
input: disable the SDL2 HIDAPI drivers by default
2022-01-10 19:20:41 +00:00
pjft
13c3300279
Revert default ThreadedLoading option 2021-12-26 09:13:43 +00:00
cmitu
1df4bbfc8e TimeUtil: use strftime for date/time formatting.
The change extends the DateTime formatting options and simplifies a bit the code.
2021-12-20 12:36:20 +02:00
TheMasterWho
300828e445
Rename instances of image to media in SlideShow Screensaver mode
* renamed image to media and added setting rename function

* replaced references to 'image' with 'media' and removed hardcoded video extensions

* fixed a bug when checking a null path
2021-10-10 16:00:20 -04:00
johnodon
a2ff3f035a
Update FileSystemUtil.cpp 2021-09-13 12:13:53 -04:00
TheMasterWho
0b5e9a7cb3 refactored ScreenSaver startScreenSaver method to allow video files in slideshow mode 2021-09-06 23:11:42 -04:00
cmitu
b19b1b0ffb input: disable the SDL2 HIDAPI drivers by default
This ensures that configurations created before HIDAPI drivers were enabled by default (2.0.12)
will work when EmulationStation uses a newer SDL2 version.

Using the HIDAPI drivers may produce a different name for joysticks and pottentially changes the mapping.
Example using a PS4 (Dualshock 4) controller:
 - without HIDAPI, the controller is named "Wireless Controller", with HIDAPI enabled is named "PS4 Controller"
 - without HIDAPI, the D-Pad is detected as a HAT, but with the drivers enabled it's detected as a series of buttons
 - the device GUID is different between the 2 configurations
The different name would probably break also the input configuration script for RetroArch, which doesn't use SDL2 as default input driver and would receive a wrong name and wrong mappings.

Note that the HIDAPI drivers are available just for a few controller models (PS4/PS4/Amazon Luna/Stadia/Xbox360(w)/Xbox One/Steam),
but these controllers are widely used and breaking their configuration would cause much confusion.
2021-08-20 16:58:48 +01:00
Gemba
ee89794993 Improved randomisation: card deck approach, use ranlux48 and random_device for seed
- Use C++11 built-in ranlux48 and random_device for seeding
- Shuffles systems (aso.) like a card deck and picks top system until empty, then shuffles again
- Fixes the flaws of the current random implementation: Real 1/N chance for an element in a set of N
- Minor refactorings
2021-07-13 11:42:22 +02:00
EnsignRutherford
40898ffc22 Changed the placement of the screensaver-start event to occur before the screensaver is started as that will fire off an event depending on the setting. 2021-06-19 12:04:44 -04:00
John Rassa
62fd08c26d
Merge pull request #666 from benjdero/simplify-grid-update
Simplify grid tiles update code
2021-05-29 09:10:15 -04:00
pjft
584f741b8e
Merge pull request #745 from Gemba/fb_no_confirm_quit
CLI option --no-confirm-quit for skipping the confirm dialog on quit …
2021-05-21 07:44:47 +01:00
Ryan McClelland
1bc75ed9b6 handle error while reading file
tellg can report -1 if there was an error while reading the file, because it was casted to a size_t type which is unsigned, this will become 18446744073709551615. It will then attempt to allocate that many bytes and of course crash. This will just return an empty resource if there was an error.
2021-05-20 23:28:36 -07:00
EnsignRutherford
077db00d59 Added an additional optional parameter to "Scripting" module and added code to fire an event when ES is configured to bring up a startup system. 2021-05-18 12:58:22 -04:00
EnsignRutherford
f6ae6e09c1 Changes necessary to implement Scripting events for "game-select", "system-select" and "screeensaver-game-select". 2021-05-17 11:29:14 -04:00
Ryan McClelland
3c4117bc5e fix issue with svg cropping the width 2021-05-10 12:05:24 -07:00
Tomas Jakobsson
29223d9a2e ProfilingUtil 2021-05-06 08:52:41 +02:00
pjft
e6f5880da0
Merge pull request #740 from Gemba/fb_fullscreen_paging_with_lr_lb
Full screen paging in gamelist view with lb/rb
2021-04-17 09:38:55 +01:00
Gemba
f85ac44257 CLI option --no-confirm-quit for skipping the confirm dialog on quit actions 2021-04-12 21:47:30 +02:00
Gemba
3b8058da7c Feature: Remove from favorites/collections with double press of Y button 2021-04-11 19:09:01 +02:00
Gemba
014af4afa2 full screen paging in gamelist view with lb/rb 2021-04-05 18:40:52 +02:00
pjft
eadcc3ef98
Address wrong path when empty
In #688 the change from getCanonicalPath to getAbsolutePath improved performance, but the case of an empty path was not resolving appropriately for the VLC video player.
2021-03-31 15:15:48 +01:00
Rodrigo L.C
ab8200e4c6 IF reduce and Fix delete buffer 2021-03-26 01:04:58 -03:00
pjft
a8ccd0a75b
Fix video screensaver launch game controls
Video screensaver wasn't launching games when the Image screensaver had been set to use custom images, even if not in use.

Introduced in #673 .

Reported in https://retropie.org.uk/forum/topic/29291/video-screensaver-black-screen-with-omx-on-and-controls-not-working/
2021-03-24 21:02:12 +00:00
pjft
de09d483f4
Merge pull request #590 from fabricecaruso72/enhanced-loading
Added a progressbar during loading + threaded loading for systems
2021-03-20 20:49:35 +00:00
Fabrice CARUSO
5349be1dce Added a progressbar during loading + threaded loading when processor threads > 2 2021-03-18 16:06:36 +01:00
Gemba
b5107138e1 Adds longer delay for start of description text autoscroll. 2021-03-02 22:01:22 +01:00
pjft
28faf89772
Merge pull request #729 from PhilaPhan80/add-ignore-articles-option
Add option to ignore common leading articles in Filename sort
2021-03-02 21:00:45 +00:00
PhilaPhan80
cfa50d0c89 Add option to ignore common leading articles in Filename sort 2021-03-01 19:50:53 -05:00
pjft
3f1a109fef Adding background indexing during screensaver 2021-02-28 21:27:42 +00:00
pjft
8a6f782c79 Improve file-system accesses
Added a cache for stat checks
2021-02-28 21:06:05 +00:00
pjft
1398779ba6
Merge pull request #689 from pjft/remove-vlc-guard
Update video screensaver settings
2021-02-26 13:56:58 +00:00
Gemba
f07eff5fd0 Less strict file permission checking (Linux): mode at least one exec bit (ugo), no sticky bit.
Indicative log message if execution fails probably due to insufficient file permissions.

Refers to: https://retropie.org.uk/forum/topic/29651/emulation-station-game-start-script-not-executable
2021-02-23 18:19:59 +01:00
Tomas Jakobsson
717e27cdd1
Merge pull request #711 from tomaz82/fix_scaling
Fix broken grid themes
2020-11-30 11:36:43 +01:00
Tomas Jakobsson
38cd70a055 Fix broken grid themes 2020-11-25 10:03:13 +01:00
Tomas Jakobsson
83eb1f2a6a Adds a root <resolution> tag to themes 2020-11-25 10:00:08 +01:00
Tomas Jakobsson
8f8ccbca7f
Merge pull request #717 from tomaz82/ninepatch_fixes
Fix warning about ninepatch missing a texture.
2020-11-25 09:56:22 +01:00
Tomas Jakobsson
de70673ef4 Fix warning about ninepatch missing a texture. 2020-11-23 21:54:43 +01:00
Jools Wills
ba269cdf48 Fix rendering when Max VRAM is set to 0
According to 6872f472 if MaxVRAM/--max-vram is 0, then texture memory should be considered unlimited
(command line help states - Max VRAM to use in Mb before swapping. 0 for unlimited)
2020-11-17 16:07:35 +00:00
Tomas Jakobsson
93cc23276c
Merge pull request #709 from tomaz82/misc_fixes
Lots of minor fixes and cleanups
2020-11-17 14:17:30 +01:00
Tomas Jakobsson
668015eb19 This will break grid themes... padding and mBackgroundCornerSize was set in pixels rather than percentages, this is fixed now 2020-11-16 23:20:14 +01:00