From 6fe7d5adc6d6324f58b4c97de420558a171e4450 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sun, 22 Dec 2024 22:50:50 +0000 Subject: [PATCH] Increase framebuffer window scale --- src/framebuffer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/framebuffer.cpp b/src/framebuffer.cpp index 8c34c6b..9651d5e 100644 --- a/src/framebuffer.cpp +++ b/src/framebuffer.cpp @@ -12,7 +12,7 @@ SDL_Texture* texture = nullptr; #define FB_WIDTH 320 #define FB_HEIGHT 200 -#define FB_SCALE 2 +#define FB_SCALE 4 #define FB_OFFSET 0x10000 Framebuffer::Framebuffer(UART& uart) @@ -30,7 +30,8 @@ Framebuffer::Framebuffer(UART& uart) void Framebuffer::mainloop() { window = SDL_CreateWindow("rve Framebuffer", SDL_WINDOWPOS_CENTERED, - SDL_WINDOWPOS_CENTERED, width, height, 0); + SDL_WINDOWPOS_CENTERED, width * FB_SCALE, + height * FB_SCALE, 0); if (!window) { throw std::runtime_error("Failed to create SDL window"); } @@ -79,6 +80,8 @@ void Framebuffer::mainloop() { asciiValue = 2; } else if (key == SDLK_RCTRL || key == SDLK_LCTRL) { asciiValue = 5; + } else if (key == SDLK_RALT || key == SDLK_LALT) { + asciiValue = 6; } else { valid_key = false; }