diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-29 19:24:31 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-29 19:24:31 +0100 |
| commit | 4bfe4900b80c17702d9e2c02b1740c790537d5bd (patch) | |
| tree | 97c8acc9dd04fce8a8241c3488baff8a96fa88cf /src | |
| parent | 93a202d1fa6cd05b494bbf7175d79c6da075f333 (diff) | |
Add PS Vita Port
Compile PICO-w for the PS Vita :tada:.
Fixes some minor compiler warnings that only showed up because
of the different compilation target, and makes the Makefile port
system a little more opinionated.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fs.c | 2 | ||||
| -rw-r--r-- | src/input.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -660,10 +660,12 @@ bool pw_fs_seek(struct pw_fs *fs, pw_fd fd, int64_t offset, // This is a little weird - but the final position needs to fit in // a signed 64-bit value (even if we use unsigned `size_t` values // internally). In practice, this should not matter. +#if SIZE_MAX > INT64_MAX if (pos > INT64_MAX) { fs->err = PW_EOVERFLOW; return SDL_SetError("seek overflows PICO-8 maximum position"); } +#endif s->pos = pos; if (newpos) { diff --git a/src/input.c b/src/input.c index f85c63c..8eaf6d0 100644 --- a/src/input.c +++ b/src/input.c @@ -256,12 +256,12 @@ static int8_t scancode_to_p8scii(SDL_Scancode sc, SDL_Keymod mod) { #define PW_SCANCODE_MOD_SHIFT 9 static bool handle_key(struct pw_input *input, SDL_KeyboardEvent *event) { - if (event->scancode < 0 || event->scancode > PW_SCANCODE_MASK) { + uint32_t sc = (uint32_t)event->scancode; + if (sc > PW_SCANCODE_MASK) { // Ignore unsupported scancodes. return true; } - uint32_t sc = (uint32_t)event->scancode; if (event->down) { sc |= PW_SCANCODE_PRESSED; } |
