[MPlayer-cvslog] r38264 - trunk/gui/dialog/dialog.c
ib
subversion at mplayerhq.hu
Fri Feb 26 16:02:20 EET 2021
Author: ib
Date: Fri Feb 26 16:02:20 2021
New Revision: 38264
Log:
Fix high CPU usage of a message box.
The message box for fatal errors consumed 100% of CPU usage
while waiting for response.
Modified:
trunk/gui/dialog/dialog.c
Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c Fri Feb 26 15:56:51 2021 (r38263)
+++ trunk/gui/dialog/dialog.c Fri Feb 26 16:02:20 2021 (r38264)
@@ -42,6 +42,7 @@
#include "help_mp.h"
#include "mp_msg.h"
#include "libavutil/intreadwrite.h"
+#include "osdep/timer.h"
#define THRESHOLD 128 // transparency values equal to or above this will become
// opaque, all values below this will become transparent
@@ -223,9 +224,12 @@ void gtkMessageBox(int type, const gchar
gtk_widget_show(MessageBox);
gtkSetLayer(MessageBox);
- if (type == MSGBOX_FATAL)
- while (MessageBox)
- gtk_main_iteration_do(0);
+ if (type == MSGBOX_FATAL) {
+ while (MessageBox) {
+ gtk_main_iteration_do(FALSE);
+ usec_sleep(5000);
+ }
+ }
}
/**
More information about the MPlayer-cvslog
mailing list