Rework the way that windows mouse cursor hiding is done to use the built

in wxWidgets methods.
This commit is contained in:
Glenn Rice 2012-12-16 21:32:14 -06:00
commit d1a812231e
4 changed files with 14 additions and 61 deletions

View file

@ -139,9 +139,9 @@ void CFrame::CreateMenu()
emulationMenu->Append(IDM_RECORDEXPORT, GetMenuLabel(HK_EXPORT_RECORDING));
emulationMenu->Append(IDM_RECORDREADONLY, GetMenuLabel(HK_READ_ONLY_MODE), wxEmptyString, wxITEM_CHECK);
emulationMenu->Append(IDM_TASINPUT, _("TAS Input"));
emulationMenu->AppendCheckItem(IDM_TOGGLE_PAUSEMOVIE, _("Pause at end of movie"));
emulationMenu->AppendCheckItem(IDM_TOGGLE_PAUSEMOVIE, _("Pause at end of movie"));
emulationMenu->Check(IDM_TOGGLE_PAUSEMOVIE, SConfig::GetInstance().m_PauseMovie);
emulationMenu->AppendCheckItem(IDM_SHOWLAG, _("Show lag counter"));
emulationMenu->AppendCheckItem(IDM_SHOWLAG, _("Show lag counter"));
emulationMenu->Check(IDM_SHOWLAG, SConfig::GetInstance().m_ShowLag);
emulationMenu->Check(IDM_RECORDREADONLY, true);
emulationMenu->AppendSeparator();
@ -1059,23 +1059,10 @@ void CFrame::DoPause()
}
else
{
// 32x32, 8bpp b/w image
// We want all transparent, so we can just use the same buffer for
// the "image" as for the transparency mask
static const char cursor_data[32 * 32] = { 0 };
#ifdef __WXGTK__
wxCursor cursor_transparent = wxCursor(cursor_data, 32, 32, 6, 14,
cursor_data, wxWHITE, wxBLACK);
#else
wxBitmap cursor_bitmap(cursor_data, 32, 32);
cursor_bitmap.SetMask(new wxMask(cursor_bitmap));
wxCursor cursor_transparent = wxCursor(cursor_bitmap.ConvertToImage());
#endif
Core::SetState(Core::CORE_RUN);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
RendererHasFocus())
m_RenderParent->SetCursor(cursor_transparent);
m_RenderParent->SetCursor(wxCURSOR_BLANK);
}
UpdateGUI();
}