From 4b36adeea6d94a415988a0788f1fd325c074386a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 12 Jun 2004 05:10:54 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3544 --- api/windows_opengl.C | 19 +++++++++++-------- checkin_notes | 14 ++++++++++++++ client/gui_rpc_server.C | 2 -- client/miofile.h | 4 ++++ win_build/boinc_cli.vcproj | 12 ++++++++++++ win_build/boinc_gui.vcproj | 27 +++++++++++++++++++-------- 6 files changed, 60 insertions(+), 18 deletions(-) diff --git a/api/windows_opengl.C b/api/windows_opengl.C index 09abbdd05f..e4aa07c942 100755 --- a/api/windows_opengl.C +++ b/api/windows_opengl.C @@ -157,7 +157,7 @@ void KillWindow() { // - when get mode change msg (via shared mem) // - when in SS mode and get user input // -void SetMode(int mode) { +static void set_mode(int mode) { if (current_graphics_mode != MODE_FULLSCREEN) GetWindowRect(hWnd, &rect); @@ -203,7 +203,7 @@ LRESULT CALLBACK WndProc( case WM_KEYDOWN: case WM_KEYUP: if (current_graphics_mode == MODE_FULLSCREEN) { - SetMode(MODE_HIDE_GRAPHICS); + set_mode(MODE_HIDE_GRAPHICS); PostMessage(HWND_BROADCAST, m_uEndSSMsg, 0, 0); } else { if (uMsg == WM_KEYDOWN) { @@ -220,7 +220,7 @@ LRESULT CALLBACK WndProc( case WM_MBUTTONUP: case WM_RBUTTONUP: if (current_graphics_mode == MODE_FULLSCREEN) { - SetMode(MODE_HIDE_GRAPHICS); + set_mode(MODE_HIDE_GRAPHICS); PostMessage(HWND_BROADCAST, m_uEndSSMsg, 0, 0); } else { int which; @@ -236,7 +236,7 @@ LRESULT CALLBACK WndProc( GetCursorPos(&cPos); if(current_graphics_mode == MODE_FULLSCREEN) { if(cPos.x != mousePos.x || cPos.y != mousePos.y) { - SetMode(MODE_HIDE_GRAPHICS); + set_mode(MODE_HIDE_GRAPHICS); PostMessage(HWND_BROADCAST, m_uEndSSMsg, 0, 0); } } else { @@ -314,11 +314,14 @@ BOOL unreg_win_class() { static VOID CALLBACK timer_handler(HWND, UINT, UINT, DWORD) { RECT rt; int width, height, new_mode, msg; + + // check for graphics-related message from core client + // if (app_client_shm) { if (app_client_shm->get_graphics_msg(CORE_APP_GFX_SEG, msg, new_mode)) { switch (msg) { case GRAPHICS_MSG_SET_MODE: - SetMode(new_mode); + set_mode(new_mode); break; case GRAPHICS_MSG_REREAD_PREFS: // only reread graphics prefs if we have a window open @@ -355,12 +358,12 @@ DWORD WINAPI win_graphics_event_loop( LPVOID gi ) { // Register window class and graphics mode message reg_win_class(); - SetTimer(NULL, 1, 100, &timer_handler); + SetTimer(NULL, 1, 30, &timer_handler); if (boinc_is_standalone()) { - SetMode(MODE_WINDOW); + set_mode(MODE_WINDOW); } else { - SetMode(MODE_HIDE_GRAPHICS); + set_mode(MODE_HIDE_GRAPHICS); } win_loop_done = false; while(!win_loop_done) { diff --git a/checkin_notes b/checkin_notes index fb2637ec22..e3901eb345 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13378,3 +13378,17 @@ David 11 June 2004 lib/ Makefile.am mfile.C,h (moved to here) + +David 11 June 2004 + - get core client to compile on Win + - graphics API: change max frame rate from 10 to 33.3 + + api/ + windows_opengl.C + client/ + gui_rpc_server.C + miofile.h + win_build/ + boinc_cli.vcproj + boinc_gui.vcproj + diff --git a/client/gui_rpc_server.C b/client/gui_rpc_server.C index d04b30da9b..3abcfe4412 100644 --- a/client/gui_rpc_server.C +++ b/client/gui_rpc_server.C @@ -336,8 +336,6 @@ bool GUI_RPC_CONN_SET::poll() { GUI_RPC_CONN* gr; struct timeval tv; - sprintf(buf, "\r\nBOINC RPC Interface %d.%.2d\r\n\r\n", MAJOR_VERSION, MINOR_VERSION); - FD_ZERO(&read_fds); FD_ZERO(&error_fds); FD_SET(lsock, &read_fds); diff --git a/client/miofile.h b/client/miofile.h index 16a2b3be9d..a6cbbf59e4 100644 --- a/client/miofile.h +++ b/client/miofile.h @@ -1,6 +1,10 @@ #ifndef _MIOFILE_ #define _MIOFILE_ +#ifdef _WIN32 +#include "stdafx.h" +#endif + #ifndef _WIN32 #include using namespace std; diff --git a/win_build/boinc_cli.vcproj b/win_build/boinc_cli.vcproj index 4e0ee22182..0387bf9cbb 100644 --- a/win_build/boinc_cli.vcproj +++ b/win_build/boinc_cli.vcproj @@ -758,6 +758,12 @@ CompileAs="2"/> + + + + @@ -1119,6 +1125,12 @@ + + + + diff --git a/win_build/boinc_gui.vcproj b/win_build/boinc_gui.vcproj index 92df994c22..259f758b7c 100644 --- a/win_build/boinc_gui.vcproj +++ b/win_build/boinc_gui.vcproj @@ -97,7 +97,6 @@ Optimization="0" AdditionalIncludeDirectories="../lib/,../api/,../RSAEuro/source/,../client/win/,../client" PreprocessorDefinitions="WIN32;_DEBUG;_MT;_WINDOWS" - MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="2" @@ -105,11 +104,11 @@ PrecompiledHeaderFile=".\Build\Debug\boinc_gui\obj/boinc_gui.pch" AssemblerListingLocation=".\Build\Debug\boinc_gui\obj/" ObjectFile=".\Build\Debug\boinc_gui\obj/" - ProgramDataBaseFileName=".\Build\Debug\boinc_gui\obj/vc70.pdb" + ProgramDataBaseFileName=".\Build\Debug\boinc_gui\obj/" BrowseInformation="1" WarningLevel="3" SuppressStartupBanner="TRUE" - DebugInformationFormat="4" + DebugInformationFormat="3" CompileAs="2"/> @@ -117,7 +116,7 @@ Name="VCLinkerTool" AdditionalDependencies="nafxcwd.lib atlsd.lib libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib advapi32.lib wsock32.lib wininet.lib winmm.lib comdlg32.lib comctl32.lib shell32.lib shlwapi.lib ole32.lib oleaut32.lib oleacc.lib winspool.lib oldnames.lib uuid.lib" OutputFile=".\Build\Debug/boinc_gui.exe" - LinkIncremental="2" + LinkIncremental="1" SuppressStartupBanner="TRUE" AdditionalLibraryDirectories="..\boinc_dll\Debug" IgnoreAllDefaultLibraries="TRUE" @@ -762,6 +761,12 @@ CompileAs="2"/> + + + + @@ -1287,6 +1292,12 @@ + + + + @@ -1367,10 +1378,10 @@ Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + RelativePath="..\client\win\res\boinc.bmp"> + RelativePath="..\client\win\boinc.bmp"> @@ -1390,10 +1401,10 @@ + RelativePath="..\client\win\boincsm.bmp"> + RelativePath="..\client\win\res\boincsm.bmp">