mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 01:02:20 +00:00
Compare commits
4 commits
e459ab7037
...
89b6a010c8
Author | SHA1 | Date | |
---|---|---|---|
89b6a010c8 | |||
306d3c7b58 | |||
9832288983 | |||
36542327b0 |
|
@ -1,15 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- Vulkan 1.1.0 is used if supported -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.vulkan.version"
|
||||
android:required="false"
|
||||
android:version="0x00401000" />
|
||||
<!-- android:glEsVersion is not specified as OpenGL ES 1.0 is supported as fallback -->
|
||||
|
||||
<!-- Only playable in landscape mode -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.screen.landscape"
|
||||
android:required="true" />
|
||||
|
||||
<!-- Touchscreen support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.usb.host"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Teeworlds does broadcasts over local networks -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
||||
|
@ -25,17 +50,24 @@
|
|||
android:isGame="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:hardwareAccelerated="true">
|
||||
<activity
|
||||
android:name="org.ddnet.client.NativeMain"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:exported="true"
|
||||
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:preferMinimalPostProcessing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:launchMode="singleInstance">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- Let Android know that we can handle some USB devices and should receive this event -->
|
||||
<intent-filter>
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="DDNet" />
|
||||
|
|
|
@ -1467,6 +1467,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
|
||||
m_MapDetailsPresent = true;
|
||||
(void)MapSize;
|
||||
str_copy(m_aPreviousMapDetailsName, m_aMapDetailsName);
|
||||
str_copy(m_aMapDetailsName, pMap);
|
||||
m_MapDetailsSha256 = *pMapSha256;
|
||||
m_MapDetailsCrc = MapCrc;
|
||||
|
@ -1522,6 +1523,12 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
|
||||
if(m_DummyConnected)
|
||||
{
|
||||
if(str_comp(m_aMapDetailsName, m_aPreviousMapDetailsName) == 0)
|
||||
{
|
||||
m_DummyReconnectOnLoad = true;
|
||||
m_DummySwapOnReconnect = g_Config.m_ClDummy == 1 ? false : true;
|
||||
}
|
||||
|
||||
DummyDisconnect(0);
|
||||
}
|
||||
|
||||
|
@ -1652,6 +1659,11 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
|||
else if(Conn == CONN_MAIN && (pPacket->m_Flags & NET_CHUNKFLAG_VITAL) != 0 && Msg == NETMSG_CON_READY)
|
||||
{
|
||||
GameClient()->OnConnected();
|
||||
if(m_DummyReconnectOnLoad)
|
||||
{
|
||||
m_DummyReconnectOnLoad = false;
|
||||
DummyConnect();
|
||||
}
|
||||
}
|
||||
else if(Conn == CONN_DUMMY && Msg == NETMSG_CON_READY)
|
||||
{
|
||||
|
@ -2746,6 +2758,16 @@ void CClient::Update()
|
|||
}
|
||||
}
|
||||
|
||||
if(m_DummySwapOnReconnect && g_Config.m_ClDummy == 1)
|
||||
{
|
||||
m_DummySwapOnReconnect = false;
|
||||
g_Config.m_ClDummy = 0;
|
||||
}
|
||||
else if(!m_DummyConnected && m_DummySwapOnReconnect)
|
||||
{
|
||||
m_DummySwapOnReconnect = false;
|
||||
}
|
||||
|
||||
m_LastDummy = (bool)g_Config.m_ClDummy;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@ class CClient : public IClient, public CDemoPlayer::IListener
|
|||
|
||||
bool m_MapDetailsPresent = false;
|
||||
char m_aMapDetailsName[256] = "";
|
||||
char m_aPreviousMapDetailsName[256] = "";
|
||||
int m_MapDetailsCrc = 0;
|
||||
SHA256_DIGEST m_MapDetailsSha256 = SHA256_ZEROED;
|
||||
char m_aMapDetailsUrl[256] = "";
|
||||
|
@ -182,6 +183,8 @@ class CClient : public IClient, public CDemoPlayer::IListener
|
|||
bool m_DummyConnecting = false;
|
||||
bool m_DummyConnected = false;
|
||||
float m_LastDummyConnectTime = 0.0f;
|
||||
bool m_DummyReconnectOnLoad = false;
|
||||
bool m_DummySwapOnReconnect = false;
|
||||
|
||||
// graphs
|
||||
CGraph m_InputtimeMarginGraph;
|
||||
|
|
Loading…
Reference in a new issue