enable vsync by default for sdl3 backend, cleanup headers

This commit is contained in:
asrael 2025-10-18 08:48:14 -05:00
parent 9d183341ae
commit 865a2b4518
3 changed files with 9 additions and 6 deletions

View file

@ -1,10 +1,13 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "pxl8_io.h"
#include "pxl8_types.h"
static inline char pxl8_to_lower(char c) {
return (c >= 'A' && c <= 'Z') ? c + 32 : c;
}
pxl8_result pxl8_io_read_file(const char* path, char** content, size_t* size) {
if (!path || !content || !size) return PXL8_ERROR_NULL_POINTER;
@ -121,7 +124,7 @@ static i32 pxl8_key_code(const char* key_name) {
char lower_name[64];
size_t i;
for (i = 0; i < sizeof(lower_name) - 1 && key_name[i]; i++) {
lower_name[i] = (char)tolower((unsigned char)key_name[i]);
lower_name[i] = pxl8_to_lower(key_name[i]);
}
lower_name[i] = '\0';