From 2f445854cc8dc618f295c92b87c421ff74643622 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 2 Dec 2013 20:33:06 +0000 Subject: Some code changes. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@88035 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/DFNet/macsrc/SockDialog.m | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'macosx/plugins/DFNet') diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m index 0114f33f..01f4cdc6 100755 --- a/macosx/plugins/DFNet/macsrc/SockDialog.m +++ b/macosx/plugins/DFNet/macsrc/SockDialog.m @@ -14,19 +14,13 @@ void SysMessage(const char *fmt, ...) { va_list list; - char msg[512]; - //char cmd[512]; - va_start(list, fmt); - vsprintf(msg, fmt, list); + NSString *errString = [[NSString alloc] initWithFormat:@(fmt) arguments:list]; va_end(list); - //sprintf(cmd, "message %s\n", msg); - NSString *errString = @(msg); - fprintf(stderr, "%s", msg); - NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", errString]; + fprintf(stderr, "message %s\n", [errString UTF8String]); + NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"Stop" alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", errString]; [alert setAlertStyle:NSCriticalAlertStyle]; - //NSInteger result = NSRunAlertPanel(errString, nil, @"Okay", nil, nil); NSInteger result = [alert runModal]; if (result == NSAlertDefaultReturn) { @@ -34,7 +28,8 @@ void SysMessage(const char *fmt, ...) if (theEmuClass) { [theEmuClass stop]; } else { - NSLog(@"Unable to stop emulation because the Objective-C class \"EmuThreaed\" was not found. Are you using a different emulator than PCSXR?"); + NSLog(@"Unable to stop emulation because the Objective-C class \"EmuThreaed\" was not found."); + NSLog(@"Are you using a different emulator than PCSXR?"); } } } @@ -93,10 +88,7 @@ void sockDestroyWaitDlg() - (id)init { - if ((self = [super initWithWindowNibName:@"SockDialog"])) { - - } - return self; + return self = [self initWithWindowNibName:@"SockDialog"]; } @end -- cgit v1.2.3