changeset 535:7d6a879901e0

misc: fix
author David Demelier <markand@malikania.fr>
date Sun, 05 Mar 2023 10:53:05 +0100
parents 88e9bd420a28
children 848897bfef2f
files examples/example-action/dialog.c libmlk-rpg/mlk/rpg/message.c
diffstat 2 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/examples/example-action/dialog.c	Sun Mar 05 10:51:25 2023 +0100
+++ b/examples/example-action/dialog.c	Sun Mar 05 10:53:05 2023 +0100
@@ -29,10 +29,6 @@
 #define QMX ((MLK_EXAMPLE_W - QMW) / 2)
 #define QMY (MLK_EXAMPLE_H * 0.2)
 
-/* Fading time and spacing. */
-#define QMD 250
-#define QMS 10
-
 static void
 handle(struct mlk_action *act, const union mlk_event *ev)
 {
@@ -74,11 +70,9 @@
 	dlg->msg.x = QMX;
 	dlg->msg.y = QMY;
 	dlg->msg.w = QMW;
-	dlg->msg.delay = QMD;
-	dlg->msg.spacing = QMS;
 
+	mlk_message_query(&dlg->msg, NULL, &dlg->msg.h);
 	mlk_message_start(&dlg->msg);
-	mlk_message_query(&dlg->msg, NULL, &dlg->msg.h);
 
 	dlg->action.data = dlg;
 	dlg->action.handle = handle;
--- a/libmlk-rpg/mlk/rpg/message.c	Sun Mar 05 10:51:25 2023 +0100
+++ b/libmlk-rpg/mlk/rpg/message.c	Sun Mar 05 10:53:05 2023 +0100
@@ -152,6 +152,8 @@
 		*w = min_width(msg);
 	if (h)
 		*h = min_height(msg);
+
+	return 0;
 }
 
 static void