Skip to content

Commit

Permalink
explorer fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ad2017gd committed Aug 18, 2023
1 parent 44f0cca commit 8b2a501
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RainbowTaskbar/ExplorerTAP/ExplorerTAP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ public static void SetAppearanceType(TransparencyInstruction.TransparencyInstruc
if (!NeedsTAP() || IsInjecting) return;
uint hres = unchecked((uint) SetAppearanceTypeDLL((uint) type));
if (hres == 0) tries = 0;
if (hres != 0 && tries < 5) { // MK_E_UNAVAILABLE or other errors?
while(hres != 0 && tries++ < 5) {
if (hres != 0 && tries < 3) { // MK_E_UNAVAILABLE or other errors?
while(hres != 0 && tries++ < 3) {
TryInject();
hres = unchecked((uint) SetAppearanceTypeDLL((uint) type));
}
if (hres != 0 && tries >= 5) {
if (hres != 0 && tries >= 3) {
MessageBox.Show(
$"0x{hres.ToString("X8")} : {Marshal.GetExceptionForHR(unchecked((int)hres))?.Message}\n\nThere seems to be an issue with the RainbowTaskbar DLL injected into explorer.exe. This process is very experimental, so please open up an issue on GitHub (Right-click RainbowTaskbar on system tray -> Submit an issue or request) to try and debug the problem. Make sure to also include any other errors you might have encountered.", "RainbowTaskbar Error", MessageBoxButton.OK, MessageBoxImage.Warning
);
Expand Down

0 comments on commit 8b2a501

Please sign in to comment.