Created
February 10, 2021 14:46
-
-
Save piomar123/7596fd3f4c9e7c2d80375af7caf1ec26 to your computer and use it in GitHub Desktop.
piomar123 #code16challenge
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
#ifdef _WIN32 | |
#include <windows.h> | |
#pragma comment(lib, "user32.lib") | |
int main() { | |
return DefWindowProc(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2); | |
} | |
#else | |
#include <stdlib.h> | |
int main() { | |
return system("xset dpms force off"); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment