Skip to content
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

Framebuffer size is incorrect on Linux with HiDPI display #52

Closed
neauoire opened this issue Jan 6, 2020 · 8 comments
Closed

Framebuffer size is incorrect on Linux with HiDPI display #52

neauoire opened this issue Jan 6, 2020 · 8 comments

Comments

@neauoire
Copy link

@neauoire neauoire commented Jan 6, 2020

I've created a new issue so we could figure this one out on here. Could you remind me which line I should edit to better test the cursor positioning bug. I use a wacom intuos 3 tablet btw.

Issue

When I move over the canvas with the wacom pencil, there is an offset from the screen position, and the canvas position.

Screenshot from 2020-01-06 14-42-28@2x

@cloudhead

This comment has been minimized.

Copy link
Owner

@cloudhead cloudhead commented Jan 6, 2020

Thanks for opening this! This bug is very likely due to the framebuffer being the incorrect size: the palette is also cut-off, and so is the session status bar. Effectively the framebuffer is exactly twice the resolution as the window, because rx is told that it should render 2 physical pixels for any given 1 "window" pixel.

If you make the following change:

- let hidpi_factor = win.hidpi_factor();
+ let hidpi_factor = 1.0;

You can force rx to create the right framebuffer size. If that works, at least we know the issue is dpi related, and we can go from there 👍

@neauoire

This comment has been minimized.

Copy link
Author

@neauoire neauoire commented Jan 6, 2020

Screenshot from 2020-01-06 16-55-51@2x

Yeah, that totally fixes it!

@cloudhead

This comment has been minimized.

Copy link
Owner

@cloudhead cloudhead commented Jan 6, 2020

Amaaaaaaaazing. I think I will introduce a CLI flag for now to turn off hidpi detection until I figure out why this is happening. It looks like hidpi detection is working, since you have a retina screen and it's detecting 2, but then the window being created is not big enough for the framebuffer 🤔

If the interface is too small, you should be able scale it with :set scale = 2.0 - I'd be curious to know if that works correctly too with the current workaround.

@neauoire

This comment has been minimized.

Copy link
Author

@neauoire neauoire commented Jan 6, 2020

It does! And you know what, that's good enough for me :) We will be using Rx at Hundred Rabbits for our NES sprite assets, thank you.

Screenshot from 2020-01-06 18-03-15@2x

@cloudhead

This comment has been minimized.

Copy link
Owner

@cloudhead cloudhead commented Jan 6, 2020

Awesome. Excited to see what you create, and feel free to provide feedback & ideas on the issues list!

I'll leave this issue open until I fix this properly.

⛵️

@cloudhead cloudhead changed the title Cursor issue with hidpi on retina macbook Framebuffer size is incorrect on Linux with HiDPI display Jan 6, 2020
@neauoire

This comment has been minimized.

Copy link
Author

@neauoire neauoire commented Jan 6, 2020

I'll definitely be asking for .chr export, but we'll get to that later.
Keep up the good work! Rx is a beauty.

@cloudhead

This comment has been minimized.

Copy link
Owner

@cloudhead cloudhead commented Jan 8, 2020

This should be fixed now with #54 merged. If you could confirm, would be great. (the --features compatibility flag is no longer necessary)

@cloudhead

This comment has been minimized.

Copy link
Owner

@cloudhead cloudhead commented Jan 12, 2020

Fixed.

@cloudhead cloudhead closed this Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.