diff --git a/Qt/Native.pro b/Qt/Native.pro index a32580e7ed..cef05b10ca 100644 --- a/Qt/Native.pro +++ b/Qt/Native.pro @@ -61,13 +61,6 @@ win32|contains(QT_CONFIG, no-zlib) { SOURCES += $$P/native/ext/libzip/*.c HEADERS += $$P/native/ext/libzip/*.h -# Libpng -SOURCES += $$P/native/ext/libpng17/*.c -HEADERS += $$P/native/ext/libpng17/*.h -armv7: SOURCES += $$P/native/ext/libpng17/arm/*.c -INCLUDEPATH += $$P/native/ext - - # Native SOURCES += $$P/native/audio/*.cpp \ diff --git a/Qt/PPSSPP.pro b/Qt/PPSSPP.pro index 47b29dc641..67d06fe679 100644 --- a/Qt/PPSSPP.pro +++ b/Qt/PPSSPP.pro @@ -4,8 +4,6 @@ TARGET = PPSSPPQt QT += core gui opengl include(Settings.pri) -!release:symbian:MMP_RULES += "DEBUGGABLE" - lessThan(QT_MAJOR_VERSION, 5) { lessThan(QT_MAJOR_VERSION, 4) | lessThan(QT_MINOR_VERSION, 7) { error(PPSSPP requires Qt 4.7 or newer but Qt $$[QT_VERSION] was detected.) @@ -117,6 +115,8 @@ INCLUDEPATH += $$P $$P/Common $$P/native $$P/native/ext FORMS += $$P/Qt/Debugger/*.ui RESOURCES += $$P/Qt/desktop_assets.qrc INCLUDEPATH += $$P/Qt $$P/Qt/Debugger + + # Creating translations should be done by Qt, really LREL_TOOL = $$[QT_INSTALL_BINS]/lrelease greaterThan(QT_MAJOR_VERSION, 4) { exists($${LREL_TOOL}-qt5): LREL_TOOL=$${LREL_TOOL}-qt5 @@ -149,6 +149,7 @@ symbian { ICON = $$P/assets/icon.svg DEPLOYMENT += vendor_deploy + MMP_RULES += "DEBUGGABLE" # 268 MB maximum TARGET.EPOCHEAPSIZE = 0x40000 0x10000000 diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 55df4e4578..de2cc6f991 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -33,7 +33,7 @@ #include #endif -#if defined(_WIN32) || (defined(USING_QT_UI) && !defined(MOBILE_DEVICE)) +#if defined(_WIN32) #include #include "ext/jpge/jpge.h" #endif @@ -565,15 +565,19 @@ void TakeScreenshot() { // Okay, allocate a buffer. u8 *buffer = new u8[3 * pixel_xres * pixel_yres]; - // Silly openGL reads upside down, we flip to another buffer for simplicity. - u8 *flipbuffer = new u8[3 * pixel_xres * pixel_yres]; glReadPixels(0, 0, pixel_xres, pixel_yres, GL_RGB, GL_UNSIGNED_BYTE, buffer); +#ifdef USING_QT_UI + QImage image(buffer, pixel_xres, pixel_yres, QImage::Format_RGB888); + image = image.mirrored(); + image.save(filename, g_Config.bScreenshotsAsPNG ? "PNG" : "JPG"); +#else + // Silly openGL reads upside down, we flip to another buffer for simplicity. + u8 *flipbuffer = new u8[3 * pixel_xres * pixel_yres]; for (int y = 0; y < pixel_yres; y++) { memcpy(flipbuffer + y * pixel_xres * 3, buffer + (pixel_yres - y - 1) * pixel_xres * 3, pixel_xres * 3); } - if (g_Config.bScreenshotsAsPNG) { png_image png; memset(&png, 0, sizeof(png)); @@ -588,9 +592,10 @@ void TakeScreenshot() { params.m_quality = 90; compress_image_to_jpeg_file(filename, pixel_xres, pixel_yres, 3, flipbuffer, params); } + delete [] flipbuffer; +#endif delete [] buffer; - delete [] flipbuffer; osm.Show(filename); #endif