parent
aef86fe900
commit
71345d4d20
|
@ -958,7 +958,7 @@ static NSMutableDictionary *_gURLDictionary = nil;
|
|||
}
|
||||
|
||||
NSString *romFileName = [[romURL path] lastPathComponent];
|
||||
NSString *fileExt = [NSString stringWithFormat:@"ds%d", slotNumber];
|
||||
NSString *fileExt = [NSString stringWithFormat:@"ds%ld", (unsigned long)slotNumber];
|
||||
|
||||
return [[romFileName stringByDeletingPathExtension] stringByAppendingPathExtension:fileExt];
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
{
|
||||
struct NDS_fw_config_data *data;
|
||||
struct NDS_fw_config_data *internalData;
|
||||
NSInteger birth_year;
|
||||
NSUInteger birth_year;
|
||||
pthread_mutex_t mutex;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
- (NSDate *) birthday
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
NSDate *theBirthday = [NSDate dateWithString:[NSString stringWithFormat:@"%d-%d-%d 12:00:00 +0000", birth_year, data->birth_month, data->birth_day]];
|
||||
NSDate *theBirthday = [NSDate dateWithString:[NSString stringWithFormat:@"%ld-%ld-%ld 12:00:00 +0000", (unsigned long)birth_year, (unsigned long)data->birth_month, (unsigned long)data->birth_day]];
|
||||
pthread_mutex_unlock(&mutex);
|
||||
|
||||
return theBirthday;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#define NSSTRING_TITLE_SHOW_STATUS_BAR NSLocalizedString(@"Show Status Bar", nil)
|
||||
#define NSSTRING_TITLE_SPEED_1X NSLocalizedString(@"Speed 1x", nil)
|
||||
#define NSSTRING_TITLE_SPEED_2X NSLocalizedString(@"Speed 2x", nil)
|
||||
#define NSSTRING_TITLE_SLOT_NUMBER NSLocalizedString(@"Slot %d", nil)
|
||||
#define NSSTRING_TITLE_SLOT_NUMBER NSLocalizedString(@"Slot %ld", nil)
|
||||
|
||||
#define NSSTRING_TITLE_TECH_SUPPORT_WINDOW_TITLE NSLocalizedString(@"Support Request Form", nil)
|
||||
#define NSSTRING_TITLE_BUG_REPORT_WINDOW_TITLE NSLocalizedString(@"Bug Report Form", nil)
|
||||
|
|
|
@ -219,7 +219,7 @@ static NSDictionary *hidUsageTable = nil;
|
|||
NSString *elementCode = nil;
|
||||
if (altElementCode == nil)
|
||||
{
|
||||
elementCode = [NSString stringWithFormat:@"0x%04X/0x%04X", elementUsagePage, elementUsage];
|
||||
elementCode = [NSString stringWithFormat:@"0x%04lX/0x%04lX", (long)elementUsagePage, (long)elementUsage];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -235,16 +235,16 @@ static NSDictionary *hidUsageTable = nil;
|
|||
{
|
||||
if (elementUsagePage == kHIDPage_Button)
|
||||
{
|
||||
elementName = [NSString stringWithFormat:@"Button %i", elementUsage];
|
||||
elementName = [NSString stringWithFormat:@"Button %li", (long)elementUsage];
|
||||
}
|
||||
else if (elementUsagePage == kHIDPage_VendorDefinedStart)
|
||||
{
|
||||
elementName = [NSString stringWithFormat:@"VendorDefined %i", elementUsage];
|
||||
elementName = [NSString stringWithFormat:@"VendorDefined %li", (long)elementUsage];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDictionary *elementUsagePageDict = (NSDictionary *)[hidUsageTable valueForKey:[NSString stringWithFormat:@"0x%04X", elementUsagePage]];
|
||||
elementName = (NSString *)[elementUsagePageDict valueForKey:[NSString stringWithFormat:@"0x%04X", elementUsage]];
|
||||
NSDictionary *elementUsagePageDict = (NSDictionary *)[hidUsageTable valueForKey:[NSString stringWithFormat:@"0x%04lX", (long)elementUsagePage]];
|
||||
elementName = (NSString *)[elementUsagePageDict valueForKey:[NSString stringWithFormat:@"0x%04lX", (long)elementUsage]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -363,8 +363,8 @@ static NSDictionary *hidUsageTable = nil;
|
|||
NSInteger upperThreshold = (((logicalMax - logicalMin) * 2) / 3) + logicalMin;
|
||||
NSNumber *onState = [NSNumber numberWithBool:YES];
|
||||
NSNumber *offState = [NSNumber numberWithBool:NO];
|
||||
NSString *elementCodeLowerThreshold = [NSString stringWithFormat:@"0x%04X/0x%04X/LowerThreshold", elementUsagePage, elementUsage];
|
||||
NSString *elementCodeUpperThreshold = [NSString stringWithFormat:@"0x%04X/0x%04X/UpperThreshold", elementUsagePage, elementUsage];
|
||||
NSString *elementCodeLowerThreshold = [NSString stringWithFormat:@"0x%04lX/0x%04lX/LowerThreshold", (long)elementUsagePage, (long)elementUsage];
|
||||
NSString *elementCodeUpperThreshold = [NSString stringWithFormat:@"0x%04lX/0x%04lX/UpperThreshold", (long)elementUsagePage, (long)elementUsage];
|
||||
|
||||
if (logicalValue <= lowerThreshold)
|
||||
{
|
||||
|
@ -410,18 +410,18 @@ static NSDictionary *hidUsageTable = nil;
|
|||
|
||||
NSNumber *onState = [NSNumber numberWithBool:YES];
|
||||
NSNumber *offState = [NSNumber numberWithBool:NO];
|
||||
NSString *elementCodeFourWayUp = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-FourDirection", elementUsagePage, elementUsage, 0];
|
||||
NSString *elementCodeFourWayRight = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-FourDirection", elementUsagePage, elementUsage, 1];
|
||||
NSString *elementCodeFourWayDown = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-FourDirection", elementUsagePage, elementUsage, 2];
|
||||
NSString *elementCodeFourWayLeft = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-FourDirection", elementUsagePage, elementUsage, 3];
|
||||
NSString *elementCodeEightWayUp = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 0];
|
||||
NSString *elementCodeEightWayUpRight = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 1];
|
||||
NSString *elementCodeEightWayRight = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 2];
|
||||
NSString *elementCodeEightWayDownRight = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 3];
|
||||
NSString *elementCodeEightWayDown = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 4];
|
||||
NSString *elementCodeEightWayDownLeft = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 5];
|
||||
NSString *elementCodeEightWayLeft = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 6];
|
||||
NSString *elementCodeEightWayUpLeft = [NSString stringWithFormat:@"0x%04X/0x%04X/%d-EightDirection", elementUsagePage, elementUsage, 7];
|
||||
NSString *elementCodeFourWayUp = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-FourDirection", (long)elementUsagePage, (long)elementUsage, 0];
|
||||
NSString *elementCodeFourWayRight = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-FourDirection", (long)elementUsagePage, (long)elementUsage, 1];
|
||||
NSString *elementCodeFourWayDown = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-FourDirection", (long)elementUsagePage, (long)elementUsage, 2];
|
||||
NSString *elementCodeFourWayLeft = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-FourDirection", (long)elementUsagePage, (long)elementUsage, 3];
|
||||
NSString *elementCodeEightWayUp = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 0];
|
||||
NSString *elementCodeEightWayUpRight = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 1];
|
||||
NSString *elementCodeEightWayRight = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 2];
|
||||
NSString *elementCodeEightWayDownRight = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 3];
|
||||
NSString *elementCodeEightWayDown = [NSString stringWithFormat:@"0x%04lXX/0x%04lX/%d-EightDirection",(long) (long)elementUsagePage, (long)elementUsage, 4];
|
||||
NSString *elementCodeEightWayDownLeft = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 5];
|
||||
NSString *elementCodeEightWayLeft = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 6];
|
||||
NSString *elementCodeEightWayUpLeft = [NSString stringWithFormat:@"0x%04lX/0x%04lX/%d-EightDirection", (long)elementUsagePage, (long)elementUsage, 7];
|
||||
|
||||
if (logicalMax == 3)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
if (theCode == nil)
|
||||
{
|
||||
deviceCode = [[NSString stringWithFormat:@"0x%08X", rand()] retain];
|
||||
deviceCode = [[NSString stringWithFormat:@"0x%08X", arc4random()] retain];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -497,7 +497,7 @@
|
|||
case NSRightMouseDragged:
|
||||
case NSOtherMouseDragged:
|
||||
input = (CocoaDSInput *)[self.inputs valueForKey:@"NSEventMouse"];
|
||||
elementCode = [NSString stringWithFormat:@"%i", [event buttonNumber]];
|
||||
elementCode = [NSString stringWithFormat:@"%li", (long)[event buttonNumber]];
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -360,9 +360,9 @@
|
|||
slotNumberKey = 0;
|
||||
}
|
||||
|
||||
NSMenuItem *mItem = [menu addItemWithTitle:[NSString stringWithFormat:NSSTRING_TITLE_SLOT_NUMBER, slotNumber]
|
||||
NSMenuItem *mItem = [menu addItemWithTitle:[NSString stringWithFormat:NSSTRING_TITLE_SLOT_NUMBER, (unsigned long)slotNumber]
|
||||
action:nil
|
||||
keyEquivalent:[NSString stringWithFormat:@"%d", slotNumberKey]];
|
||||
keyEquivalent:[NSString stringWithFormat:@"%ld", (unsigned long)slotNumberKey]];
|
||||
|
||||
[mItem setTarget:[mainWindow delegate]];
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
self.untitledCount++;
|
||||
if (self.untitledCount > 1)
|
||||
{
|
||||
untitledString = [NSString stringWithFormat:@"Untitled %d", self.untitledCount];
|
||||
untitledString = [NSString stringWithFormat:@"Untitled %ld", (unsigned long)self.untitledCount];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -597,7 +597,7 @@ enum OGLVertexAttributeID
|
|||
|
||||
if (keyPressed && [theEvent window] != nil && [[[theEvent window] delegate] respondsToSelector:@selector(setStatus:)])
|
||||
{
|
||||
[[[theEvent window] delegate] setStatus:[NSString stringWithFormat:@"Keyboard:%i", [theEvent keyCode]]];
|
||||
[(EmuWindowDelegate *)[[theEvent window] delegate] setStatus:[NSString stringWithFormat:@"Keyboard:%i", [theEvent keyCode]]];
|
||||
}
|
||||
|
||||
isHandled = [self.cdsController setStateWithInput:inputAttributes];
|
||||
|
@ -619,8 +619,8 @@ enum OGLVertexAttributeID
|
|||
// and finally to DS touchscreen coordinates.
|
||||
NSPoint touchLoc = [self dsPointFromEvent:theEvent];
|
||||
|
||||
NSString *elementCode = [NSString stringWithFormat:@"%i", [theEvent buttonNumber]];
|
||||
NSString *elementName = [NSString stringWithFormat:@"Button %i", [theEvent buttonNumber]];
|
||||
NSString *elementCode = [NSString stringWithFormat:@"%li", (long)[theEvent buttonNumber]];
|
||||
NSString *elementName = [NSString stringWithFormat:@"Button %li", (long)[theEvent buttonNumber]];
|
||||
|
||||
switch ([theEvent buttonNumber])
|
||||
{
|
||||
|
@ -652,7 +652,7 @@ enum OGLVertexAttributeID
|
|||
|
||||
if (buttonPressed && [theEvent window] != nil && [[[theEvent window] delegate] respondsToSelector:@selector(setStatus:)])
|
||||
{
|
||||
[[[theEvent window] delegate] setStatus:[NSString stringWithFormat:@"Mouse:%i X:%i Y:%i", [theEvent buttonNumber], (NSInteger)(touchLoc.x), (NSInteger)(touchLoc.y)]];
|
||||
[(EmuWindowDelegate *)[[theEvent window] delegate] setStatus:[NSString stringWithFormat:@"Mouse:%li X:%li Y:%li", (long)[theEvent buttonNumber], (long)(touchLoc.x), (long)(touchLoc.y)]];
|
||||
}
|
||||
|
||||
isHandled = [self.cdsController setStateWithInput:inputAttributes];
|
||||
|
|
|
@ -1319,7 +1319,7 @@
|
|||
|
||||
[cheatWindowBindings setValue:titleString forKey:@"cheatDBTitle"];
|
||||
[cheatWindowBindings setValue:dateString forKey:@"cheatDBDate"];
|
||||
[cheatWindowBindings setValue:[NSString stringWithFormat:@"%d", [dbList count]] forKey:@"cheatDBItemCount"];
|
||||
[cheatWindowBindings setValue:[NSString stringWithFormat:@"%ld", (unsigned long)[dbList count]] forKey:@"cheatDBItemCount"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -119,8 +119,8 @@
|
|||
- (BOOL) handleMouseDown:(NSEvent *)mouseEvent
|
||||
{
|
||||
BOOL isHandled = NO;
|
||||
NSString *elementCode = [NSString stringWithFormat:@"%i", [mouseEvent buttonNumber]];
|
||||
NSString *elementName = [NSString stringWithFormat:@"Button %i", [mouseEvent buttonNumber]];
|
||||
NSString *elementCode = [NSString stringWithFormat:@"%li", (long)[mouseEvent buttonNumber]];
|
||||
NSString *elementName = [NSString stringWithFormat:@"Button %li", (long)[mouseEvent buttonNumber]];
|
||||
|
||||
switch ([mouseEvent buttonNumber])
|
||||
{
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
|
||||
[cheatWindowBindings setValue:titleString forKey:@"cheatDBTitle"];
|
||||
[cheatWindowBindings setValue:dateString forKey:@"cheatDBDate"];
|
||||
[cheatWindowBindings setValue:[NSString stringWithFormat:@"%d", [dbList count]] forKey:@"cheatDBItemCount"];
|
||||
[cheatWindowBindings setValue:[NSString stringWithFormat:@"%ld", (unsigned long)[dbList count]] forKey:@"cheatDBItemCount"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue