reisen icon indicating copy to clipboard operation
reisen copied to clipboard

Sample player improvements

Open samhocevar opened this issue 1 year ago • 3 comments

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.

samhocevar avatar Oct 25 '22 20:10 samhocevar

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. image

zergon321 avatar Oct 30 '22 18:10 zergon321

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?

samhocevar avatar Nov 24 '22 07:11 samhocevar

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.

image

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.

zergon321 avatar Nov 27 '22 15:11 zergon321