From d03d0e1045e9a707d96b5e9f803ff251f472b3c4 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 10 Apr 2020 02:09:47 -0700 Subject: [PATCH 1/2] More internal return type fixes. --- assets/src/ba_data/python/_ba.py | 6 +++--- assets/src/ba_data/python/bastd/ui/settings/graphics.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 73491b72..16b4c4d9 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand. """ # (hash we can use to see if this file is out of date) -# SOURCES_HASH=293498427545140555839175614948455855333 +# SOURCES_HASH=126196922259492504803685031830587478733 # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression @@ -1987,8 +1987,8 @@ def get_connection_to_host_info() -> dict: return dict() -def get_display_resolution() -> Tuple[int, int]: - """get_display_resolution() -> Tuple[int, int] +def get_display_resolution() -> Optional[Tuple[int, int]]: + """get_display_resolution() -> Optional[Tuple[int, int]] (internal) diff --git a/assets/src/ba_data/python/bastd/ui/settings/graphics.py b/assets/src/ba_data/python/bastd/ui/settings/graphics.py index 010bd81a..0fda19b6 100644 --- a/assets/src/ba_data/python/bastd/ui/settings/graphics.py +++ b/assets/src/ba_data/python/bastd/ui/settings/graphics.py @@ -256,6 +256,7 @@ class GraphicsSettingsWindow(ba.Window): on_value_change_call=self._set_gvr_render_target_scale) else: native_res = _ba.get_display_resolution() + assert native_res is not None choices = ['Auto', 'Native'] choices_display = [ ba.Lstr(resource='autoText'), @@ -283,7 +284,7 @@ class GraphicsSettingsWindow(ba.Window): # set pixel-scale instead current_res = _ba.get_display_resolution() if current_res is None: - current_res = (str(min(100, max(10, int(round( + current_res2 = (str(min(100, max(10, int(round( ba.app.config.resolve('Screen Pixel Scale') * 100.0))))) + '%') # yapf: disable popup.PopupMenu( @@ -292,7 +293,7 @@ class GraphicsSettingsWindow(ba.Window): width=120, scale=popup_menu_scale, choices=['100%', '88%', '75%', '63%', '50%'], - current_choice=current_res, + current_choice=current_res2, on_value_change_call=self._set_pixel_scale) else: raise Exception('obsolete path; discrete resolutions' From 4497b6cab10cd2ea4bac0d0c369c36abea690a6f Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 10 Apr 2020 02:14:41 -0700 Subject: [PATCH 2/2] latest binaries, assets, and docs --- .efrocachemap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 5b3216ff..1f083ef7 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4114,10 +4114,10 @@ "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", - "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/62/db/3e52e59e335813b3c7bd7e4e19f5", - "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/b7/109913f9ee56c9a0306b47392fd2", - "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/71/ea/7b890bbddbaa0d27e0db60a4318a", - "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d2/38/fca90505d90fb63beab3357fcbd4", - "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/81/54/42d2d1cb0215e764b397651e1c58", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3a/4d/7b38001fbcd9bc39bc50133cea53" + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6b/88/a8f82a340a0fba36edfe95298871", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d3/72/4ad974215d1cfd0db7f14af5f6c3", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/82/c3/388d9a77f8bde608d7cdf2891ad3", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6c/6f/d2ffeecb1e9a18678b1ec1695198", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/77/68/e7ac990ee0ec25dd6a459e637d9f", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e8/ce/1091fea9004ca76f6b8ccde8b839" } \ No newline at end of file