ehouse
33cb34abfe
Remove excessive focus logging; fix timer bug for BT by posting event so EvtGetEvent can exit
2007-12-06 05:26:44 +00:00
ehouse
d5d29adc0c
Change util function to use signed type; other cleanup to compile with various features.
2007-12-05 06:28:51 +00:00
ehouse
9ec0177592
Log BT lib version -- toward refusing to run or alerting user of broken Treo650 (version 1).
2007-12-03 01:18:59 +00:00
ehouse
5457ea1b59
replace all __FUNCTION__ with __func__
2007-12-02 19:13:25 +00:00
ehouse
4c8cf98d24
Add and set a compile-time option so comms will set a periodic timer
...
and use it to send and check for heartbeats over any transport.
Caller must supply a reset proc which is called when heartbeat hasn't
been received in too long. No changes required to comms protocol, but
that means the heartbeat interval is fixed at compile time: can't be
negotiated, and the two ends had better agree. Currently tested with
linux host and PalmOS guest, where only the first heartbeat failure is
recovered from. So there's some debugging to be done still.
2007-11-18 23:43:27 +00:00
ehouse
bdb06cbdf8
Use a single general-purpose callback passed into palm_bt_doWork where
...
it's needed, removing those passed into _init and _send. When client
is unable to connect to host, raise alert to user and give choice to
continue trying. Clear 'suspendBT' flag when user manually resends or
opens different game. Currently this happens only on guest's failure
to find registered SDP; should also extend to remote device not
running at all and to host failure to send to guest.
2007-11-07 13:40:56 +00:00
ehouse
556dbf46e3
move LOG_OFFSET
2007-09-30 17:22:38 +00:00
ehouse
f0b36895d7
If we get keyUp event, override earlier determination that this device doesn't get them. This works around Tungsten double-key bug. Better fix will be to use the right FtrGet constants to set generatesKeyUp.
2007-08-22 02:36:13 +00:00
ehouse
ab6ed444bb
add fnav resource for password dialog, and use it if device has fiveway.
...
Otherwise use FrmSetFocus. This works around a bug where key event that
leaks through from parent dialog dismisses dialog (whereupon another comes
up, and eventually cursor is left flashing on parent.)
2007-06-18 13:21:36 +00:00
ehouse
d58789c493
Use a timer to avoid trying to get an ACL connection too frequetly.
...
This seems to trigger crash Treo650s far less often than constantly
retrying.
2007-05-26 22:51:25 +00:00
ehouse
dd7a5c8104
type name change only
2007-05-26 14:14:01 +00:00
ehouse
eeebeca542
substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change
2007-05-26 14:03:07 +00:00
ehouse
45d5bb6260
Hide tray on turn transitions when more than one non-robot local player present in game.
2007-05-20 20:46:29 +00:00
ehouse
f832959480
Up version for ship; build LocalizedStrIncludes.h per-platform;
...
include language in all platform obj directory names
2007-05-13 21:06:42 +00:00
ehouse
c9e1cab5ee
Make "Cur" string in tile-picker dialog localizable; move buttons in same for French to fit.
2007-04-24 13:34:21 +00:00
ehouse
a1a0f9934a
Call HsNavDrawFocusRing on Treo600, FrmNavDrawFocusRing on later
...
devices. Fixes crasher on devices that don't have the former. Up version.
2007-04-23 03:20:37 +00:00
ehouse
630d9e391b
add no-bt state so there can be no icon when bt's been left off; up
...
version and turn BT on by default for a8 release.
2007-04-16 05:22:49 +00:00
ehouse
0b0143fa92
If BT is off, ask user to turn it on only once. If cancels, warn that
...
it must be turned on, and don't attempt to turn it on again. This
prevents BTLib from repeatedly asking for permission to turn BT on.
2007-04-15 16:46:17 +00:00
ehouse
2bba51f95a
cleanup (no change to generated code): remove old owner_hash code; replace empty formal lists with void.
2007-04-14 16:27:19 +00:00
ehouse
0bc445f2ad
Fix to compile with XWFEATURE_FIVEWAY undefined
2007-04-12 01:19:56 +00:00
ehouse
128d9c56ef
Turn off BT, and up version for first RC release.
2007-04-05 04:19:44 +00:00
ehouse
03433901fc
Closing BT lib from datahandler (since don't want to close on game
...
close in case next game will use); erase BT status icon when not BT
game; plug leak of dict name.
2007-03-18 23:57:30 +00:00
ehouse
aad182c2e3
turn stringFromStream into macro to aid logging for leak detection. Debug builds only effected.
2007-03-18 23:31:51 +00:00
ehouse
c7b46cffbf
Pad prefs struct so ARM and 68K versions are using same addresses
...
(fixes crash opening game in ARM version that was saved in 68K);
renumber resource IDs so can be logged via a switch.
2007-03-17 15:37:15 +00:00
ehouse
971bfc280f
Save and restore focus owner across app restarts (includes working around
...
OS's insistence on sending focusTake event on formOpen); up version numbers; turn off BT prior to beta release.
2007-02-24 03:35:51 +00:00
ehouse
621e049962
Cleanup for a5 release: always use status icons when building for bluetooth.
2007-02-18 03:33:17 +00:00
ehouse
f273e93c86
code to use bitmaps instead of letters to show bt conn status.
2007-02-12 08:05:35 +00:00
ehouse
b1d4a800c8
Fix nav for tungsten: test for lack rather than presence of keyUp events.
2007-02-08 15:16:46 +00:00
ehouse
a424d54445
Add a one-byte header to BT messages so one device can signal another
...
that a new game's begun without dropping the connection. On Palm,
remove connection-drop on new game. With this change starting a new
game takes imperciptible time, down from 30 seconds.
2007-02-08 02:53:10 +00:00
ehouse
f2ae7cb716
close and reopen bt module with every new game to fix, badly, client's
...
failure to connect if it's restarted before host; add event and use to
retry BtLibSocketListen when fails (since failure is usually
temporary).
2007-02-05 04:20:13 +00:00
ehouse
9a61f5c38b
Add assert; don't call comms if has been set to null (fixes device
...
reset); fix failure to install connCB (removes need to manually resend
messages when client starts up first.)
2007-02-04 17:13:01 +00:00
ehouse
363cfdce04
Drop keyUp events not preceeded by keyDowns to catch leaks from
...
dismissed dialogs; don't drop first keyDown on OS4 since the bug that
works around isn't there; turn BT back off by default.
2007-02-04 04:10:11 +00:00
ehouse
7c8b7294cd
add const to a bunch of char* decls in APIs and variables; no code change
2007-02-03 17:54:20 +00:00
ehouse
83a25455bb
Fix Zodiac-only bug: printing keys generate only keyDown event, so
...
must use different handler than for nav keys; fix treo bug where forms
brought up during key handling get spurious key events by adding
keySafeCustomAlert that consumes up to the first keyDown before
calling FrmCustomAlert.
2007-02-03 17:36:56 +00:00
ehouse
b2f3e73672
Don't make any btlib calls until the main form is up. This works
...
around an (OS?) bug where, apparently, the confirm-turn-on-bt dialog
eats pending events, including frmLoadEvent, so that the form never
loads or is very broken if that dialog is allowed to come up too
early.
2007-02-02 08:24:06 +00:00
ehouse
9d74699181
Work around what looks like a PalmOS bug that generates a spurious
...
keyDown event to a form put up while processing a keyUp event in the
main form: set a flag while handling key events, and drop the first
keyDown in child forms when it's set.
2007-01-27 15:10:10 +00:00
ehouse
0313a89553
Test and special-case for zodiac, which gets events in the same way
...
has Treo but doesn't have OS support for moving focus among objects.
And since zodiac doesn't support the std Palm hires APIs don't try to
use them. Up version string to b4.
2007-01-21 23:27:46 +00:00
ehouse
68730379b4
add five-way support for Tungstens; don't move cursor when keys are
...
meant for menu; redraw after hiding miniwindow when OS brings up
dialog;
2007-01-18 05:49:54 +00:00
ehouse
5a87db48bd
keep track of last key down so can fake key up event when palm won't
...
be giving us one, e.g. when holding key results in a system window
coming up;
2007-01-12 03:34:43 +00:00
ehouse
fef8891e3c
fix problems created by key-nav changes: don't drop hardware scroll
...
keys, and redraw after key-repeat if either up or down handled.
2007-01-07 05:25:28 +00:00
ehouse
e0010901f1
add board_handleKeyRepeat, and call it from palm and gtk. This lets a
...
held nav key walk the cursor across the board.
2007-01-07 04:32:29 +00:00
ehouse
8f924e9dc9
Don't show about dialog (with its alpha message) except when BT enabled.
2007-01-06 18:31:16 +00:00
ehouse
31b6526917
handle both keyUp and keyDown events, including dealing with devices
...
that don't generate the former. Break key-handling code into separate
function.
2007-01-06 17:50:43 +00:00
ehouse
02c225c413
Fix so IR-only multi-device build works again.
2007-01-06 16:46:45 +00:00
ehouse
68e2f821d6
beta 2; redraw focus ring after redrawing tray buttons; move board
...
focus border so it coincides with regular border.
2006-12-21 07:55:19 +00:00
ehouse
1808fa804c
When palm button loses focus to board obj, post event to be handled
...
after focus event, and on handling it inval rect of focus ring on
button. This fixes drawing glitch where palm remembers pixels behind
focus ring but they're not right.
2006-12-20 04:49:24 +00:00
ehouse
afc302a29b
When alt key pressed cursor can move onto occupied squares it normally skips.
2006-11-22 13:49:14 +00:00
ehouse
53765169be
Draw focus differently in tray if whole thing has it, to include borders
...
between the tiles.
2006-11-17 13:46:06 +00:00
ehouse
7fe5718cc5
When "dived" focus reaches and crosses border of object, return as if
...
not handled. This causes the platform to handle the key event itself,
typically by moving the focus to the next top-level object.
2006-11-17 13:41:13 +00:00
ehouse
a67be62069
Remove old focus-change callback; use extended handleKey API to allow
...
Palm to own all top-level focus change decisions (in accord with fnav
resource)
2006-11-14 06:54:14 +00:00