mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
wxw3: OSX can use the same method of hiding cursors as MSW
This commit is contained in:
@ -504,20 +504,21 @@ void CFrame::OnActive(wxActivateEvent& event)
|
|||||||
// We want all transparent, so we can just use the same buffer for
|
// We want all transparent, so we can just use the same buffer for
|
||||||
// the "image" as for the transparency mask
|
// the "image" as for the transparency mask
|
||||||
static const char cursor_data[32 * 32] = { 0 };
|
static const char cursor_data[32 * 32] = { 0 };
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXGTK__
|
||||||
wxBitmap cursor_bitmap(cursor_data, 32, 32);
|
|
||||||
cursor_bitmap.SetMask(new wxMask(cursor_bitmap));
|
|
||||||
wxCursor cursor_transparent = wxCursor(cursor_bitmap.ConvertToImage());
|
|
||||||
|
|
||||||
::SetFocus((HWND)m_RenderParent->GetHandle());
|
|
||||||
#else
|
|
||||||
wxCursor cursor_transparent = wxCursor(cursor_data, 32, 32, 6, 14,
|
wxCursor cursor_transparent = wxCursor(cursor_data, 32, 32, 6, 14,
|
||||||
cursor_data, wxWHITE, wxBLACK);
|
cursor_data, wxWHITE, wxBLACK);
|
||||||
|
|
||||||
m_RenderParent->SetFocus();
|
m_RenderParent->SetFocus();
|
||||||
|
#else
|
||||||
|
wxBitmap cursor_bitmap(cursor_data, 32, 32);
|
||||||
|
cursor_bitmap.SetMask(new wxMask(cursor_bitmap));
|
||||||
|
wxCursor cursor_transparent = wxCursor(cursor_bitmap.ConvertToImage());
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
::SetFocus((HWND)m_RenderParent->GetHandle());
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
||||||
Core::GetState() == Core::CORE_RUN)
|
Core::GetState() == Core::CORE_RUN)
|
||||||
m_RenderParent->SetCursor(cursor_transparent);
|
m_RenderParent->SetCursor(cursor_transparent);
|
||||||
|
Reference in New Issue
Block a user