diff --git a/src/gba/core.c b/src/gba/core.c index 0edd73b85..3feb64176 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -255,12 +255,19 @@ static void _GBACoreLoadConfig(struct mCore* core, const struct mCoreConfig* con mCoreConfigCopyValue(&core->config, config, "threadedVideo"); #endif mCoreConfigCopyValue(&core->config, config, "hwaccelVideo"); + mCoreConfigCopyValue(&core->config, config, "videoScale"); } static void _GBACoreDesiredVideoDimensions(struct mCore* core, unsigned* width, unsigned* height) { - UNUSED(core); - *width = GBA_VIDEO_HORIZONTAL_PIXELS; - *height = GBA_VIDEO_VERTICAL_PIXELS; + struct GBACore* gbacore = (struct GBACore*) core; + int fakeBool; + int scale = 1; + if (mCoreConfigGetIntValue(&core->config, "hwaccelVideo", &fakeBool) && fakeBool) { + scale = gbacore->glRenderer.scale; + } + + *width = GBA_VIDEO_HORIZONTAL_PIXELS * scale; + *height = GBA_VIDEO_VERTICAL_PIXELS * scale; } static void _GBACoreSetVideoBuffer(struct mCore* core, color_t* buffer, size_t stride) { @@ -406,6 +413,7 @@ static void _GBACoreReset(struct mCore* core) { #endif if (mCoreConfigGetIntValue(&core->config, "hwaccelVideo", &fakeBool) && fakeBool) { renderer = &gbacore->glRenderer.d; + mCoreConfigGetIntValue(&core->config, "videoScale", &gbacore->glRenderer.scale); } if (core->videoLogger) { gbacore->proxyRenderer.logger = core->videoLogger; diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index 5f6f8ba04..37ea45cac 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -40,7 +40,7 @@ CoreController::CoreController(mCore* core, QObject* parent) m_threadContext.core = core; m_threadContext.userData = this; - QSize size(256, 512); + QSize size(1024, 2048); m_buffers[0].resize(size.width() * size.height() * sizeof(color_t)); m_buffers[1].resize(size.width() * size.height() * sizeof(color_t)); m_buffers[0].fill(0xFF); diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 722359255..8ff657016 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -251,7 +251,7 @@ PainterGL::PainterGL(int majorVersion, VideoProxy* proxy, QGLWidget* parent) m_backend->lockAspectRatio = false; for (int i = 0; i < 2; ++i) { - m_free.append(new uint32_t[256 * 256]); + m_free.append(new uint32_t[1024 * 2048]); } }