From 05e5e6058f650ec47a366453a585caf38a2f77d2 Mon Sep 17 00:00:00 2001
From: Eladash <elad3356p@gmail.com>
Date: Tue, 14 Jan 2020 15:42:07 +0200
Subject: [PATCH] Add description for rsx wake-up delay

---
 rpcs3/Json/tooltips.json          | 1 +
 rpcs3/rpcs3qt/settings_dialog.cpp | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json
index 0ee6ea4ce1..e29201d68d 100644
--- a/rpcs3/Json/tooltips.json
+++ b/rpcs3/Json/tooltips.json
@@ -17,6 +17,7 @@
 		"sleepTimersAccuracy": "Changes the sleep period accuracy.\n'As Host' uses default accuracy of the underlying operating system, while 'All Timers' attempts to improve it.\n'Usleep Only' limits the adjustments to usleep syscall only.\nCan affect perfomance in unexpected ways.",
 		"vblankRate": "Adjusts the frequency of vertical blanking signals that the emulator sends.\nAffects timing of events which rely on these signals.",
 		"clocksScale": "Changes the scale of emulated system time.\nAffects software which uses system time to calculate things such as dynamic timesteps.",
+		"wakeupDelay": "Try fiddling with this setting when encountering unstable games. The higher value, the better stability it may provide.\nIncrements/Decrements for each test should be around 100μs to 200μs until finding the best value for optimal stability.\nValues above 1000μs may cause noticeable performance penalties, use with caution.",
 		"disabledFromGlobal": "Do not change this setting globally.\nRight-click the game in game list and choose \"Configure\" instead."
 	},
 	"audio": {
diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp
index 1cd993caf8..973fd69a72 100644
--- a/rpcs3/rpcs3qt/settings_dialog.cpp
+++ b/rpcs3/rpcs3qt/settings_dialog.cpp
@@ -974,11 +974,15 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
 		ui->clockScale->setDisabled(true);
 		ui->clockScaleReset->setDisabled(true);
 		SubscribeTooltip(ui->clockScale, json_advanced["disabledFromGlobal"].toString());
+		ui->wakeupDelay->setDisabled(true);
+		ui->wakeupReset->setDisabled(true);
+		SubscribeTooltip(ui->wakeupDelay, json_advanced["disabledFromGlobal"].toString());
 	}
 	else
 	{
 		SubscribeTooltip(ui->vblank, json_advanced["vblankRate"].toString());
 		SubscribeTooltip(ui->clockScale, json_advanced["clocksScale"].toString());
+		SubscribeTooltip(ui->wakeupDelay, json_advanced["wakeupDelay"].toString());
 	}
 
 	// lib options tool tips