Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor objective-c code style improvements
  • Loading branch information
slime73 committed Nov 20, 2014
1 parent 650ace8 commit feb2ab1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/video/uikit/SDL_uikitappdelegate.m
Expand Up @@ -113,7 +113,7 @@ - (void)postFinishLaunch
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
/* Set working directory to resource path */
[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];

/* register a callback for the idletimer hint */
SDL_AddHintCallback(SDL_HINT_IDLE_TIMER_DISABLED,
Expand Down
26 changes: 13 additions & 13 deletions src/video/uikit/SDL_uikitopengles.m
Expand Up @@ -141,18 +141,18 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
}

/* construct our view, passing in SDL's OpenGL configuration data */
view = [[SDL_uikitopenglview alloc] initWithFrame: frame
scale: scale
retainBacking: _this->gl_config.retained_backing
rBits: _this->gl_config.red_size
gBits: _this->gl_config.green_size
bBits: _this->gl_config.blue_size
aBits: _this->gl_config.alpha_size
depthBits: _this->gl_config.depth_size
stencilBits: _this->gl_config.stencil_size
sRGB: _this->gl_config.framebuffer_srgb_capable
majorVersion: _this->gl_config.major_version
shareGroup: share_group];
view = [[SDL_uikitopenglview alloc] initWithFrame:frame
scale:scale
retainBacking:_this->gl_config.retained_backing
rBits:_this->gl_config.red_size
gBits:_this->gl_config.green_size
bBits:_this->gl_config.blue_size
aBits:_this->gl_config.alpha_size
depthBits:_this->gl_config.depth_size
stencilBits:_this->gl_config.stencil_size
sRGB:_this->gl_config.framebuffer_srgb_capable
majorVersion:_this->gl_config.major_version
shareGroup:share_group];
if (!view) {
return NULL;
}
Expand All @@ -162,7 +162,7 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
if (view.viewcontroller != nil) {
view.viewcontroller.view = view;
}
[uiwindow addSubview: view];
[uiwindow addSubview:view];

/* The view controller needs to be the root in order to control rotation on iOS 6.0 */
if (uiwindow.rootViewController == nil) {
Expand Down
4 changes: 2 additions & 2 deletions src/video/uikit/SDL_uikitopenglview.m
Expand Up @@ -112,8 +112,8 @@ - (id)initWithFrame:(CGRect)frame

eaglLayer.opaque = YES;
eaglLayer.drawableProperties = @{
kEAGLDrawablePropertyRetainedBacking: @(retained),
kEAGLDrawablePropertyColorFormat: colorFormat
kEAGLDrawablePropertyRetainedBacking:@(retained),
kEAGLDrawablePropertyColorFormat:colorFormat
};

/* Set the appropriate scale (for retina display support) */
Expand Down
12 changes: 6 additions & 6 deletions src/video/uikit/SDL_uikitview.m
Expand Up @@ -52,7 +52,7 @@ @implementation SDL_uikitview {

- (id)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame: frame]) {
if (self = [super initWithFrame:frame]) {
#if SDL_IPHONE_KEYBOARD
[self initializeKeyboard];
#endif
Expand All @@ -69,7 +69,7 @@ - (id)initWithFrame:(CGRect)frame

- (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize
{
CGPoint point = [touch locationInView: self];
CGPoint point = [touch locationInView:self];

if (normalize) {
CGRect bounds = self.bounds;
Expand Down Expand Up @@ -123,7 +123,7 @@ - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
at once, or perhaps in other circumstances. Usually (it seems)
all active touches are canceled.
*/
[self touchesEnded: touches withEvent: event];
[self touchesEnded:touches withEvent:event];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
Expand Down Expand Up @@ -154,7 +154,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
/* Set ourselves up as a UITextFieldDelegate */
- (void)initializeKeyboard
{
textField = [[UITextField alloc] initWithFrame: CGRectZero];
textField = [[UITextField alloc] initWithFrame:CGRectZero];
textField.delegate = self;
/* placeholder so there is something to delete! */
textField.text = @" ";
Expand All @@ -171,7 +171,7 @@ - (void)initializeKeyboard
textField.hidden = YES;
keyboardVisible = NO;
/* add the UITextField (hidden) to our view */
[self addSubview: textField];
[self addSubview:textField];

_uikit_keyboard_init();
}
Expand Down Expand Up @@ -204,7 +204,7 @@ - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRan
int i;
for (i = 0; i < [string length]; i++) {

unichar c = [string characterAtIndex: i];
unichar c = [string characterAtIndex:i];

Uint16 mod = 0;
SDL_Scancode code;
Expand Down

0 comments on commit feb2ab1

Please sign in to comment.