-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create win7-dwm-disable.wh.cpp (#739)
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// ==WindhawkMod== | ||
// @id win7-dwm-disable | ||
// @name Win7 Disable Composition for process | ||
// @description Disables desktop composition when a certain process is running | ||
// @version 1.0 | ||
// @author Jevil7452 | ||
// @github https://github.com/Jevil7452 | ||
// @compilerOptions -ldwmapi | ||
// ==/WindhawkMod== | ||
|
||
// ==WindhawkModReadme== | ||
/* | ||
This mod lets you disable DWM desktop composition when you run a certain program. | ||
It acts the same as the "Disable desktop composition" option in the Compatibility tab, however this can be used for 64-bit programs as well. | ||
To include a program to be affected by the mod, use the process inclusion option on the Advanced tab. | ||
NOTE: If your program re-enables DWM composition by itself (for example, OBS versions that support turning it off via the program), it will not work | ||
Example with Notepad: | ||
![Notepad](https://i.imgur.com/4O06W7H.png) | ||
IMPORTANT: This mod is only for actual Windows 7, it will not work on newer versions | ||
*/ | ||
// ==/WindhawkModReadme== | ||
|
||
#include <dwmapi.h> | ||
|
||
BOOL Wh_ModInit() { | ||
Wh_Log(L"Init"); | ||
DwmEnableComposition(0); | ||
return TRUE; | ||
} |