Commit graph

621 commits

Author SHA1 Message Date
ehouse
8035955814 Add non-sf.net contact options; make params const. 2007-12-09 23:37:47 +00:00
ehouse
4c686bdaa0 Add strings and make other changes needed for compilation with BT on
for French, marked for translation.  Fix formatting and add emacs
compile string for English.
2007-12-09 04:02:24 +00:00
ehouse
a07a5f2822 cleanup; replace a bunch of EvtAddEventToQueue calls with
postEmptyEvent; pass transport type with incoming packets so they can
be rejected if not on expected channel (to stop IR, which is always
on, from injecting into a BT game); do BT work and fire timers even
when menu is down; don't let robot run until after board is drawn for
the first time; on startup, don't let robot run until after board is
drawn once.  Up version to b3.
2007-12-09 01:59:15 +00:00
ehouse
8dfff86cff Fix crash on restart when app had been exited with some form other
than main on top.  focusOwner was saved based on front form but on
startup I tried to set it in the main form.  This will need to be
merged into a branch based on the 4.2.1 release for a 4.2.1.
2007-12-08 21:04:44 +00:00
ehouse
75a3c36ad6 Remove unused code and constants; fix to compile with relay; don't
show connection type dialog unless more than IR is available and
supported, and then build the dropdown dynamically based on what's
compiled-in and available on the device.  This means you don't see the
BT option at all if you don't have BT.
2007-12-08 18:11:42 +00:00
ehouse
348111ece2 Remove unused FindTrustedDevice calls; don't try to become master or slave
until we know which we'll be.  This likely fixes the problem where devices
have trouble connecting after switching roles.
2007-12-07 09:50:48 +00:00
ehouse
619e7d14c0 call util_addrChange prior to closing comms to fix crash moving from
BT to standalone game; add a couple of similar assertions; up beta
version.
2007-12-07 07:50:19 +00:00
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
ad78ec1fd8 Rewrite of checkIncomingStream to be cleaner and fix bug with initial messages getting dropped
while heartbeat feature was enabled.  Fixed the problem on Linux, but experience on Treo650
is still better without HB feature, so turning it off on Palm.  This seems ready for beta,
but will test a bit more.
2007-12-05 06:33:37 +00:00
ehouse
7929865ad9 Comments only. 2007-12-05 06:31:30 +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
1926c84825 Change state icon even when not doing work to get it to show up (unconnected) earlier. 2007-12-05 06:26:21 +00:00
ehouse
e4c2143aed Fix dialog title; send heartbeat based on when connected even if no
messages yet received; reset bt connection on palm in two stages;
remove unused param.  Change version number for beta.
2007-12-03 01:20:32 +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
f3d67cfb6c Fix bug reassembling packets; advance credit on each send/receive.
With this checkin rfcomm works between two Treos and between Treos and
linux, though with plenty of bugs around reconnecting yet to find.
However, it turns out that even using rfcomm a Treo650 gives no notice
to the other device when shutting down the connection, so rfcomm
doesn't help.  Rfcomm is probably not worth using, but the code's now
here and can be turned on in the Makefiles.
2007-11-18 17:57:28 +00:00
ehouse
d6163b62ff Add code, disabled in Makefile, to use rfcomm rather than l2cap for
data with the goal of detecting disconnects more quickly.  Stops
working after a few packets (client only tested against host on linux
so far), and doesn't compile for ARM yet, but the framework is there.
Am framing packets on Palm side which may not be necessary.
2007-11-15 14:39:33 +00:00
ehouse
ef19abbfd9 Fix reconnect bug: when master's in initial state but listening socket
already inited, shift state to listening
2007-11-10 17:54:05 +00:00
ehouse
6db5eed156 Add English strings as starting point for translation 2007-11-08 05:18:04 +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
36c40f3375 Use fixed action queue and memcpy rather than rotating buffer; eliminate sequential duplicates of most actions. 2007-11-06 04:05:11 +00:00
ehouse
41936fe18a Byte-swap psm field to callback on ARM: now both client and host work. Move SDP-related constants out where linux can use too. 2007-11-03 22:04:06 +00:00
ehouse
3480df738c Add ARM support for functions and types required for UUID/PSM lookup.
Almost works: if the ARM build is running as host, all's well; but if
it's client, gets btLibL2DiscConnPsmUnsupported after trying to make
an l2c connection.
2007-09-30 17:33:19 +00:00
ehouse
556dbf46e3 move LOG_OFFSET 2007-09-30 17:22:38 +00:00
ehouse
104a173c5d Publish (master) and look for (slave) SPD record so that we're looking for our app and not just BT when connecting. I hoped this would prevent T650s from crashing when nothing's running. It doesn't, but it's the right way to connect, and will allow better error messages or retry logic. Compiles only on 68K at the moment. 2007-09-15 13:50:07 +00:00
ehouse
cc4aeaee8c Turn BT back on as default and up version preparing for next release. 2007-09-15 13:47:28 +00:00
ehouse
40fdec22a2 up version number for dot release. 2007-08-27 12:43:26 +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
719fc3889c turn off BT; remove rc designation so can ship 2007-06-09 18:09:21 +00:00
ehouse
c911780c37 fix to build with relay turned on (part 2) 2007-06-08 03:20:09 +00:00
ehouse
a1ebd16a5a fix to build with relay turned on 2007-06-08 03:15:52 +00:00
ehouse
f12bf79101 turn on BT; up alpha version number. 2007-05-27 16:59:24 +00:00
ehouse
a527e426d6 Revert version number to rc3 for 4.2. 2007-05-26 22:59:32 +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
8a074126db Turn of BT for rc2 release 2007-04-28 23:34:44 +00:00
ehouse
934f90efbc up alpha version number 2007-04-28 22:53:21 +00:00
ehouse
42f8a55220 A few more translations and moving of widgets to accomodate strings 2007-04-27 07:08:09 +00:00
ehouse
96ae1292bf A couple of additional translations; back out debug-only translations; mark strings that may still need translation. 2007-04-26 01:24:23 +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
ee636886a1 Additional French corrections. 2007-04-23 03:24:34 +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
b1de2cb575 Return null rather than allocing bt storage if unable to open bt library. 2007-04-13 08:47:22 +00:00
ehouse
f141078e1f More translation tweaks 2007-04-13 08:45:48 +00:00
ehouse
555d8f9a82 include LANG in obj dir name 2007-04-12 01:22:31 +00:00
ehouse
0bc445f2ad Fix to compile with XWFEATURE_FIVEWAY undefined 2007-04-12 01:19:56 +00:00
ehouse
9b7e0c76a3 Text tweaks from Francis; widget resizings from Eric. 2007-04-12 01:17:33 +00:00
ehouse
0d8545426d First pass at translation. 2007-04-10 13:23:39 +00:00
ehouse
df1f14b41f Copy English files preparatory to French localization. 2007-04-10 13:19:04 +00:00
ehouse
128d9c56ef Turn off BT, and up version for first RC release. 2007-04-05 04:19:44 +00:00
ehouse
d1c36681f3 pass -D options to gen_pace.pl 2007-04-05 04:18:42 +00:00
ehouse
959357f0f6 wrap BT APIs in ifdef 2007-04-05 04:18:05 +00:00
ehouse
039a730217 merge changes 1895 and 1899 for allowing ifdefs in funcfile.txt 2007-04-05 04:17:43 +00:00
ehouse
539912b8b2 Make gadget and bitmap size match. 2007-03-18 23:58:32 +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
0d286632be palm_dictionary_make makes copy of name if needed. Helps plug memory leak. 2007-03-18 23:49:15 +00:00
ehouse
90d285c593 add consts; remove logging. 2007-03-18 23:48:00 +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
3974ac4639 Fix crash on ARM: don't compare dummy strings. 2007-03-18 14:45:51 +00:00
ehouse
e22a131687 include ability to choose arm or 68K in combined-arch release builds too 2007-03-18 00:05:15 +00:00
ehouse
d9e29674cd comment out assert that doesn't seem to matter 2007-03-17 17:31:01 +00:00
ehouse
08901ca548 include ability to choose arm or 68K in combined-arch debug builds 2007-03-17 17:30:30 +00:00
ehouse
ecba9df348 Pad prefs struct so ARM and 68K versions are using same addresses
(fixes crash opening game in ARM version that was saved in 68K);
2007-03-17 17:29:32 +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
e111c2d89c Remove excess logging. 2007-03-17 15:35:14 +00:00
ehouse
bf7833c420 Put back code to associate service record with listening socket, but
ifdef'd out as it doesn't seem to make any difference.
2007-03-17 15:34:24 +00:00
ehouse
aa4333903f compare only six bytes of struct ARM pads to 8. 2007-03-15 05:06:56 +00:00
ehouse
19ac39010f Enable BT; up version number for a3. 2007-03-15 01:21:56 +00:00
ehouse
b72aba3a9a Don't store procptr stubs in Ftrs across app boots! Fixes device-resetting crash. 2007-03-15 01:20:11 +00:00
ehouse
a0eeafb226 Don't store procptr stubs in Ftrs across app boots! Fixes device-resetting crash. 2007-03-15 01:19:35 +00:00
ehouse
252c07c6ee Print param lists under 80 columns. 2007-03-15 01:14:15 +00:00
ehouse
97cddf35ff define constant so tests work on ARM too. 2007-03-09 03:00:44 +00:00
ehouse
c00dad745d Add APIs needed to compile and use BT APIs. ARM version works now well enough to play games, but often crashes on app exit having done so. 2007-03-09 02:58:57 +00:00
ehouse
3535a2c846 update to die when func not found, and to handle BT APIs 2007-03-09 02:56:02 +00:00
ehouse
5478dbeb43 Add one-bit bluetooth status indicators 2007-02-28 02:32:49 +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
13c425f005 Add bitmaps to replace letters as indicators of bluetooth connnect state. Still to go: lowres equivalents. 2007-02-12 07:54:23 +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
edd1ce9455 up version number for alpha 2007-02-06 05:55:21 +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
e8f2215221 Turn on BT so 4.3a4 can have a non-M rev number; up version for 4.2. 2007-02-03 20:36:22 +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
e6ec790305 eType_2str replaces logEvent. Only effects debug builds. 2007-02-03 17:41:46 +00:00
ehouse
1fb61d9a7f don't set INITIALOBJECTID for main form 2007-02-03 17:39:48 +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
3f111c5657 name change only: Connectedness becomes DeviceRole 2007-02-02 08:34:37 +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