mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #21232 from hrydgard/more-improvements
Libretro: Fix freeze
This commit is contained in:
4 files changed
+29
-5
No files matched your search
@@ -311,6 +311,8 @@ void DisplayHWReset() {
|
||||
|
||||
fpsHistoryValid = 0;
|
||||
fpsHistoryPos = 0;
|
||||
lastFpsTime = 0.0;
|
||||
lastFpsFrame = 0;
|
||||
|
||||
frameTimeHistoryValid = 0;
|
||||
frameTimeHistoryPos = 0;
|
||||
|
||||
@@ -146,7 +146,14 @@ GameSettingsScreen::~GameSettingsScreen() {
|
||||
Reporting::Enable(enableReports_, "report.ppsspp.org");
|
||||
Reporting::UpdateConfig();
|
||||
if (!g_Config.Save("GameSettingsScreen::onFinish")) {
|
||||
System_Toast("Failed to save settings!\nCheck permissions, or try to restart the device.");
|
||||
std::string message = "Failed to save settings!\n";
|
||||
#ifdef MOBILE_DEVICE
|
||||
message += "Check permissions, or try to restart the device.";
|
||||
#else
|
||||
message += "Make sure this folder isn't read-only:\n";
|
||||
message += g_Config.memStickDirectory.ToVisualString();
|
||||
#endif
|
||||
System_Toast(message);
|
||||
}
|
||||
|
||||
if (editGameSpecificThenRestore_) {
|
||||
|
||||
+5
-1
@@ -711,13 +711,17 @@ void GamePauseScreen::ShowContextMenu(UI::View *menuButton, bool portrait) {
|
||||
std::string confirmMessage = GetConfirmExitMessage();
|
||||
if (!confirmMessage.empty()) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
screenManager()->push(new UI::MessagePopupScreen(di->T("Reset"), confirmMessage, di->T("Reset"), di->T("Cancel"), [](bool result) {
|
||||
screenManager()->push(new UI::MessagePopupScreen(di->T("Reset"), confirmMessage, di->T("Reset"), di->T("Cancel"), [this](bool result) {
|
||||
if (result) {
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
|
||||
finishNextFrameResult_ = DR_BACK; // resume
|
||||
finishNextFrame_ = true;
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
|
||||
finishNextFrameResult_ = DR_BACK; // resume
|
||||
finishNextFrame_ = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+14
-3
@@ -1360,9 +1360,9 @@ namespace Libretro
|
||||
ctx->GetDrawContext()->BeginFrame(Draw::DebugFlags::NONE);
|
||||
}
|
||||
|
||||
const DisplayLayoutConfig &displayLayoutConfig = g_Config.GetDisplayLayoutConfig(g_display.GetDeviceOrientation());
|
||||
if (gpu) {
|
||||
const DisplayLayoutConfig &config = g_Config.GetDisplayLayoutConfig(g_display.GetDeviceOrientation());
|
||||
gpu->BeginHostFrame(config);
|
||||
gpu->BeginHostFrame(displayLayoutConfig);
|
||||
}
|
||||
|
||||
PSP_RunLoopWhileState();
|
||||
@@ -1377,9 +1377,20 @@ namespace Libretro
|
||||
break;
|
||||
}
|
||||
|
||||
if (gpu)
|
||||
if (gpu) {
|
||||
gpu->EndHostFrame();
|
||||
|
||||
gpu->PrepareCopyDisplayToOutput(displayLayoutConfig);
|
||||
}
|
||||
|
||||
// gotta do the backbuffer bind somewhere.
|
||||
using namespace Draw;
|
||||
ctx->GetDrawContext()->BindFramebufferAsRenderTarget(nullptr, {RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR}, "BackBuffer");
|
||||
|
||||
if (gpu) {
|
||||
gpu->CopyDisplayToOutput(displayLayoutConfig);
|
||||
}
|
||||
|
||||
if (ctx->GetDrawContext()) {
|
||||
ctx->GetDrawContext()->EndFrame();
|
||||
ctx->GetDrawContext()->Present(Draw::PresentMode::FIFO);
|
||||
|
||||
Reference in new issue
Block a user