Browse Source

Fixes MacOSX resize events

seanpaultaylor 12 years ago
parent
commit
755b4f4bdd
2 changed files with 6 additions and 2 deletions
  1. 5 1
      gameplay/src/PlatformMacOSX.mm
  2. 1 1
      samples/browser/src/Audio3DSample.cpp

+ 5 - 1
gameplay/src/PlatformMacOSX.mm

@@ -749,7 +749,11 @@ double getMachTimeInMilliseconds()
 {
     [gameLock lock];
     NSSize size = [ [ _window contentView ] frame ].size;
-    gameplay::Platform::resizeEventInternal((unsigned int)size.width, (unsigned int)size.height);
+    __width = size.width;
+    __height = size.height;
+    gameplay::Platform::resizeEventInternal((unsigned int)__width, (unsigned int)__height);
+
+    
     [gameLock unlock];
 }
 

+ 1 - 1
samples/browser/src/Audio3DSample.cpp

@@ -326,7 +326,7 @@ void Audio3DSample::drawDebugText(int x, int y)
 void Audio3DSample::drawVector3(const char* str, const Vector3& vector, int x, int y)
 {
     char buffer[255];
-    sprintf(buffer, "%s: (%f, %f, %f)", str, vector.x, vector.y, vector.z);
+    sprintf(buffer, "%s: (%.3f, %.3f, %.3f)", str, vector.x, vector.y, vector.z);
     _font->drawText(buffer, x, y, Vector4::one(), 22);
 }