[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49319] branches/soc-2012-swiss_cheese/ intern/ghost/intern/GHOST_WindowAndroid.cpp: Ghost side of window size fix for Android.

Alexander Kuznetsov kuzsasha at gmail.com
Sat Jul 28 04:50:42 CEST 2012


Revision: 49319
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49319
Author:   alexk
Date:     2012-07-28 02:50:38 +0000 (Sat, 28 Jul 2012)
Log Message:
-----------
Ghost side of window size fix for Android.
If we cannot get the size, initialize to 400x400

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowAndroid.cpp

Modified: branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowAndroid.cpp
===================================================================
--- branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowAndroid.cpp	2012-07-28 02:43:15 UTC (rev 49318)
+++ branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowAndroid.cpp	2012-07-28 02:50:38 UTC (rev 49319)
@@ -50,25 +50,24 @@
 	m_invalid_window(false),
 	m_system(system)
 {
-	
-	winrect.m_t = 0;
-	winrect.m_l = 0;
-	winrect.m_r = 200;
-	winrect.m_b = 200;
+	int size[2];
+	if(aGetWindowSize(size))
+	{
+		winrect.m_t = 0;
+		winrect.m_l = 0;
+		winrect.m_r = size[0];
+		winrect.m_b = size[1];
+	} else
+	{
+		/* Cannot get correct size */
+		/* shouldn't happend */
 
+		winrect.m_t = 0;
+		winrect.m_l = 0;
+		winrect.m_r = 400;
+		winrect.m_b = 400;
+	}
 
-
-
-
-	glClearColor(0.0f, 0.0f, 1.0f, 0.5f);
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-	aSwapBuffers();
-
-    
-
-	//fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
-	//	theEvent->error_code, theEvent->request_code);
-
 	setTitle(title);
 }
 




More information about the Bf-blender-cvs mailing list