Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-02-08 12:02:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-08 12:02:05 +0400
commit52df65b137ebcebb2b693a905cb4ee49a6d8fbcb (patch)
tree84d14a9e30f4ef4e93f7039b16202f35303232a1 /intern
parentcef952a750d86fe823bc0805032637f7a07394f5 (diff)
building ghost-sdl works again.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp14
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index fdc4f33b784..da1836d88a0 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -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
diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h
index 43c9129fdd8..776dc2f66a5 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@ -88,6 +88,10 @@ public:
GHOST_TInt32 y);
void
+ getAllDisplayDimensions(GHOST_TUns32& width,
+ GHOST_TUns32& height) const;
+
+ void
getMainDisplayDimensions(GHOST_TUns32& width,
GHOST_TUns32& height) const;