Revision: 76131
          http://sourceforge.net/p/brlcad/code/76131
Author:   starseeker
Date:     2020-06-12 12:47:11 +0000 (Fri, 12 Jun 2020)
Log Message:
-----------
Correct framebuffer return codes

Modified Paths:
--------------
    brlcad/branches/bioh/src/burst2/grid.cpp
    brlcad/branches/bioh/src/burst2/paint.cpp

Modified: brlcad/branches/bioh/src/burst2/grid.cpp
===================================================================
--- brlcad/branches/bioh/src/burst2/grid.cpp    2020-06-12 12:35:14 UTC (rev 
76130)
+++ brlcad/branches/bioh/src/burst2/grid.cpp    2020-06-12 12:47:11 UTC (rev 
76131)
@@ -1800,7 +1800,7 @@
     plotInit(s);
 
     /* initialize frame buffer if appropriate */
-    if (! imageInit(s)) {
+    if (!imageInit(s)) {
        brst_log(s, "Error: problem opening frame buffer.");
        return;
     }
@@ -1896,7 +1896,7 @@
 void
 gridInit(struct burst_state *s)
 {
-    brst_log(s, "Initializing grid");
+    //brst_log(s, "Initializing grid\n");
     rt_prep_timer();
 
     /* compute grid unit vectors */
@@ -2127,7 +2127,7 @@
        brst_log(s, "No target file has been specified.");
        return BRLCAD_ERROR;
     }
-    brst_log(s, "Reading target data base");
+    //brst_log(s, "Reading target data base\n");
     rt_prep_timer();
     if (s->rtip == RTI_NULL) {
        char db_title[TITLE_LEN+1];
@@ -2149,7 +2149,7 @@
        rt_prep_timer();
        for (int i = 0; i < ac; i++) {
            const char *obj = av[i];
-           brst_log(s, "Loading \"%s\"", obj);
+           //brst_log(s, "Loading \"%s\"\n", obj);
            if (rt_gettree(s->rtip, obj) != 0) {
                brst_log(s, "Bad object \"%s\".", obj);
                loaderror = 1;
@@ -2164,7 +2164,7 @@
     if (loaderror)
        return BRLCAD_ERROR;
     if (s->rtip->needprep) {
-       brst_log(s, "Prepping solids");
+       //brst_log(s, "Prepping solids\n");
        rt_prep_timer();
        rt_prep(s->rtip);
        prntTimer(s, "prep");

Modified: brlcad/branches/bioh/src/burst2/paint.cpp
===================================================================
--- brlcad/branches/bioh/src/burst2/paint.cpp   2020-06-12 12:35:14 UTC (rev 
76130)
+++ brlcad/branches/bioh/src/burst2/paint.cpp   2020-06-12 12:47:11 UTC (rev 
76131)
@@ -179,10 +179,10 @@
 int
 openFbDevice(struct burst_state *s, struct bu_vls *fbdev)
 {
-    brst_log(s, "Opening frame buffer");
+    //brst_log(s, "Opening frame buffer\n");
     if (s->zoom < 1) {
-       brst_log(s, "Device is too small to display image.");
-       return 1;
+       brst_log(s, "Device is too small to display image.\n");
+       return 0;
     }
     if (((s->fbiop != FB_NULL && fb_getwidth(s->fbiop) != s->devwid) || 
s->pixgrid == NULL)
        && (s->pixgrid = (unsigned char *) calloc(s->devwid*3, sizeof(unsigned 
char))) == (unsigned char *) NULL) {
@@ -199,9 +199,10 @@
               || (fb_zoom(s->fbiop, 1, 1) == -1)
               || (fb_window(s->fbiop, s->devwid/2, s->devhgt/2) == -1)
              ) {
-       return 1;
+       return 0;
     }
-    return 0;
+
+    return 1;
 }
 
 int

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to