Show an error once for wayland users. Wayland doesn't support this software

This commit is contained in:
dec05eba
2025-10-30 18:33:50 +01:00
parent d9496e0a0a
commit 12c090c7d3
4 changed files with 46 additions and 32 deletions

View File

@@ -65,6 +65,7 @@ namespace gsr {
struct MainConfig {
int32_t config_file_version = GSR_CONFIG_FILE_VERSION;
bool software_encoding_warning_shown = false;
bool wayland_warning_shown = false;
std::string hotkeys_enable_option = "enable_hotkeys";
std::string joystick_hotkeys_enable_option = "disable_hotkeys";
std::string tint_color;

View File

@@ -42,6 +42,11 @@ namespace gsr {
SCREENSHOT
};
enum class NotificationLevel {
INFO,
ERROR,
};
enum class ScreenshotForceType {
NONE,
REGION,
@@ -77,7 +82,7 @@ namespace gsr {
void take_screenshot();
void take_screenshot_region();
void take_screenshot_window();
void show_notification(const char *str, double timeout_seconds, mgl::Color icon_color, mgl::Color bg_color, NotificationType notification_type, const char *capture_target = nullptr);
void show_notification(const char *str, double timeout_seconds, mgl::Color icon_color, mgl::Color bg_color, NotificationType notification_type, const char *capture_target = nullptr, NotificationLevel notification_level = NotificationLevel::INFO);
bool is_open() const;
bool should_exit(std::string &reason) const;
void exit();