mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
UI: Make GPU events more consistent.
This commit is contained in:
1 parent
7613fd97aa
commit
661b2a3aa8
6 files changed
+17
-22
No files matched your search
+3
-4
@@ -8,6 +8,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "base/display.h"
|
||||
#include "base/NativeApp.h"
|
||||
#include "Core/MIPS/MIPSDebugInterface.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/SaveState.h"
|
||||
@@ -94,8 +95,7 @@ void MainWindow::updateMenus()
|
||||
foreach(QAction * action, displayLayoutGroup->actions()) {
|
||||
if (g_Config.iSmallDisplayZoomType == action->data().toInt()) {
|
||||
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
|
||||
action->setChecked(true);
|
||||
break;
|
||||
@@ -379,8 +379,7 @@ void MainWindow::fullscrAct()
|
||||
|
||||
showFullScreen();
|
||||
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
InitPadLayout(dp_xres, dp_yres);
|
||||
if (GetUIState() == UISTATE_INGAME && !g_Config.bShowTouchControls)
|
||||
QApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
|
||||
|
||||
@@ -1051,9 +1051,8 @@ void GameSettingsScreen::onFinish(DialogResult result) {
|
||||
KeyMap::UpdateNativeMenuKeys();
|
||||
|
||||
// Wipe some caches after potentially changing settings.
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
Reporting::UpdateConfig();
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
NativeMessageReceived("gpu_clearCache", "");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1169,10 +1168,7 @@ UI::EventReturn GameSettingsScreen::OnPostProcShader(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnPostProcShaderChange(UI::EventParams &e) {
|
||||
if (gpu) {
|
||||
gpu->Resized();
|
||||
}
|
||||
Reporting::UpdateConfig();
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -836,7 +836,7 @@ void NativeRender(GraphicsContext *graphicsContext) {
|
||||
if (GetGPUBackend() == GPUBackend::OPENGL) {
|
||||
PSP_CoreParameter().pixelWidth = pixel_xres;
|
||||
PSP_CoreParameter().pixelHeight = pixel_yres;
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -868,7 +868,7 @@ void HandleGlobalMessage(const std::string &msg, const std::string &value) {
|
||||
// Show for the same duration as the preview.
|
||||
osm.Show(msg, 2.0f, 0xFFFFFF, -1, true, "savestate_slot");
|
||||
}
|
||||
if (msg == "gpu resized" || msg == "gpu clear cache") {
|
||||
if (msg == "gpu_resized" || msg == "gpu_clearCache") {
|
||||
if (gpu) {
|
||||
gpu->ClearCacheNextFrame();
|
||||
gpu->Resized();
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace MainWindow
|
||||
if (g_Config.iTexScalingLevel == TEXSCALING_AUTO)
|
||||
setTexScalingMultiplier(0);
|
||||
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
||||
void CorrectCursor() {
|
||||
@@ -279,7 +279,7 @@ namespace MainWindow
|
||||
INFO_LOG(SYSTEM, "Pixel width/height: %dx%d", PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight);
|
||||
|
||||
if (UpdateScreenScale(width, height)) {
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
||||
if (screenManager) {
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace MainWindow {
|
||||
// not static
|
||||
void setTexScalingMultiplier(int level) {
|
||||
g_Config.iTexScalingLevel = level;
|
||||
NativeMessageReceived("gpu clear cache", "");
|
||||
NativeMessageReceived("gpu_clearCache", "");
|
||||
}
|
||||
|
||||
static void setTexFiltering(int type) {
|
||||
@@ -497,7 +497,7 @@ namespace MainWindow {
|
||||
|
||||
static void setTexScalingType(int type) {
|
||||
g_Config.iTexScalingType = type;
|
||||
NativeMessageReceived("gpu clear cache", "");
|
||||
NativeMessageReceived("gpu_clearCache", "");
|
||||
}
|
||||
|
||||
static void setRenderingMode(int mode) {
|
||||
@@ -529,7 +529,7 @@ namespace MainWindow {
|
||||
break;
|
||||
}
|
||||
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
||||
static void setFpsLimit(int fps) {
|
||||
@@ -563,7 +563,7 @@ namespace MainWindow {
|
||||
|
||||
static void setDisplayOptions(int options) {
|
||||
g_Config.iSmallDisplayZoomType = options;
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
||||
void MainWindowMenu_Process(HWND hWnd, WPARAM wParam) {
|
||||
@@ -765,7 +765,7 @@ namespace MainWindow {
|
||||
|
||||
case ID_TEXTURESCALING_DEPOSTERIZE:
|
||||
g_Config.bTexDeposterize = !g_Config.bTexDeposterize;
|
||||
NativeMessageReceived("gpu clear cache", "");
|
||||
NativeMessageReceived("gpu_clearCache", "");
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_DIRECT3D9:
|
||||
@@ -1029,7 +1029,7 @@ namespace MainWindow {
|
||||
if (index < availableShaders.size()) {
|
||||
g_Config.sPostShaderName = availableShaders[index];
|
||||
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ QString MainUI::InputBoxGetQString(QString title, QString defaultValue)
|
||||
void MainUI::resizeGL(int w, int h)
|
||||
{
|
||||
if (UpdateScreenScale(w, h)) {
|
||||
NativeMessageReceived("gpu resized", "");
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
xscale = w / this->width();
|
||||
yscale = h / this->height();
|
||||
|
||||
Reference in new issue
Block a user