From 849c272ac079160deb9487244ee5f44d0a798576 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 1 Aug 2025 12:47:41 -0500 Subject: [PATCH] editor fix for TPM. Fix launchedr atexit error when no mouse attached. --- builtin_apps/editor/code.py | 5 ++--- src/code.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin_apps/editor/code.py b/builtin_apps/editor/code.py index 891de85..aa27207 100644 --- a/builtin_apps/editor/code.py +++ b/builtin_apps/editor/code.py @@ -37,11 +37,10 @@ highlight_palette[1] = 0xFFFFFF highlight_palette[2] = 0xC9C9C9 - +tpm = TilePaletteMapper(highlight_palette, 2) terminal_area = TileGrid(bitmap=font.bitmap, width=screen_size[0], height=screen_size[1], - tile_width=char_size[0], tile_height=char_size[1]) + tile_width=char_size[0], tile_height=char_size[1], pixel_shader=tpm) -tpm = TilePaletteMapper(highlight_palette, 2, terminal_area) for x in range(screen_size[0]): tpm[x,screen_size[1]-1] = [2,0] diff --git a/src/code.py b/src/code.py index 5b88f8e..d0671f7 100644 --- a/src/code.py +++ b/src/code.py @@ -98,6 +98,7 @@ if pathlib.Path("launcher.conf.json").exists(): DIR_IN = 0x80 mouse_interface_index, mouse_endpoint_address = None, None mouse = None +mouse_was_attached = None if "use_mouse" in launcher_config and launcher_config["use_mouse"]: