[Scummvm-cvs-logs] SF.net SVN: scummvm:[33828] scummvm/branches/branch-0-12-0/backends/ platform/iphone

vinterstum at users.sourceforge.net vinterstum at users.sourceforge.net
Wed Aug 13 17:12:11 CEST 2008


Revision: 33828
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33828&view=rev
Author:   vinterstum
Date:     2008-08-13 15:12:08 +0000 (Wed, 13 Aug 2008)

Log Message:
-----------
iPhone: Fixed some soft keyboard issues (removed autocapitalization, fixed backspace), removed some debug output and increased sound buffer size

Modified Paths:
--------------
    scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.h
    scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.m
    scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.cpp
    scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.h

Modified: scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.h
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.h	2008-08-13 14:33:17 UTC (rev 33827)
+++ scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.h	2008-08-13 15:12:08 UTC (rev 33828)
@@ -37,11 +37,3 @@
 - (void)handleKeyPress:(unichar)c;
 
 @end
-
- at interface TextInputHandler : UITextView {
-	SoftKeyboard* softKeyboard;
-}
-
-- (id)initWithKeyboard:(SoftKeyboard*)keyboard;
-
- at end

Modified: scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.m
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.m	2008-08-13 14:33:17 UTC (rev 33827)
+++ scummvm/branches/branch-0-12-0/backends/platform/iphone/iphone_keyboard.m	2008-08-13 15:12:08 UTC (rev 33828)
@@ -25,15 +25,35 @@
 
 #import "iphone_keyboard.h"
 
+ at interface UITextInputTraits
+- (void)setAutocorrectionType:(int)type;
+- (void)setAutocapitalizationType:(int)type;
+- (void)setEnablesReturnKeyAutomatically:(BOOL)val;
+ at end
+
+ at interface TextInputHandler : UITextView {
+	SoftKeyboard* softKeyboard;
+}
+
+- (id)initWithKeyboard:(SoftKeyboard*)keyboard;
+
+ at end
+
+
 @implementation TextInputHandler
 
 - (id)initWithKeyboard:(SoftKeyboard*)keyboard; {
 	self = [super initWithFrame:CGRectMake(0.0f, 0.0f, 0.0f, 0.0f)];
 	softKeyboard = keyboard;
+	
+	[[self textInputTraits] setAutocorrectionType:1];
+	[[self textInputTraits] setAutocapitalizationType:0];
+	[[self textInputTraits] setEnablesReturnKeyAutomatically:NO];
+	
 	return self;
 }
 
-- (BOOL)webView:(id)fp8 shouldDeleteDOMRange:(id)fp12 {
+- (void) keyboardInputShouldDelete:(id)input {
 	[softKeyboard handleKeyPress:0x08];
 }
 
@@ -43,9 +63,12 @@
 
 	if ([character length] != 1) {
 		[NSException raise:@"Unsupported" format:@"Unhandled multi-char insert!"];
-		return false;
+		return NO;
 	}
+
 	[softKeyboard handleKeyPress:[character characterAtIndex:0]];
+	
+	return NO;
 }
 
 @end

Modified: scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.cpp	2008-08-13 14:33:17 UTC (rev 33827)
+++ scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.cpp	2008-08-13 15:12:08 UTC (rev 33828)
@@ -740,7 +740,7 @@
 }
 
 bool OSystem_IPHONE::handleEvent_mouseDown(Common::Event &event, int x, int y) {
-	printf("Mouse down at (%u, %u)\n", x, y);
+	//printf("Mouse down at (%u, %u)\n", x, y);
 
 	// Workaround: kInputMouseSecondToggled isn't always sent when the
 	// secondary finger is lifted. Need to make sure we get out of that mode.

Modified: scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.h
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.h	2008-08-13 14:33:17 UTC (rev 33827)
+++ scummvm/branches/branch-0-12-0/backends/platform/iphone/osys_iphone.h	2008-08-13 15:12:08 UTC (rev 33828)
@@ -35,7 +35,7 @@
 #include <AudioToolbox/AudioQueue.h>
 
 #define AUDIO_BUFFERS 3
-#define WAVE_BUFFER_SIZE 2048
+#define WAVE_BUFFER_SIZE 4096
 #define AUDIO_SAMPLE_RATE 44100
 
 #define SCUMMVM_ROOT_PATH "/var/mobile/Library/ScummVM"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list