mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 17:33:13 +08:00
More internal return type fixes.
This commit is contained in:
parent
f801d1626b
commit
d03d0e1045
@ -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)
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user