Commit graph

13973 commits

Author SHA1 Message Date
Eric House
28edeb1877 add creation time to stats
Useful, especially when it's getting reset mysteriously -- which was
probably the Android timers bug
2024-08-24 09:41:22 -07:00
Eric House
3b132be0a5 import class
AS's Java->Kotlin conversion doesn't like to import classes, making
the code more verbose. I'll fix these as they bug me. Should be no
code change at all: sed made these changes. :-)
2024-08-24 09:31:29 -07:00
Eric House
c4df8f0497 fix (new) timers on Android
Broke 'em implementing clearTimer()
2024-08-24 07:18:39 -07:00
Eric House
a5132f22a4 rewrite lock detector to not use pthread_cancel
...which isn't available on Android
2024-08-22 22:00:37 -07:00
Eric House
466abffc43 rewrite mutex stuff to make timeout/asserting easier 2024-08-20 22:03:08 -07:00
Eric House
db35adbada use xwmutex more 2024-08-20 06:57:23 -07:00
Eric House
f00343a1ed add option to control odds of rematching 2024-08-19 12:20:34 -07:00
Eric House
526b3c6b8f increase buffer so 100 games can run at once
Better fix is to not limit the size, but it's a test app and I have a
bug to find.
2024-08-19 11:33:16 -07:00
Eric House
c45638e037 pool acks and send using a timer (untested on Android) 2024-08-19 06:56:33 -07:00
Eric House
faf398790c cleanup; use new mutex for mempool 2024-08-17 22:03:37 -07:00
Eric House
5eb4eb77d3 don't delete game dbs by default
I want to come close to reproducing the Android situation where many
games are present and potentially receiving stale mqtt messages.
2024-08-17 11:48:43 -07:00
Eric House
64a080a955 use Kotlin threads 2024-08-16 07:21:12 -07:00
Eric House
de1aea9083 save new localized pref after locale change
Problem: localized strings are saved as prefs, so when locale changes
they don't make sense. I was already choosing to use the default, but
now I'll save it so the problem won't occur again.
2024-08-16 07:14:39 -07:00
Eric House
2993e82ec7 fix assertion by implementing kplr_nameForAddress() fully 2024-08-15 17:38:34 -07:00
Eric House
cc82d88fcc don't create second game from same gameID invitation 2024-08-13 21:24:42 -07:00
Eric House
0bd0d31d42 use new timers for stats saving on Android too 2024-08-13 13:58:45 -07:00
Eric House
f406757fb2 add generic timers (with dutil component for scheduling) 2024-08-12 21:11:14 -07:00
Eric House
ad651c6cba more work on stats 2024-08-11 20:45:11 -07:00
Eric House
0a992c5a4b move mutex into a struct (for future dev advantage) 2024-08-11 19:59:38 -07:00
Eric House
464e124038 add debug-only stats submenu, and ability to print stats
They won't persist on Android if I count on dutil shutting down, since
there's no such thing. So I save on every change, which is way too
often but good enough for now.
2024-08-10 20:54:56 -07:00
Eric House
35e3487f9d don't use invitation a second time 2024-08-10 20:08:14 -07:00
Eric House
2f8164d8c7 add test for email-style invitation 2024-08-09 10:48:27 -07:00
Eric House
6092ad2d4b fix NPE 2024-08-08 22:28:59 -07:00
Eric House
ce2da59bb2 random cleanup 2024-08-08 07:15:10 -07:00
Eric House
c09ac28759 fix warnings about zeroing static structs (no behavior change) 2024-08-07 22:29:46 -07:00
Eric House
7286156c87 add a few more stats 2024-08-07 22:13:02 -07:00
Eric House
4ab6b1930f new stats module gathering data for debugging and upload (soon) 2024-08-07 08:16:12 -07:00
Eric House
72082cde0d add mutex utility
since I'm using them more now
2024-08-06 10:23:20 -07:00
Eric House
041684a355 (linux) include gameID on game board screen 2024-07-31 18:22:23 -07:00
Eric House
b25726a4af cleanup (make more Kotlin-like); no behavior change 2024-07-31 16:10:50 -07:00
Eric House
696c47ace4 fix harvesting of known player names to not mismatch name/address
The buggy code assumed two arrays were in sync that weren't guaranteed
to be so. So now I'm leveraging rematch code that already put
addresses in player order.
2024-07-30 16:15:44 -07:00
Eric House
daacc66ffe send ack info as array for later optimization 2024-07-30 16:15:44 -07:00
Eric House
2f91ff1f78 display known player names for pending invites
When an invitation is pending for a player in GameSummary or
scoreboard, show "<Name> invited" instead of "remote missing."
2024-07-28 08:48:33 -07:00
Eric House
f3fb43e93b handle invitations for excessive new addresses
Deal with somebody creating a new invitation, e.g. because it's been
realized that an existing one won't be accepted. Unused channels are
used first (though there will be none in a 4-device game), then
channels with old invites (only) are recycled.
2024-07-28 08:48:33 -07:00
Eric House
6d0686f737 add test for resigning (off by default) 2024-07-28 08:48:33 -07:00
Eric House
d61b4ce485 make comms choose channel for invitations
Since server will ultimately assign them as registrations come in
there's no point in trying to force an order earlier.
2024-07-28 08:48:33 -07:00
Eric House
7d4cfa5e26 don't assert in low-level logging code
Only possible explanation for deadlock is the assert, though I don't
see how it'd happen...
2024-07-28 08:48:33 -07:00
Eric House
b8e2877880 remove some logging 2024-07-28 08:48:33 -07:00
Eric House
ae03f4ed5b trivial API change 2024-07-28 08:48:33 -07:00
Eric House
93770f29d2 fix so GameWrapper can work with already opened games 2024-07-28 08:48:33 -07:00
Eric House
a3f8d22f89 import class: no code change 2024-07-28 08:48:33 -07:00
Eric House
ff7c20c52e no-op: DO NOT PUSH 2024-07-28 08:48:33 -07:00
Eric House
be97ef5a7b don't log exception when web api conn fails 2024-07-28 08:48:33 -07:00
Eric House
a3078fb549 cleanup: fix flashing quarantine count and reduce logging 2024-07-19 22:48:34 -07:00
Eric House
7642613612 clean up logging file 2024-07-18 22:06:19 -07:00
Eric House
3ee909df7d use mutex in comms
I've long had logging to detect (and assert(0))when two methods access
comms at the same time on different threads. I'm getting that
assertion more often now due, I guess, to subtle changes introduced by
the kotlin port. I wanted to avoid a mutex in cross-platform code, but
I've been using them without problems in a couple of less critical
modules so let's just do the simple thing.
2024-07-18 08:38:24 -07:00
blomusti
c5851207fa
Translated using Weblate (Turkish)
Currently translated at 13.3% (123 of 923 strings)
2024-07-18 15:09:37 +00:00
ssantos
ea5c765030
Translated using Weblate (Portuguese)
Currently translated at 100.0% (923 of 923 strings)
2024-07-18 15:09:29 +00:00
大王叫我来巡山
b6036f8d7d
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (923 of 923 strings)
2024-07-15 06:09:21 +02:00
Federico Di Lorenzo
d073d63c59
Translated using Weblate (Italian)
Currently translated at 100.0% (923 of 923 strings)
2024-07-10 21:09:10 +02:00