bug fixes

This commit is contained in:
Eric 2023-11-29 15:33:59 -08:00
parent 2cc67956ac
commit 18bb80c680
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
9 changed files with 95 additions and 53 deletions

View File

@ -37,8 +37,3 @@ indent_style = space
indent_size = 2 indent_size = 2
max_line_length = 80 max_line_length = 80
# Java overrides.
[*.{java}]
indent_style = space
indent_size = 2
max_line_length = 80

56
.efrocachemap generated
View File

@ -4056,26 +4056,26 @@
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "ead20e58b2cf88e71b324dba1468a5ec", "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e1b514f894b0078ed7bd3a72219ce2a3",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "80fd8e740193e6f7ff47aafdb29beb99", "build/prefab/full/linux_arm64_gui/release/ballisticakit": "17244543e91b7be39444af42dae9b7d1",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "669fef14d4eb8f939a6da857808cc834", "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "47bb91ce4fb7aad7e94b01a51d3ef969",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "ee04459b54e94495a1aefd67628f7a01", "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "bec653e66e25727bc96d6dac966abf41",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "4faea0209f862b3b3efbf8ef570d0ae0", "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "1b4c041294e0d9d1990e9bed2cce718b",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "d6265890c3e384917e7979325be5a7af", "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "54a3cef6bc9a0118cf5ff1b0fe897981",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "9d9365749d358cd3543f72b07b5416cc", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "7a0424345af93c7e96fd37178a101975",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "730dd0cb27af4dee2e42174718dc36a6", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "1319f01def8f006757b6ba9f99d4082d",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "30bf588730c95523b6891a9431ad9897", "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "517b50b6decce9ec2fbae020971c1cb1",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "a0e734e97483f608b0da91721c42f416", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "a5092bc735ba18f9dc01775d2aca6de3",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "b44c311262ed6958da11b9143b4747ea", "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "bdf0c74ece44212a80e0a54f462aba54",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "c576e665ed6fbccb14d5591dcfef2560", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6362b3cf0bedff5bb289e23ff93cf94e",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "b8095344948530377d5c4147cfaad3ec", "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "4fc0ad0ef28159d901cea7fc773a01f5",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "1d4f2efd3d2d9e718fd30da5972e605e", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "d1232f39ff8e3e0a45b2fcfe01452916",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "331d85d66cc8e3707401ff847239a973", "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "065cb69f2593e626f681184f772a7971",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "20d4ff570dcbdc53162cd03a2bc5127a", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "d92fc90d32742b00df6bd83f828c3c17",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "58dc3dcaf0e5da291ffaa728c42d080c", "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "9edb7eefb8724c506e251ce9b6388fe8",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e2d33100dd91a8526168246e693008cd", "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "8e2c1faf18f4be6b35890041ba03fdbd",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "616cab068c995c4e70b0f173662565cf", "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "eb29dc378b26fbdc37256f19297797ca",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "7a26ee8376f752ffb010f6360ba090c7", "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "80f58bca4cd948f1ec70aac07914eae0",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "c22901e06e88a55cce0b4e08bbf41a4c", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "c22901e06e88a55cce0b4e08bbf41a4c",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "a27963487e346338e4c216bd4fbb9e2a", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "a27963487e346338e4c216bd4fbb9e2a",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "c22901e06e88a55cce0b4e08bbf41a4c", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "c22901e06e88a55cce0b4e08bbf41a4c",
@ -4092,14 +4092,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "852fe46c736082611a831a618923c241", "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "852fe46c736082611a831a618923c241",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "36fbda7829ed5c2862c34feb09b03402", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "36fbda7829ed5c2862c34feb09b03402",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "852fe46c736082611a831a618923c241", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "852fe46c736082611a831a618923c241",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "b497de63fb2370a7e893a4dd93c3e020", "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "23dbca6f6f4c8b9061e68af17d79791b",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "210cb0d4ec77da138c08ed5428a4ce1e", "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "639bb72656fb6f5b21ac525b9098854a",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "615cc61b2431de1ee68f4c12210d3174", "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "d0a0820657e11771d1e393d47af23c17",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "42ddbc2ec78390ec90d584b667fb21fd", "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "62f9d32dcc6c74421f1a3f88abf07777",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "5af8897e9a047b1b80404c22e0e50123", "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "2d38cd1723c7b1a9a1b19d206d5a17a5",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "6c6e15126d40ed6839e0fdf2fdfc7018", "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "8e4304d0b16fa16038fc1660eb06c350",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "5a70719bd76a7553fcc849472eb71875", "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "08120b7a6b3845cf729c1defcc6e90ec",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "0f2ec390a0306d1a9003cceb972fddee", "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "f5d59b0bce6cb0e43da92a5863bb963c",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "28323912b56ec07701eda3d41a6a4101", "src/assets/ba_data/python/babase/_mgen/enums.py": "28323912b56ec07701eda3d41a6a4101",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f",

View File

@ -1,4 +1,4 @@
### 1.7.30 (build 21623, api 8, 2023-11-28) ### 1.7.30 (build 21628, api 8, 2023-11-29)
- Continued work on the big 1.7.28 update. - Continued work on the big 1.7.28 update.
- Got the Android version back up and running. There's been lots of cleanup and - Got the Android version back up and running. There's been lots of cleanup and
simplification on the Android layer, cleaning out years of cruft. This should simplification on the Android layer, cleaning out years of cruft. This should
@ -17,7 +17,9 @@
more often and be quicker to respond when dialogs or other activities more often and be quicker to respond when dialogs or other activities
temporarily pop up in front of it. Please holler if you run into strange side temporarily pop up in front of it. Please holler if you run into strange side
effects such as the app continuing to play audio when it should not be. effects such as the app continuing to play audio when it should not be.
- (build 21626) Fixed a bug where click/tap locations were incorrect on some
builds when tv-border was on (Thanks for the heads-up Loup(Dliwk's fan)!).
### 1.7.29 (build 21619, api 8, 2023-11-21) ### 1.7.29 (build 21619, api 8, 2023-11-21)
- Simply continued work on the big 1.7.28 update. I was able to finally start - Simply continued work on the big 1.7.28 update. I was able to finally start

View File

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

View File

@ -97,11 +97,8 @@ void AppAdapter::SuspendApp() {
g_core->platform->DebugLog( g_core->platform->DebugLog(
"SuspendApp@" "SuspendApp@"
+ std::to_string(core::CorePlatform::GetCurrentMillisecs())); + std::to_string(core::CorePlatform::GetCurrentMillisecs()));
// assert(!app_pause_requested_);
// app_pause_requested_ = true;
app_suspended_ = true; app_suspended_ = true;
OnAppSuspend_(); OnAppSuspend_();
// UpdatePauseResume_();
// We assume that the OS will completely suspend our process the moment we // We assume that the OS will completely suspend our process the moment we
// return from this call (though this is not technically true on all // return from this call (though this is not technically true on all
@ -149,9 +146,6 @@ void AppAdapter::UnsuspendApp() {
g_core->platform->DebugLog( g_core->platform->DebugLog(
"UnsuspendApp@" "UnsuspendApp@"
+ std::to_string(core::CorePlatform::GetCurrentMillisecs())); + std::to_string(core::CorePlatform::GetCurrentMillisecs()));
// assert(app_pause_requested_);
// app_pause_requested_ = false;
// UpdatePauseResume_();
app_suspended_ = false; app_suspended_ = false;
OnAppUnsuspend_(); OnAppUnsuspend_();
if (g_buildconfig.debug_build()) { if (g_buildconfig.debug_build()) {

View File

@ -28,8 +28,8 @@ extern std::string g_rift_audio_device_name;
#endif #endif
#if BA_OSTYPE_ANDROID #if BA_OSTYPE_ANDROID
LPALCDEVICEPAUSESOFT alcDevicePauseSOFT; LPALCDEVICEPAUSESOFT alcDevicePauseSOFT{};
LPALCDEVICERESUMESOFT alcDeviceResumeSOFT; LPALCDEVICERESUMESOFT alcDeviceResumeSOFT{};
#endif #endif
const int kAudioProcessIntervalNormal{500 * 1000}; const int kAudioProcessIntervalNormal{500 * 1000};
@ -219,8 +219,10 @@ void AudioServer::OnAppStartInThread_() {
if (alcIsExtensionPresent(device, "ALC_SOFT_pause_device")) { if (alcIsExtensionPresent(device, "ALC_SOFT_pause_device")) {
alcDevicePauseSOFT = reinterpret_cast<LPALCDEVICEPAUSESOFT>( alcDevicePauseSOFT = reinterpret_cast<LPALCDEVICEPAUSESOFT>(
alcGetProcAddress(device, "alcDevicePauseSOFT")); alcGetProcAddress(device, "alcDevicePauseSOFT"));
BA_PRECONDITION_FATAL(alcDevicePauseSOFT != nullptr);
alcDeviceResumeSOFT = reinterpret_cast<LPALCDEVICERESUMESOFT>( alcDeviceResumeSOFT = reinterpret_cast<LPALCDEVICERESUMESOFT>(
alcGetProcAddress(device, "alcDeviceResumeSOFT")); alcGetProcAddress(device, "alcDeviceResumeSOFT"));
BA_PRECONDITION_FATAL(alcDeviceResumeSOFT != nullptr);
} else { } else {
FatalError("ALC_SOFT pause/resume functionality not found."); FatalError("ALC_SOFT pause/resume functionality not found.");
} }
@ -331,21 +333,37 @@ void AudioServer::SetSuspended_(bool suspend) {
alcMakeContextCurrent(nullptr); alcMakeContextCurrent(nullptr);
#endif #endif
// On android lets tell open-sl to stop its processing. // Pause OpenALSoft.
#if BA_OSTYPE_ANDROID #if BA_OSTYPE_ANDROID
alcDevicePauseSOFT(alcGetContextsDevice(impl_->alc_context)); BA_PRECONDITION_FATAL(alcDevicePauseSOFT != nullptr);
BA_PRECONDITION_FATAL(impl_ != nullptr && impl_->alc_context != nullptr);
auto* device = alcGetContextsDevice(impl_->alc_context);
BA_PRECONDITION_FATAL(device != nullptr);
try {
alcDevicePauseSOFT(device);
} catch (const std::exception& e) {
g_core->platform->DebugLog(
std::string("EXC pausing alcDevice: ")
+ g_core->platform->DemangleCXXSymbol(typeid(e).name()) + " "
+ e.what());
throw;
} catch (...) {
g_core->platform->DebugLog("UNKNOWN EXC pausing alcDevice");
throw;
}
#endif #endif
suspended_ = true; suspended_ = true;
} }
} else { } else {
// unsuspend if requested.. // Unsuspend if requested.
if (suspend) { if (suspend) {
Log(LogLevel::kError, Log(LogLevel::kError,
"Got audio suspend request when already suspended."); "Got audio suspend request when already suspended.");
} else { } else {
#if BA_OSTYPE_IOS_TVOS #if BA_OSTYPE_IOS_TVOS
// apple recommends this during audio-interruptions.. // Apple recommends this during audio-interruptions.
// http://developer.apple.com/library/ios/#documentation/Audio/ // http://developer.apple.com/library/ios/#documentation/Audio/
// Conceptual/AudioSessionProgrammingGuide/Cookbook/ // Conceptual/AudioSessionProgrammingGuide/Cookbook/
// Cookbook.html#//apple_ref/doc/uid/TP40007875-CH6-SW38 // Cookbook.html#//apple_ref/doc/uid/TP40007875-CH6-SW38
@ -356,7 +374,22 @@ void AudioServer::SetSuspended_(bool suspend) {
// On android lets tell openal-soft to stop processing. // On android lets tell openal-soft to stop processing.
#if BA_OSTYPE_ANDROID #if BA_OSTYPE_ANDROID
alcDeviceResumeSOFT(alcGetContextsDevice(impl_->alc_context)); BA_PRECONDITION_FATAL(alcDeviceResumeSOFT != nullptr);
BA_PRECONDITION_FATAL(impl_ != nullptr && impl_->alc_context != nullptr);
auto* device = alcGetContextsDevice(impl_->alc_context);
BA_PRECONDITION_FATAL(device != nullptr);
try {
alcDeviceResumeSOFT(device);
} catch (const std::exception& e) {
g_core->platform->DebugLog(
std::string("EXC resuming alcDevice: ")
+ g_core->platform->DemangleCXXSymbol(typeid(e).name()) + " "
+ e.what());
throw;
} catch (...) {
g_core->platform->DebugLog("UNKNOWN EXC resuming alcDevice");
throw;
}
#endif #endif
suspended_ = false; suspended_ = false;
#if BA_ENABLE_AUDIO #if BA_ENABLE_AUDIO

View File

@ -580,6 +580,9 @@ auto Graphics::GetGraphicsSettingsSnapshot() -> Snapshot<GraphicsSettings>* {
settings_snapshot_ = Object::New<Snapshot<GraphicsSettings>>(new_settings); settings_snapshot_ = Object::New<Snapshot<GraphicsSettings>>(new_settings);
graphics_settings_dirty_ = false; graphics_settings_dirty_ = false;
// We keep a cached copy of this value since we use it a lot.
tv_border_ = settings_snapshot_->Get()->tv_border;
// This can affect placeholder settings; keep those up to date. // This can affect placeholder settings; keep those up to date.
UpdatePlaceholderSettings(); UpdatePlaceholderSettings();
} }

View File

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

View File

@ -2497,8 +2497,15 @@ static auto PySetPartyIconAlwaysVisible(PyObject* self, PyObject* args,
const_cast<char**>(kwlist), &value)) { const_cast<char**>(kwlist), &value)) {
return nullptr; return nullptr;
} }
assert(g_base->input); BA_PRECONDITION(g_base->InLogicThread());
g_ui_v1->root_ui()->set_always_draw_party_icon(static_cast<bool>(value)); assert(g_base);
assert(g_ui_v1);
auto* root_ui = g_ui_v1->root_ui();
if (root_ui == nullptr) {
throw Exception("ui-v1 root ui not found.");
}
root_ui->set_always_draw_party_icon(static_cast<bool>(value));
Py_RETURN_NONE; Py_RETURN_NONE;
BA_PYTHON_CATCH; BA_PYTHON_CATCH;
} }
@ -2524,8 +2531,15 @@ static auto PySetPartyWindowOpen(PyObject* self, PyObject* args,
const_cast<char**>(kwlist), &value)) { const_cast<char**>(kwlist), &value)) {
return nullptr; return nullptr;
} }
BA_PRECONDITION(g_base->InLogicThread());
assert(g_base->input); assert(g_base->input);
g_ui_v1->root_ui()->set_party_window_open(static_cast<bool>(value)); assert(g_ui_v1);
auto* root_ui = g_ui_v1->root_ui();
if (root_ui == nullptr) {
throw Exception("ui-v1 root ui not found.");
}
root_ui->set_party_window_open(static_cast<bool>(value));
Py_RETURN_NONE; Py_RETURN_NONE;
BA_PYTHON_CATCH; BA_PYTHON_CATCH;
} }
@ -2800,6 +2814,7 @@ static PyMethodDef PyConsolePrintDef = {
static auto PyIsPartyIconVisible(PyObject* self) -> PyObject* { static auto PyIsPartyIconVisible(PyObject* self) -> PyObject* {
BA_PYTHON_TRY; BA_PYTHON_TRY;
BA_PRECONDITION(g_base->InLogicThread());
bool party_button_active = (g_base->app_mode()->HasConnectionToClients() bool party_button_active = (g_base->app_mode()->HasConnectionToClients()
|| g_base->app_mode()->HasConnectionToHost() || g_base->app_mode()->HasConnectionToHost()
|| g_ui_v1->root_ui()->always_draw_party_icon()); || g_ui_v1->root_ui()->always_draw_party_icon());