Skip to content

Commit 0c004e1

Browse files
committed
fixed renderer detection
1 parent c395015 commit 0c004e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/processing/mode/android/AndroidBuild.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public File createProject() throws IOException, SketchException {
182182
// build the preproc and get to work
183183
AndroidPreprocessor preproc = new AndroidPreprocessor(sketch, getPackageName());
184184
// On Android, this init will throw a SketchException if there's a problem with size()
185-
SurfaceInfo info = preproc.initSketchSize(sketch.getMainProgram());
185+
preproc.initSketchSize(sketch.getMainProgram());
186186
preproc.initSketchSmooth(sketch.getMainProgram());
187187

188188
sketchClassName = preprocess(srcFolder, manifest.getPackageName(), preproc, false);
@@ -199,7 +199,9 @@ public File createProject() throws IOException, SketchException {
199199
final File resFolder = new File(tmpFolder, "res");
200200
writeRes(resFolder, sketchClassName);
201201

202-
writeMainClass(srcFolder, preproc.getRenderer(info.getSettings()));
202+
// TODO: it would be great if we can just get the renderer from the SurfaceInfo
203+
// object returned by initSketchSize()
204+
writeMainClass(srcFolder, preproc.getRenderer(sketch.getMainProgram()));
203205

204206
// new location for SDK Tools 17: /opt/android/tools/proguard/proguard-android.txt
205207
// File proguardSrc = new File(sdk.getSdkFolder(), "tools/lib/proguard.cfg");
@@ -975,7 +977,6 @@ private File mkdirs(final File parent, final String name) throws SketchException
975977

976978

977979
private void writeMainClass(final File srcDirectory, String renderer) {
978-
System.out.println("---------------> RENDERER: " + renderer);
979980
if (publishOption == FRAGMENT) {
980981
writeFragmentActivity(srcDirectory);
981982
} else if (publishOption == WALLPAPER) {

0 commit comments

Comments
 (0)