Hi, I have a byte[] and I'm trying to get out 1-2 bytes depending on whether it's 8bit or 16bit and to convert this to a short value. I'm not really sure how to do this as obviously I can't just add the bytes together, and I need to make sure that I know whether it is positive/negative (and little/big endian).
Can anybody explain how to do this?
edit: I am presuming that you can get out the first byte and shift it left by 8, and then add it to the other byte. But then how do I know whether the two bytes are positive or negative.
This surely must be a rather standard problem, so I wonder if there is any sample code anywhere that I can look at?
I have tried that registry 'trick' from that video already. It doesn't work at all in Win11 for me
Yes it's a 3rd party app... that I am only using because of Microsoft breaking user customization in Windows 11.
So yes... the is a Windows 11 issue. As of now to me, Microsoft has made a huge mistake with this in Windows 11.
The current font option in Windows 11 are terrible. They are just missing. People that want to use their own computer the way they want to, they need to avoid 11.
It's been an age since I did desktop support, but here goes:
You have an issue with Windows 11, which is fair. You are using a freeware 3rd party app to make modifications to the default Windows 11. Since an update, this 3rd party application no longer plays nice with Windows 11. And this is somehow Windows 11's fault?
Sorry, not buying that this is a Windows 11 problem... it's a customization issue that has just appeared, but standard 3rd party support.
Clearly you're upset. You can't make Windows do anything, just like you can't make MacOS run Explorer or Linux run Nintendo games natively. And I know people are going to say "sure, it's possible..." but those aren't defining elements of the OS. You can't have animated backgrounds in Windows 11 natively -- so it's trash amirite???
I did quick searches about changing the default fonts and there are ways to do it, and clearly 3rd party freeware apps can do it (basically my guess is they're making registry changes on your behalf) and clearly they're having issue. You can make your computer do a lot of things, but sometimes you get what you pay for.
Did a quick search and don't see an easy option in Windows 10 either. Some of these links - ironically - are for Windows 10. They still apply.
Here's a video tutorial of how it can be done without a 3rd party:
Same reference here with a bit more detail: https://www.howtogeek.com/716407/how-to-change-the-default-system-font-on-windows-10/
Once the font is chosen, the size can be changed via personalization from my understanding.
Hope this helps.
Question
lhnz
Hi, I have a byte[] and I'm trying to get out 1-2 bytes depending on whether it's 8bit or 16bit and to convert this to a short value. I'm not really sure how to do this as obviously I can't just add the bytes together, and I need to make sure that I know whether it is positive/negative (and little/big endian).
Can anybody explain how to do this?
edit: I am presuming that you can get out the first byte and shift it left by 8, and then add it to the other byte. But then how do I know whether the two bytes are positive or negative.
This surely must be a rather standard problem, so I wonder if there is any sample code anywhere that I can look at?
Edited by lhnzLink to comment
https://www.neowin.net/forum/topic/709892-java-convert-1-2-bytes-into-a-short/Share on other sites
7 answers to this question
Recommended Posts