mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-22 11:41:38 +00:00
Rectirect Sys_Printf's output to the command output box.
This commit is contained in:
parent
fe9fdd7b83
commit
36342da9bd
2 changed files with 16 additions and 9 deletions
Binary file not shown.
|
@ -4,6 +4,7 @@
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
#include "QF/dstring.h"
|
||||||
#include "QF/quakeio.h"
|
#include "QF/quakeio.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
|
||||||
|
@ -105,6 +106,20 @@ CheckCmdDone ( /* DPSTimedEntry tag, */ double now, void *userData)
|
||||||
// DPSRemoveTimedEntry( cmdte );
|
// DPSRemoveTimedEntry( cmdte );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
QuakeEd_print (const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
static dstring_t *output;
|
||||||
|
NSString *string;
|
||||||
|
|
||||||
|
if (!output)
|
||||||
|
output = dstring_new ();
|
||||||
|
|
||||||
|
dvsprintf (output, fmt, args);
|
||||||
|
string = [NSString stringWithCString: output->str];
|
||||||
|
[g_cmd_out_i setStringValue: string];
|
||||||
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
@implementation QuakeEd
|
@implementation QuakeEd
|
||||||
|
@ -171,7 +186,6 @@ postappdefined (void)
|
||||||
windowNumber: 0 context:[NSApp context]
|
windowNumber: 0 context:[NSApp context]
|
||||||
subtype: 0 data1: 0 data2:0];
|
subtype: 0 data1: 0 data2:0];
|
||||||
[NSApp postEvent: ev atStart:NO];
|
[NSApp postEvent: ev atStart:NO];
|
||||||
Sys_Printf ("posted\n");
|
|
||||||
updateinflight = YES;
|
updateinflight = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,8 +311,6 @@ App delegate methods
|
||||||
|
|
||||||
updateinflight = NO;
|
updateinflight = NO;
|
||||||
|
|
||||||
Sys_Printf ("serviced\n");
|
|
||||||
|
|
||||||
// update screen
|
// update screen
|
||||||
evp = [NSApp nextEventMatchingMask: NSAnyEventMask
|
evp = [NSApp nextEventMatchingMask: NSAnyEventMask
|
||||||
untilDate: [NSDate distantPast]
|
untilDate: [NSDate distantPast]
|
||||||
|
@ -308,12 +320,6 @@ App delegate methods
|
||||||
postappdefined ();
|
postappdefined ();
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
Sys_Printf ("updating %d %d %p %d %p %d\n",
|
|
||||||
(int)[map_i count],
|
|
||||||
(int)[[map_i currentEntity] count],
|
|
||||||
entitycount_i, [entitycount_i intValue],
|
|
||||||
brushcount_i, [brushcount_i intValue]);
|
|
||||||
|
|
||||||
|
|
||||||
[self disableFlushWindow];
|
[self disableFlushWindow];
|
||||||
|
|
||||||
|
@ -363,6 +369,7 @@ App delegate methods
|
||||||
|
|
||||||
running = YES;
|
running = YES;
|
||||||
g_cmd_out_i = cmd_out_i; // for qprintf
|
g_cmd_out_i = cmd_out_i; // for qprintf
|
||||||
|
Sys_SetStdPrintf (QuakeEd_print);
|
||||||
|
|
||||||
[preferences_i readDefaults];
|
[preferences_i readDefaults];
|
||||||
[project_i initProject];
|
[project_i initProject];
|
||||||
|
|
Loading…
Reference in a new issue