Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions wolf3d/code/iphone/EAGLView.m
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ - (void) handleTouches:(NSSet*)touches withEvent:(UIEvent*)event {
for (UITouch *myTouch in t)
{
CGPoint touchLocation = [myTouch locationInView:self];

if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) {

UIDeviceOrientation deviceOrientation = [[UIDevice currentDevice] orientation];
if (deviceOrientation == UIDeviceOrientationLandscapeLeft || deviceOrientation == UIDeviceOrientationPortrait) {
points[ 2 * touchCount + 1 ] = self.bounds.size.width - (self.bounds.size.width - touchLocation.x);
points[ 2 * touchCount + 0 ] = self.bounds.size.height - touchLocation.y;
} else {
Expand Down