mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-12 19:37:01 +00:00
UI: Fix warnings (#1729)
This commit is contained in:
parent
934cc3eb9d
commit
eb95e63d94
11 changed files with 35 additions and 35 deletions
|
|
@ -124,7 +124,7 @@ AudioDebuggerWindow::AudioDebuggerWindow(wxFrame& parent)
|
|||
|
||||
sizer->Add(voiceListbox, 1, wxEXPAND | wxBOTTOM, 0);
|
||||
|
||||
voiceListbox->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(AudioDebuggerWindow::OnVoiceListRightClick), NULL, this);
|
||||
voiceListbox->Bind(wxEVT_RIGHT_DOWN, &AudioDebuggerWindow::OnVoiceListRightClick, this);
|
||||
|
||||
mainPane->SetSizer(sizer);
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ void unused_translation_dummy()
|
|||
}
|
||||
|
||||
#if BOOST_OS_WINDOWS
|
||||
#include <shlobj_core.h>
|
||||
#include <shlobj.h>
|
||||
fs::path GetAppDataRoamingPath()
|
||||
{
|
||||
PWSTR path = nullptr;
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ void MainWindow::OpenSettings()
|
|||
const bool mlc_modified = frame.MLCModified();
|
||||
|
||||
if (paths_modified)
|
||||
m_game_list->ReloadGameEntries(false);
|
||||
m_game_list->ReloadGameEntries();
|
||||
else
|
||||
SaveSettings();
|
||||
|
||||
|
|
@ -1012,7 +1012,7 @@ void MainWindow::OnConsoleLanguage(wxCommandEvent& event)
|
|||
if (m_game_list)
|
||||
{
|
||||
m_game_list->DeleteCachedStrings();
|
||||
m_game_list->ReloadGameEntries(false);
|
||||
m_game_list->ReloadGameEntries();
|
||||
}
|
||||
GetConfigHandle().Save();
|
||||
}
|
||||
|
|
@ -1450,7 +1450,7 @@ void MainWindow::OnAccountListRefresh(wxCommandEvent& event)
|
|||
|
||||
void MainWindow::OnRequestGameListRefresh(wxCommandEvent& event)
|
||||
{
|
||||
m_game_list->ReloadGameEntries(false);
|
||||
m_game_list->ReloadGameEntries();
|
||||
}
|
||||
|
||||
void MainWindow::OnSetWindowTitle(wxCommandEvent& event)
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ void MemorySearcherTool::OnEntryListRightClick(wxDataViewEvent& event)
|
|||
//mnu.SetClientData(data);
|
||||
mnu.Append(LIST_ENTRY_ADD, _("&Add new entry"))->Enable(false);
|
||||
mnu.Append(LIST_ENTRY_REMOVE, _("&Remove entry"));
|
||||
mnu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MemorySearcherTool::OnPopupClick), nullptr, this);
|
||||
mnu.Bind(wxEVT_COMMAND_MENU_SELECTED, &MemorySearcherTool::OnPopupClick, this);
|
||||
PopupMenu(&mnu);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,21 +66,21 @@ void _stripPathFilename(fs::path& path)
|
|||
path = path.parent_path();
|
||||
}
|
||||
|
||||
std::list<fs::path> _getCachesPaths(const TitleId& titleId)
|
||||
std::vector<fs::path> _getCachesPaths(const TitleId& titleId)
|
||||
{
|
||||
std::list<fs::path> cachePaths{
|
||||
std::vector<fs::path> cachePaths{
|
||||
ActiveSettings::GetCachePath(L"shaderCache/driver/vk/{:016x}.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/precompiled/{:016x}_spirv.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/precompiled/{:016x}_gl.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_shaders.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_vkpipeline.bin", titleId)};
|
||||
|
||||
cachePaths.remove_if(
|
||||
[](const fs::path& cachePath)
|
||||
{
|
||||
cachePaths.erase(std::remove_if(cachePaths.begin(), cachePaths.end(),
|
||||
[](const fs::path& cachePath) {
|
||||
std::error_code ec;
|
||||
return !fs::exists(cachePath, ec);
|
||||
});
|
||||
}),
|
||||
cachePaths.end());
|
||||
|
||||
return cachePaths;
|
||||
}
|
||||
|
|
@ -342,7 +342,7 @@ bool wxGameList::IsVisible(long item) const
|
|||
return visible;
|
||||
}
|
||||
|
||||
void wxGameList::ReloadGameEntries(bool cached)
|
||||
void wxGameList::ReloadGameEntries()
|
||||
{
|
||||
wxWindowUpdateLocker windowlock(this);
|
||||
DeleteAllItems();
|
||||
|
|
@ -842,7 +842,7 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
switch (event.GetId())
|
||||
{
|
||||
case kContextMenuRefreshGames:
|
||||
ReloadGameEntries(false);
|
||||
ReloadGameEntries();
|
||||
break;
|
||||
case kContextMenuStyleList:
|
||||
SetStyle(Style::kList);
|
||||
|
|
@ -1255,7 +1255,7 @@ void wxGameList::HandleTitleListCallback(CafeTitleListCallbackEvent* evt)
|
|||
}
|
||||
}
|
||||
|
||||
void wxGameList::RemoveCache(const std::list<fs::path>& cachePaths, const std::string& titleName)
|
||||
void wxGameList::RemoveCache(const std::vector<fs::path>& cachePaths, const std::string& titleName)
|
||||
{
|
||||
wxMessageDialog dialog(this, formatWxString(_("Remove the shader caches for {}?"), titleName), _("Remove shader caches"), wxCENTRE | wxYES_NO | wxICON_EXCLAMATION);
|
||||
dialog.SetYesNoLabels(_("Yes"), _("No"));
|
||||
|
|
@ -1263,7 +1263,7 @@ void wxGameList::RemoveCache(const std::list<fs::path>& cachePaths, const std::s
|
|||
const auto dialogResult = dialog.ShowModal();
|
||||
if (dialogResult != wxID_YES)
|
||||
return;
|
||||
std::list<std::string> errs;
|
||||
std::vector<std::string> errs;
|
||||
for (const fs::path& cachePath : cachePaths)
|
||||
{
|
||||
if (std::error_code ec; !fs::remove(cachePath, ec))
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
void SaveConfig(bool flush = false);
|
||||
bool IsVisible(long item) const; // only available in wxwidgets 3.1.3
|
||||
|
||||
void ReloadGameEntries(bool cached = false);
|
||||
void ReloadGameEntries();
|
||||
void DeleteCachedStrings();
|
||||
|
||||
void CreateShortcut(GameInfo2& gameInfo);
|
||||
|
|
@ -115,7 +115,7 @@ private:
|
|||
|
||||
void HandleTitleListCallback(struct CafeTitleListCallbackEvent* evt);
|
||||
|
||||
void RemoveCache(const std::list<fs::path>& cachePath, const std::string& titleName);
|
||||
void RemoveCache(const std::vector<fs::path>& cachePath, const std::string& titleName);
|
||||
|
||||
void AsyncWorkerThread();
|
||||
void RequestLoadIconAsync(TitleId titleId);
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
|
|||
menu.Append(MENU_ID_CREATE_MEM_BP_READ, _("Create memory breakpoint (read)"));
|
||||
menu.Append(MENU_ID_CREATE_MEM_BP_WRITE, _("Create memory breakpoint (write)"));
|
||||
|
||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BreakpointWindow::OnContextMenuClick), nullptr, this);
|
||||
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClick, this);
|
||||
PopupMenu(&menu);
|
||||
}
|
||||
else
|
||||
|
|
@ -234,7 +234,7 @@ void BreakpointWindow::OnRightDown(wxMouseEvent& event)
|
|||
wxMenu menu;
|
||||
menu.Append(MENU_ID_DELETE_BP, _("Delete breakpoint"));
|
||||
|
||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(BreakpointWindow::OnContextMenuClickSelected), nullptr, this);
|
||||
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &BreakpointWindow::OnContextMenuClickSelected, this);
|
||||
PopupMenu(&menu);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ void HotkeySettings::CreateHotkeyRow(const wxString& label, sHotkeyCfg& cfgHotke
|
|||
controllerInput->Bind(wxEVT_BUTTON, &HotkeySettings::OnControllerHotkeyInputLeftClick, this);
|
||||
|
||||
/* for cancelling and clearing input */
|
||||
keyInput->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(HotkeySettings::OnKeyboardHotkeyInputRightClick), NULL, this);
|
||||
controllerInput->Connect(wxEVT_RIGHT_UP, wxMouseEventHandler(HotkeySettings::OnControllerHotkeyInputRightClick), NULL, this);
|
||||
keyInput->Bind(wxEVT_RIGHT_UP, &HotkeySettings::OnKeyboardHotkeyInputRightClick, this);
|
||||
controllerInput->Bind(wxEVT_RIGHT_UP, &HotkeySettings::OnControllerHotkeyInputRightClick, this);
|
||||
|
||||
keyInput->SetMinSize(m_minButtonSize);
|
||||
controllerInput->SetMinSize(m_minButtonSize);
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ DebugPPCThreadsWindow::DebugPPCThreadsWindow(wxFrame& parent)
|
|||
|
||||
sizer->Add(row, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
m_thread_list->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(DebugPPCThreadsWindow::OnThreadListRightClick), nullptr, this);
|
||||
m_thread_list->Bind(wxEVT_RIGHT_DOWN, &DebugPPCThreadsWindow::OnThreadListRightClick, this);
|
||||
|
||||
SetSizer(sizer);
|
||||
|
||||
|
|
@ -466,7 +466,7 @@ void DebugPPCThreadsWindow::OnThreadListRightClick(wxMouseEvent& event)
|
|||
menu.AppendSeparator();
|
||||
menu.Append(THREADLIST_MENU_DUMP_STACK_TRACE, _("Write stack trace to log"));
|
||||
menu.Append(THREADLIST_MENU_PROFILE_THREAD, _("Profile thread"));
|
||||
menu.Connect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(DebugPPCThreadsWindow::OnThreadListPopupClick), nullptr, this);
|
||||
menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &DebugPPCThreadsWindow::OnThreadListPopupClick, this);
|
||||
PopupMenu(&menu);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ TextureRelationViewerWindow::TextureRelationViewerWindow(wxFrame& parent)
|
|||
sizerBottom->Add(checkboxShowViews, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxTOP | wxLEFT, 10);
|
||||
checkboxShowViews->SetValue(true);
|
||||
|
||||
textureRelationListA->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(TextureRelationViewerWindow::OnTextureListRightClick), NULL, this);
|
||||
textureRelationListA->Bind(wxEVT_RIGHT_DOWN, &TextureRelationViewerWindow::OnTextureListRightClick, this);
|
||||
|
||||
sizer->Add(
|
||||
sizerBottom,
|
||||
|
|
|
|||
|
|
@ -121,49 +121,49 @@ void wxCheckTree::Init()
|
|||
|
||||
// Unchecked
|
||||
renderer_dc.SelectObject(unchecked_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_NONE);
|
||||
|
||||
// Unchecked Mouse Over
|
||||
renderer_dc.SelectObject(unchecked_mouse_over_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CURRENT);
|
||||
|
||||
// Unchecked and Disabled
|
||||
renderer_dc.SelectObject(unchecked_disabled_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_DISABLED);
|
||||
|
||||
// Unchecked Left Down
|
||||
renderer_dc.SelectObject(unchecked_left_down_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CURRENT | wxCONTROL_PRESSED);
|
||||
|
||||
// Checked
|
||||
renderer_dc.SelectObject(checked_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED);
|
||||
|
||||
// Checked Mouse Over
|
||||
renderer_dc.SelectObject(checked_mouse_over_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED | wxCONTROL_CURRENT);
|
||||
|
||||
// Checked Left Down
|
||||
renderer_dc.SelectObject(checked_left_down_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED | wxCONTROL_CURRENT | wxCONTROL_PRESSED);
|
||||
|
||||
// Checked and Disabled
|
||||
renderer_dc.SelectObject(checked_disabled_bmp);
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
|
||||
renderer_dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour()));
|
||||
renderer_dc.Clear();
|
||||
wxRendererNative::Get().DrawCheckBox(this, renderer_dc, wxRect(0, 0, width, height), wxCONTROL_CHECKED | wxCONTROL_DISABLED);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue