Fixed some linux compile errors and removed compile warnings.
Fixed bug which crashed the application after the orientation was changed.
Fixed wrong indentations.
Merge pull request #1 from bastiankoe/master

Linux compile fixes, fixed bug after changing the orientation