Skip to content

Commit 8fc3841

Browse files
committed
v1.7.50
1 parent 723c0da commit 8fc3841

File tree

10 files changed

+110
-45
lines changed

10 files changed

+110
-45
lines changed

.efrocachemap

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
### 1.7.50 (build 22525, api 9, 2025-09-04)
1+
### 1.7.50 (build 22528, api 9, 2025-09-05)
22
- Cleaned up cursor handling on Mac build. Fixes an issue where the cursor could
33
sometimes revert to the system cursor for a few seconds after moving the
44
cursor to the top of a fullscreen window.
5+
- Chest prize odds now show with most valuable stuff at the top instead of
6+
bottom (feels more intuitive to me).
57

68
### 1.7.49 (build 22524, api 9, 2025-09-04)
79
- Fixes an issue where `bascenev1.reload_hooks()` and `bauiv1.reload_hooks()`

config/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pbxproj==4.3.0
99
pur==7.3.3
1010
pylint==3.3.8
1111
pylsp-mypy==0.7.0
12-
pytest==8.4.1
12+
pytest==8.4.2
1313
python-daemon==3.1.2
1414
python-lsp-black==2.0.0
1515
python-lsp-server==1.13.1

src/assets/ba_data/python/baclassic/_appmode.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class ClassicAppMode(babase.AppMode):
3333
"""AppMode for the classic BombSquad experience."""
3434

3535
_ACCOUNT_STATE_CONFIG_KEY = 'ClassicAccountState'
36+
_ASKED_FOR_REVIEW_CONFIG_KEY = 'AskedForReview'
3637

3738
def __init__(self) -> None:
3839
self._on_primary_account_changed_callback: (
@@ -529,6 +530,18 @@ def _on_classic_account_data_change(
529530

530531
self._target_purchases_state = val.purchases_state
531532

533+
# If they want us to ask for a review (and we haven't yet), do
534+
# so.
535+
if val.Flag.ASK_FOR_REVIEW in val.flags:
536+
cfg = babase.app.config
537+
if (
538+
not cfg.get(self._ASKED_FOR_REVIEW_CONFIG_KEY, False)
539+
and babase.native_review_request_supported()
540+
):
541+
cfg[self._ASKED_FOR_REVIEW_CONFIG_KEY] = True
542+
cfg.commit()
543+
babase.native_review_request()
544+
532545
# If someone replaced our purchases in the classic subsystem,
533546
# fix it.
534547
if (

src/assets/ba_data/python/baenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
# Build number and version of the ballistica binary we expect to be
5858
# using.
59-
TARGET_BALLISTICA_BUILD = 22525
59+
TARGET_BALLISTICA_BUILD = 22528
6060
TARGET_BALLISTICA_VERSION = '1.7.50'
6161

6262

src/assets/ba_data/python/bauiv1lib/chest.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,11 @@ def _show_chest_actions(
327327
)
328328

329329
# Store the prize-sets so we can display odds/etc. Sort them
330-
# with largest weights first.
331-
self._prizesets = sorted(
332-
chest.prizesets, key=lambda s: s.weight, reverse=True
333-
)
330+
# with smallest weights first (higher visually == better).
331+
# self._prizesets = sorted(
332+
# chest.prizesets, key=lambda s: s.weight, reverse=True
333+
# )
334+
self._prizesets = chest.prizesets
334335

335336
if chest.unlock_tokens > 0:
336337
lsize = 30
@@ -746,11 +747,15 @@ def _mktxt(txt: str, advance: bool = True) -> None:
746747
self._prizesettxts = {}
747748
self._prizesetimgs = {}
748749

750+
basey = y
751+
749752
for i, p in enumerate(self._prizesets):
750753
prizesettxts = self._prizesettxts.setdefault(i, [])
751754
prizesetimgs = self._prizesetimgs.setdefault(i, [])
752755
x = self._width * 0.5 + xoffs
753-
y -= rowheight
756+
757+
# Display from bottom up.
758+
y = basey - (len(self._prizesets) - i) * rowheight
754759
percent = 100.0 * p.weight / totalweight
755760

756761
# Show decimals only if we get very small percentages (looks

src/assets/ba_data/python/bauiv1lib/settings/advanced.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ def __init__(
180180
)
181181

182182
# Add some blotches so our contents fades out as it approaches
183-
# the bottom toolbar.
184-
if uiscale is bui.UIScale.SMALL:
183+
# the bottom toolbar (but only in the main menu when there's
184+
# something down there).
185+
if uiscale is bui.UIScale.SMALL and bui.in_main_menu():
185186
blotchwidth = 500.0
186187
blotchheight = 200.0
187188
bimg = bui.imagewidget(

src/ballistica/base/graphics/graphics.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,19 @@ void Graphics::DrawCursor(FrameDef* frame_def) {
11411141
new_cursor_visibility = true;
11421142
}
11431143

1144+
// As of macOS 15.6.1 there seems to be a bug where moving the cursor down
1145+
// from the top portion of a fullscreen window flips it back to the arrow
1146+
// cursor. Should submit a bug to Apple if this is still the case in macOS
1147+
// 16, but for now am just forcing cursor resets at a higher frequency there
1148+
// to hide that.
1149+
seconds_t fudge_secs =
1150+
(g_buildconfig.platform_macos() && g_buildconfig.xcode_build()) ? 0.235
1151+
: 2.345;
1152+
11441153
// Ship this state when it changes and also every now and then just in
11451154
// case things go wonky.
11461155
if (new_cursor_visibility != hardware_cursor_visible_
1147-
|| app_time - last_cursor_visibility_event_time_ > 2.137) {
1156+
|| app_time - last_cursor_visibility_event_time_ > fudge_secs) {
11481157
hardware_cursor_visible_ = new_cursor_visibility;
11491158
last_cursor_visibility_event_time_ = app_time;
11501159
g_base->app_adapter->PushMainThreadCall([this] {

src/ballistica/shared/ballistica.cc

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
#include "ballistica/shared/ballistica.h"
44

5+
#include <chrono>
56
#include <cstdio>
7+
#include <memory>
68
#include <string>
9+
#include <thread>
710

811
#include "ballistica/core/logging/logging.h"
912
#include "ballistica/core/platform/core_platform.h"
@@ -41,7 +44,7 @@ auto main(int argc, char** argv) -> int {
4144
namespace ballistica {
4245

4346
// These are set automatically via script; don't modify them here.
44-
const int kEngineBuildNumber = 22525;
47+
const int kEngineBuildNumber = 22528;
4548
const char* kEngineVersion = "1.7.50";
4649
const int kEngineApiVersion = 9;
4750

@@ -228,11 +231,30 @@ class IncrementalInitRunner_ {
228231
last_step_time_ = core::CorePlatform::TimeMonotonicSeconds();
229232
return false;
230233

231-
case 1:
234+
case 1: {
232235
core_->python->WarmStart1();
236+
237+
// Launch a thread which spins and waits for the Python bg stuff
238+
// we just launched to complete. We do this in a separate thread
239+
// because even acquiring the GIL to make the check in the main
240+
// thread can be enough to trigger ANRs on slower hardware.
241+
thread_ = std::make_unique<std::thread>([this] {
242+
while (explicit_bool(true)) {
243+
{
244+
Python::ScopedInterpreterLock gil_acquire;
245+
if (core_->python->WarmStart1Completed()) {
246+
warm_start_completed_ = true;
247+
break;
248+
}
249+
}
250+
std::this_thread::sleep_for(std::chrono::milliseconds(1));
251+
}
252+
});
253+
233254
LogStepTime_(step_);
234255
step_++;
235256
return false;
257+
}
236258

237259
case 2: {
238260
// This step is a special case; the previous step kicked off a
@@ -246,7 +268,11 @@ class IncrementalInitRunner_ {
246268
LogStepTime_(step_);
247269
return false;
248270
}
249-
if (core_->python->WarmStart1Completed()) {
271+
// if (core_->python->WarmStart1Completed()) {
272+
if (warm_start_completed_) {
273+
// Our thread that set this should be done.
274+
thread_->join();
275+
250276
// We finished this step.
251277
LogStepTime_(step_);
252278
step_++;
@@ -349,6 +375,8 @@ class IncrementalInitRunner_ {
349375
int step_{};
350376
seconds_t last_step_time_{};
351377
bool zombie_{};
378+
bool warm_start_completed_{};
379+
std::unique_ptr<std::thread> thread_{};
352380
core::CoreConfig config_;
353381
core::CoreFeatureSet* core_{};
354382
core::BaseSoftInterface* base_{};

tools/bacommon/bs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ class LeagueType(Enum):
153153
GOLD = 'g'
154154
DIAMOND = 'd'
155155

156+
class Flag(Enum):
157+
"""Flags set for our account."""
158+
159+
ASK_FOR_REVIEW = 'r'
160+
156161
tickets: Annotated[int, IOAttrs('ti')]
157162

158163
tokens: Annotated[int, IOAttrs('to')]
@@ -179,6 +184,8 @@ class LeagueType(Enum):
179184
# State id of our purchases for builds 22459+.
180185
purchases_state: Annotated[str | None, IOAttrs('p')]
181186

187+
flags: Annotated[set[Flag], IOAttrs('f', soft_default_factory=set)]
188+
182189

183190
class DisplayItemTypeID(Enum):
184191
"""Type ID for each of our subclasses."""

0 commit comments

Comments
 (0)