OSDN Git Service

console/windows_console.hpp: get_console_width(), get_console_height() Add
authorMyun2 <myun2@nwhite.info>
Thu, 23 Dec 2010 16:26:14 +0000 (01:26 +0900)
committerMyun2 <myun2@nwhite.info>
Thu, 23 Dec 2010 16:26:14 +0000 (01:26 +0900)
roast/include/roast/console/windows_console.hpp

index f9fed86..61a19e2 100644 (file)
@@ -73,7 +73,24 @@ namespace roast
                        width = bufInfo.dwMaximumWindowSize.X;
                        height = bufInfo.dwMaximumWindowSize.Y;
                        return true;
-               }                       
+               }
+
+               int get_console_width()
+               {
+                       int width;
+                       int height;
+                       if ( get_console_size(width,height) == false )
+                               return 0;
+                       return width;
+               }
+               int get_console_height()
+               {
+                       int width;
+                       int height;
+                       if ( get_console_size(width,height) == false )
+                               return 0;
+                       return height;
+               }
        }
 }