[Solved] HP Touchpad / Resolution like a scaled Pre app

Currently I'm porting a fun project to the touchpad. Works good, but the app is scalled like it is no 'HD' app. I will look for a solution myself and post it here. But perhaps somebody is faster then me. Regards, Julian ----> Solution can be found …

Viewing 1 to 10 (10 Total)
[Solved] HP Touchpad / Resolution like a scaled Pre app

jujulian1987

jujulian1987
Total Posts: 48
Joined: September 06, 2011

Currently I'm porting a fun project to the touchpad. Works good, but the app is scalled like it is no 'HD' app. I will look for a solution myself and post it here. But perhaps somebody is faster then me.

Regards,
Julian

----> Solution can be found here:http://www.haxenme.org/index.php?cID=189&ccm_paging_p=1&tim...

Tags:
Posted on September 06, 2011 at 12:23 PM

singmajesty

singmajesty
Total Posts: 2140
Joined: August 25, 2011

RE: HP Touchpad / Resolution like a scaled Pre app

Hi!

When the application starts, what values do Lib.current.stage.stageWidth and Lib.current.stage.stageHeight return?

Posted on September 06, 2011 at 2:03 PM

jujulian1987

jujulian1987
Total Posts: 48
Joined: September 06, 2011

Result

This:

X = 640
Y = 480

Posted on September 06, 2011 at 2:34 PM

singmajesty

singmajesty
Total Posts: 2140
Joined: August 25, 2011

RE: HP Touchpad / Resolution like a scaled Pre app

Okay. Are you using the NME 3 install tool, building from an NMML file? Does it have a window width and height set?

Posted on September 06, 2011 at 3:09 PM

jujulian1987

jujulian1987
Total Posts: 48
Joined: September 06, 2011

My NMML file

I use a nmml file to compile and install: Using latest svn of hxcpp and nme.

This is my nmml file:

<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Kitty" main="com.northlightgames.kitty.Kitty" package="com.northlightgames.kitty" version="1.0.0" icon="images/icon.png" company="Northlight Games" ></app>
<window width="1024" height="768" fps="60" orientation="portrait" resizable="false" if="target_flash"></window>
<window width="0" height="0" fps="60" orientation="landscape" resizable="true" if="target_cpp"></window>


<set name="BUILD_DIR" value="Export" ></set>

<classpath name="Source" ></classpath>
<classpath name="../box2dhx" ></classpath>

<assets path="Assets" rename="images" include="*" ></assets>

<haxelib name="nme" ></haxelib>

<ndll name="std" ></ndll>
<ndll name="regexp" ></ndll>
<ndll name="zlib" ></ndll>
<ndll name="nme" haxelib="nme" ></ndll>

</project>


and this is the command I use: haxelib run nme test "Kitty.nmml" webos

Has it changed that <window width="0" height="0" has any effect?

Posted on September 06, 2011 at 3:17 PM

singmajesty

singmajesty
Total Posts: 2140
Joined: August 25, 2011

RE: HP Touchpad / Resolution like a scaled Pre app

Hmm, this does seem strange.

Does it act any differently if you set "resizable" to false, or "orientation" to portrait?

Posted on September 06, 2011 at 3:20 PM

singmajesty

singmajesty
Total Posts: 2140
Joined: August 25, 2011

RE: HP Touchpad / Resolution like a scaled Pre app

Also, make sure that you do not have a metadata.json file in your application directory on the device, or in your application package, as that could trigger "compatibility mode"

Posted on September 06, 2011 at 3:21 PM

jujulian1987

jujulian1987
Total Posts: 48
Joined: September 06, 2011

Solved

okay first I tried this one:

<window width="0" height="0" fps="60" orientation="portrait" resizable="false" if="target_cpp"></window>

didn't work.

Then I tried that one:

<window width="0" height="0" fps="60" orientation="portrait" resizable="false" if="target_webos"></window>

That did the trick. Thought webos would be a sub class of cpp. But think it wasn't smiling.
Will update my first post.

BTW it seems for my browser that xml data won't be shown in my post. Is that the same for you?

Posted on September 06, 2011 at 4:28 PM

musa

musa
Total Posts: 14
Joined: September 08, 2011

XML

Indeed, the XML got parsed out somewhere on the way, so your solution is not part of the content sad

Posted on September 08, 2011 at 6:48 PM

singmajesty

singmajesty
Total Posts: 2140
Joined: August 25, 2011

Re: HP Touchpad / Resolution like a scaled Pre app

Fixed!

Sorry for the delay. Just jumped into the BBCode parser and gave it an "htmlentities" call instead of "strip_tags", and added some extra smarts to support [ code ] tags

Posted on September 09, 2011 at 11:19 AM