diff --git a/Core/Core.cpp b/Core/Core.cpp
index 508c69ce0..d92c88a9e 100644
--- a/Core/Core.cpp
+++ b/Core/Core.cpp
@@ -127,11 +127,11 @@ bool UpdateScreenScale(int width, int height, bool smallWindow) {
g_dpi_scale = 1.0f;
#if defined(__SYMBIAN32__)
g_dpi_scale = 1.4f;
-#elif defined(_WIN32)
+#endif
if (smallWindow) {
g_dpi_scale = 2.0f;
}
-#endif
+
pixel_in_dps = 1.0f / g_dpi_scale;
int new_dp_xres = width * g_dpi_scale;
diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp
index 9ceca618a..8ae678ff1 100644
--- a/Qt/mainwindow.cpp
+++ b/Qt/mainwindow.cpp
@@ -39,7 +39,7 @@ MainWindow::MainWindow(QWidget *parent, bool fullscreen) :
createMenus();
updateMenus();
- SetZoom(g_Config.iInternalResolution);
+ SetWindowScale(-1);
if(fullscreen)
fullscrAct();
@@ -83,7 +83,9 @@ void MainWindow::updateMenus()
}
foreach(QAction * action, screenGroup->actions()) {
- if (g_Config.iInternalResolution == action->data().toInt()) {
+ int width = (g_Config.IsPortrait() ? 272 : 480) * action->data().toInt();
+ int height = (g_Config.IsPortrait() ? 480 : 272) * action->data().toInt();
+ if (g_Config.iWindowWidth == width && g_Config.iWindowHeight == height) {
action->setChecked(true);
break;
}
@@ -362,7 +364,7 @@ void MainWindow::fullscrAct()
updateMenus();
showNormal();
- SetZoom(g_Config.iInternalResolution);
+ SetWindowScale(-1);
InitPadLayout(dp_xres, dp_yres);
if (GetUIState() == UISTATE_INGAME && QApplication::overrideCursor())
QApplication::restoreOverrideCursor();
@@ -414,18 +416,35 @@ void MainWindow::aboutAct()
}
/* Private functions */
-void MainWindow::SetZoom(int zoom) {
+void MainWindow::SetWindowScale(int zoom) {
if (isFullScreen())
fullscrAct();
- if (zoom < 1) zoom = 1;
- if (zoom > 4) zoom = 4;
- g_Config.iInternalResolution = zoom;
- emugl->setFixedSize(480 * zoom, 272 * zoom);
+ int width, height;
+ if (zoom == -1 && (g_Config.iWindowWidth <= 0 || g_Config.iWindowHeight <= 0)) {
+ // Default to zoom level 2.
+ zoom = 2;
+ }
+ if (zoom == -1) {
+ // Take the last setting.
+ width = g_Config.iWindowWidth;
+ height = g_Config.iWindowHeight;
+ } else {
+ // Update to the specified factor. Let's clamp first.
+ if (zoom < 1)
+ zoom = 1;
+ if (zoom > 4)
+ zoom = 4;
+
+ width = (g_Config.IsPortrait() ? 272 : 480) * zoom;
+ height = (g_Config.IsPortrait() ? 480 : 272) * zoom;
+ }
+
+ g_Config.iWindowWidth = width;
+ g_Config.iWindowHeight = height;
+
+ emugl->setFixedSize(g_Config.iWindowWidth, g_Config.iWindowHeight);
setFixedSize(sizeHint());
-
- if (gpu)
- gpu->Resized();
}
void MainWindow::SetGameTitle(QString text)
diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h
index 1428f4dea..b20279fd4 100644
--- a/Qt/mainwindow.h
+++ b/Qt/mainwindow.h
@@ -97,7 +97,7 @@ private slots:
void bufferRenderAct() { g_Config.iRenderingMode = !g_Config.iRenderingMode; }
void linearAct() { g_Config.iTexFiltering = (g_Config.iTexFiltering != 0) ? 0 : 3; }
- void screenGroup_triggered(QAction *action) { SetZoom(action->data().toInt()); }
+ void screenGroup_triggered(QAction *action) { SetWindowScale(action->data().toInt()); }
void displayLayoutGroup_triggered(QAction *action) { g_Config.iSmallDisplayZoomType = action->data().toInt(); }
void transformAct() { g_Config.bHardwareTransform = !g_Config.bHardwareTransform; }
@@ -135,7 +135,7 @@ private slots:
void langChanged(QAction *action) { loadLanguage(action->data().toString(), true); }
private:
- void SetZoom(int zoom);
+ void SetWindowScale(int zoom);
void SetGameTitle(QString text);
void loadLanguage(const QString &language, bool retranslate);
void createMenus();
diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp
index 9ca8045dd..9aea37132 100644
--- a/UI/NativeApp.cpp
+++ b/UI/NativeApp.cpp
@@ -377,7 +377,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
const char *fileToLog = 0;
const char *stateToLoad = 0;
- bool gfxLog = false;
+ bool gfxLog = true;
// Parse command line
LogTypes::LOG_LEVELS logLevel = LogTypes::LINFO;
for (int i = 1; i < argc; i++) {
@@ -389,7 +389,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
logLevel = LogTypes::LDEBUG;
break;
case 'g':
- gfxLog = true;
+ gfxLog = false;
break;
case 'j':
g_Config.iCpuCore = CPU_CORE_JIT;
diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj
index 4a61e38dd..33bea34b3 100644
--- a/Windows/PPSSPP.vcxproj
+++ b/Windows/PPSSPP.vcxproj
@@ -293,6 +293,66 @@
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+ true
+
@@ -349,6 +409,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -404,6 +474,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters
index a981fe75c..e062f0b74 100644
--- a/Windows/PPSSPP.vcxproj.filters
+++ b/Windows/PPSSPP.vcxproj.filters
@@ -29,6 +29,12 @@
{15f0e146-e39c-4bad-ba10-3c714a7dbf74}
+
+ {45191b1f-33c8-405c-a410-35fe2344d1d1}
+
+
+ {1d0cc0ee-fdbd-419e-b322-b35075d9d9db}
+
@@ -153,6 +159,36 @@
Windows\System
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
@@ -280,6 +316,36 @@
Windows\System
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
@@ -335,6 +401,45 @@
Resource Files
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
+
+ Other Platforms\Qt\Debugger
+
diff --git a/ext/native/base/QtMain.cpp b/ext/native/base/QtMain.cpp
index 3a7384f52..e0444f82a 100644
--- a/ext/native/base/QtMain.cpp
+++ b/ext/native/base/QtMain.cpp
@@ -239,7 +239,10 @@ QString MainUI::InputBoxGetQString(QString title, QString defaultValue)
void MainUI::resizeGL(int w, int h)
{
- UpdateScreenScale(w, h, false);
+ bool smallWindow = g_Config.IsPortrait() ? (h < 480 + 80) : (w < 480 + 80);
+ if (UpdateScreenScale(w, h, smallWindow)) {
+ NativeMessageReceived("gpu resized", "");
+ }
xscale = w / this->width();
yscale = h / this->height();