diff --git a/pcsx2/Frontend/Achievements.cpp b/pcsx2/Frontend/Achievements.cpp index c203b7fecc..d348ed55d3 100644 --- a/pcsx2/Frontend/Achievements.cpp +++ b/pcsx2/Frontend/Achievements.cpp @@ -189,7 +189,6 @@ namespace Achievements RAPI_STRUCT_NAME(rc_api_submit_lboard_entry_request_t); RAPI_STRUCT_NAME(rc_api_fetch_leaderboard_info_request_t); - RAPI_STRUCT_NAME(rc_api_response_t); RAPI_STRUCT_NAME(rc_api_login_response_t); RAPI_STRUCT_NAME(rc_api_resolve_hash_response_t); RAPI_STRUCT_NAME(rc_api_fetch_game_data_response_t); @@ -201,6 +200,7 @@ namespace Achievements RAPI_STRUCT_NAME(rc_api_fetch_leaderboard_info_response_t); // Unused for now. + // RAPI_STRUCT_NAME(rc_api_response_t); // RAPI_STRUCT_NAME(rc_api_fetch_achievement_info_response_t); // RAPI_STRUCT_NAME(rc_api_fetch_games_list_response_t); diff --git a/pcsx2/Frontend/D3D11HostDisplay.cpp b/pcsx2/Frontend/D3D11HostDisplay.cpp index e57caf9988..84b2ae6ced 100644 --- a/pcsx2/Frontend/D3D11HostDisplay.cpp +++ b/pcsx2/Frontend/D3D11HostDisplay.cpp @@ -63,34 +63,6 @@ private: bool m_dynamic; }; -static wil::com_ptr_nothrow CreateVertexShader(ID3D11Device* device, const void* bytecode, - size_t bytecode_length) -{ - wil::com_ptr_nothrow shader; - const HRESULT hr = device->CreateVertexShader(bytecode, bytecode_length, nullptr, shader.put()); - if (FAILED(hr)) - { - Console.Error("Failed to create vertex shader: 0x%08X", hr); - return {}; - } - - return shader; -} - -static wil::com_ptr_nothrow CreatePixelShader(ID3D11Device* device, const void* bytecode, - size_t bytecode_length) -{ - wil::com_ptr_nothrow shader; - const HRESULT hr = device->CreatePixelShader(bytecode, bytecode_length, nullptr, shader.put()); - if (FAILED(hr)) - { - Console.Error("Failed to create pixel shader: 0x%08X", hr); - return {}; - } - - return shader; -} - D3D11HostDisplay::D3D11HostDisplay() = default; D3D11HostDisplay::~D3D11HostDisplay() diff --git a/pcsx2/Frontend/D3D11HostDisplay.h b/pcsx2/Frontend/D3D11HostDisplay.h index 57ff3dd143..be65db4e94 100644 --- a/pcsx2/Frontend/D3D11HostDisplay.h +++ b/pcsx2/Frontend/D3D11HostDisplay.h @@ -16,6 +16,7 @@ #pragma once #include "HostDisplay.h" #include "common/RedtapeWindows.h" +#include "common/RedtapeWilCom.h" #include "common/WindowInfo.h" #include #include @@ -24,7 +25,6 @@ #include #include #include -#include class D3D11HostDisplay final : public HostDisplay { diff --git a/pcsx2/Frontend/DInputSource.h b/pcsx2/Frontend/DInputSource.h index dfb0900fe6..7db4d10093 100644 --- a/pcsx2/Frontend/DInputSource.h +++ b/pcsx2/Frontend/DInputSource.h @@ -16,13 +16,13 @@ #pragma once #define DIRECTINPUT_VERSION 0x0800 #include "common/RedtapeWindows.h" +#include "common/RedtapeWilCom.h" #include "Frontend/InputSource.h" #include #include #include #include #include -#include class DInputSource final : public InputSource { diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index ca11c90103..7399af0425 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -330,9 +330,12 @@ namespace FullscreenUI static void DrawIntSpinBoxSetting(SettingsInterface* bsi, const char* title, const char* summary, const char* section, const char* key, int default_value, int min_value, int max_value, int step_value, const char* format = "%d", bool enabled = true, float height = ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT, ImFont* font = g_large_font, ImFont* summary_font = g_medium_font); +#if 0 + // Unused as of now static void DrawFloatRangeSetting(SettingsInterface* bsi, const char* title, const char* summary, const char* section, const char* key, float default_value, float min_value, float max_value, const char* format = "%f", float multiplier = 1.0f, bool enabled = true, float height = ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT, ImFont* font = g_large_font, ImFont* summary_font = g_medium_font); +#endif static void DrawFloatSpinBoxSetting(SettingsInterface* bsi, const char* title, const char* summary, const char* section, const char* key, float default_value, float min_value, float max_value, float step_value, float multiplier, const char* format = "%f", bool enabled = true, float height = ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT, @@ -434,8 +437,6 @@ namespace FullscreenUI static HostDisplayTexture* GetTextureForGameListEntryType(GameList::EntryType type); static HostDisplayTexture* GetGameListCover(const GameList::Entry* entry); static HostDisplayTexture* GetCoverForCurrentGame(); - static std::string GetNotificationImageForGame(const GameList::Entry* entry); - static std::string GetNotificationImageForGame(const std::string& game_path); // Lazily populated cover images. static std::unordered_map s_cover_image_map; @@ -1654,6 +1655,8 @@ void FullscreenUI::DrawIntSpinBoxSetting(SettingsInterface* bsi, const char* tit ImGui::PopFont(); } +#if 0 +// Unused as of now void FullscreenUI::DrawFloatRangeSetting(SettingsInterface* bsi, const char* title, const char* summary, const char* section, const char* key, float default_value, float min_value, float max_value, const char* format, float multiplier, bool enabled, float height, ImFont* font, ImFont* summary_font) @@ -1710,6 +1713,7 @@ void FullscreenUI::DrawFloatRangeSetting(SettingsInterface* bsi, const char* tit ImGui::PopStyleVar(4); ImGui::PopFont(); } +#endif void FullscreenUI::DrawFloatSpinBoxSetting(SettingsInterface* bsi, const char* title, const char* summary, const char* section, const char* key, float default_value, float min_value, float max_value, float step_value, float multiplier, const char* format, @@ -3932,7 +3936,6 @@ void FullscreenUI::DrawControllerSettingsPage() ImGui::PopID(); } - static constexpr const char* usb_sections[USB::NUM_PORTS] = {"USB1", "USB2"}; for (u32 port = 0; port < USB::NUM_PORTS; port++) { ImGui::PushID(port); @@ -4680,7 +4683,6 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading) (static_cast(ImGui::GetWindowWidth()) - (item_width_with_spacing * static_cast(grid_count_x))) * 0.5f; u32 grid_x = 0; - u32 grid_y = 0; ImGui::SetCursorPos(ImVec2(start_x, 0.0f)); for (u32 i = 0; i < s_save_state_selector_slots.size(); i++) { @@ -4869,7 +4871,6 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading) if (grid_x == grid_count_x) { grid_x = 0; - grid_y++; ImGui::SetCursorPosX(start_x); ImGui::SetCursorPosY(ImGui::GetCursorPosY() + item_spacing); } @@ -5388,7 +5389,6 @@ void FullscreenUI::DrawGameGrid(const ImVec2& heading_size) std::string draw_title; u32 grid_x = 0; - u32 grid_y = 0; ImGui::SetCursorPos(ImVec2(start_x, 0.0f)); for (const GameList::Entry* entry : s_game_list_sorted_entries) { @@ -5451,7 +5451,6 @@ void FullscreenUI::DrawGameGrid(const ImVec2& heading_size) if (grid_x == grid_count_x) { grid_x = 0; - grid_y++; ImGui::SetCursorPosX(start_x); ImGui::SetCursorPosY(ImGui::GetCursorPosY() + item_spacing); } @@ -5786,23 +5785,6 @@ HostDisplayTexture* FullscreenUI::GetCoverForCurrentGame() return GetGameListCover(entry); } -std::string FullscreenUI::GetNotificationImageForGame(const GameList::Entry* entry) -{ - std::string ret; - - if (entry) - ret = GameList::GetCoverImagePathForEntry(entry); - - return ret; -} - -std::string FullscreenUI::GetNotificationImageForGame(const std::string& game_path) -{ - auto lock = GameList::GetLock(); - const GameList::Entry* entry = GameList::GetEntryForPath(game_path.c_str()); - return entry ? GetNotificationImageForGame(entry) : std::string(); -} - ////////////////////////////////////////////////////////////////////////// // Overlays ////////////////////////////////////////////////////////////////////////// diff --git a/pcsx2/Frontend/GameList.cpp b/pcsx2/Frontend/GameList.cpp index a9511edabc..7fda0741f4 100644 --- a/pcsx2/Frontend/GameList.cpp +++ b/pcsx2/Frontend/GameList.cpp @@ -67,8 +67,6 @@ namespace GameList static bool IsScannableFilename(const std::string_view& path); - static Entry* GetMutableEntryForPath(const char* path); - static bool GetIsoSerialAndCRC(const std::string& path, s32* disc_type, std::string* serial, u32* crc); static Region ParseDatabaseRegion(const std::string_view& db_region); static bool GetElfListEntry(const std::string& path, GameList::Entry* entry); @@ -739,18 +737,6 @@ const GameList::Entry* GameList::GetEntryBySerialAndCRC(const std::string_view& return nullptr; } -GameList::Entry* GameList::GetMutableEntryForPath(const char* path) -{ - const size_t path_length = std::strlen(path); - for (Entry& entry : s_entries) - { - if (entry.path.size() == path_length && StringUtil::Strcasecmp(entry.path.c_str(), path) == 0) - return &entry; - } - - return nullptr; -} - u32 GameList::GetEntryCount() { return static_cast(s_entries.size()); diff --git a/pcsx2/Frontend/XInputSource.cpp b/pcsx2/Frontend/XInputSource.cpp index a5667f93cd..5ac1b69791 100644 --- a/pcsx2/Frontend/XInputSource.cpp +++ b/pcsx2/Frontend/XInputSource.cpp @@ -105,7 +105,7 @@ bool XInputSource::Initialize(SettingsInterface& si, std::unique_lock