mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Windows only part
This commit is contained in:
parent
495bc957cd
commit
0573c4eb94
1 changed files with 15 additions and 8 deletions
|
@ -120,12 +120,13 @@ bool Steam_Overlay::ShowOverlay() const
|
|||
|
||||
void Steam_Overlay::ShowOverlay(bool state)
|
||||
{
|
||||
static RECT old_clip;
|
||||
static BOOL show_cursor = FALSE;
|
||||
|
||||
if (!Ready() || show_overlay == state)
|
||||
return;
|
||||
|
||||
#ifdef STEAM_WIN32
|
||||
static RECT old_clip;
|
||||
static BOOL show_cursor = FALSE;
|
||||
|
||||
if (state)
|
||||
{
|
||||
HWND game_hwnd = Windows_Hook::Inst()->GetGameHwnd();
|
||||
|
@ -173,8 +174,12 @@ void Steam_Overlay::ShowOverlay(bool state)
|
|||
if (!show_cursor)
|
||||
while (ShowCursor(FALSE) >= 0);
|
||||
}
|
||||
show_overlay = state;
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
show_overlay = state;
|
||||
overlay_state_changed = true;
|
||||
}
|
||||
|
||||
|
@ -312,7 +317,9 @@ void Steam_Overlay::BuildFriendWindow(Friend const& frd, friend_window_state& st
|
|||
{
|
||||
if (state.window_state & window_state_need_attention && ImGui::IsWindowFocused())
|
||||
{
|
||||
#ifdef STEAM_WIN32
|
||||
PlaySound((LPCSTR)notif_invite_wav, NULL, SND_ASYNC | SND_MEMORY);
|
||||
#endif
|
||||
state.window_state &= ~window_state_need_attention;
|
||||
}
|
||||
|
||||
|
@ -432,7 +439,7 @@ void Steam_Overlay::OverlayProc( int width, int height )
|
|||
if (!friends.empty())
|
||||
{
|
||||
ImGui::ListBoxHeader("##label", friend_size);
|
||||
std::for_each(friends.begin(), friends.end(), [this](auto& i)
|
||||
std::for_each(friends.begin(), friends.end(), [this](std::pair<Friend const, friend_window_state> &i)
|
||||
{
|
||||
ImGui::PushID(i.first.id());
|
||||
|
||||
|
|
Loading…
Reference in a new issue