mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-07-01 00:41:07 -05:00
osascript fullscreen screen fix
This commit is contained in:
parent
a2c03d73b9
commit
56cddfe3b2
|
|
@ -170,6 +170,7 @@ bool Switcher::isWindowFullscreen() {
|
|||
FILE * f1 = popen(cmd.c_str(), "r");
|
||||
fgets(resolution, 255, f1);
|
||||
pclose(f1);
|
||||
string resolutionString = string(resolution);
|
||||
|
||||
//get window resolution
|
||||
cmd = "osascript "
|
||||
|
|
@ -194,8 +195,9 @@ bool Switcher::isWindowFullscreen() {
|
|||
FILE * f2 = popen(cmd.c_str(), "r");
|
||||
fgets(bounds, 255, f2);
|
||||
pclose(f2);
|
||||
string boundsString = string(bounds);
|
||||
|
||||
return string(resolution).compare(string(bounds)) == 0;
|
||||
return resolutionString.compare(boundsString) == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user