Fix Windows and macOS build errors

Adds to e4b640903d and de5b6f8eb4
This commit is contained in:
Myned
2020-05-23 00:25:30 -04:00
parent 87da123c19
commit f0cf5a5c19
2 changed files with 41 additions and 2 deletions

View File

@@ -58,6 +58,22 @@ void GetWindowList(vector<string>& windows)
}
}
// Overloaded
void GetWindowList(QStringList &windows)
{
windows.clear();
HWND window = GetWindow(GetDesktopWindow(), GW_CHILD);
while (window)
{
string title;
if (WindowValid(window) && GetWindowTitle(window, title))
windows << QString::fromStdString(title);
window = GetNextWindow(window, GW_HWNDNEXT);
}
}
void GetCurrentWindowTitle(string& title)
{
HWND window = GetForegroundWindow();
@@ -87,7 +103,8 @@ pair<int, int> getCursorPos()
return pos;
}
bool isFullscreen()
// Argument added in lieu of fullscreen bug fix
bool isFullscreen(std::string &title)
{
RECT appBounds;
RECT rc;