<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">main.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+33</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-8</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">180abbb2a1f3 -> 7b16bbd6209c</td></tr>
<tr class="alt" style=";" ><td><tt>pvr2/<a href="#file2">glutil.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+13</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">180abbb2a1f3 -> 7b16bbd6209c</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+46</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-9</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >2 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add undocumented option --gl-info to dump out the GL identification and extension list
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>main.c</b></big> <small id="info" style="color: #888888;" >180abbb2a1f3 -> 7b16bbd6209c</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/main.c
+++ lxdream/src/main.c
@@ -24,23 +24,26 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "lxdream.h"
 #include "lxpaths.h"
 #include "gettext.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >me</span>m.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >drea</span>m.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "dreamcast.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "dream.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "display.h"
 #include "gui.h"
 #include "gdlist.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "hotkeys.h"
+#include "loader.h"
+#include "mem.h"
+#include "plugin.h"
+#include "serial.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "syscall.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "loader.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "aica/audio.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "aica/armdasm.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "gdrom/gdrom.h"
 #include "maple/maple.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include "pvr2/glutil.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "sh4/sh4.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "aica/armdasm.h"
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "vmu/vmulist.h"
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-#include "serial.h"
-#include "hotkeys.h"
-#include "plugin.h"
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+
+#define GL_INFO_OPT 1
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:xX?";
 struct option longopts[] = {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -52,7 +55,8 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "execute", required_argument, NULL, 'e' },
         { "fullscreen", no_argument, NULL, 'f' },
         { "gdb-sh4", required_argument, NULL, 'g' },  
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-        { "gdb-arm", required_argument, NULL, 'G' },<span id="removedchars" style="background-color:#ff9999;font-weight:bolder;" >  </span>
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        { "gdb-arm", required_argument, NULL, 'G' },
+        { "gl-info", no_argument, NULL, GL_INFO_OPT },
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         { "help", no_argument, NULL, 'h' },
         { "headless", no_argument, NULL, 'H' },
         { "log", required_argument, NULL,'l' }, 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -127,6 +131,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     int opt;
     double t;
     gboolean display_ok, have_disc = FALSE, have_save = FALSE, have_exec = FALSE;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    gboolean print_glinfo = FALSE;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     uint32_t time_secs, time_nanos;
     const char *exec_name = NULL;
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -214,6 +219,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         case 'X': /* Shadow translator */
             sh4_core = SH4_SHADOW;
             break;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+        case GL_INFO_OPT:
+            print_glinfo = TRUE;
+            break;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         }
     }
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -236,6 +244,23 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         exit(0);
     }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( print_glinfo ) {
+        gui_init(FALSE, FALSE);
+        display_driver_t display_driver = get_display_driver_by_name(display_driver_name);
+        if( display_driver == NULL ) {
+            ERROR( "Video driver '%s' not found, aborting.", display_driver_name );
+            exit(2);
+        } else if( display_set_driver( display_driver ) == FALSE ) {
+            ERROR( "Video driver '%s' failed to initialize (could not connect to display?)",
+                    display_driver->name );
+            exit(2);
+        }
+        glPrintInfo(stdout);
+        exit(0);
+
+    }
+
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     iso_init();
     gdrom_list_init();
     vmulist_init();
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>glutil.c</b></big> <small id="info" style="color: #888888;" >180abbb2a1f3 -> 7b16bbd6209c</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/glutil.c
+++ lxdream/src/pvr2/glutil.c
@@ -17,6 +17,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 
 #include <string.h>
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#include <stdlib.h>
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include <glib/gstrfuncs.h>
 #include "pvr2/glutil.h"
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -78,11 +79,22 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     return FALSE;
 }
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+int compare_charp( const void *a, const void *b )
+{
+    const char **ca = (const char **)a;
+    const char **cb = (const char **)b;
+    return strcmp(*ca, *cb);
+}
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > void glPrintInfo( FILE *out )
 {
     const gchar *extensions = (const gchar *)glGetString(GL_EXTENSIONS);
     gchar **ext_split = g_strsplit(extensions, " ", 0);
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    unsigned int i;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    unsigned int i<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >, count</span>;
+
+    for( count = 0; ext_split[count] != NULL; count++ );
+
+    qsort(ext_split, count, sizeof(gchar *), compare_charp);
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
     fprintf( out, "GL Vendor: %s\n", glGetString(GL_VENDOR) );
     fprintf( out, "GL Renderer: %s\n", glGetString(GL_RENDERER) );
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>