Closed Wolod closed 2 years ago
Hi @Wolod , we aren't going to support any resolutions lower than the original 640x480.
Sad to hear that. Anyway thanks for the quick response @ihhub !
I wonder how the scaling for the fullscreen mode is currently handled? It looks like when you use a resolution lower than the current, it gets scaled up to the current screen resolution (by SDL?)
Could it not be made work the other way around — that is, scaling down to a resolution lower than the minimum?
By right SDL must handle scaling properly if user sets the original resolution. I'm more surprised to see resolution lower than the original. I remember we have a check for this.
My bad: we check only with static assertion. To fix the issue we must validate that the minimum resolution is equal or higher than the original one. If it's smaller we must force to 640x480.
@Wolod , are you able to test a custom build on your console?
@ihhub , I'll be glad to help. Please provide me with a download link for the custom Ubuntu SDL2 build.
Hi @Wolod , please try the latest snapshot in about an hour from now. The compilation should be done.
@Wolod , forgot to mention: most likely you have to run in fullscreen mode or SDL 2 has ability to resize window.
Hi @ihhub , UI scales properly now but the cursor is invisible. My friend compiled it from the source. He used cmake v.3.13.4, so that's might be the reason because minimum required is v.3.14. He'll try to recompile it on a newer version of cmake.
@Wolod just for fun, can you post the photos of scaled UI?
@a1exsh here you go :)
Nice!
Text written in the smallest font will be probably hard to read after scaling, e.g. number of troops in a hero's army, and so on. But it can still be playable!
Great! Someone before asked about support for PSP so we can tell it works except memory issue 😅
The fix works on linux handheld game devices. Please note that this line means that gamecontroller is only initialised on Vita or Switch, so this #ifdef needed to be removed to allow game controllers to work on linux handheld and other devices with game controller support. Perhaps game controller support can be made generic, if sdl2 is supported. https://github.com/ihhub/fheroes2/blob/c79c9866f821a92b73622aadf2cff45d2d98e2ae/src/fheroes2/game/fheroes2.cpp#L150
Preliminary checks
Describe the problem requiring a solution
Hello and thanks for your hard work!
I'm trying to play fhereos2 on a Chinese handheld console with a 3:2 screen that works in a 480x320 resolution. This resolution is the only available option when I run fheroes2 on my device. Game works completely fine but different crucial UI elements are hidden behind the screen. For example I can't start a new campaign or do different things inside my castle.
On the other hand I tested original HoMM2 in the dosbox pure emulator on my console and everything scaled properly.
Here's how incorrect UI scaling looks on my device.
Describe the possible solution
I think my issue is related to the fact that minimal resolution that fheroes2 support is 640x480.
Additional info
My device is called Anbernic RG351P and I use ArkOS firmware that is based on Ubuntu. So basically I'm trying to play Ubuntu version of fheroes2 on my console.