mirror of https://github.com/BOINC/boinc.git
client: Fix compiler warning. MGR: allow showing graphics with or without sandbox for Mac, UNIX, Linux
svn path=/trunk/boinc/; revision=15131
This commit is contained in:
parent
f5acace913
commit
8f937bd8e2
|
@ -3587,3 +3587,13 @@ David May 4 2008
|
|||
whetstone.C
|
||||
clientgui/
|
||||
ViewMessages.cpp
|
||||
|
||||
Charlie May 5 2008
|
||||
- client: Fix compiler warning.
|
||||
- MGR: Fix CMainDocument::WorkShowGraphics() for Mac, UNIX and Linux
|
||||
to allow showing graphics with or without sandbox.
|
||||
|
||||
client/
|
||||
cs_benchmark.C
|
||||
clientgui/
|
||||
MainDocument.cpp
|
||||
|
|
|
@ -154,7 +154,7 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
|
|||
int retval;
|
||||
double vax_mips, int_loops=0, int_time=0, fp_time;
|
||||
|
||||
sprintf(bdp->error_str, "");
|
||||
bdp->error_str[0] = '\0';
|
||||
host_info.clear_host_info();
|
||||
retval = whetstone(host_info.p_fpops, fp_time, MIN_CPU_TIME);
|
||||
if (retval) {
|
||||
|
|
|
@ -1210,24 +1210,28 @@ int CMainDocument::WorkShowGraphics(RESULT* result)
|
|||
// See if we are already running the graphics application for this task
|
||||
previous_gfx_app = GetRunningGraphicsApp(result, slot);
|
||||
|
||||
#ifdef __WXMAC__
|
||||
ProcessSerialNumber gfx_app_psn;
|
||||
#ifndef __WXMSW__
|
||||
char* argv[5];
|
||||
|
||||
if (previous_gfx_app) {
|
||||
#ifdef __WXMAC__
|
||||
ProcessSerialNumber gfx_app_psn;
|
||||
// If this graphics app is already running,
|
||||
// just bring it to the front
|
||||
//
|
||||
if (!GetProcessForPID(previous_gfx_app->pid, &gfx_app_psn)) {
|
||||
SetFrontProcess(&gfx_app_psn);
|
||||
}
|
||||
#endif
|
||||
// If graphics app is already running, don't launch a second instance
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
// For unknown reasons, the graphics application exits with
|
||||
// "RegisterProcess failed (error = -50)" unless we pass its
|
||||
// full path twice in the argument list to execv.
|
||||
//
|
||||
argv[0] = "switcher";
|
||||
// For unknown reasons on Macs, the graphics application
|
||||
// exits with "RegisterProcess failed (error = -50)" unless
|
||||
// we pass its full path twice in the argument list to execv.
|
||||
//
|
||||
argv[1] = (char *)result->graphics_exec_path.c_str();
|
||||
argv[2] = (char *)result->graphics_exec_path.c_str();
|
||||
argv[3] = "--graphics";
|
||||
|
@ -1246,8 +1250,8 @@ int CMainDocument::WorkShowGraphics(RESULT* result)
|
|||
iRetVal = run_program(
|
||||
result->slot_path.c_str(),
|
||||
result->graphics_exec_path.c_str(),
|
||||
3,
|
||||
&argv[1],
|
||||
2,
|
||||
&argv[2],
|
||||
0,
|
||||
id
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue