reisen
reisen copied to clipboard
Sample player improvements
Hi! I tried to make the sample player more useful (can play a file from command line), use less memory, and the code is also a bit safer. If any of these changes doesn’t suit you, I’m happy to fix or submit another PR restricted to what you’d like to keep.
Thanks for providing this library, by the way. It is quite straightforward and does the job very nicely.
I'm afraid I can't accept this PR at its current state because the video resolution doesn't correspond to the window resolution (tested on Linux). Couldn't manage to figure out why, sorry.
I really scratched my head around this and it’s really puzzling. The code calls ebiten.SetWindowSize()
with the width and height of the video. However the video is 1280×720 yet your screenshot size is 1636×969, how is that possible? Is your monitor highDPI maybe? Could you please try to print the value of ebiten.DeviceScaleFactor()
when running the program?
Yes, I think my screen is HiDPI. I hava a Lenovo Legion 5 15ACH6H laptop, the size is 15.6", the definition is Full HD (1920x1080). I use KDE Plasma with 125% scale.
But when I call ebiten.DeviceScaleFactor()
in either Start()
(at the end before the return
statement) or Update()
(at the end of the case <-game.perSecond
instruction block), it always returns 1.