Skip to content

Commit

Permalink
[Fix] Fullscreen game detection (close #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
SakuraKoi committed Mar 3, 2021
1 parent 3958293 commit c6b1290
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BattlefieldChat/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ int getSystemTitleHeight() {
return (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CXPADDEDBORDER));
}

bool isFullscreenWindow(HWND window) { // FIXME not working
return window == GetDesktopWindow() || window == GetShellWindow();
bool isFullscreenWindow(HWND window) {
QUERY_USER_NOTIFICATION_STATE state;
SHQueryUserNotificationState(&state);
return state == QUNS_BUSY || state == QUNS_RUNNING_D3D_FULL_SCREEN;
}

bool isBorderlessWindow(HWND window) {
Expand Down

0 comments on commit c6b1290

Please sign in to comment.