-
Notifications
You must be signed in to change notification settings - Fork 80
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
Solve incorrect resolution when dpi is set #126
Conversation
How did that screenshot look before this change? Additionally, can you provide some before- and after- performance benchmarks? You can use |
@rashil2000 This is what before was like. I have two 3840x2160 screens scaled at 200%, so it was showing 1920x1080, one at 150% so it was showing 2560x1440, one 2560x1440 and one 1080p both scaled at 100% respectively so they are at native resolution. It was a mess. For performance, this is before
After
|
Btw, with this approach I can easily add refresh rate to it as #116 |
Can you merge with latest master? Your branch is very behind. (I did some refactoring to make this PR easier to review). |
Have been too busy at work lately. I will look into that this weekend and get it resolved. |
I merged with |
Looks like your editor messed up some ASCII characters. Could you please open the PR from a fresh branch (created from latest master)? |
What is your $OutputEncoding? And PowerShell version? |
There is a bug in Windows PowerShell version 5.1. To work around this, you can put this line in your $PROFILE: if ($PSVersionTable.PSVersion.Major -le 5) { $OutputEncoding = [System.Text.Encoding]::UTF8 } |
Have you tried cloning the repo and running it in PowerShell 7+? |
@rashil2000 Just tried. It runs fine on Powershell 7, but I would suggest to make it compatible with the powershell 5.1 that comes preinstalled. |
It does work on PowerShell 5.1 😅 (I do all my winfetch work on 5.1). As I said, there are some bugs in PS 5.1 regarding codepages/encoding that you need to workaround yourself (depending on region/language). It is unlikely that these will be fixed given that 5.1 receives no updates. |
I tried it on another PC that has Windows 11, Simplified Chinese fresh installed, it also doesn't run in Powershell 5.1.🤔 |
Likely that PS 5.1 has issues with this language. If you can't solve it through changing codepage/encoding, I'm sorry there's nothing I or winfetch can do about it. Your only solution is to use a better and more up to date PS 7. |
The thing is I am having issue with the US version, and that's likely to bring issues with quite a lot of users. The thing you can do is remove that Microsoft fallback logo, that's the reason my PR was originally based on the released 2.3 branch. |
The logo had been requested by many people for a long time, that's why it was added. I'm reluctant to remove it based on a single report yet. @jcwillox any thoughts? In the meanwhile, let's not stall this PR because it's unrelated here. I'd recommend you to use PS 7 to continue with the review here. For the encoding problem, please create a new issue. |
Yeah ok, other than this, my PR runs fine on Powershell 7. |
Because there are a lot of (unrelated) changes in the current PR |
I have this maybe over-convoluted approach to solve #76
Also see my comment
But anyway, it does solves the issue.
Here's a screenshot of the result.