Commit graph

305 commits

Author SHA1 Message Date
tepiloxtl
24ac49df22 messing with gametime and realtime 2026-03-03 14:22:48 +01:00
tepiloxtl
6b10ab3ab4 clang-format 2026-03-03 14:00:29 +01:00
tepiloxtl
e1eaea6d09 Small comparisons changes 2026-03-03 13:58:21 +01:00
tepiloxtl
63ec5cfa2e Restored calls to TheRun in timer.c 2026-03-03 13:57:56 +01:00
tepiloxtl
7dbebeedd1 Merge remote-tracking branch 'upstream/main' into therun 2026-03-03 01:56:03 +01:00
Pedro Montes Alcalde
a29f3ba34c
timer: Overhaul the logic and callings (#290)
* meow

* miao

* :3

* aaaaaaa

* cheese

* bbbbbbbbb

* blehhhhhh

* miao

* :D

* nyan

* small

* splits

* last tick fix

* maybe

* hehe

* docstrings

* docs change

* Fix segfault on no splits

* remove asserts

* Dont run reset when not running

* actually reset this time i swear

* avoid reset desync

* suggestions

* meow

* miao

* format nyaaaa
2026-03-02 14:58:45 -03:00
tepiloxtl
cde8ee36c2 Silence nulls from the server 2026-02-26 23:15:48 +01:00
tepiloxtl
a3eb4eb50a Implement startTime field, fix brain deficiencies 2026-02-26 22:48:46 +01:00
tepiloxtl
fa013d83f3 "Personal Best" and "Best Segment" times added
Fixes display on therun frontend, but it's not 100% correct data, yet
2026-02-26 19:10:40 +01:00
tepiloxtl
691c5858b2 More triggers inserted, some small corrections to api 2026-02-26 18:17:19 +01:00
Daniele Penazzo
c34bd39ef0
Fix compiler failure on certain systems (#311)
In my system (and others) initializing a char* with strchr might turn up
as an error (in those cases the signature is `const char* strchr` instead of `char* strchr`).

Some sources say the signatures differ when the first argument is const,
others don't. This should fix the compilation issue at least.
2026-02-25 11:58:50 -03:00
tepiloxtl
bb7fcd2d2c Add source field to therun_trigger_update, initial logic for split and pause 2026-02-23 09:45:04 +01:00
Daniele Penazzo
3e94856963
Str2ida functionality (#313)
* Added rough str2ida implementation

* Added small documentation.

* Move the lua pushed string to the heap

Works with compilers that don't support VLA and avoids
stack-overflow-induced headaches.

* Check if malloc actually mallocs
2026-02-18 21:00:47 -03:00
tepiloxtl
776ef78614 run clang-format 2026-02-17 21:34:43 +01:00
tepiloxtl
8be538e906 Thread uploading 2026-02-17 21:06:05 +01:00
tepiloxtl
05328a516d Send the payload to therun 2026-02-17 20:58:25 +01:00
tepiloxtl
d1a2d4b0dc Implemented rest of fields on best intentions basis
No handling for pausing timer and some other hardcoded values
2026-02-17 20:28:06 +01:00
tepiloxtl
c292d21812 Do not split split title if theres no pipe 2026-02-17 20:02:34 +01:00
tepiloxtl
794c985714 Split split title into game and category 2026-02-17 19:59:33 +01:00
tepiloxtl
fafd2693e6 What is a millisecond?
A miserable little pile of secrets.
2026-02-17 19:29:58 +01:00
tepiloxtl
cd57166a26
Merge branch 'LibreSplit:main' into therun 2026-02-17 18:17:15 +01:00
tepiloxtl
6677cbfb0b Basic json structure 2026-02-16 22:48:07 +01:00
Pedro Montes Alcalde
a52ea9dd84
maps: Clear previous map name (#307) 2026-02-16 18:31:35 -03:00
tepiloxtl
51617745ba Trying to do something... 2026-02-16 21:24:17 +01:00
Daniele Penazzo
db4524233f
Fix possible segfault if no type is defined. (#304)
* Fix possible segfault if no type is defined.

The type of value to read is a mandatory argument, skipping directly to
the address (`readAddress(0x...)`) will lead to a segfault

* Fix possible segfault on calls without arguments

Just to be safe.
2026-02-15 20:43:50 -03:00
Jack Tench
f87a6829c9
Standardise parent window parameter of dialogs (#299)
Some checks failed
/ Build (push) Has been cancelled
/ format-check (push) Has been cancelled
/ linter-check (push) Has been cancelled
/ Build AppImage (push) Has been cancelled
2026-02-11 17:24:12 -03:00
Daniele Penazzo
7ccddc0062
Added clickable "clear icons" on Entry Widgets in settings (#296)
* Added basic keypress unbind icon

And made it work for string options too, cause it's handy

* Added missing docstrings
2026-02-11 17:06:26 -03:00
Daniele Penazzo
7d86e7c329
Split modules v3 (#282)
* Split declarations and definitions for windows

* Exploded the program

* Fix formatting
2026-02-08 16:18:09 -03:00
Jack Tench
df1a2dc99f
Update linting workflow to use older c standard (#289)
* Update linting workflow to use older c standard

* Add int types to bind.c

* Run clang-format to move include
2026-02-08 12:58:55 -03:00
Pedro Montes Alcalde
490d3987b5
Lower C standard from gnu23 to gnu17 (#283) 2026-02-08 11:38:02 -03:00
Daniele Penazzo
8b96ab1a2e
Reset rules (#281)
* Added main-window class

Seems that editing the `.window` class affects all windows in
LibreSplit, which is definitely unwanted.

Left the note in the CSS classes for posterity.

* Added another note on LibreSplit/GTK's theming capabilities

* Added a reset stylesheet as string

Theoretically, if it works as it should should fix both #272 and #63

* Applied suggestions and fixes

* Changed function signature and error handling

* Pointer Confusion

This shows the error in case of bad reset rules, tested by stepping with
GDB
2026-02-04 18:38:52 -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
844ec16bc4
Keygrabber for Keybinds (#269)
* Keygrabber for Keybinds

Very useful.

Fixes #265

* Documentation, fixes and reformatting

The auto importer strikes again.
2026-02-03 18:23:47 -03:00
Daniele Penazzo
7a861aa2da
Delayed keybind handlers support (#262)
* Fix segfault on first start

If no split_file is defined, there will be a NULL-point dereference,
leading to a segfault. This fixes that.

* First idea of "delayed keybind handlers"

* Trying to make the structure more reusable

Not sure it worked.

* Added missing pragma
2026-02-03 16:53:28 -03:00
Daniele Penazzo
8ddee5b731
Fix segfault on first start (#258)
If no split_file is defined, there will be a NULL-point dereference,
leading to a segfault. This fixes that.
2026-02-01 21:39:49 -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
a75c5d4ef2
timer: Fix saving worse time (#217) 2026-01-30 11:08:53 -03:00
Jack Tench
1f1b0db3fd
Fix timer not resetting in non-gold runs (#254)
Bug introduced in #253
2026-01-29 20:36:36 -03:00
Daniele Penazzo
eff5ba287c
Disallow changing splits or autosplitter if a run is on (#252)
* Disallow changing splits or autosplitter if a run is on

Fixes #241

* Define external function to see if a run is started

Uses the RTA timer "running" property and the atomic_bool run_started
from the Auto splitter

* Replace or statement with relative descriptive function

* Use is_run_started for autosplitter warnings too
2026-01-29 20:32:42 -03:00
Jack Tench
58fefe904e
Prompt user when resetting a run with a gold split (#253)
* Create confirm reset dialog

* Add detection logic for a gold in the current run

* Prompt for confirmation when run has a gold split

* Switch to using stdbool

* Move reset logic to not interfere with other logic
2026-01-29 20:32:07 -03:00
Pedro Montes Alcalde
4dd11944ec
settings: Use const when possible (#235) 2026-01-27 09:48:45 -03:00
Pedro Montes Alcalde
cafb713024
gui: Dont show any digits when number of digits is 0 (#249) 2026-01-27 09:48:10 -03:00
Pedro Montes Alcalde
a9459cfa4a
gui: Close other windows when main window is closed (#250) 2026-01-27 09:47:49 -03:00
Pedro Montes Alcalde
0b21672eb7
maps: Fix search by name (#248) 2026-01-27 09:47:17 -03:00
Pedro Montes Alcalde
82f257e4c6
maps: Add env var to disable ioctl (#247) 2026-01-26 09:44:54 -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
5b1a2b388b
Fix wrong logic in welcome screen (#240)
* Show welcome screen only when there is no timer or game loaded

Also fixes a SegFault due to removing the welcome screen being destroyed
by the "close splits" option.

Fixes #239

* Beautify welcome screen a little bit

* Removed useless else branch

If a game is loaded, the if statement will be false anyway
2026-01-24 21:48:59 -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
Jack Tench
0224bf3eb4
Add link to resources repo in help dialog (#233) 2026-01-22 10:24:44 -03:00
Jack Tench
f7b837521f
Replace #embed directive with build-time object creation (#232)
* Create object file for fallback css at build time

* Include css object in LibreSplit binary

* Replace embed directive with linker-provided symbols

* Load fallback css using new method

* Adjust helper function

Linter had raised concern about pointer mathematics

* Set ld as required

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

---------

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
2026-01-22 10:08:08 -03:00