summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OnScreenDisplay.cpp
diff options
context:
space:
mode:
authorFelk <de.felix.koenig@gmail.com>2020-08-02 01:31:05 +0200
committerFelk <de.felix.koenig@gmail.com>2020-08-02 01:37:20 +0200
commitf775e9b99db45fff0272ed5331de28e144f8f092 (patch)
tree721d7c03d81f48f5bf09007541fb2468c471032c /Source/Core/VideoCommon/OnScreenDisplay.cpp
parentdbacffd75d0608f0b22e709ac398282afa3ec848 (diff)
OnScreenDisplay: fix names rgba -> argb
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenDisplay.cpp')
-rw-r--r--Source/Core/VideoCommon/OnScreenDisplay.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp
index 68afd3e6ab..359e17ebb0 100644
--- a/Source/Core/VideoCommon/OnScreenDisplay.cpp
+++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp
@@ -37,12 +37,12 @@ struct Message
static std::multimap<MessageType, Message> s_messages;
static std::mutex s_messages_mutex;
-static ImVec4 RGBAToImVec4(const u32 rgba)
+static ImVec4 ARGBToImVec4(const u32 argb)
{
- return ImVec4(static_cast<float>((rgba >> 16) & 0xFF) / 255.0f,
- static_cast<float>((rgba >> 8) & 0xFF) / 255.0f,
- static_cast<float>((rgba >> 0) & 0xFF) / 255.0f,
- static_cast<float>((rgba >> 24) & 0xFF) / 255.0f);
+ return ImVec4(static_cast<float>((argb >> 16) & 0xFF) / 255.0f,
+ static_cast<float>((argb >> 8) & 0xFF) / 255.0f,
+ static_cast<float>((argb >> 0) & 0xFF) / 255.0f,
+ static_cast<float>((argb >> 24) & 0xFF) / 255.0f);
}
static float DrawMessage(int index, const Message& msg, const ImVec2& position, int time_left)
@@ -67,7 +67,7 @@ static float DrawMessage(int index, const Message& msg, const ImVec2& position,
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing))
{
// Use %s in case message contains %.
- ImGui::TextColored(RGBAToImVec4(msg.color), "%s", msg.text.c_str());
+ ImGui::TextColored(ARGBToImVec4(msg.color), "%s", msg.text.c_str());
window_height =
ImGui::GetWindowSize().y + (WINDOW_PADDING * ImGui::GetIO().DisplayFramebufferScale.y);
}
@@ -78,18 +78,18 @@ static float DrawMessage(int index, const Message& msg, const ImVec2& position,
return window_height;
}
-void AddTypedMessage(MessageType type, std::string message, u32 ms, u32 rgba)
+void AddTypedMessage(MessageType type, std::string message, u32 ms, u32 argb)
{
std::lock_guard lock{s_messages_mutex};
s_messages.erase(type);
- s_messages.emplace(type, Message(std::move(message), Common::Timer::GetTimeMs() + ms, rgba));
+ s_messages.emplace(type, Message(std::move(message), Common::Timer::GetTimeMs() + ms, argb));
}
-void AddMessage(std::string message, u32 ms, u32 rgba)
+void AddMessage(std::string message, u32 ms, u32 argb)
{
std::lock_guard lock{s_messages_mutex};
s_messages.emplace(MessageType::Typeless,
- Message(std::move(message), Common::Timer::GetTimeMs() + ms, rgba));
+ Message(std::move(message), Common::Timer::GetTimeMs() + ms, argb));
}
void DrawMessages()