mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-13 08:01:33 +01:00
Turn on and enable UI for relay and sms transport. relay doensn't
work, at least on win32 where threading code is broken, and former is completely stubbed out.
This commit is contained in:
parent
8a47aa177d
commit
4939cf1785
13 changed files with 390 additions and 184 deletions
|
@ -49,8 +49,10 @@ HAVE_COMMCTRL = 1
|
|||
# CHOOSE_FONTS = -DALLOW_CHOOSE_FONTS
|
||||
|
||||
ifeq ($(TARGET_OS),wince)
|
||||
SMS = -DXWFEATURE_SMS
|
||||
RELAY = -DXWFEATURE_RELAY -DCOMMS_HEARTBEAT
|
||||
# IPDIRECT = -DXWFEATURE_IP_DIRECT
|
||||
# BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
||||
RELAY = -DXWFEATURE_RELAY
|
||||
CC = ${CE_ARCH}-gcc
|
||||
WINDRES = ${CE_ARCH}-windres
|
||||
STRIP = ${CE_ARCH}-strip
|
||||
|
@ -80,7 +82,9 @@ ifeq ($(TARGET_OS),win32)
|
|||
#STANDALONE = -DXWFEATURE_STANDALONE_ONLY
|
||||
STANDALONE = -DPREV_WAS_STANDALONE_ONLY
|
||||
#BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
||||
SMS = -DXWFEATURE_SMS
|
||||
RELAY = -DXWFEATURE_RELAY
|
||||
# IPDIRECT = -DXWFEATURE_IP_DIRECT
|
||||
CC = i586-mingw32msvc-gcc
|
||||
WINDRES = i586-mingw32msvc-windres
|
||||
STRIP = i586-mingw32msvc-strip
|
||||
|
@ -97,7 +101,7 @@ CFLAGS += -DARM -I./ -I../common -I../relay
|
|||
|
||||
CFLAGS += -Wall -Wunused-parameter
|
||||
|
||||
CFLAGS += $(BLUETOOTH) $(RELAY) $(STANDALONE) $(COLOR_SEL) $(CHOOSE_FONTS)
|
||||
CFLAGS += $(BLUETOOTH) $(RELAY) $(SMS) $(IPDIRECT) $(STANDALONE) $(COLOR_SEL) $(CHOOSE_FONTS)
|
||||
|
||||
SVNDEF = -DSVN_REV='\"$(SVNREV)\"'
|
||||
CFLAGS += $(SVNDEF)
|
||||
|
@ -147,6 +151,7 @@ WINCESRC = \
|
|||
cestrbx.c \
|
||||
cedraw.c \
|
||||
cefonts.c \
|
||||
cesms.c \
|
||||
debhacks.c \
|
||||
cedebug.c \
|
||||
|
||||
|
@ -177,8 +182,8 @@ XW_BOTH_DEFINES = \
|
|||
$(DEBUG_FLAG) $(MEM_DEBUG_FLAG) $(LOGGING_FLAG) \
|
||||
|
||||
CFLAGS += $(XW_BOTH_DEFINES) -DARM
|
||||
RESFLAGS += $(XW_BOTH_DEFINES) $(STANDALONE) $(BLUETOOTH) $(RELAY) \
|
||||
-D_WIN32 -D_WIN32_IE=0x0400 $(COLOR_SEL) $(CHOOSE_FONTS)
|
||||
RESFLAGS += $(XW_BOTH_DEFINES) $(STANDALONE) $(BLUETOOTH) $(RELAY) $(SMS) \
|
||||
$(IPDIRECT) -D_WIN32 -D_WIN32_IE=0x0400 $(COLOR_SEL) $(CHOOSE_FONTS)
|
||||
|
||||
####################################################################
|
||||
# Rules start here
|
||||
|
|
255
wince/cecondlg.c
255
wince/cecondlg.c
|
@ -18,12 +18,29 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
|
||||
#include "cecondlg.h"
|
||||
#include "ceutil.h"
|
||||
#include "debhacks.h"
|
||||
|
||||
typedef struct _ConnDlgPair {
|
||||
CommsConnType conType;
|
||||
wchar_t* str;
|
||||
} ConnDlgPair;
|
||||
|
||||
typedef struct _CeConnDlgState {
|
||||
CeDlgHdr dlgHdr;
|
||||
CommsAddrRec addrRec;
|
||||
DeviceRole role;
|
||||
XP_U16 connComboId;
|
||||
ConnDlgPair* types;
|
||||
XP_Bool userCancelled;
|
||||
} CeConnDlgState;
|
||||
|
||||
static CommsConnType indexToConType( const CeConnDlgState* state,
|
||||
XP_U16 index );
|
||||
|
||||
static void
|
||||
ceControlsToAddrRec( HWND hDlg, CeConnDlgState* state )
|
||||
{
|
||||
|
@ -39,6 +56,12 @@ ceControlsToAddrRec( HWND hDlg, CeConnDlgState* state )
|
|||
len = sizeof(state->addrRec.u.ip_relay.cookie);
|
||||
ceGetDlgItemText( hDlg, COOKIE_EDIT, state->addrRec.u.ip_relay.cookie,
|
||||
&len );
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_IP_DIRECT ) {
|
||||
#ifdef XWFEATURE_IP_DIRECT
|
||||
len = sizeof(state->addrRec.u.ip.hostName_ip);
|
||||
ceGetDlgItemText( hDlg, IPNAME_EDIT, state->addrRec.u.ip.hostName_ip,
|
||||
&len );
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_BT ) {
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
|
@ -47,6 +70,14 @@ ceControlsToAddrRec( HWND hDlg, CeConnDlgState* state )
|
|||
ceGetDlgItemText( hDlg, IDC_BLUET_ADDR_EDIT,
|
||||
state->addrRec.u.bt.hostName, &len );
|
||||
}
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_SMS ) {
|
||||
#ifdef XWFEATURE_SMS
|
||||
len = sizeof(state->addrRec.u.sms.phone);
|
||||
ceGetDlgItemText( hDlg, IDC_SMS_PHONE_EDIT, state->addrRec.u.sms.phone,
|
||||
&len );
|
||||
state->addrRec.u.sms.port = (XP_U16)ceGetDlgItemNum( hDlg,
|
||||
IDC_SMS_PORT_EDIT );
|
||||
#endif
|
||||
} else {
|
||||
XP_ASSERT(0);
|
||||
|
@ -54,7 +85,7 @@ ceControlsToAddrRec( HWND hDlg, CeConnDlgState* state )
|
|||
} /* ceControlsToAddrRec */
|
||||
|
||||
static void
|
||||
adjustForConnType( HWND hDlg, const CeConnDlgState* state )
|
||||
adjustForConnType( HWND hDlg, CeConnDlgState* state, XP_Bool useFromState )
|
||||
{
|
||||
XP_U16 relayIds[] = {
|
||||
IDC_COOKIE_LAB,
|
||||
|
@ -63,84 +94,108 @@ adjustForConnType( HWND hDlg, const CeConnDlgState* state )
|
|||
IDC_CRELAYPORT_LAB, RELAYPORT_EDIT,
|
||||
#endif
|
||||
0 };
|
||||
XP_U16 btIds[] = {
|
||||
IDC_BLUET_ADDR_LAB,
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
IDC_BLUET_ADDR_EDIT, IDC_BLUET_ADDR_BROWSE,
|
||||
#endif
|
||||
0 };
|
||||
XP_U16* allIDs[] = { relayIds, btIds };
|
||||
XP_U16 directIds[] = {
|
||||
IDC_IPNAME_LAB,
|
||||
IPNAME_EDIT,
|
||||
0
|
||||
};
|
||||
XP_U16 smsIds[] = {
|
||||
IDC_SMS_PHONE_LAB,
|
||||
IDC_SMS_PHONE_EDIT,
|
||||
IDC_SMS_PORT_LAB,
|
||||
IDC_SMS_PORT_EDIT,
|
||||
0
|
||||
};
|
||||
XP_U16* allIDs[] = { relayIds, directIds, smsIds };
|
||||
XP_U16* on = NULL;
|
||||
XP_U16 i;
|
||||
XP_U16 ii;
|
||||
CommsConnType conType;
|
||||
|
||||
if ( state->addrRec.conType == COMMS_CONN_RELAY ) {
|
||||
on = relayIds;
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_BT ) {
|
||||
on =
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
state->role != SERVER_ISCLIENT ? NULL:
|
||||
#endif
|
||||
btIds; /* we want the "disabled" message */
|
||||
if ( !useFromState ) {
|
||||
XP_S16 sel;
|
||||
sel = SendDlgItemMessage( hDlg, state->connComboId,
|
||||
GETCURSEL(state->dlgHdr.globals), 0, 0L );
|
||||
state->addrRec.conType = indexToConType( state, sel );
|
||||
}
|
||||
|
||||
for ( i = 0; i < VSIZE(allIDs); ++i ) {
|
||||
XP_U16* ids = allIDs[i];
|
||||
conType = state->addrRec.conType;
|
||||
|
||||
if ( 0 ) {
|
||||
#ifdef XWFEATURE_RELAY
|
||||
} else if ( conType == COMMS_CONN_RELAY ) {
|
||||
on = relayIds;
|
||||
#endif
|
||||
#ifdef XWFEATURE_IP_DIRECT
|
||||
} else if ( COMMS_CONN_IP_DIRECT == conType ) {
|
||||
on = directIds;
|
||||
#endif
|
||||
#ifdef XWFEATURE_SMS
|
||||
} else if ( COMMS_CONN_SMS == conType ) {
|
||||
on = smsIds;
|
||||
#endif
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
} else if ( COMMS_CONN_BT == conType ) {
|
||||
on = btIds;
|
||||
#endif
|
||||
}
|
||||
|
||||
for ( ii = 0; ii < VSIZE(allIDs); ++ii ) {
|
||||
XP_U16* ids = allIDs[ii];
|
||||
XP_Bool enable = ids == on;
|
||||
while ( *ids != 0 ) {
|
||||
ceShowOrHide( hDlg, *(ids++), enable );
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32_WCE
|
||||
if ( IS_SMARTPHONE(state->dlgHdr.globals) ) {
|
||||
SendMessage( hDlg, DM_RESETSCROLL, (WPARAM)TRUE, (LPARAM)TRUE );
|
||||
}
|
||||
#endif
|
||||
} /* adjustForConnType */
|
||||
|
||||
static XP_U16
|
||||
conTypeToIndex( CommsConnType conType )
|
||||
conTypeToIndex( const CeConnDlgState* state, CommsConnType conType )
|
||||
{
|
||||
XP_U16 index = 0;
|
||||
switch( conType ) {
|
||||
case COMMS_CONN_RELAY:
|
||||
index = 1;
|
||||
break;
|
||||
case COMMS_CONN_BT:
|
||||
index = 0;
|
||||
break;
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
XP_U16 ii;
|
||||
for ( ii = 0; state->types[ii].conType != COMMS_CONN_NONE; ++ii ) {
|
||||
if ( conType == state->types[ii].conType ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
XP_ASSERT( state->types[ii].conType != COMMS_CONN_NONE );
|
||||
return ii;
|
||||
}
|
||||
|
||||
static CommsConnType
|
||||
indexToConType( XP_U16 index )
|
||||
indexToConType( const CeConnDlgState* state, XP_U16 index )
|
||||
{
|
||||
CommsConnType conType = COMMS_CONN_NONE;
|
||||
switch( index ) {
|
||||
case 0:
|
||||
conType = COMMS_CONN_BT; break;
|
||||
case 1:
|
||||
conType = COMMS_CONN_RELAY; break;
|
||||
default:
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
CommsConnType conType = state->types[index].conType;
|
||||
XP_ASSERT( conTypeToIndex( state, conType ) == index );
|
||||
return conType;
|
||||
}
|
||||
} /* indexToConType */
|
||||
|
||||
static void
|
||||
ceControlsFromAddrRec( HWND hDlg, const CeConnDlgState* state )
|
||||
{
|
||||
XP_U16 i;
|
||||
wchar_t* strs[] = {
|
||||
L"Bluetooth"
|
||||
, L"WiFi/Cellular data"
|
||||
};
|
||||
XP_U16 ii;
|
||||
CEAppGlobals* globals = state->dlgHdr.globals;
|
||||
CommsConnType conType;
|
||||
|
||||
for ( i = 0; i < VSIZE(strs); ++i ) {
|
||||
SendDlgItemMessage( hDlg, IDC_CONNECTCOMBO, CB_ADDSTRING,
|
||||
0, (LPARAM)strs[i] );
|
||||
for ( ii = 0; ; ++ii ) {
|
||||
ConnDlgPair* type = &state->types[ii];
|
||||
if ( type->conType == COMMS_CONN_NONE ) {
|
||||
break;
|
||||
}
|
||||
/* make sure tables are in sync */
|
||||
XP_ASSERT( ii == conTypeToIndex( state, type->conType ) );
|
||||
SendDlgItemMessage( hDlg, state->connComboId, ADDSTRING(globals),
|
||||
0, (LPARAM)type->str );
|
||||
}
|
||||
|
||||
SendDlgItemMessage( hDlg, IDC_CONNECTCOMBO, CB_SETCURSEL,
|
||||
conTypeToIndex(state->addrRec.conType), 0L );
|
||||
SendDlgItemMessage( hDlg, state->connComboId, SETCURSEL(globals),
|
||||
conTypeToIndex(state, state->addrRec.conType), 0L );
|
||||
|
||||
conType = state->addrRec.conType;
|
||||
if ( state->addrRec.conType == COMMS_CONN_RELAY ) {
|
||||
#ifdef XWFEATURE_RELAY
|
||||
ceSetDlgItemText( hDlg, RELAYNAME_EDIT,
|
||||
|
@ -149,6 +204,10 @@ ceControlsFromAddrRec( HWND hDlg, const CeConnDlgState* state )
|
|||
state->addrRec.u.ip_relay.port );
|
||||
ceSetDlgItemText( hDlg, COOKIE_EDIT,
|
||||
state->addrRec.u.ip_relay.cookie );
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_IP_DIRECT ) {
|
||||
#ifdef XWFEATURE_IP_DIRECT
|
||||
ceSetDlgItemText( hDlg, IPNAME_EDIT, state->addrRec.u.ip.hostName_ip );
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_BT ) {
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
|
@ -156,6 +215,11 @@ ceControlsFromAddrRec( HWND hDlg, const CeConnDlgState* state )
|
|||
ceSetDlgItemText( hDlg, IDC_BLUET_ADDR_EDIT,
|
||||
state->addrRec.u.bt.hostName );
|
||||
}
|
||||
#endif
|
||||
} else if ( state->addrRec.conType == COMMS_CONN_SMS ) {
|
||||
#ifdef XWFEATURE_SMS
|
||||
ceSetDlgItemText( hDlg, IDC_SMS_PHONE_EDIT, state->addrRec.u.sms.phone );
|
||||
ceSetDlgItemNum( hDlg, IDC_SMS_PORT_EDIT, state->addrRec.u.sms.port );
|
||||
#endif
|
||||
} else {
|
||||
XP_ASSERT(0);
|
||||
|
@ -173,44 +237,43 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
|
|||
SetWindowLongPtr( hDlg, GWL_USERDATA, lParam );
|
||||
state = (CeConnDlgState*)lParam;
|
||||
|
||||
adjustForConnType( hDlg, state );
|
||||
|
||||
state->connComboId = LB_IF_PPC(state->dlgHdr.globals,IDC_CONNECT_COMBO);
|
||||
adjustForConnType( hDlg, state, XP_TRUE );
|
||||
ceControlsFromAddrRec( hDlg, state );
|
||||
|
||||
ceDlgSetup( &state->dlgHdr, hDlg, DLG_STATE_NONE );
|
||||
ceDlgSetup( &state->dlgHdr, hDlg, DLG_STATE_TRAPBACK );
|
||||
|
||||
ceDlgComboShowHide( &state->dlgHdr, IDC_CONNECT_COMBO );
|
||||
|
||||
result = TRUE;
|
||||
} else {
|
||||
state = (CeConnDlgState*)GetWindowLongPtr( hDlg, GWL_USERDATA );
|
||||
if ( !!state ) {
|
||||
XP_U16 id = LOWORD(wParam);
|
||||
|
||||
if ( message == WM_COMMAND ) {
|
||||
XP_U16 id = LOWORD(wParam);
|
||||
if ( ceDoDlgHandle( &state->dlgHdr, message, wParam, lParam) ) {
|
||||
result = TRUE;
|
||||
|
||||
switch( id ) {
|
||||
|
||||
case IDC_CONNECTCOMBO:
|
||||
} else if ( WM_NOTIFY == message ) {
|
||||
if ( (id-1) == state->connComboId ) {
|
||||
adjustForConnType( hDlg, state, XP_FALSE );
|
||||
}
|
||||
} else if ( WM_COMMAND == message ) {
|
||||
if ( id == state->connComboId ) {
|
||||
if ( HIWORD(wParam) == CBN_SELCHANGE ) {
|
||||
XP_S16 sel;
|
||||
sel = SendDlgItemMessage( hDlg, IDC_CONNECTCOMBO,
|
||||
CB_GETCURSEL, 0, 0L );
|
||||
state->addrRec.conType = indexToConType( sel );
|
||||
adjustForConnType( hDlg, state );
|
||||
adjustForConnType( hDlg, state, XP_FALSE );
|
||||
result = TRUE;
|
||||
}
|
||||
} else {
|
||||
switch ( id ) {
|
||||
case IDOK:
|
||||
ceControlsToAddrRec( hDlg, state );
|
||||
case IDCANCEL:
|
||||
EndDialog(hDlg, id);
|
||||
state->userCancelled = id == IDCANCEL;
|
||||
result = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case IDOK:
|
||||
ceControlsToAddrRec( hDlg, state );
|
||||
case IDCANCEL:
|
||||
EndDialog(hDlg, id);
|
||||
state->userCancelled = id == IDCANCEL;
|
||||
result = TRUE;
|
||||
}
|
||||
/* } else if ( message == WM_VSCROLL ) { */
|
||||
/* if ( !IS_SMARTPHONE(globals) ) { */
|
||||
/* ceDoDlgScroll( hDlg, wParam ); */
|
||||
/* } */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,20 +282,40 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
|
|||
} /* ConnsDlg */
|
||||
|
||||
XP_Bool
|
||||
WrapConnsDlg( HWND hDlg, CEAppGlobals* globals, const CommsAddrRec* addrRec,
|
||||
DeviceRole role, CeConnDlgState* state )
|
||||
WrapConnsDlg( HWND hDlg, CEAppGlobals* globals, const CommsAddrRec* addrRecIn,
|
||||
CommsAddrRec* addrRecOut, DeviceRole role )
|
||||
{
|
||||
XP_Bool result;
|
||||
XP_MEMSET( state, 0, sizeof( *state ) );
|
||||
CeConnDlgState state;
|
||||
ConnDlgPair types[] = {
|
||||
#ifdef XWFEATURE_RELAY
|
||||
{ COMMS_CONN_RELAY, L"Relay" },
|
||||
#endif
|
||||
#ifdef XWFEATURE_IP_DIRECT
|
||||
{ COMMS_CONN_IP_DIRECT, L"Direct connection" },
|
||||
#endif
|
||||
#ifdef XWFEATURE_SMS
|
||||
{ COMMS_CONN_SMS, L"Texting" },
|
||||
#endif
|
||||
{ COMMS_CONN_NONE, NULL }
|
||||
};
|
||||
|
||||
state->dlgHdr.globals = globals;
|
||||
state->role = role;
|
||||
XP_MEMCPY( &state->addrRec, addrRec, sizeof(state->addrRec) );
|
||||
XP_MEMSET( &state, 0, sizeof( state ) );
|
||||
|
||||
state.dlgHdr.globals = globals;
|
||||
state.types = types;
|
||||
state.role = role;
|
||||
XP_MEMCPY( &state.addrRec, addrRecIn, sizeof(state.addrRec) );
|
||||
|
||||
DialogBoxParam( globals->hInst, (LPCTSTR)IDD_CONNSSDLG, hDlg,
|
||||
(DLGPROC)ConnsDlg, (long)state );
|
||||
(DLGPROC)ConnsDlg, (long)&state );
|
||||
|
||||
result = !state.userCancelled;
|
||||
|
||||
if ( result ) {
|
||||
XP_MEMCPY( addrRecOut, &state.addrRec, sizeof(*addrRecOut) );
|
||||
}
|
||||
|
||||
result = !state->userCancelled;
|
||||
return result;
|
||||
} /* WrapConnsDlg */
|
||||
|
||||
|
|
|
@ -23,17 +23,10 @@
|
|||
|
||||
#include "comms.h"
|
||||
#include "cemain.h"
|
||||
#include "ceutil.h"
|
||||
|
||||
typedef struct CeConnDlgState {
|
||||
CeDlgHdr dlgHdr;
|
||||
CommsAddrRec addrRec;
|
||||
DeviceRole role;
|
||||
XP_Bool userCancelled;
|
||||
} CeConnDlgState;
|
||||
#include "ceutil.h"
|
||||
|
||||
XP_Bool WrapConnsDlg( HWND hDlg, CEAppGlobals* globals,
|
||||
const CommsAddrRec* addrRec,
|
||||
DeviceRole role, CeConnDlgState* state );
|
||||
const CommsAddrRec* addrRecIn,
|
||||
CommsAddrRec* addrRecOut, DeviceRole role );
|
||||
|
||||
#endif
|
||||
|
|
118
wince/ceginfo.c
118
wince/ceginfo.c
|
@ -162,28 +162,24 @@ cleanupGameInfoState( GameInfoState* state )
|
|||
static void
|
||||
loadFromGameInfo( GameInfoState* state )
|
||||
{
|
||||
XP_U16 i;
|
||||
XP_U16 ii;
|
||||
CEAppGlobals* globals = state->dlgHdr.globals;
|
||||
CurGameInfo* gi = &globals->gameInfo;
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
HWND hDlg = state->dlgHdr.hDlg;
|
||||
#endif
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
wchar_t* roles[] = { L"Standalone", L"Host", L"Guest" };
|
||||
for ( i = 0; i < VSIZE(roles); ++i ) {
|
||||
SendDlgItemMessage( hDlg, IDC_ROLECOMBO, CB_ADDSTRING, 0,
|
||||
(long)roles[i] );
|
||||
for ( ii = 0; ii < VSIZE(roles); ++ii ) {
|
||||
SendDlgItemMessage( state->dlgHdr.hDlg, state->roleComboId,
|
||||
ADDSTRING(globals), 0, (long)roles[ii] );
|
||||
}
|
||||
#endif
|
||||
|
||||
for ( i = 0; i < MAX_NUM_PLAYERS; ++i ) {
|
||||
for ( ii = 0; ii < MAX_NUM_PLAYERS; ++ii ) {
|
||||
wchar_t widebuf[8];
|
||||
/* put a string in the moronic combobox */
|
||||
swprintf( widebuf, L"%d", i + 1 );
|
||||
swprintf( widebuf, L"%d", ii + 1 );
|
||||
SendDlgItemMessage( state->dlgHdr.hDlg, state->nPlayersId,
|
||||
ADDSTRING(globals), 0,
|
||||
(long)widebuf );
|
||||
ADDSTRING(globals), 0, (long)widebuf );
|
||||
}
|
||||
|
||||
newg_load( state->newGameCtx, gi );
|
||||
|
@ -257,11 +253,6 @@ stateToGameInfo( GameInfoState* state )
|
|||
return success;
|
||||
} /* stateToGameInfo */
|
||||
|
||||
#ifndef DM_RESETSCROLL
|
||||
//http://www.nah6.com/~itsme/cvs-xdadevtools/itsutils/src/its_windows_message_list.txt
|
||||
# define DM_RESETSCROLL 0x0402
|
||||
#endif
|
||||
|
||||
static void
|
||||
raiseForHiddenPlayers( GameInfoState* state, XP_U16 nPlayers )
|
||||
{
|
||||
|
@ -332,18 +323,30 @@ handlePrefsButton( HWND hDlg, CEAppGlobals* globals, GameInfoState* state )
|
|||
}
|
||||
} /* handlePrefsButton */
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
static void
|
||||
handleConnOptionsButton( HWND hDlg, CEAppGlobals* globals,
|
||||
DeviceRole role, GameInfoState* state )
|
||||
{
|
||||
CeConnDlgState dlgState;
|
||||
if ( role == SERVER_STANDALONE ) {
|
||||
NGValue value;
|
||||
role = (DeviceRole)SendDlgItemMessage( hDlg,
|
||||
state->roleComboId,
|
||||
GETCURSEL(globals), 0,
|
||||
0L);
|
||||
value.ng_role = role;
|
||||
newg_attrChanged( state->newGameCtx, NG_ATTR_ROLE, value );
|
||||
}
|
||||
|
||||
if ( WrapConnsDlg( hDlg, globals, &state->prefsPrefs.addrRec,
|
||||
role, &dlgState ) ) {
|
||||
XP_MEMCPY( &state->prefsPrefs.addrRec, &dlgState.addrRec,
|
||||
sizeof(state->prefsPrefs.addrRec) );
|
||||
state->addrChanged = XP_TRUE;
|
||||
if ( role != state->lastRole ) {
|
||||
state->lastRole = role;
|
||||
|
||||
if ( role != SERVER_STANDALONE) {
|
||||
if ( WrapConnsDlg( hDlg, globals, &state->prefsPrefs.addrRec,
|
||||
&state->prefsPrefs.addrRec, role ) ) {
|
||||
state->addrChanged = XP_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -380,9 +383,9 @@ resIDForAttr( GameInfoState* state, NewGameAttr attr )
|
|||
case NG_ATTR_NPLAYERS:
|
||||
resID = state->nPlayersId;
|
||||
break;
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
case NG_ATTR_ROLE:
|
||||
resID = IDC_ROLECOMBO;
|
||||
resID = state->roleComboId;
|
||||
break;
|
||||
case NG_ATTR_REMHEADER:
|
||||
resID = IDC_REMOTE_LABEL;
|
||||
|
@ -559,18 +562,28 @@ ceDrawIconButton( CEAppGlobals* globals, DRAWITEMSTRUCT* dis )
|
|||
static void
|
||||
checkUpdateCombo( GameInfoState* state, XP_U16 id )
|
||||
{
|
||||
if ( (id == state->nPlayersId)
|
||||
&& state->isNewGame ) { /* ignore if in info mode */
|
||||
NGValue value;
|
||||
XP_U16 nPlayers = 1 + (XP_U16)
|
||||
SendDlgItemMessage( state->dlgHdr.hDlg, id,
|
||||
GETCURSEL(state->dlgHdr.globals), 0, 0L);
|
||||
value.ng_u16 = nPlayers;
|
||||
XP_ASSERT( !!state->newGameCtx );
|
||||
newg_attrChanged( state->newGameCtx,
|
||||
NG_ATTR_NPLAYERS, value );
|
||||
HWND hDlg = state->dlgHdr.hDlg;
|
||||
|
||||
raiseForHiddenPlayers( state, nPlayers );
|
||||
if ( id == state->nPlayersId ) {
|
||||
if ( state->isNewGame ) { /* ignore if in info mode */
|
||||
XP_S16 sel;
|
||||
XP_U16 nPlayers;
|
||||
NGValue value;
|
||||
|
||||
sel = SendDlgItemMessage( hDlg, id,
|
||||
GETCURSEL(state->dlgHdr.globals), 0, 0L);
|
||||
nPlayers = 1 + sel;
|
||||
value.ng_u16 = nPlayers;
|
||||
XP_ASSERT( !!state->newGameCtx );
|
||||
newg_attrChanged( state->newGameCtx,
|
||||
NG_ATTR_NPLAYERS, value );
|
||||
|
||||
raiseForHiddenPlayers( state, nPlayers );
|
||||
}
|
||||
} else if ( id == state->roleComboId ) {
|
||||
XP_ASSERT( SERVER_STANDALONE == 0 );
|
||||
handleConnOptionsButton( hDlg, state->dlgHdr.globals,
|
||||
SERVER_STANDALONE, state );
|
||||
}
|
||||
} /* checkUpdateCombo */
|
||||
|
||||
|
@ -590,10 +603,16 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
globals = state->dlgHdr.globals;
|
||||
|
||||
state->nPlayersId = LB_IF_PPC(globals,IDC_NPLAYERSCOMBO);
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
state->roleComboId = LB_IF_PPC(globals, IDC_ROLECOMBO);
|
||||
#endif
|
||||
state->dictListId = LB_IF_PPC(globals,IDC_DICTLIST);
|
||||
state->prevNPlayers = MAX_NUM_PLAYERS;
|
||||
|
||||
ceDlgSetup( &state->dlgHdr, hDlg, DLG_STATE_TRAPBACK );
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
ceDlgComboShowHide( &state->dlgHdr, IDC_ROLECOMBO );
|
||||
#endif
|
||||
ceDlgComboShowHide( &state->dlgHdr, IDC_NPLAYERSCOMBO );
|
||||
ceDlgComboShowHide( &state->dlgHdr, IDC_DICTLIST );
|
||||
|
||||
|
@ -643,7 +662,11 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
case WM_COMMAND:
|
||||
result = TRUE;
|
||||
id = LOWORD(wParam);
|
||||
if ( id == state->nPlayersId ) {
|
||||
if ( id == state->nPlayersId
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
|| id == state->roleComboId
|
||||
#endif
|
||||
) {
|
||||
if ( HIWORD(wParam) == CBN_SELCHANGE ) {
|
||||
checkUpdateCombo( state, id );
|
||||
}
|
||||
|
@ -663,28 +686,17 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
case REMOTE_CHECK4:
|
||||
handleColChecked( state, id, REMOTE_CHECK1 );
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
case IDC_ROLECOMBO:
|
||||
case IDC_ROLECOMBO_PPC:
|
||||
if ( HIWORD(wParam) == CBN_SELCHANGE ) {
|
||||
if ( state->isNewGame ) { /* ignore if in info
|
||||
mode */
|
||||
NGValue value;
|
||||
value.ng_role =
|
||||
(DeviceRole)SendDlgItemMessage( hDlg,
|
||||
IDC_ROLECOMBO,
|
||||
CB_GETCURSEL, 0,
|
||||
0L);
|
||||
newg_attrChanged( state->newGameCtx,
|
||||
NG_ATTR_ROLE, value );
|
||||
/* If we've switched to a state where we'll be
|
||||
connecting */
|
||||
if ( value.ng_role != SERVER_STANDALONE ) {
|
||||
handleConnOptionsButton( hDlg, globals,
|
||||
value.ng_role,
|
||||
state );
|
||||
}
|
||||
handleConnOptionsButton( hDlg, globals,
|
||||
SERVER_STANDALONE,
|
||||
state );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
||||
/*
|
||||
* Copyright 2002 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
* Copyright 2002-2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -37,6 +37,10 @@ typedef struct GameInfoState {
|
|||
wchar_t** menuDicts;
|
||||
XP_U16 nPlayersId;
|
||||
XP_U16 dictListId;
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
XP_U16 roleComboId;
|
||||
DeviceRole lastRole; /* to prevent multiple dialog raises */
|
||||
#endif
|
||||
|
||||
XP_Bool isNewGame; /* newGame or GameInfo */
|
||||
XP_Bool userCancelled; /* OUT param */
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "debhacks.h"
|
||||
#include "cesvdgms.h"
|
||||
#include "cedraw.h"
|
||||
#include "cesms.h"
|
||||
|
||||
#include "dbgutil.h"
|
||||
|
||||
|
@ -74,7 +75,7 @@ typedef struct FileWriteState {
|
|||
} FileWriteState;
|
||||
|
||||
/* forward util function decls */
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
static XP_S16 ce_send_proc( const XP_U8* buf, XP_U16 len,
|
||||
const CommsAddrRec* addr,
|
||||
void* closure );
|
||||
|
@ -2846,20 +2847,46 @@ ce_reset_proc( void* closure )
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
static XP_S16
|
||||
ce_send_proc( const XP_U8* buf, XP_U16 len, const CommsAddrRec* addr,
|
||||
ce_send_proc( const XP_U8* buf, XP_U16 len, const CommsAddrRec* addrp,
|
||||
void* closure )
|
||||
{
|
||||
XP_S16 nSent = -1;
|
||||
CEAppGlobals* globals = (CEAppGlobals*)closure;
|
||||
XP_LOGF( "ce_send_proc called" );
|
||||
CommsAddrRec addr;
|
||||
LOG_FUNC();
|
||||
|
||||
if ( !globals->socketWrap ) {
|
||||
globals->socketWrap = ce_sockwrap_new( MPPARM(globals->mpool)
|
||||
got_data_proc, globals );
|
||||
if ( !addrp ) {
|
||||
comms_getAddr( globals->game.comms, &addr );
|
||||
addrp = &addr;
|
||||
}
|
||||
|
||||
return ce_sockwrap_send( globals->socketWrap, buf, len, addr );
|
||||
XP_ASSERT( !!addrp ); /* firing */
|
||||
switch( addrp->conType ) {
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
case COMMS_CONN_IP_DIRECT:
|
||||
break;
|
||||
case COMMS_CONN_RELAY:
|
||||
if ( !globals->socketWrap ) {
|
||||
globals->socketWrap = ce_sockwrap_new( MPPARM(globals->mpool)
|
||||
got_data_proc, globals );
|
||||
}
|
||||
|
||||
nSent = ce_sockwrap_send( globals->socketWrap, buf, len, addrp );
|
||||
break;
|
||||
#endif
|
||||
#ifdef XWFEATURE_SMS
|
||||
case COMMS_CONN_SMS:
|
||||
nSent = ce_sms_send( globals, buf, len, addrp );
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
XP_LOGF( "unexpected conType %d", addrp->conType );
|
||||
XP_ASSERT( 0 );
|
||||
}
|
||||
|
||||
return nSent;
|
||||
} /* ce_send_proc */
|
||||
|
||||
static void
|
||||
|
@ -3349,7 +3376,7 @@ ce_util_remSelected( XW_UtilCtxt* uc )
|
|||
PostMessage( globals->hWnd, XWWM_REM_SEL, 0, 0 );
|
||||
}
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
static void
|
||||
ce_util_addrChange( XW_UtilCtxt* XP_UNUSED(uc),
|
||||
const CommsAddrRec* XP_UNUSED(oldAddr),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-mode: C; fill-column: 78; c-basic-offset: 4;-*- */
|
||||
/*
|
||||
* Copyright 2000-2008 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
* Copyright 2000-2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -212,4 +212,10 @@ XP_Bool queryBoxChar( HWND hWnd, const XP_UCHAR* msg );
|
|||
|
||||
#define BACK_KEY_UP_MAYBE 0x1000
|
||||
#define CE_MAX_PATH_LEN 256
|
||||
|
||||
#ifndef DM_RESETSCROLL
|
||||
//http://www.nah6.com/~itsme/cvs-xdadevtools/itsutils/src/its_windows_message_list.txt
|
||||
# define DM_RESETSCROLL 0x0402
|
||||
#endif
|
||||
|
||||
#endif /* _CEMAIN_H_ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
||||
/*
|
||||
* Copyright 2002 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
* Copyright 2002-2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -138,7 +138,7 @@ loadStateFromCurPrefs( CEAppGlobals* XP_UNUSED_STANDALONE(globals),
|
|||
XP_MEMCPY( &prefsPrefs->colors, &appPrefs->colors,
|
||||
sizeof(prefsPrefs->colors) );
|
||||
|
||||
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
if ( globals->game.comms != NULL ) {
|
||||
comms_getAddr( globals->game.comms, &prefsPrefs->addrRec );
|
||||
} else {
|
||||
|
|
30
wince/cesms.c
Normal file
30
wince/cesms.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
||||
/*
|
||||
* Copyright 2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "cesms.h"
|
||||
|
||||
XP_S16
|
||||
ce_sms_send( CEAppGlobals* XP_UNUSED(globals), const XP_U8* XP_UNUSED(buf),
|
||||
XP_U16 len, const CommsAddrRec* addrp )
|
||||
{
|
||||
XP_LOGF( "%s: got %d bytes to send to port %d at %s but don't know how.",
|
||||
__func__, len, addrp->u.sms.port, addrp->u.sms.phone );
|
||||
return -1;
|
||||
}
|
||||
|
28
wince/cesms.h
Normal file
28
wince/cesms.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
||||
/*
|
||||
* Copyright 2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _CESMS_H_
|
||||
#define _CESMS_H_
|
||||
|
||||
#include "cemain.h"
|
||||
|
||||
XP_S16 ce_sms_send( CEAppGlobals* globals, const XP_U8* buf, XP_U16 len,
|
||||
const CommsAddrRec* addrp );
|
||||
|
||||
#endif
|
|
@ -92,8 +92,8 @@ queue_packet( CeSocketWrapper* self, XP_U8* packet, XP_U16 len )
|
|||
self->packets[self->nPackets] = packet;
|
||||
self->lens[self->nPackets] = len;
|
||||
++self->nPackets;
|
||||
XP_LOGF( "there are now %d packets on send queue",
|
||||
self->nPackets );
|
||||
XP_LOGF( "%s: there are now %d packets on send queue",
|
||||
__func__, self->nPackets );
|
||||
|
||||
/* signal the writer thread */
|
||||
SetEvent( self->queueAddEvent );
|
||||
|
@ -130,6 +130,7 @@ get_packet( CeSocketWrapper* self, XP_U8** packet, XP_U16* len )
|
|||
return success;
|
||||
} /* get_packet */
|
||||
|
||||
/* called by WriterThreadProc */
|
||||
static void
|
||||
remove_packet( CeSocketWrapper* self )
|
||||
{
|
||||
|
@ -173,14 +174,13 @@ sendAll( CeSocketWrapper* self, XP_U8* buf, XP_U16 len )
|
|||
static XP_Bool
|
||||
sendLenAndData( CeSocketWrapper* self, XP_U8* packet, XP_U16 len )
|
||||
{
|
||||
XP_Bool success = XP_FALSE;
|
||||
XP_Bool success;
|
||||
XP_U16 lenData;
|
||||
XP_ASSERT( self->socket != -1 );
|
||||
|
||||
lenData = XP_HTONS( len );
|
||||
if ( sendAll( self, (XP_U8*)&lenData, sizeof(lenData) ) ) {
|
||||
success = sendAll( self, packet, len );
|
||||
}
|
||||
success = sendAll( self, (XP_U8*)&lenData, sizeof(lenData) )
|
||||
&& sendAll( self, packet, len );
|
||||
return success;
|
||||
} /* sendLenAndData */
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#define IDC_PREFCOLORS 1045
|
||||
#define IDC_PREFFONTS 1046
|
||||
#define PHONIES_LABEL 1048
|
||||
#define IDC_ROLECOMBO 1049
|
||||
/* #define IDC_ROLECOMBO 1049 */
|
||||
#define GIJUGGLE_BUTTON 1050
|
||||
#define IDC_TOTAL_LABEL 1051
|
||||
#define IDC_REMOTE_LABEL 1052
|
||||
|
@ -164,20 +164,28 @@
|
|||
# define IDC_CRELAYPORT_LAB 1109
|
||||
# define IDC_CRELAYHINT_LAB 1110
|
||||
|
||||
# define IDC_CONNECTCOMBO 1111
|
||||
/* # define IDC_CONNECTCOMBO 1111 */
|
||||
# define RELAYNAME_EDIT 1112
|
||||
# define RELAYPORT_EDIT 1113
|
||||
# define COOKIE_EDIT 1114
|
||||
|
||||
#endif
|
||||
|
||||
#define IDC_BLUET_ADDR_LAB 1115
|
||||
#define IDC_BLUET_ADDR_LAB 1300
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
# define IDC_BLUET_ADDR_EDIT 1116
|
||||
# define IDC_BLUET_ADDR_BROWSE 1117
|
||||
# define IDC_BLUET_ADDR_EDIT 1301
|
||||
# define IDC_BLUET_ADDR_BROWSE 1302
|
||||
#endif
|
||||
/* #define IDS_UPDOWN 1118 */
|
||||
|
||||
/* Direct IP connection */
|
||||
# define IDC_IPNAME_LAB 1303
|
||||
# define IPNAME_EDIT 1304
|
||||
/* SMS connection */
|
||||
# define IDC_SMS_PHONE_LAB 1305
|
||||
# define IDC_SMS_PHONE_EDIT 1306
|
||||
# define IDC_SMS_PORT_LAB 1307
|
||||
# define IDC_SMS_PORT_EDIT 1308
|
||||
|
||||
#define IDC_SVGM_SELLAB 1127
|
||||
/* Let's remove these until they're implemented */
|
||||
|
@ -269,7 +277,17 @@
|
|||
#define IDC_NPLAYERSUPDOWN 1219
|
||||
#define IDC_NPLAYERSCOMBO_PPC 1220
|
||||
|
||||
#define IDC_DICTLABEL 1221
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
# define IDC_CONNECT_COMBO 1221
|
||||
# define IDC_CONNECTUPDOWN 1222
|
||||
# define IDC_CONNECT_COMBO_PPC 1223
|
||||
|
||||
# define IDC_ROLECOMBO 1224
|
||||
# define IDC_ROLEUPDOWN 1225
|
||||
# define IDC_ROLECOMBO_PPC 1226
|
||||
#endif /* XWFEATURE_STANDALONE_ONLY */
|
||||
|
||||
#define IDC_DICTLABEL 1227
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
@ -277,7 +295,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 125
|
||||
#define _APS_NEXT_COMMAND_VALUE 40033
|
||||
#define _APS_NEXT_CONTROL_VALUE 1128
|
||||
/* #define _APS_NEXT_CONTROL_VALUE 1128 */
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
||||
/*
|
||||
* Copyright 1999-2008 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
* Copyright 1999-2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -119,11 +119,11 @@ XP_U16 wince_snprintf( XP_UCHAR* buf, XP_U16 len,
|
|||
|
||||
/* The pocketpc sdk on linux renames certain functions to avoid conflicts
|
||||
with same-named posix symbols. */
|
||||
#if defined __GNUC__ && defined _WIN32_WCE
|
||||
# define MS(func) M$_##func
|
||||
#else
|
||||
/* #if defined __GNUC__ && defined _WIN32_WCE */
|
||||
/* # define MS(func) M$_##func */
|
||||
/* #else */
|
||||
# define MS(func) func
|
||||
#endif
|
||||
/* #endif */
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# undef CALLBACK
|
||||
|
|
Loading…
Reference in a new issue