From e686a0ad873855a9d19c4833d23074a17fc203c4 Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Fri, 17 Dec 2021 07:52:30 +0200 Subject: [PATCH] qt: Buffer/texture size to 2048x2048 --- src/qt/qt_rendererstack.cpp | 8 ++++---- src/qt/qt_sdl.c | 6 +++--- src/qt/qt_specifydimensions.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 23f61f186..4aacd0c50 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -25,8 +25,8 @@ RendererStack::RendererStack(QWidget *parent) : { ui->setupUi(this); imagebufs = QVector(2); - imagebufs[0] = QImage{QSize(2048 + 64, 2048 + 64), QImage::Format_RGB32}; - imagebufs[1] = QImage{QSize(2048 + 64, 2048 + 64), QImage::Format_RGB32}; + imagebufs[0] = QImage{QSize(2048, 2048), QImage::Format_RGB32}; + imagebufs[1] = QImage{QSize(2048, 2048), QImage::Format_RGB32}; buffers_in_use = std::vector(2); buffers_in_use[0].clear(); @@ -220,11 +220,11 @@ void RendererStack::blit(int x, int y, int w, int h) sw = this->w = w; sh = this->h = h; auto imagebits = imagebufs[currentBuf].bits(); - video_copy(imagebits + y * ((2048 + 64) * 4) + x * 4, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t)); + video_copy(imagebits + y * ((2048) * 4) + x * 4, &(buffer32->line[y][x]), h * (2048) * sizeof(uint32_t)); if (screenshots) { - video_screenshot((uint32_t *)imagebits, 0, 0, 2048 + 64); + video_screenshot((uint32_t *)imagebits, 0, 0, 2048); } video_blit_complete(); blitToRenderer(imagebufs[currentBuf], sx, sy, sw, sh, &buffers_in_use[currentBuf]); diff --git a/src/qt/qt_sdl.c b/src/qt/qt_sdl.c index 072531bd6..81a1311d1 100644 --- a/src/qt/qt_sdl.c +++ b/src/qt/qt_sdl.c @@ -313,10 +313,10 @@ sdl_blit(int x, int y, int w, int h) SDL_LockMutex(sdl_mutex); SDL_LockTexture(sdl_tex, 0, &pixeldata, &pitch); - video_copy(pixeldata, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t)); + video_copy(pixeldata, &(buffer32->line[y][x]), h * (2048) * sizeof(uint32_t)); if (screenshots) - video_screenshot((uint32_t *) pixeldata, 0, 0, (2048 + 64)); + video_screenshot((uint32_t *) pixeldata, 0, 0, (2048)); SDL_UnlockTexture(sdl_tex); @@ -414,7 +414,7 @@ sdl_init_texture(void) } sdl_tex = SDL_CreateTexture(sdl_render, SDL_PIXELFORMAT_ARGB8888, - SDL_TEXTUREACCESS_STREAMING, (2048 + 64), (2048 + 64)); + SDL_TEXTUREACCESS_STREAMING, (2048), (2048)); if (sdl_render == NULL) { sdl_log("SDL: unable to SDL_CreateRenderer (%s)\n", SDL_GetError()); diff --git a/src/qt/qt_specifydimensions.cpp b/src/qt/qt_specifydimensions.cpp index 58c2ae1a6..4ef9ae76d 100644 --- a/src/qt/qt_specifydimensions.cpp +++ b/src/qt/qt_specifydimensions.cpp @@ -22,9 +22,9 @@ SpecifyDimensions::SpecifyDimensions(QWidget *parent) : { ui->setupUi(this); ui->checkBox->setChecked(vid_resize == 2); - ui->spinBoxWidth->setRange(16, 2048 + 64); + ui->spinBoxWidth->setRange(16, 2048); ui->spinBoxWidth->setValue(main_window->getRenderWidgetSize().width()); - ui->spinBoxHeight->setRange(16, 2048 + 64); + ui->spinBoxHeight->setRange(16, 2048); ui->spinBoxHeight->setValue(main_window->getRenderWidgetSize().height()); }