mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-29 00:32:37 +00:00
Use safe string composition in tray tooltip
This commit is contained in:
parent
bf1b9a20ec
commit
270716b862
@ -291,7 +291,7 @@ namespace system_tray {
|
|||||||
tray.icon = TRAY_ICON_PLAYING;
|
tray.icon = TRAY_ICON_PLAYING;
|
||||||
tray.notification_title = "Stream Started";
|
tray.notification_title = "Stream Started";
|
||||||
char msg[256];
|
char msg[256];
|
||||||
sprintf(msg, "Streaming started for %s", app_name.c_str());
|
snprintf(msg, std::size(msg), "Streaming started for %s", app_name.c_str());
|
||||||
tray.notification_text = msg;
|
tray.notification_text = msg;
|
||||||
tray.tooltip = msg;
|
tray.tooltip = msg;
|
||||||
tray.notification_icon = TRAY_ICON_PLAYING;
|
tray.notification_icon = TRAY_ICON_PLAYING;
|
||||||
@ -311,7 +311,7 @@ namespace system_tray {
|
|||||||
tray.icon = TRAY_ICON_PAUSING;
|
tray.icon = TRAY_ICON_PAUSING;
|
||||||
tray_update(&tray);
|
tray_update(&tray);
|
||||||
char msg[256];
|
char msg[256];
|
||||||
sprintf(msg, "Streaming paused for %s", app_name.c_str());
|
snprintf(msg, std::size(msg), "Streaming paused for %s", app_name.c_str());
|
||||||
tray.icon = TRAY_ICON_PAUSING;
|
tray.icon = TRAY_ICON_PAUSING;
|
||||||
tray.notification_title = "Stream Paused";
|
tray.notification_title = "Stream Paused";
|
||||||
tray.notification_text = msg;
|
tray.notification_text = msg;
|
||||||
@ -333,7 +333,7 @@ namespace system_tray {
|
|||||||
tray.icon = TRAY_ICON;
|
tray.icon = TRAY_ICON;
|
||||||
tray_update(&tray);
|
tray_update(&tray);
|
||||||
char msg[256];
|
char msg[256];
|
||||||
sprintf(msg, "Application %s successfully stopped", app_name.c_str());
|
snprintf(msg, std::size(msg), "Application %s successfully stopped", app_name.c_str());
|
||||||
tray.icon = TRAY_ICON;
|
tray.icon = TRAY_ICON;
|
||||||
tray.notification_icon = TRAY_ICON;
|
tray.notification_icon = TRAY_ICON;
|
||||||
tray.notification_title = "Application Stopped";
|
tray.notification_title = "Application Stopped";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user