Skip to content

Commit

Permalink
Add -restore switch
Browse files Browse the repository at this point in the history
When Windows updates, this program tries to restore the original
uDWM_win11drc.bak to uDWM.dll even though it should't, users have
to manually delete this file to get rid of rounded corners again.

See: valinet#35
  • Loading branch information
animeavi committed Jul 18, 2023
1 parent 5ac8d11 commit 9eb1173
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Win11DisableRoundedCorners/Win11DisableRoundedCorners.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ int main(int argc, char** argv)
{
BOOL bRestore = FALSE;

if (argc == 2 && strcmp(argv[1], "-restore") == 0)
{
bRestore = TRUE;
}

char szTaskkill[MAX_PATH];
ZeroMemory(
szTaskkill,
Expand Down Expand Up @@ -50,7 +55,6 @@ int main(int argc, char** argv)
MAX_PATH,
"\\uDWM_win11drc.bak"
);
bRestore = fileExists(szOriginalDWM);

char szModifiedDWM[_MAX_PATH];
ZeroMemory(
Expand Down Expand Up @@ -290,4 +294,4 @@ int main(int argc, char** argv)
}
printf("Operation successful.\n");
return 0;
}
}

0 comments on commit 9eb1173

Please sign in to comment.