Skip to content
Browse files

window size override, fix p2iOS.sh

  • Loading branch information...
1 parent 5d58dfb commit 3a04971fe527062b94ebbe28aa5157f6afde574f @gimlids committed May 7, 2012
Showing with 9 additions and 2 deletions.
  1. +1 −1 p2iOS.sh
  2. +8 −1 runtime/p2iOS/p2iOS.h
View
2 p2iOS.sh
@@ -16,7 +16,7 @@ template_path="$apps_dir/p2iOSApp"
app_dir="$apps_dir/$example_name"
output_path="$app_dir/src/main.mm"
-
+rm -r $app_dir
cp -R $template_path $app_dir
#mv $app_dir/p2iOSApp.xcodeproj $app_dir/$example_name.xcodeproj
View
9 runtime/p2iOS/p2iOS.h
@@ -10,6 +10,8 @@
#include "ofxiPhone.h"
#include "ofxiPhoneExtras.h"
+#define OVERRIDE_WINDOW_SIZE_CALLS
+
#define P2IOS_MAIN \
int main(int argc, char** argv) { \
printf("p2iOS says hello world!\n"); \
@@ -150,9 +152,11 @@ namespace p2iOS
void size(int _width, int _height)
{
+ #ifndef OVERRIDE_WINDOW_SIZE_CALLS
ofSetWindowShape(_width, _height);
width = _width;
height = _height;
+ #endif
};
void noLoop() { /*noLoopWasCalled = true;*/ NSLog(@"p2iOS warning: noLoop() is not implemented"); }
@@ -319,8 +323,11 @@ namespace p2iOS
_colorMode.range2 = 255;
_colorMode.range3 = 255;
_colorMode.range4 = 255;
+
+
+ width = ofGetWidth();
+ height = ofGetHeight();
-
};
void update() { };
void draw() {

0 comments on commit 3a04971

Please sign in to comment.
Something went wrong with that request. Please try again.