mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
include game name in invitation
This commit is contained in:
parent
f4a691da6b
commit
270f2922b1
2 changed files with 13 additions and 5 deletions
|
@ -1184,8 +1184,7 @@ public class BoardDelegate extends DelegateBase
|
|||
{
|
||||
String data = null;
|
||||
if ( 0 < m_nMissing ) { // Isn't there a better test??
|
||||
NetLaunchInfo nli = new NetLaunchInfo( m_gi.gameID, m_gi.dictLang,
|
||||
m_gi.dictName, m_gi.nPlayers );
|
||||
NetLaunchInfo nli = new NetLaunchInfo( m_gi );
|
||||
Assert.assertTrue( 0 <= m_nGuestDevs );
|
||||
nli.forceChannel = 1 + m_nGuestDevs;
|
||||
for ( Iterator<CommsConnType> iter = m_connTypes.iterator();
|
||||
|
@ -1808,6 +1807,7 @@ public class BoardDelegate extends DelegateBase
|
|||
{
|
||||
if ( 0 == m_jniGamePtr ) {
|
||||
try {
|
||||
String gameName = DBUtils.getName( m_activity, m_rowid );
|
||||
String[] dictNames = GameUtils.dictNames( m_activity, m_rowid );
|
||||
DictUtils.DictPairs pairs = DictUtils.openDicts( m_activity, dictNames );
|
||||
|
||||
|
@ -1819,6 +1819,7 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
byte[] stream = GameUtils.savedGame( m_activity, m_gameLock );
|
||||
m_gi = new CurGameInfo( m_activity );
|
||||
m_gi.setName( gameName );
|
||||
XwJNI.gi_from_stream( m_gi, stream );
|
||||
DbgUtils.logf( "BoardDelegate:after loadGame: gi.nPlayers: %d", m_gi.nPlayers );
|
||||
String langName = m_gi.langName();
|
||||
|
|
|
@ -99,7 +99,7 @@ public class NetLaunchInfo {
|
|||
lang = bundle.getInt( MultiService.LANG );
|
||||
forceChannel = bundle.getInt( MultiService.FORCECHANNEL );
|
||||
dict = bundle.getString( MultiService.DICT );
|
||||
gameName= bundle.getString( MultiService.GAMENAME );
|
||||
gameName = bundle.getString( MultiService.GAMENAME );
|
||||
nPlayersT = bundle.getInt( MultiService.NPLAYERST );
|
||||
nPlayersH = bundle.getInt( MultiService.NPLAYERSH );
|
||||
gameID = bundle.getInt( MultiService.GAMEID );
|
||||
|
@ -164,9 +164,11 @@ public class NetLaunchInfo {
|
|||
calcValid();
|
||||
}
|
||||
|
||||
public NetLaunchInfo( int gamID, int dictLang, String dictName, int nPlayers )
|
||||
public NetLaunchInfo( int gamID, String gamNam, int dictLang,
|
||||
String dictName, int nPlayers )
|
||||
{
|
||||
this();
|
||||
gameName = gamNam;
|
||||
dict = dictName;
|
||||
lang = dictLang;
|
||||
nPlayersT = nPlayers;
|
||||
|
@ -181,9 +183,14 @@ public class NetLaunchInfo {
|
|||
forceChannel = fc;
|
||||
}
|
||||
|
||||
public NetLaunchInfo( CurGameInfo gi )
|
||||
{
|
||||
this( gi.gameID, gi.getName(), gi.dictLang, gi.dictName, gi.nPlayers );
|
||||
}
|
||||
|
||||
public NetLaunchInfo( GameSummary summary, CurGameInfo gi )
|
||||
{
|
||||
this( gi.gameID, gi.dictLang, gi.dictName, gi.nPlayers );
|
||||
this( gi );
|
||||
|
||||
for ( CommsConnType typ : summary.conTypes.getTypes() ) {
|
||||
DbgUtils.logf( "NetLaunchInfo(): got type %s", typ.toString() );
|
||||
|
|
Loading…
Add table
Reference in a new issue