V6 GFX: Fix bugs in graphics compatibility with V5 applications

svn path=/trunk/boinc/; revision=13830
This commit is contained in:
Charlie Fenton 2007-10-11 11:02:48 +00:00
parent 3fe9503f96
commit eb9cfe6b20
4 changed files with 25 additions and 0 deletions

View File

@ -9426,3 +9426,13 @@ Charlie 10 Oct 2007
mac_build/
boinc.xcodeproj/
project.pbxproj
Charlie 11 Oct 2007
- V6 GFX: Fix bugs in graphics compatibility with V5 applications:
- Initialize APP_VERSION::graphics_exec_path to empty string.
- Remember previous graphics mode when setting V5 applications
to MODE_FULLSCREEN and restore mode when exiting fullscreen.
client/
app.h
app_graphics.C
client_state.C

View File

@ -116,6 +116,7 @@ public:
// info related to app's graphics mode (win, screensaver, etc.)
//
int graphics_mode_acked; // mode acked by app
int graphics_mode_before_ss; // mode before last screensaver request
double graphics_mode_ack_timeout;
bool exit_requested;
int premature_exit_count;

View File

@ -46,6 +46,18 @@ void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) {
if (!app_client_shm.shm) return;
if (m.mode == MODE_FULLSCREEN) {
// Remember mode before screensaver
graphics_mode_before_ss = graphics_mode_acked;
} else if (graphics_mode_acked != MODE_FULLSCREEN) {
graphics_mode_before_ss = MODE_HIDE_GRAPHICS;
}
if ( (m.mode == MODE_HIDE_GRAPHICS) && (graphics_mode_acked == MODE_FULLSCREEN) ) {
// Restore mode from before screensaver
m.mode = graphics_mode_before_ss;
}
graphics_msg = m; // save graphics_station, desktop, display
strcpy(buf, xml_graphics_modes[m.mode]);

View File

@ -731,6 +731,8 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
);
return ERR_NOT_UNIQUE;
}
avp->graphics_exec_path[0] = 0;
for (i=0; i<avp->app_files.size(); i++) {
FILE_REF& file_ref = avp->app_files[i];