Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of system variable where possible and use sys.platform or platform instead to allow type hinting #1318

Open
C0rn3j opened this issue Nov 26, 2024 · 1 comment

Comments

@C0rn3j
Copy link
Collaborator

C0rn3j commented Nov 26, 2024

Pyright is really unhappy with defining it into a var and does not eval the code paths properly as a result.

Right now it's just hardcoded to "Linux" and used even on Windows/macOS.

t_draw does not even use the code path with class RECT as a result.

@Taiko2k
Copy link
Owner

Taiko2k commented Nov 28, 2024

Originally on Windows, Tauon used the Win32 API for text rendering, I later migrated to using an msys2 environment and using Cairo for text as is done on Linux. Since in this environment many Linux code paths can remain the same and to simplify the code I now often use the "Linux" code paths. So I now have basically two modes on Windows, "Windows native", and MSYS. Largely system == "Windows", msys==false and system == "Linux", msys==true respectively.

The "Windows native" code path isn't currently used and hasn't been maintained in a long time and likely doesn't work as is, but I keep it around just in case its useful in the future. These blocks could be commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants