Commit graph

12 commits

Author SHA1 Message Date
Penaz
3f2ba7f54c Restructuring project folders
This should allow for plugins to refer to LibreSplit's functions without
having to pull in half of the codebase.
2026-03-25 21:57:10 +01:00
Penaz
f14f9d2929 Make the plugin loading code use XDG_DATA_HOME 2026-03-15 21:54:59 +01:00
Daniele Penazzo
0ec65fdee5
Added customized logging library (#317)
* Added asynchronous logging library

Did some rudimentary testing, might need more for safety.

Fixes #316 at least in part

* Included missing stdbool include

* Added console logging (in addition to file logging)

* Force a file flush at every write

This might be useful if we want to analyze the cause of a crash, if we
don't flush the file, one to several log lines might be missing.

* Added default log settings for release and debug versions

* Added LOG_*F formattable logging functions

* Allow the main thread to close the logger

Or LS will keep on logging from a detached thread.

* Empty the logger queue on thread exit.

This should remove the possibility of losing messages on exit.

* Add timestamps to logs and avoid double newlines

* Put the log file in XDG_DATA_DIR/libresplit

* Default LogLevel at Warns + Errors

Debug LogLevel stays at "everything"

* Bunch'o'statics

* Move prctl to the beginning of the logging thread code
2026-03-10 19:49:17 +01:00
Pedro Montes Alcalde
490d3987b5
Lower C standard from gnu23 to gnu17 (#283) 2026-02-08 11:38:02 -03:00
Daniele Penazzo
26f87c8ea3
Added settings to allow user to disable alerts for gold and worse run (#280)
Fixes #275
2026-02-04 14:58:24 -03:00
Daniele Penazzo
4990a4f911
Add option to enable/disable run history saving (#257)
* Add save run history setting definition

* Save only when relative option is active

Fixes #255
2026-01-30 17:19:41 -03:00
Pedro Montes Alcalde
4dd11944ec
settings: Use const when possible (#235) 2026-01-27 09:48:45 -03:00
Daniele Penazzo
e5fd1434df
Add a decimals parameter (#237)
* Add a decimals parameter

Somewhat crudely fixes #178. Tends to hit onto the settings struct at
30/60/whatever times a second, but allows to have the decimals update
immediately after changing in the settings window.

* Allow to hide all digits from timers

The detailed timer will still show all 6 digits if "0" is used.
2026-01-25 20:38:47 -03:00
Daniele Penazzo
1623459c8f
Settings dialog (#220)
* Added basic help dialog

Is probably missing some destructor logic and might leak memory, idk

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>

* Settings dialog experiments

* Make sections into tabs

* Present settings to the user

* Create a new CFG_KEYBIND setting

It's a copy of the string setting, but it can be used for special
treatment in the settings GUI

* Make the context menu more pleasing to the eye

* Allow to hide sections from the GUI

* Try to avoid writing to null pointer

* Try to fix the int->char issue for GUI

* Try to tie the actual settings to the GTK widgets

* Added missing saving code for KEYBIND settings

* Added settings saving

* Fix some jank, do some cleanup

* Insert hatred for auto-importer here

* Apply suggestions

* Remove settings_number from global scope

* Delete duplicate code

---------

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
2026-01-22 11:03:42 -03:00
Pedro Montes Alcalde
25363fbd40
Sort all typedefs and struct declarations (#204) 2026-01-19 12:17:34 -03:00
tepiloxtl
39034e38a3
Add runs history (#194)
* Add run history feature

* Added error handling, forgot to handle error

* Run clang-format

* Don't ls_run_save on reset if run finishes

* Save split segment time

* Reworked split structure, better handle skipped splits
2026-01-17 17:00:01 -03:00
Pedro Montes Alcalde
5cce843464
settings: Dont use a JSON file for defaults (#189) 2026-01-09 12:26:08 -03:00