mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Add support for SAMPLE_EVENT_STRING event type
Instead of having fixed numbers and trying to translate them into strings, a dive computer could just give us the string directly. Like the new EON Steel backend does. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c27ad52be4
commit
a0aaadd50b
1 changed files with 4 additions and 0 deletions
|
@ -235,6 +235,10 @@ static void handle_event(struct divecomputer *dc, struct sample *sample, dc_samp
|
|||
name = QT_TRANSLATE_NOOP("gettextFromC", "invalid event number");
|
||||
if (type < nr_events)
|
||||
name = events[type];
|
||||
#ifdef SAMPLE_EVENT_STRING
|
||||
if (type == SAMPLE_EVENT_STRING)
|
||||
name = value.event.name;
|
||||
#endif
|
||||
|
||||
time = value.event.time;
|
||||
if (sample)
|
||||
|
|
Loading…
Reference in a new issue