<feed xmlns='http://www.w3.org/2005/Atom'>
<title>picow/src/scale.c, branch main</title>
<subtitle>Launcher for the PICO-8 Wasm Runtime</subtitle>
<id>http://src.lordello.net/picow/atom/src/scale.c?h=main</id>
<link rel='self' href='http://src.lordello.net/picow/atom/src/scale.c?h=main'/>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/'/>
<updated>2026-10-29T13:18:39Z</updated>
<entry>
<title>Support SDL 3.2</title>
<updated>2026-10-29T13:18:39Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-29T12:45:32Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=d17db29f66214b478fca83c34eb96cc5e0fbdbe2'/>
<id>urn:sha1:d17db29f66214b478fca83c34eb96cc5e0fbdbe2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve Mouse Position Handling</title>
<updated>2026-10-24T10:26:16Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-24T10:26:16Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=f43e306bf050b9f96be4b22382cacd96d86b5239'/>
<id>urn:sha1:f43e306bf050b9f96be4b22382cacd96d86b5239</id>
<content type='text'>
After some playing around with devkit mode, I noticed two things:

1. The mouse pointer can be outside of the range [0. 128) in case
   the window is larger than the PICO-8 screen, but it does not
   move to positions that would be outside of the window
2. Under pointer lock, relative positions continue to be reported
   even when the mouse is stuck to the edge of the window

This means our implementation was slightly wrong, as it it did
not properly handle the second case in a few ways:

- We would always round to integer relative mouse mouse motions,
  meaning we would incorrectly approximate in case we collected
  multiple frames of relative mouse motion
- We would compute the relative motion based on the mouse position,
  which is incorrect under pointer lock (as the position doesn't
  change but PICO-8 still needs relative mouse motion)
- We would reset relative mouse motion every frame, meaning that
  we would not correctly accumulate relative motion in case the
  host's refresh rate was faster than PICO-8's (which seems to
  only run its frame logic at 30 FPS).

We fix that here.
</content>
</entry>
<entry>
<title>Fix Minor Scaling Issues</title>
<updated>2026-10-11T22:12:59Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-11T22:12:59Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=88aedb9414800d2e0002430d2d260ea77a60ea8c'/>
<id>urn:sha1:88aedb9414800d2e0002430d2d260ea77a60ea8c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Support Different Scaling Modes</title>
<updated>2026-10-10T20:51:12Z</updated>
<author>
<name>Nicholas Rodrigues Lordello</name>
<email>n@lordello.net</email>
</author>
<published>2026-10-10T20:51:12Z</published>
<link rel='alternate' type='text/html' href='http://src.lordello.net/picow/commit/?id=898291f9d5e447a85d36bef885896498f01acb20'/>
<id>urn:sha1:898291f9d5e447a85d36bef885896498f01acb20</id>
<content type='text'>
We now support pixel perfect scaling (what existed before) as well
as new scaling modes:

- `fill`: Fill fit to output, but keep aspect ratio
- `stretch`: Fill every pixel in the output, may look OK on certain
  displays that are close to 1:1 aspect ratio

We also fixed a small mouse position computation bug (we would jump
to the next pixel too early).
</content>
</entry>
</feed>
