Skip to content

Commit 64c15f5

Browse files
committed
Use 'generic message' widget style in Disc Control
1 parent 9b6ddfb commit 64c15f5

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

disk_control_interface.c

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
#include "disk_control_interface.h"
3232

33+
#ifdef HAVE_GFX_WIDGETS
34+
#include "gfx/gfx_widgets.h"
35+
#endif
36+
3337
#ifdef HAVE_CHEEVOS
3438
#include "cheevos/cheevos.h"
3539
#endif
@@ -369,7 +373,7 @@ bool disk_control_set_eject_state(
369373
/* Errors should always be displayed */
370374
if (verbosity || err)
371375
runloop_msg_queue_push(
372-
msg, _len, 1, err ? 180 : 60, true, NULL,
376+
msg, _len, 2, err ? 180 : 60, true, NULL,
373377
MESSAGE_QUEUE_ICON_DEFAULT,
374378
err ? MESSAGE_QUEUE_CATEGORY_ERROR : MESSAGE_QUEUE_CATEGORY_INFO);
375379
}
@@ -442,10 +446,16 @@ bool disk_control_set_index(
442446
RARCH_LOG("[Disc] %s\n", msg);
443447

444448
/* Errors should always be displayed */
445-
if (verbosity || err)
446-
runloop_msg_queue_push(msg, _len, 1, msg_duration, true, NULL,
447-
MESSAGE_QUEUE_ICON_DEFAULT,
448-
err ? MESSAGE_QUEUE_CATEGORY_ERROR : MESSAGE_QUEUE_CATEGORY_INFO);
449+
if (verbosity)
450+
#ifdef HAVE_GFX_WIDGETS
451+
gfx_widget_set_generic_message(msg, msg_duration * 10);
452+
#else
453+
runloop_msg_queue_push(msg, _len, 2, msg_duration, true, NULL,
454+
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
455+
#endif
456+
else if (err)
457+
runloop_msg_queue_push(msg, _len, 2, msg_duration, true, NULL,
458+
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_ERROR);
449459
}
450460

451461
/* If operation was successful, update disk
@@ -661,8 +671,8 @@ bool disk_control_append_image(
661671
msg[++_len] = '\0';
662672
_len += strlcpy(msg + _len, image_filename, sizeof(msg) - _len);
663673

664-
runloop_msg_queue_push(msg, _len, 0, 180, true, NULL,
665-
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
674+
runloop_msg_queue_push(msg, _len, 2, 180, true, NULL,
675+
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING);
666676

667677
return false;
668678
}

0 commit comments

Comments
 (0)