Skip to content

Commit 4590f18

Browse files
committed
Pull fixes to sys_get_current_resolution.
1 parent be423db commit 4590f18

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Unreleased
1010
------------------
1111
Fixed
1212
- Fixed missing `tcod.FOV_SYMMETRIC_SHADOWCAST` constant.
13+
- Fixed regression in `tcod.sys_get_current_resolution` behavior. This
14+
function now returns the monitor resolution as was previously expected.
1315

1416
11.18.1 - 2020-11-30
1517
--------------------

tcod/libtcodpy.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4217,15 +4217,14 @@ def sys_force_fullscreen_resolution(width: int, height: int) -> None:
42174217
lib.TCOD_sys_force_fullscreen_resolution(width, height)
42184218

42194219

4220-
@deprecate("This function is not supported if contexts are being used.")
4220+
@deprecate(
4221+
"This function is deprecated, which monitor is detected is ambiguous."
4222+
)
42214223
def sys_get_current_resolution() -> Tuple[int, int]:
4222-
"""Return the current resolution as (width, height)
4223-
4224-
Returns:
4225-
Tuple[int,int]: The current resolution.
4224+
"""Return a monitors pixel resolution as (width, height).
42264225
42274226
.. deprecated:: 11.13
4228-
This function is not supported by contexts.
4227+
This function is deprecated, which monitor is detected is ambiguous.
42294228
"""
42304229
w = ffi.new("int *")
42314230
h = ffi.new("int *")

0 commit comments

Comments
 (0)