controller connect timing tweaks

This commit is contained in:
Eric 2023-10-26 10:33:50 -07:00
parent 2ec08d706e
commit f4aec571ba
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
5 changed files with 30 additions and 26 deletions

40
.efrocachemap generated
View File

@ -4056,26 +4056,26 @@
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "c98fdb967f44411171c3d7fde1c74471",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "5514854ae459adab968120a361692cd5",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "83bcfb3af22b61e5c35972d989b3f7f8",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "a63758734d93eb969fe482b56c8d1ed2",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "7e68a605645c70fca06e4f4d5155bb0c",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0598aa59718bb8404c3b007c22123c75",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "9c86d900fc1bc2d6f3bdb4c3e26149da",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "37f5996151f983b45925ad15dce2d0e9",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "b8560855bf772b3e74f2a8f190f54885",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "55c777fa3afd720089223fb949478502",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "81a41ddca9da9060d5d5034a84845674",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "536825d983f4a3bcec018b0295005bdb",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "1733a9610de15f77dd8df3effcca1516",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "f7434d47c371f0baaae676d288847351",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "d16ea39c50f41117697789dafb249200",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "55d18233c5b887af17afcb266a8c5597",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "c4df3b76ef890daf48e8181cffd4cd82",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "eb609d02a0897c671e40519faad3365b",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0c0d303a440e852d0112c3a5aa75ef36",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "bdd6b2c15d6718a6c99ee287d965f022",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "b3aaa8011f040ba38b1abcff978e3c85",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "f5623a29f71cf5363ff72fe4436340b1",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "9f5ec716df130f92e9b055e9fca4bbc8",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "327f6b0da02ecf72006ff88dd37b31ac",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "ede687d69269225dc788851fc4515ccf",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "16029a78e585822f78fe4619beba456c",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "8f091556ac938da89cab226d9bb59dec",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "08ea82e016ce2d7ac8d687a795e7a179",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "91d4f5cb9b13eb6f2964187fd7ff9cc5",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "ed93c1d02f14dc147d2d84c8f919568c",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "5e3eb1b9195fcbf3ec477392b15bff23",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "b6cf7d6cf47f8bbf1b3c4f28ba9c7854",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "f044e3d1d94751272c02f864ddafbe6b",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "aa56b6e21eb82ca8af11a248bde876d1",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "4ee8ff4b9d37bbc3d7a7db73168f8888",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "dc62f105598c866680a0fd150b83ea0a",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "a04e0837368e5eae80ec084a898b79d8",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "cd5b75cfa4cf0bfd478092ef812006c4",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4decefaeffa74fb89f39834960c8fd5f",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "73087f5f43a6e9d4b10529824d671d6b",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "becf7a70c7c0d7bb5bfe731dde5e0249",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "c9ef036408f0832cd068a34365485e0b",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "becf7a70c7c0d7bb5bfe731dde5e0249",

View File

@ -1,4 +1,4 @@
### 1.7.28 (build 21510, api 8, 2023-10-26)
### 1.7.28 (build 21512, api 8, 2023-10-26)
- Massively cleaned up code related to rendering and window systems (OpenGL,
SDL, etc). This code had been growing into a nasty tangle for 15 years

View File

@ -52,7 +52,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21510
TARGET_BALLISTICA_BUILD = 21512
TARGET_BALLISTICA_VERSION = '1.7.28'

View File

@ -155,11 +155,13 @@ void Input::CreateTouchInput() {
}
void Input::AnnounceConnects_() {
assert(g_base->InLogicThread());
static bool first_print = true;
// For the first announcement just say "X controllers detected" and don't
// have a sound.
if (first_print && g_core->GetAppTimeSeconds() < 2.0) {
if (first_print && g_core->GetAppTimeSeconds() < 3.0) {
first_print = false;
// Disabling this completely on Android for now; we often get large
@ -237,12 +239,14 @@ void Input::ShowStandardInputDeviceConnectedMessage_(InputDevice* j) {
}
newly_connected_controllers_.push_back(j->GetDeviceName() + suffix);
// Set a timer to go off and announce the accumulated additions.
// Set a timer to go off and announce controller additions. This allows
// several connecting at (almost) the same time to be announced as a
// single event.
if (connect_print_timer_id_ != 0) {
g_base->logic->DeleteAppTimer(connect_print_timer_id_);
}
connect_print_timer_id_ = g_base->logic->NewAppTimer(
250, false, NewLambdaRunnable([this] { AnnounceConnects_(); }).Get());
500, false, NewLambdaRunnable([this] { AnnounceConnects_(); }).Get());
}
void Input::ShowStandardInputDeviceDisconnectedMessage_(InputDevice* j) {

View File

@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 21510;
const int kEngineBuildNumber = 21512;
const char* kEngineVersion = "1.7.28";
const int kEngineApiVersion = 8;