q66 pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=130d099c87e18f9c4e796684de5bd41f49552038

commit 130d099c87e18f9c4e796684de5bd41f49552038
Author: Daniel Kolesa <[email protected]>
Date:   Fri May 9 16:58:03 2014 +0100

    FreeBSD support for helpful error message in screenshot
---
 src/modules/shot/e_mod_main.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index f61483e..54b1124 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -676,6 +676,21 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params)
                }
              fclose(f);
           }
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+        int max;
+        size_t len = sizeof(max);
+
+        if (!sysctlbyname("kern.ipc.shmmax", &max, &len, NULL, 0))
+          {
+             if (max && (max < (w * h * sizeof(int))))
+               {
+                  e_util_dialog_show(_("Screenshot Error"),
+                                      _("SHMMAX is too small to take 
screenshot.<br>"
+                                        "Consider increasing kern.ipc.shmmax 
to a value larger than %llu"),
+                                        (long long unsigned int)(w * h * 
sizeof(int)));
+                  dialog = EINA_TRUE;
+               }
+          }
 #endif
         if (!dialog)
           e_util_dialog_show(_("Screenshot Error"),

-- 


Reply via email to