diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-12-02 20:33:06 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-12-02 20:33:06 +0000 |
| commit | 2f445854cc8dc618f295c92b87c421ff74643622 (patch) | |
| tree | b371284e48ea47fb3a72046815bb6bac55c2aeb4 /macosx/plugins/DFNet | |
| parent | 81da7f45b488bd774fdf51763a5d3ef094d8e368 (diff) | |
| download | pcsxr-2f445854cc8dc618f295c92b87c421ff74643622.tar.gz | |
Some code changes.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@88035 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFNet')
| -rwxr-xr-x | macosx/plugins/DFNet/macsrc/SockDialog.m | 20 |
1 files changed, 6 insertions, 14 deletions
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 |
