Author: pebender
Date: Sun Dec 14 19:14:13 2008
New Revision: 4099

Modified:
    trunk/gar-minimyth/html/minimyth/document-changelog.txt
     
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start

Log:
- Improved resolution detection in mm_game_start
     - Added resolution detection using xrandr utility.



Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt     (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt     Sun Dec 14  
19:14:13 2008
@@ -19,6 +19,8 @@
      - Obsoleted mm_ss_suspend
          - The mm_run_without_ss performs the same function more cleanly and
            precisely.
+    - Improved resolution detection in mm_game_start
+        - Added resolution detection using xrandr utility.

  Modified kernel
      - Enabled use of out-of-tree ALSA 1.0.18a drivers now that they  
include a

Modified:  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
==============================================================================
---  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
        
(original)
+++  
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/usr/bin/mm_game_start
        
Sun Dec 14 19:14:13 2008
@@ -21,10 +21,29 @@
      my $bios_root    = $minimyth->var_get('MM_GAME_BIOS_ROOT');
      my $resolution_x = 0;
      my $resolution_y = 0;
-    if ($minimyth->var_get('MM_X_MODE') =~ /^([0-9]+)x([0-9]+)[^0-9]*$/)
+    if (($resolution_x == 0) || ($resolution_y == 0))
      {
-        $resolution_x = $1;
-        $resolution_y = $2;
+        if (open(FILE, '-|', q(/usr/bin/xrandr --query)))
+        {
+            foreach my $resolution (grep(/\* *$/, <FILE>))
+            {
+                if ($resolution =~ / *([[:digit:]]+)x([[:digit:]]+) /)
+                {
+                    $resolution_x = $1;
+                    $resolution_y = $2;
+                    last;
+                }
+            }
+            close(FILE);
+        }
+    }
+    if (($resolution_x == 0) || ($resolution_y == 0))
+    {
+        if ($minimyth->var_get('MM_X_MODE') =~  
/^([0-9]+)x([0-9]+)[^0-9]*$/)
+        {
+            $resolution_x = $1;
+            $resolution_y = $2;
+        }
      }

      $emulator{'fceu'} =

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to