mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3174
This commit is contained in:
parent
107a2f1d90
commit
8ff9f243b4
|
@ -93,7 +93,7 @@ static void cleanup_shared_mem();
|
|||
static int update_app_progress(double frac_done, double cpu_t, double cp_cpu_t, double ws_t);
|
||||
static int set_timer(double period);
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
static bool core_client_is_running() {
|
||||
int retval;
|
||||
bool running = true;
|
||||
|
@ -107,6 +107,7 @@ static bool core_client_is_running() {
|
|||
}
|
||||
return running;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Standard BOINC APIs
|
||||
//
|
||||
|
|
|
@ -39,6 +39,8 @@ BOOL win_loop_done;
|
|||
|
||||
static bool visible = true;
|
||||
|
||||
void KillWindow();
|
||||
|
||||
void SetupPixelFormat(HDC hDC) {
|
||||
int nPixelFormat;
|
||||
|
||||
|
@ -128,8 +130,12 @@ static void make_new_window(int mode) {
|
|||
width = WindowRect.right-WindowRect.left;
|
||||
height = WindowRect.bottom-WindowRect.top;
|
||||
|
||||
ShowWindow(hWnd, SW_SHOW);
|
||||
SetFocus(hWnd);
|
||||
if(current_graphics_mode == MODE_FULLSCREEN || current_graphics_mode == MODE_WINDOW) {
|
||||
ShowWindow(hWnd, SW_SHOW);
|
||||
SetFocus(hWnd);
|
||||
} else {
|
||||
KillWindow();
|
||||
}
|
||||
|
||||
app_graphics_init();
|
||||
}
|
||||
|
@ -195,7 +201,7 @@ LRESULT CALLBACK WndProc(
|
|||
case WM_MBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
if(current_graphics_mode == MODE_FULLSCREEN) {
|
||||
KillWindow();
|
||||
SetMode(MODE_HIDE_GRAPHICS);
|
||||
PostMessage(HWND_BROADCAST, m_uEndSSMsg, 0, 0);
|
||||
}
|
||||
return 0;
|
||||
|
@ -204,7 +210,7 @@ LRESULT CALLBACK WndProc(
|
|||
POINT cPos;
|
||||
GetCursorPos(&cPos);
|
||||
if(cPos.x != mousePos.x || cPos.y != mousePos.y) {
|
||||
KillWindow();
|
||||
SetMode(MODE_HIDE_GRAPHICS);
|
||||
PostMessage(HWND_BROADCAST, m_uEndSSMsg, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -279,11 +285,7 @@ static VOID CALLBACK timer_handler(HWND, UINT, UINT, DWORD) {
|
|||
if (app_client_shm->get_graphics_msg(CORE_APP_GFX_SEG, msg, new_mode)) {
|
||||
switch (msg) {
|
||||
case GRAPHICS_MSG_SET_MODE:
|
||||
if (new_mode == MODE_HIDE_GRAPHICS) {
|
||||
KillWindow();
|
||||
} else {
|
||||
SetMode(new_mode);
|
||||
}
|
||||
SetMode(new_mode);
|
||||
break;
|
||||
case GRAPHICS_MSG_REREAD_PREFS:
|
||||
// only reread graphics prefs if we have a window open
|
||||
|
|
|
@ -10956,3 +10956,19 @@ David Mar 26 2004
|
|||
html/inc/
|
||||
forum.inc
|
||||
util.inc
|
||||
|
||||
Rom Mar 26 2004
|
||||
- Fix a minor bug where after the screen saver shutdown BOINC would fire-up
|
||||
a new SAH Window
|
||||
- Fix a few build breaks in the Windows CC
|
||||
- Tag for a 2.31 release.
|
||||
|
||||
api/
|
||||
boinc_api.c
|
||||
windows_opengl.c
|
||||
client/
|
||||
app.c
|
||||
client/win/
|
||||
wingui_mainwindow.cpp
|
||||
lib/
|
||||
app_ipc.c
|
|
@ -207,7 +207,9 @@ int ACTIVE_TASK::write_app_init_file(APP_INIT_DATA& aid) {
|
|||
aid.host_expavg_credit = wup->project->host_expavg_credit;
|
||||
aid.checkpoint_period = gstate.global_prefs.disk_interval;
|
||||
aid.fraction_done_update_period = DEFAULT_FRACTION_DONE_UPDATE_PERIOD;
|
||||
#ifndef _WIN32
|
||||
aid.shm_key = 0;
|
||||
#endif
|
||||
// when writing the wu_cpu_time to the app init file
|
||||
// use the total cpu time from the start of the session
|
||||
// (starting_cpu_time) rather than the total cpu time
|
||||
|
|
|
@ -48,7 +48,7 @@ BOOL CMyApp::InitInstance()
|
|||
BOINC_DIAG_REDIRECTSTDOUTOVERWRITE |
|
||||
BOINC_DIAG_TRACETOSTDERR;
|
||||
|
||||
boinc_init_diag(dwDiagnosticsFlags);
|
||||
boinc_init_diagnostics(dwDiagnosticsFlags);
|
||||
}
|
||||
catch (boinc_runtime_base_exception e)
|
||||
{
|
||||
|
|
|
@ -68,7 +68,9 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
"<user_expavg_credit>%f</user_expavg_credit>\n"
|
||||
"<host_total_credit>%f</host_total_credit>\n"
|
||||
"<host_expavg_credit>%f</host_expavg_credit>\n"
|
||||
#ifndef _WIN32
|
||||
"<shm_key>%d</shm_key>\n"
|
||||
#endif
|
||||
"<checkpoint_period>%f</checkpoint_period>\n"
|
||||
"<fraction_done_update_period>%f</fraction_done_update_period>\n",
|
||||
ai.wu_cpu_time,
|
||||
|
@ -76,7 +78,9 @@ int write_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
ai.user_expavg_credit,
|
||||
ai.host_total_credit,
|
||||
ai.host_expavg_credit,
|
||||
#ifndef _WIN32
|
||||
ai.shm_key,
|
||||
#endif
|
||||
ai.checkpoint_period,
|
||||
ai.fraction_done_update_period
|
||||
);
|
||||
|
@ -104,7 +108,9 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
|
|||
else if (parse_double(buf, "<host_total_credit>", ai.host_total_credit)) continue;
|
||||
else if (parse_double(buf, "<host_expavg_credit>", ai.host_expavg_credit)) continue;
|
||||
else if (parse_double(buf, "<wu_cpu_time>", ai.wu_cpu_time)) continue;
|
||||
#ifndef _WIN32
|
||||
else if (parse_int(buf, "<shm_key>", ai.shm_key)) continue;
|
||||
#endif
|
||||
else if (parse_double(buf, "<checkpoint_period>", ai.checkpoint_period)) continue;
|
||||
else if (parse_double(buf, "<fraction_done_update_period>", ai.fraction_done_update_period)) continue;
|
||||
else fprintf(stderr, "parse_init_data_file: unrecognized %s", buf);
|
||||
|
|
Loading…
Reference in New Issue