diff --git a/src/xenia/base/socket_win.cc b/src/xenia/base/socket_win.cc index 2d3644dda..730b2b8ab 100644 --- a/src/xenia/base/socket_win.cc +++ b/src/xenia/base/socket_win.cc @@ -36,7 +36,7 @@ class Win32Socket : public Socket { Win32Socket() = default; ~Win32Socket() override { Close(); } - bool Connect(std::string hostname, uint16_t port) { + bool Connect(std::string& hostname, uint16_t port) { addrinfo hints = {0}; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; diff --git a/src/xenia/kernel/xam/xam_ui.cc b/src/xenia/kernel/xam/xam_ui.cc index 7f274920c..686b48611 100644 --- a/src/xenia/kernel/xam/xam_ui.cc +++ b/src/xenia/kernel/xam/xam_ui.cc @@ -209,8 +209,8 @@ DECLARE_XAM_EXPORT2(XamIsUIActive, kUI, kImplemented, kHighFrequency); class MessageBoxDialog : public XamDialog { public: - MessageBoxDialog(xe::ui::ImGuiDrawer* imgui_drawer, std::string title, - std::string description, std::vector buttons, + MessageBoxDialog(xe::ui::ImGuiDrawer* imgui_drawer, std::string& title, + std::string& description, std::vector buttons, uint32_t default_button) : XamDialog(imgui_drawer), title_(title), @@ -349,6 +349,7 @@ dword_result_t XNotifyQueueUI_entry(dword_t exnq, dword_t dwUserIndex, qword_t qwAreas, lpu16string_t displayText_ptr, lpvoid_t contextData) { + std::string title_text = "XNotifyQueueUI"; std::string displayText = ""; if (displayText_ptr) { @@ -372,8 +373,7 @@ dword_result_t XNotifyQueueUI_entry(dword_t exnq, dword_t dwUserIndex, ui::ImGuiDrawer* imgui_drawer = emulator->imgui_drawer(); xeXamDispatchDialog( - new MessageBoxDialog(imgui_drawer, "XNotifyQueueUI", displayText, buttons, - 0), + new MessageBoxDialog(imgui_drawer, title_text, displayText, buttons, 0), close, false); // XNotifyQueueUI -> XNotifyQueueUIEx -> XMsgProcessRequest -> @@ -384,8 +384,8 @@ DECLARE_XAM_EXPORT1(XNotifyQueueUI, kUI, kSketchy); class KeyboardInputDialog : public XamDialog { public: - KeyboardInputDialog(xe::ui::ImGuiDrawer* imgui_drawer, std::string title, - std::string description, std::string default_text, + KeyboardInputDialog(xe::ui::ImGuiDrawer* imgui_drawer, std::string& title, + std::string& description, std::string& default_text, size_t max_length) : XamDialog(imgui_drawer), title_(title), @@ -542,14 +542,16 @@ void XamShowDirtyDiscErrorUI_entry(dword_t user_index) { exit(1); return; } + + std::string title = "Disc Read Error"; + std::string desc = + "There's been an issue reading content from the game disc.\nThis is " + "likely caused by bad or unimplemented file IO calls."; + const Emulator* emulator = kernel_state()->emulator(); ui::ImGuiDrawer* imgui_drawer = emulator->imgui_drawer(); xeXamDispatchDialog( - new MessageBoxDialog( - imgui_drawer, "Disc Read Error", - "There's been an issue reading content from the game disc.\nThis is " - "likely caused by bad or unimplemented file IO calls.", - {"OK"}, 0), + new MessageBoxDialog(imgui_drawer, title, desc, {"OK"}, 0), [](MessageBoxDialog*) -> X_RESULT { return X_ERROR_SUCCESS; }, 0); // This is death, and should never return. // TODO(benvanik): cleaner exit. diff --git a/src/xenia/patcher/plugin_loader.cc b/src/xenia/patcher/plugin_loader.cc index 6f0d55d63..08c19c210 100644 --- a/src/xenia/patcher/plugin_loader.cc +++ b/src/xenia/patcher/plugin_loader.cc @@ -125,7 +125,7 @@ std::vector PluginLoader::GetHashes( const auto arr = toml_entry->as_array(); for (cpptoml::array::const_iterator itr = arr->begin(); itr != arr->end(); - itr++) { + ++itr) { const std::string hash_entry = itr->get()->as()->get(); hashes.push_back(strtoull(hash_entry.c_str(), NULL, 16)); }