Handle clear gpu cache as a global message.

This makes it so if you change texture scaling in the Windows menu on the
pause menu, it actually clears the cache.
This commit is contained in:
Unknown W. Brackets 2016-09-28 22:35:09 -07:00
parent ff66fe7f89
commit 6bbb3c0442
2 changed files with 12 additions and 10 deletions

View File

@ -338,13 +338,6 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
UpdateUIState(UISTATE_MENU);
releaseButtons();
screenManager()->push(new GameSettingsScreen(gamePath_));
} else if (!strcmp(message, "gpu resized") || !strcmp(message, "gpu clear cache")) {
if (gpu) {
gpu->ClearCacheNextFrame();
gpu->Resized();
}
Reporting::UpdateConfig();
RecreateViews();
} else if (!strcmp(message, "gpu dump next frame")) {
if (gpu)
gpu->DumpNextFrame();

View File

@ -72,6 +72,7 @@
#include "Core/Core.h"
#include "Core/FileLoaders/DiskCachingFileLoader.h"
#include "Core/Host.h"
#include "Core/Reporting.h"
#include "Core/SaveState.h"
#include "Core/Screenshot.h"
#include "Core/System.h"
@ -79,11 +80,12 @@
#include "Core/HLE/sceCtrl.h"
#include "Core/Util/GameManager.h"
#include "Core/Util/AudioFormat.h"
#include "GPU/GPUInterface.h"
#include "ui_atlas.h"
#include "EmuScreen.h"
#include "GameInfoCache.h"
#include "HostTypes.h"
#include "UI/EmuScreen.h"
#include "UI/GameInfoCache.h"
#include "UI/HostTypes.h"
#include "UI/OnScreenDisplay.h"
#include "UI/MiscScreens.h"
#include "UI/TiltEventProcessor.h"
@ -782,6 +784,13 @@ 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 (gpu) {
gpu->ClearCacheNextFrame();
gpu->Resized();
}
Reporting::UpdateConfig();
}
if (msg == "core_powerSaving") {
if (value != "false") {
I18NCategory *sy = GetI18NCategory("System");