building ghost-sdl works again.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Feb 2013 08:02:05 +0000 (08:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Feb 2013 08:02:05 +0000 (08:02 +0000)
intern/ghost/intern/GHOST_SystemSDL.cpp
intern/ghost/intern/GHOST_SystemSDL.h

index fdc4f33..da1836d 100644 (file)
@@ -114,6 +114,20 @@ GHOST_SystemSDL::init() {
        return GHOST_kFailure;
 }
 
+/**
+ * Returns the dimensions of the main display on this system.
+ * \return The dimension of the main display.
+ */
+void
+GHOST_SystemSDL::getAllDisplayDimensions(GHOST_TUns32& width,
+                                         GHOST_TUns32& height) const
+{
+       SDL_DisplayMode mode;
+       SDL_GetDesktopDisplayMode(0, &mode); /* note, always 0 display */
+       width = mode.w;
+       height = mode.h;
+}
+
 void
 GHOST_SystemSDL::getMainDisplayDimensions(GHOST_TUns32& width,
                                           GHOST_TUns32& height) const
index 43c9129..776dc2f 100644 (file)
@@ -87,6 +87,10 @@ public:
        setCursorPosition(GHOST_TInt32 x,
                          GHOST_TInt32 y);
 
+       void
+       getAllDisplayDimensions(GHOST_TUns32& width,
+                               GHOST_TUns32& height) const;
+
        void
        getMainDisplayDimensions(GHOST_TUns32& width,
                                 GHOST_TUns32& height) const;