ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/video_x.cpp
(Generate patch)

Comparing SheepShaver/src/Unix/video_x.cpp (file contents):
Revision 1.43 by gbeauche, 2005-06-22T12:24:36Z vs.
Revision 1.44 by gbeauche, 2005-06-22T16:40:24Z

# Line 1023 | Line 1023 | static bool open_display(void)
1023   #endif
1024  
1025          // Zero screen buffers, viRowBytes is initialized at this stage
1026 <        memset(the_buffer, 0, VModes[cur_mode].viRowBytes * VModes[cur_mode].viYsize);
1027 <        memset(the_buffer_copy, 0, VModes[cur_mode].viRowBytes * VModes[cur_mode].viYsize);
1026 >        if (display_open) {
1027 >                memset(the_buffer, 0, VModes[cur_mode].viRowBytes * VModes[cur_mode].viYsize);
1028 >                memset(the_buffer_copy, 0, VModes[cur_mode].viRowBytes * VModes[cur_mode].viYsize);
1029 >        }
1030          return display_open;
1031   }
1032  
# Line 1643 | Line 1645 | bool VideoInit(void)
1645   #endif
1646  
1647          // Open window/screen
1648 <        if (!open_display())
1648 >        if (!open_display()) {
1649 >                ErrorAlert(GetString(STR_OPEN_WINDOW_ERR));
1650                  return false;
1651 +        }
1652  
1653   #if 0
1654          // Ignore errors from now on

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines