Skip to content

Commit

Permalink
window size override, fix p2iOS.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnn55 committed May 8, 2012
1 parent 5d58dfb commit 3a04971
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion p2iOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion runtime/p2iOS/p2iOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"); \
Expand Down Expand Up @@ -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"); }
Expand Down Expand Up @@ -319,8 +323,11 @@ namespace p2iOS
_colorMode.range2 = 255;
_colorMode.range3 = 255;
_colorMode.range4 = 255;


width = ofGetWidth();
height = ofGetHeight();


};
void update() { };
void draw() {
Expand Down

0 comments on commit 3a04971

Please sign in to comment.