English Amiga Board


Go Back   English Amiga Board > Support > support.OtherUAE

 
 
Thread Tools
Old 04 September 2013, 16:36   #1
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
iAmiga Joystick fix

Hi Guys,
If you can compile and run iAmiga, but didn't figure the joystick out,
it's not that they're swapped. The joystick is the whole screen, and it's
just the fire button that isn't on the side of the screen you want it to be.

This is the simplest fix I could come up with to make the entire right
hand side of the display the fire button.

Code:
const int kButtonWidthPortrait			= 110;
const int kButtonWidthLandscape			= 200;

@synthesize delegate;

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
		//button = [[FireButtonView alloc] initWithFrame:CGRectMake(0, 0, kButtonWidthPortrait, frame.size.height)];
        
        button = [[FireButtonView alloc] initWithFrame:CGRectMake(frame.size.width/2, 0, frame.size.width/2, frame.size.height)];
        
		[self addSubview:button];
		_deadZone = 20.0f;	// radius, in pixels of the dead zone.
		_trackingStick = NO;
		_stickVector = new CGVector2D();
		sharedInstance = self;
		TheJoyStick = &g_touchStick;
    }
    return self;
}

- (void)setDelegate:(id<InputControllerChangedDelegate>)theDelegate {
	delegate = theDelegate;
	button->delegate = theDelegate;
}

- (void)layoutSubviews {
	//CGPoint origin = self.frame.origin;
	CGSize size = self.frame.size;
	UIInterfaceOrientation current = (UIInterfaceOrientation)[[UIDevice currentDevice] orientation];
	if (UIInterfaceOrientationIsLandscape(current)) {
		//button.frame = CGRectMake(0, 0, kButtonWidthLandscape, size.height);
        
        button.frame = CGRectMake(size.width/2, 0, size.width/2, size.height);
        
		//button.showImage = YES;
	} else {
		//button.frame = CGRectMake(0, 0, kButtonWidthPortrait, size.height);
        
        button.frame = CGRectMake(size.width/2, 0, size.width/2, size.height);
        
		//button.showImage = NO;
	}
}
You only need change underneath he comments.
kButtonWidthPortrait & kButtonWidthLandscape usually set the maximum
display coordinate from the left that the fire button will still work.
xArtx is offline  
Old 05 September 2013, 21:40   #2
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 5,999
Send a message via MSN to FOL
Be good if the controls were permanently on the screen.

I cant compile it though, dont have a mac.
FOL is offline  
Old 06 September 2013, 01:14   #3
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
Quote:
Originally Posted by FOL View Post
Be good if the controls were permanently on the screen.

I cant compile it though, dont have a mac.
That's just a switch that Stu turned off.
Can't give it to you either.. don't have a jailbreak
xArtx is offline  
Old 06 September 2013, 11:28   #4
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 5,999
Send a message via MSN to FOL
Quote:
Originally Posted by xArtx View Post
That's just a switch that Stu turned off.
Can't give it to you either.. don't have a jailbreak
I do, Ill test, .
FOL is offline  
Old 06 September 2013, 16:37   #5
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
Quote:
Originally Posted by FOL View Post
I do, Ill test, .
I mean don't have my act together at all (to compile, distribute via Cydia, etc.).
Once I got the developer stuff sorted I never bothered with the jailbreak route.
Otherwise I'd have a distro that just downloads Turrican from the Factor 5 site on it's first launch
xArtx is offline  
Old 06 September 2013, 18:19   #6
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 5,999
Send a message via MSN to FOL
Quote:
Originally Posted by xArtx View Post
I mean don't have my act together at all (to compile, distribute via Cydia, etc.).
Once I got the developer stuff sorted I never bothered with the jailbreak route.
Otherwise I'd have a distro that just downloads Turrican from the Factor 5 site on it's first launch
LOL< dont need to do cydia, .
FOL is offline  
Old 07 September 2013, 02:32   #7
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 685
Quote:
Originally Posted by FOL View Post
LOL< dont need to do cydia, .
I''l come back over your forum..
xArtx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quickshot Python: crap joystick or crappest joystick ever? T_hairy_bootson Nostalgia & memories 141 13 September 2016 15:36
Joystick incompatibility since WinUAE V2.4.0 - needs a fix Amigo support.WinUAE 7 13 August 2013 08:09
I need a Fix! kipper2k support.Apps 3 08 September 2009 17:54
What Why and How to fix? DDNI support.Hardware 5 28 May 2007 22:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.21753 seconds with 15 queries