Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color the notification icon by message category #17573

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

schellingb
Copy link
Contributor

Description

In RetroArch showing of notification messages is done via a call to runloop_msg_queue_push which gets passed a category (info, warning, error or success). Currently the message popup will look exactly the same regardless of that category. Also when a libretro core uses RETRO_ENVIRONMENT_SET_MESSAGE_EXT with RETRO_MESSAGE_TYPE_NOTIFICATION it can specify a level (info, warn, error) which is then translated by RetroArch to that same internal message category.

This commit adds a simple color selection of the icon based on the category so that errors and warnings stand out better.

It uses yellow for warnings and red for errors, and keeps the current blue for everything else (info and success messages). Additionally, it flips the 'i' info icon upside down for warnings and errors so it becomes a '!' exclamation mark icon.

image

Many RetroArch systems like shaders, netplay or cheevos use these types of notifications. Some correctly specify an appropriate message category but I've noticed a lot of calls to runloop_msg_queue_push use the generic MESSAGE_QUEUE_CATEGORY_INFO instead of MESSAGE_QUEUE_CATEGORY_ERROR (or MESSAGE_QUEUE_CATEGORY_WARNING) for things that clearly are errors. Might be a good idea to search through the code base for MESSAGE_QUEUE_CATEGORY_INFO and assign a more appropriate category for things that clearly should be warning or error.

Related Issues

Related Pull Requests

Reviewers

Use yellow for warnings and red for errors, keep the current blue for everything else.
Additionally, flip the 'i' info icon upside down for warnings and errors so it becomes a '!' exclamation mark icon.
@LibretroAdmin LibretroAdmin merged commit 754dbe3 into libretro:master Feb 17, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants