You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ported my emulator to use pixels, and it's great! I love the automatic scaling to the window size.
However, I would also like to allow my users to select a scaling factor that they prefer, regardless of window size. I tried passing my own values to pixels.resize, but this doesn't do what I want.
The text was updated successfully, but these errors were encountered:
pixels doesn't integrate directly with any windowing provider (like winit or sdl2), If you want to resize the window, you need to use the API supported by your window provider. After resizing the window, you can call the resize method to fit the output texture to the window. (This is usually going to be called in response to resizing the window as part of application-specific integration with a window provider.)
Does that help? I don't think there is anything more pixels can do to resize your window.
The scaling factor is a function of window size and pixel buffer size. E.g. a pixel buffer of 160x120 can comfortably fit in a window size 320x240 at 2x scale, but it will not fit in the same window with a 3x scale.
If you are talking about allowing non-integer scaling, like 2.386x, that's a feature that can be added.
Sorry, let me clarify. To use your example of a 160x120 pixel buffer, I would like the ability to force the scale of the buffer display to 1x or 2x, even if the window itself is much larger (say, 640x480) and could support a scale of 4x.
I recently ported my emulator to use pixels, and it's great! I love the automatic scaling to the window size.
However, I would also like to allow my users to select a scaling factor that they prefer, regardless of window size. I tried passing my own values to
pixels.resize
, but this doesn't do what I want.The text was updated successfully, but these errors were encountered: