all repos — mgba @ 6cf255daf45ac5f9f778d1c4a56cf07a70f48316

mGBA Game Boy Advance Emulator

Qt: Allow small windows
Vicki Pfau vi@endrift.com
Sat, 18 May 2019 17:06:53 -0700
commit

6cf255daf45ac5f9f778d1c4a56cf07a70f48316

parent

7cc06ea12db77b7c8c70c6c2a9cc841624e98774

2 files changed, 4 insertions(+), 7 deletions(-)

jump to
M src/platform/opengl/gles2.csrc/platform/opengl/gles2.c

@@ -246,7 +246,7 @@ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, drawW, drawH, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);

glBindTexture(GL_TEXTURE_2D, oldTex); } - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, shader->filter ? GL_LINEAR : GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, shader->filter ? GL_LINEAR : GL_NEAREST); glUseProgram(shader->program); glUniform1i(shader->texLocation, 0);
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -719,7 +719,6 @@ if (m_savedScale > 0) {

resizeFrame(size * m_savedScale); } attachWidget(m_display.get()); - m_display->setMinimumSize(size); setFocus(); #ifndef Q_OS_MAC

@@ -890,7 +889,6 @@ }

#endif if (m_controller) { - m_display->setMinimumSize(m_controller->screenDimensions()); connect(m_controller.get(), &CoreController::stopping, m_display.get(), &Display::stopDrawing); connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::resizeContext); connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::forceDraw);

@@ -902,13 +900,12 @@ connect(m_controller.get(), &CoreController::statusPosted, m_display.get(), &Display::showMessage);

attachWidget(m_display.get()); m_display->startDrawing(m_controller); - } else { + } #ifdef M_CORE_GB - m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS); + m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS); #elif defined(M_CORE_GBA) - m_display->setMinimumSize(GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS); + m_display->setMinimumSize(GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS); #endif - } } void Window::reloadAudioDriver() {