diff options
author | Oxore <oxore@protonmail.com> | 2023-05-06 22:20:44 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-06 22:20:44 +0300 |
commit | b834fe204108c549e576ffa7dfd2684225bbb7f7 (patch) | |
tree | e13fb0875637d7ebe986b2c0532642fdfdcc90ea | |
parent | 18eb8db9c253601ca05dc02b2003e3a3eaebc5ed (diff) |
Impl hardcoded integer scaling
-rw-r--r-- | graphics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/graphics.cpp b/graphics.cpp index 0a6f699..afcd3b2 100644 --- a/graphics.cpp +++ b/graphics.cpp @@ -6,6 +6,8 @@ #include <cstdlib> +static size_t kIntegerScaling = 2; + Graphics::Graphics() { #if HAS_GRAPHICS == 1 @@ -18,17 +20,17 @@ Graphics::Graphics() _window = SDL_CreateWindow("Gut (SEGA MD/G emulator)", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - VDP().kRenderWidth, - VDP().kRenderHeight, + VDP().kRenderWidth * kIntegerScaling, + VDP().kRenderHeight * kIntegerScaling, SDL_WINDOW_RESIZABLE); if (!_window) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); SDL_Quit(); return; } _renderer = SDL_CreateRenderer(_window, -1, 0); if (!_renderer) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); SDL_Quit(); return; } @@ -39,7 +41,7 @@ Graphics::Graphics() VDP().kRenderWidth, VDP().kRenderHeight); if (!_render_texture) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_Quit(); return; } |