Xcode 4.5 device orientation change? - cocos2d-iphone

I am in the process of building a cocos2d game with kobold2d and since I upgraded to xcode 4.5 every time I build the project the device orientation starts out in landscape and the rotates to portrait mode automatically? I in the precious versions of xcode the default orientation is landscape but now it keeps switching on its own.

In AppDelegate change the line that says something like:
[window addSubView:viewcontroller.view];
to
[window setRootViewController:viewcontroller];
that should do it.

Related

Wrong coordinates in a Qt Application

I created a Qt Application with Qt Creator 3.3.1, using Qt embedded 4.8.6 for a Cortex A5.
It runs on a board with Linux embedded and a touchscreen.
The filesystem was created with Buildroot 2015.08.
I'm using a resistive touchscreen calibrated with ts_calibrate.
The Qt Application works, but I often get the wrong coordinates. For example, when I push on a button, sometimes the program takes the coordinates related to another point of the touchscreen, giving the idea that the button pushed doesn't work properly.
My Qt enviroment variable are:
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE=`cat /etc/ts.dev 2>/dev/null`
export QWS_DISPLAY=LinuxFB:mmWidth=800:mmHeight=480
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
If I try to use another Qt Application (for example the Qt demos created with Buildroot) I get the same problem.
Is it a bug of Qt 4.8.6 or something?
Can anyone help me? Thank you
Sounds like playing with your activated filters or their parameters in ts.conf might help.
Since you asked your question, there is tslib 1.2 and (if you need multitouch) tslib 1.3-rc3, both with new and improved filters, see tslib's project page

Getting EXC_BAD_ACCESS when running Cocos2D V3 RC3 on iOS 7.1 device

I've recently discovered Cocos2D V3 with Chipmunk physics engine built right into it. There's only one template to create a project from. When I run the sample game on my iPod touch with iOS 6.1 it works as expected but when I run it on an iOS 7.1 device, like 5S or 5, I get EXC_BAD_ACCESS error when I click the [Newton physics] button. There's nothing else. It just shows EXC_BAD_ACCESS before the onNewtonClicked method, so it's not inside the method, but outside. Has someone else experienced this?
This is a 32/64 bit compilation problem from Cocos2d.
You can fix this by updating to the latest RC 0.4 version.
Please check the instructions here to see how to do that :
xCode 5.1 build crashes - SpriteBuilder

xCode 5.1 build crashes - SpriteBuilder

I recently updated xCode to 5.1. All of a sudden my (cocos2d) builds keep on crashing when publishing to my iPhone 5s (iOS 7.1). It works fine in the simulator (iOS 7.1).
I got a screenshot here: http://puu.sh/7rB8S.png
Also I got a bunch of warnings since I updated xCode to 5.1.
Replace above with: "7rBfp.png" (due to lack of reputation...)
If you are willing to reproduce the problem, I followed this tutorial: https://www.makegameswith.us/tutorials/getting-started-with-spritebuilder/menus/
Once I added the MainScene background (and the button + methods) I was not able to build on my iPhone anymore.
Am I missing something? Before I updated xCode and my phone today everything worked flawlessly.
To update Cocos2D, download the latest version ( https://s3.amazonaws.com/spritebuilder/cocos2d-iphone-3.0.0.rc.4.zip24 ), unzip the file and rename it to cocos2d-iphone and replace the version in your current project. It's in Source/libs/cocos2d-iphone.
Credits to Vic at the SpriteBuilder forums for this answer.

Blackberry simulator: can't lower graphics settings in view menu

I downloaded the simulator for BB Bold 9930 (v. 7.1) at http://us.blackberry.com/sites/developers/resources/simulators.html
My Windows VM follows the system requirements at http://developer.blackberry.com/bbos/java/documentation/the_bb_smrtphn_simulator_447179_11.html, except for one thing: OpenGL 1.x compatibility, which I can't figure out how to test (see Windows 7 on Virtualbox virtual machine: is it OpenGL 1.x compatible?).
So installing this and launching C:\Program Files\Research In Motion......\9930.bat causes the following error to come up:
"An OpenGL 1.x + compatible video card with recent video drivers is required for graphics acceleration. Please try a lower graphics acceleration setting by navigating to the view menu".
Clicking on the view menu is impossible until I click OK on the modal dialog, but when I do so, the program immediately crashes with the message "BlackBerry Handheld Simulator has stopped working".
Is there any way around (through the command line, for instance?)
You should be able to force the simulator not to use the graphics acceleration at all (which hopefully would work around your problem).
See this BlackBerry forum thread here.
Basically, just include this in your simulator config file:
<?xml version="1.0" encoding="utf-8"?>
<fledge-configuration>
<BodyBuilder::opengl-acceleration>0</BodyBuilder::opengl-acceleration>
The setting of 0 turns off graphics acceleration. You can either turn it off by default in your simulators, or just in one particular simulator, by using the fledge-saved.conf file, or 9900-saved.conf file (for example, to change the setting on the 9900 simulator).
On a Windows system, these config files would be located somewhere like:
C:\Users\myname\net\rim\fledge-2\

Error executing cross-compiled codes in raspberry pi

I am having problems with a Qt GUI application I created. Basically I created the application in my ubuntu to check if it compiles and works properly, however, if I set up the cross compiler (followed a tutorial and tried a hello world which works properly) and execute my code in the pi the UI does not display properly and basically I cant do anything:
· Text disappears from buttons
· Mouse disappears from screen (therefore cant click buttons)
· Cant navigate buttons using tab key
Any clues? maybe I cant use .ui files in the pi and have to use qml? Thank you in advance.
2 Screenshots of what I get with the pi and what the program should actually look like (ignore the second LCD display):
what I get http://imageshack.us/a/img17/9986/img20130508093318.jpg
I’ve been told that Qt5 has different rendering platforms, the standard for my compiled version is “eglfs”, which is fullscreen EGL accelerated mobile application style. I need to run it another platform for example xcb or x11 with the command “./myprogram -platform xcb”. Unfortunatelly i only have the following platform options and none of them work: eglfs,linuxfb,minimal,minimalegl,offscreen. I dont now how to install these, i’ll google it see if i can find anything.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=26590&p=321556